Skip to content

Commit 4788ebe

Browse files
committed
Updated the tests to check for a fifo size that was previously splitting with a fifo depth of 1, added an assertion to check all fifo depths are okay
1 parent 2b55849 commit 4788ebe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/finn/transformation/fpgadataflow/set_fifo_depths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ def decompose_pow2(x):
539539
ret_final = []
540540
for cand_depth in ret_pass2:
541541
if cand_depth <= max_qsrl_depth:
542-
ret_final.append((max(2,cand_depth), "rtl"))
542+
ret_final.append((max(2, cand_depth), "rtl"))
543543
else:
544544
ret_final.append((cand_depth, "vivado"))
545545

tests/fpgadataflow/test_split_large_fifos.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def get_folding_cfg(depth=65536):
6363
@pytest.mark.slow
6464
@pytest.mark.vivado
6565
@pytest.mark.fpgadataflow
66-
@pytest.mark.parametrize("depth", [16384, 65536, 45000])
66+
@pytest.mark.parametrize("depth", [16384, 65536, 45000, 1537])
6767
@pytest.mark.parametrize("force_python_rtlsim", ["True", "False"])
6868
def test_split_large_fifos(depth, force_python_rtlsim):
6969
tmp_output_dir = fetch_test_model("tfc")
@@ -103,6 +103,7 @@ def test_split_large_fifos(depth, force_python_rtlsim):
103103
inst = getCustomOp(fifo_node)
104104
fifo_depth = inst.get_nodeattr("depth")
105105
assert fifo_depth == golden_cfg[i % len(golden_cfg)][0]
106+
assert fifo_depth > 1
106107

107108
shutil.rmtree(tmp_output_dir)
108109

0 commit comments

Comments
 (0)