aboutsummaryrefslogtreecommitdiff
path: root/sem6
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-24 15:26:37 +0100
committerJulian T <julian@jtle.dk>2021-02-24 15:26:37 +0100
commitc0b0284ddb243f2d19303af9575f5212bca0fe82 (patch)
treebdd8e557086c7082664629cbe641c77e3f2a7a4f /sem6
parent92876e17653abd7f46126d7419433c628d303cb8 (diff)
Add some simple documentation of the generate_test_file script
Diffstat (limited to 'sem6')
-rwxr-xr-xsem6/dig/generate_test_file.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/sem6/dig/generate_test_file.py b/sem6/dig/generate_test_file.py
index b97cbe6..2b8e37a 100755
--- a/sem6/dig/generate_test_file.py
+++ b/sem6/dig/generate_test_file.py
@@ -1,5 +1,18 @@
#!/usr/bin/env python
-# WOW THIS IS TERRIBLE
+"""
+WOW THIS IS TERRIBLE
+====
+Documentation of the file definition thing
+====
+Its just a json string with the following values
+ inputs: List of inputs, vectors are defined with "name,a,b" which becomes "std_logic_vector(a downto b)". Do not include the clock inhere if the "clk" param is used.
+ outputs: Same as inputs but outputs. These are not checked, but they are added as signals to the output wave thing.
+ testin: Test statements. Must be a 2D list or something like that, with [testindex][input_in_order]. ["0000", "0000"] is valid if there is 4 inputs, vectors are given as strings: [["0000", "1"]].
+ testcount: Run number of times without any testinput. Handy if there are no inputs but a clock.
+ clk: Define a new input to use as clock. The clock will be pulsed for every "testin", thus making the test twice as long.
+ teststep: How long to wait with between each pulse. When using clk, it is the time between each pulse.
+"""
+
import json
import argparse
import re