mirror of
https://github.com/corundum/corundum.git
synced 2025-01-16 08:12:53 +08:00
Compute DEPTH based on FIFO data width
Signed-off-by: Alex Forencich <alex@alexforencich.com>
This commit is contained in:
parent
7febd080c9
commit
3a665f0ded
@ -32,10 +32,10 @@ MODULE = test_$(DUT)
|
||||
VERILOG_SOURCES += ../../rtl/$(DUT).v
|
||||
|
||||
# module parameters
|
||||
export PARAM_DEPTH := 1024
|
||||
export PARAM_DATA_WIDTH := 8
|
||||
export PARAM_KEEP_ENABLE := $(shell expr $(PARAM_DATA_WIDTH) \> 8 )
|
||||
export PARAM_KEEP_WIDTH := $(shell expr \( $(PARAM_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_KEEP_ENABLE := $(shell echo $$(( $(PARAM_DATA_WIDTH) > 8 )))
|
||||
export PARAM_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_DEPTH := $(shell echo $$(( 1024 * $(PARAM_KEEP_WIDTH) )))
|
||||
export PARAM_LAST_ENABLE := 1
|
||||
export PARAM_ID_ENABLE := 1
|
||||
export PARAM_ID_WIDTH := 8
|
||||
|
@ -595,10 +595,10 @@ def test_axis_async_fifo(request, data_width, ram_pipeline, output_fifo,
|
||||
|
||||
parameters = {}
|
||||
|
||||
parameters['DEPTH'] = 1024
|
||||
parameters['DATA_WIDTH'] = data_width
|
||||
parameters['KEEP_ENABLE'] = int(parameters['DATA_WIDTH'] > 8)
|
||||
parameters['KEEP_WIDTH'] = (parameters['DATA_WIDTH'] + 7) // 8
|
||||
parameters['DEPTH'] = 1024 * parameters['KEEP_WIDTH']
|
||||
parameters['LAST_ENABLE'] = 1
|
||||
parameters['ID_ENABLE'] = 1
|
||||
parameters['ID_WIDTH'] = 8
|
||||
|
@ -34,13 +34,13 @@ VERILOG_SOURCES += ../../rtl/axis_async_fifo.v
|
||||
VERILOG_SOURCES += ../../rtl/axis_adapter.v
|
||||
|
||||
# module parameters
|
||||
export PARAM_DEPTH := 1024
|
||||
export PARAM_S_DATA_WIDTH := 8
|
||||
export PARAM_S_KEEP_ENABLE := $(shell expr $(PARAM_S_DATA_WIDTH) \> 8 )
|
||||
export PARAM_S_KEEP_WIDTH := $(shell expr \( $(PARAM_S_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_S_KEEP_ENABLE := $(shell echo $$(( $(PARAM_S_DATA_WIDTH) > 8 )))
|
||||
export PARAM_S_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_S_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_M_DATA_WIDTH := 8
|
||||
export PARAM_M_KEEP_ENABLE := $(shell expr $(PARAM_M_DATA_WIDTH) \> 8 )
|
||||
export PARAM_M_KEEP_WIDTH := $(shell expr \( $(PARAM_M_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_M_KEEP_ENABLE := $(shell echo $$(( $(PARAM_M_DATA_WIDTH) > 8 )))
|
||||
export PARAM_M_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_M_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_DEPTH := $(shell echo $$(( 1024 * ($(PARAM_S_KEEP_WIDTH) > $(PARAM_M_KEEP_WIDTH) ? $(PARAM_S_KEEP_WIDTH) : $(PARAM_M_KEEP_WIDTH)) )))
|
||||
export PARAM_ID_ENABLE := 1
|
||||
export PARAM_ID_WIDTH := 8
|
||||
export PARAM_DEST_ENABLE := 1
|
||||
|
@ -590,13 +590,13 @@ def test_axis_async_fifo_adapter(request, s_data_width, m_data_width, frame_fifo
|
||||
|
||||
parameters = {}
|
||||
|
||||
parameters['DEPTH'] = 1024
|
||||
parameters['S_DATA_WIDTH'] = s_data_width
|
||||
parameters['S_KEEP_ENABLE'] = int(parameters['S_DATA_WIDTH'] > 8)
|
||||
parameters['S_KEEP_WIDTH'] = (parameters['S_DATA_WIDTH'] + 7) // 8
|
||||
parameters['M_DATA_WIDTH'] = m_data_width
|
||||
parameters['M_KEEP_ENABLE'] = int(parameters['M_DATA_WIDTH'] > 8)
|
||||
parameters['M_KEEP_WIDTH'] = (parameters['M_DATA_WIDTH'] + 7) // 8
|
||||
parameters['DEPTH'] = 1024 * max(parameters['S_KEEP_WIDTH'], parameters['M_KEEP_WIDTH'])
|
||||
parameters['ID_ENABLE'] = 1
|
||||
parameters['ID_WIDTH'] = 8
|
||||
parameters['DEST_ENABLE'] = 1
|
||||
|
@ -32,10 +32,10 @@ MODULE = test_$(DUT)
|
||||
VERILOG_SOURCES += ../../rtl/$(DUT).v
|
||||
|
||||
# module parameters
|
||||
export PARAM_DEPTH := 1024
|
||||
export PARAM_DATA_WIDTH := 8
|
||||
export PARAM_KEEP_ENABLE := $(shell expr $(PARAM_DATA_WIDTH) \> 8 )
|
||||
export PARAM_KEEP_WIDTH := $(shell expr \( $(PARAM_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_KEEP_ENABLE := $(shell echo $$(( $(PARAM_DATA_WIDTH) > 8 )))
|
||||
export PARAM_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_DEPTH := $(shell echo $$(( 1024 * $(PARAM_KEEP_WIDTH) )))
|
||||
export PARAM_LAST_ENABLE := 1
|
||||
export PARAM_ID_ENABLE := 1
|
||||
export PARAM_ID_WIDTH := 8
|
||||
|
@ -374,10 +374,10 @@ def test_axis_fifo(request, data_width, ram_pipeline, output_fifo,
|
||||
|
||||
parameters = {}
|
||||
|
||||
parameters['DEPTH'] = 1024
|
||||
parameters['DATA_WIDTH'] = data_width
|
||||
parameters['KEEP_ENABLE'] = int(parameters['DATA_WIDTH'] > 8)
|
||||
parameters['KEEP_WIDTH'] = (parameters['DATA_WIDTH'] + 7) // 8
|
||||
parameters['DEPTH'] = 1024 * parameters['KEEP_WIDTH']
|
||||
parameters['LAST_ENABLE'] = 1
|
||||
parameters['ID_ENABLE'] = 1
|
||||
parameters['ID_WIDTH'] = 8
|
||||
|
@ -34,13 +34,13 @@ VERILOG_SOURCES += ../../rtl/axis_fifo.v
|
||||
VERILOG_SOURCES += ../../rtl/axis_adapter.v
|
||||
|
||||
# module parameters
|
||||
export PARAM_DEPTH := 1024
|
||||
export PARAM_S_DATA_WIDTH := 8
|
||||
export PARAM_S_KEEP_ENABLE := $(shell expr $(PARAM_S_DATA_WIDTH) \> 8 )
|
||||
export PARAM_S_KEEP_WIDTH := $(shell expr \( $(PARAM_S_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_S_KEEP_ENABLE := $(shell echo $$(( $(PARAM_S_DATA_WIDTH) > 8 )))
|
||||
export PARAM_S_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_S_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_M_DATA_WIDTH := 8
|
||||
export PARAM_M_KEEP_ENABLE := $(shell expr $(PARAM_M_DATA_WIDTH) \> 8 )
|
||||
export PARAM_M_KEEP_WIDTH := $(shell expr \( $(PARAM_M_DATA_WIDTH) + 7 \) / 8 )
|
||||
export PARAM_M_KEEP_ENABLE := $(shell echo $$(( $(PARAM_M_DATA_WIDTH) > 8 )))
|
||||
export PARAM_M_KEEP_WIDTH := $(shell echo $$(( ( $(PARAM_M_DATA_WIDTH) + 7 ) / 8 )))
|
||||
export PARAM_DEPTH := $(shell echo $$(( 1024 * ($(PARAM_S_KEEP_WIDTH) > $(PARAM_M_KEEP_WIDTH) ? $(PARAM_S_KEEP_WIDTH) : $(PARAM_M_KEEP_WIDTH)) )))
|
||||
export PARAM_ID_ENABLE := 1
|
||||
export PARAM_ID_WIDTH := 8
|
||||
export PARAM_DEST_ENABLE := 1
|
||||
|
@ -373,13 +373,13 @@ def test_axis_fifo_adapter(request, s_data_width, m_data_width, frame_fifo, drop
|
||||
|
||||
parameters = {}
|
||||
|
||||
parameters['DEPTH'] = 1024
|
||||
parameters['S_DATA_WIDTH'] = s_data_width
|
||||
parameters['S_KEEP_ENABLE'] = int(parameters['S_DATA_WIDTH'] > 8)
|
||||
parameters['S_KEEP_WIDTH'] = (parameters['S_DATA_WIDTH'] + 7) // 8
|
||||
parameters['M_DATA_WIDTH'] = m_data_width
|
||||
parameters['M_KEEP_ENABLE'] = int(parameters['M_DATA_WIDTH'] > 8)
|
||||
parameters['M_KEEP_WIDTH'] = (parameters['M_DATA_WIDTH'] + 7) // 8
|
||||
parameters['DEPTH'] = 1024 * max(parameters['S_KEEP_WIDTH'], parameters['M_KEEP_WIDTH'])
|
||||
parameters['ID_ENABLE'] = 1
|
||||
parameters['ID_WIDTH'] = 8
|
||||
parameters['DEST_ENABLE'] = 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user