Skip to content

Commit

Permalink
Remove tb_file between tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Jun 5, 2019
1 parent 6022f74 commit 1705e47
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def rtl_tester(test_op, data0=None, data1=None, bit0=None, bit1=None, bit2=None,
for filename in libs:
copy_file(os.path.join(cw_dir, filename),
os.path.join(test_dir, filename))
# Seeing a strange issue where ncsim doesn't always recompile between
# tests with a new test bench, because we know for every new system
# verilog test bench that we'll have a new `_tb` file, we just nuke it
# here now to force ncsim to recompile
# See https://github.com/StanfordAHA/lassen/issues/111 for more info
tb_file = os.path.join(test_dir, f"{pe_circuit.name}_tb.sv")
if os.path.exists(tb_file):
os.remove(tb_file)
tester.compile_and_run(target="system-verilog", simulator="ncsim",
directory="tests/build/",
include_verilog_libraries=libs,
Expand Down

0 comments on commit 1705e47

Please sign in to comment.