From c0b0284ddb243f2d19303af9575f5212bca0fe82 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 24 Feb 2021 15:26:37 +0100 Subject: Add some simple documentation of the generate_test_file script --- sem6/dig/generate_test_file.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sem6/dig') 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 -- cgit v1.2.3