aboutsummaryrefslogtreecommitdiff
path: root/sem6/dig/generate_test_file.py
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-24 15:15:24 +0100
committerJulian T <julian@jtle.dk>2021-02-24 15:15:46 +0100
commit92876e17653abd7f46126d7419433c628d303cb8 (patch)
tree053fce8e2f16935756f3570f67112f26cfe6d11f /sem6/dig/generate_test_file.py
parentbf931f790f2ad6f482df38b0f70e0bbd05c401d8 (diff)
Add exercises for m5 dig
Diffstat (limited to 'sem6/dig/generate_test_file.py')
-rwxr-xr-xsem6/dig/generate_test_file.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/sem6/dig/generate_test_file.py b/sem6/dig/generate_test_file.py
index 5a951f2..b97cbe6 100755
--- a/sem6/dig/generate_test_file.py
+++ b/sem6/dig/generate_test_file.py
@@ -113,7 +113,12 @@ architecture behavior of test_{name} is
def wait():
tof(f"wait for {td.get('teststep', 1)} fs;")
- for tindex, t in enumerate(td["testin"]):
+ if "testin" in td:
+ enum = enumerate(td["testin"])
+ else:
+ enum = enumerate([1] * td["testcount"])
+
+ for tindex, t in enum:
# Add clock
if "clk" in td:
tof(f"in_{td['clk']} <= '0';")