1
0
mirror of https://github.com/corundum/corundum.git synced 2025-01-16 08:12:53 +08:00

Pull out header size as a parameter

Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
Alex Forencich 2023-06-29 15:48:39 -07:00
parent 77adf30dad
commit f705646e3e
4 changed files with 16 additions and 8 deletions

View File

@ -86,11 +86,13 @@ module arp_eth_rx #
output wire error_invalid_header
);
parameter CYCLE_COUNT = (28+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter HDR_SIZE = 28;
parameter CYCLE_COUNT = (HDR_SIZE+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter PTR_WIDTH = $clog2(CYCLE_COUNT);
parameter OFFSET = 28 % KEEP_WIDTH;
parameter OFFSET = HDR_SIZE % KEEP_WIDTH;
// bus width assertions
initial begin

View File

@ -82,11 +82,13 @@ module arp_eth_tx #
output wire busy
);
parameter CYCLE_COUNT = (28+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter HDR_SIZE = 28;
parameter CYCLE_COUNT = (HDR_SIZE+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter PTR_WIDTH = $clog2(CYCLE_COUNT);
parameter OFFSET = 28 % KEEP_WIDTH;
parameter OFFSET = HDR_SIZE % KEEP_WIDTH;
// bus width assertions
initial begin

View File

@ -77,11 +77,13 @@ module eth_axis_rx #
output wire error_header_early_termination
);
parameter CYCLE_COUNT = (14+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter HDR_SIZE = 14;
parameter CYCLE_COUNT = (HDR_SIZE+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter PTR_WIDTH = $clog2(CYCLE_COUNT);
parameter OFFSET = 14 % KEEP_WIDTH;
parameter OFFSET = HDR_SIZE % KEEP_WIDTH;
// bus width assertions
initial begin

View File

@ -76,11 +76,13 @@ module eth_axis_tx #
output wire busy
);
parameter CYCLE_COUNT = (14+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter HDR_SIZE = 14;
parameter CYCLE_COUNT = (HDR_SIZE+KEEP_WIDTH-1)/KEEP_WIDTH;
parameter PTR_WIDTH = $clog2(CYCLE_COUNT);
parameter OFFSET = 14 % KEEP_WIDTH;
parameter OFFSET = HDR_SIZE % KEEP_WIDTH;
// bus width assertions
initial begin