Skip to content

Commit

Permalink
Updated the tests to check for a fifo size that was previously splitt…
Browse files Browse the repository at this point in the history
…ing with a fifo depth of 1, added an assertion to check all fifo depths are okay
  • Loading branch information
STFleming committed Feb 26, 2025
1 parent 2b55849 commit 4788ebe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/finn/transformation/fpgadataflow/set_fifo_depths.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def decompose_pow2(x):
ret_final = []
for cand_depth in ret_pass2:
if cand_depth <= max_qsrl_depth:
ret_final.append((max(2,cand_depth), "rtl"))
ret_final.append((max(2, cand_depth), "rtl"))
else:
ret_final.append((cand_depth, "vivado"))

Expand Down
3 changes: 2 additions & 1 deletion tests/fpgadataflow/test_split_large_fifos.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_folding_cfg(depth=65536):
@pytest.mark.slow
@pytest.mark.vivado
@pytest.mark.fpgadataflow
@pytest.mark.parametrize("depth", [16384, 65536, 45000])
@pytest.mark.parametrize("depth", [16384, 65536, 45000, 1537])
@pytest.mark.parametrize("force_python_rtlsim", ["True", "False"])
def test_split_large_fifos(depth, force_python_rtlsim):
tmp_output_dir = fetch_test_model("tfc")
Expand Down Expand Up @@ -103,6 +103,7 @@ def test_split_large_fifos(depth, force_python_rtlsim):
inst = getCustomOp(fifo_node)
fifo_depth = inst.get_nodeattr("depth")
assert fifo_depth == golden_cfg[i % len(golden_cfg)][0]
assert fifo_depth > 1

shutil.rmtree(tmp_output_dir)

Expand Down

0 comments on commit 4788ebe

Please sign in to comment.