First clone this repo, then:
pip3 install -r requirements.txt
or
pip install -r requirements.txt
Usage: generator.py [OPTIONS]
Options:
--size INTEGER RANGE Number of tests to generate [default: 100; x>=0]
--limit INTEGER RANGE Maximum input stream size [default: 255; 0<=x<=255]
--randseed INTEGER Random generator seed
--help Show this message and exit.
To generate tests run:
python3 generator.py
or
python generator.py
Example:
python generator.py --size 1000
test_values.txt
: human readable file containing the generated testsram_content.txt
: file used by the Vivado testbench. It contains both the values loaded in RAM before testing your circuit, and the values that it checks after your circuit has finished processing.
- Import
gen_testbench_no_reset.vhd
file in Vivado - Update the file with the correct file paths for
ram_content.txt
,non_passati.txt
andpassati.txt
- Run the simulation using
gen_testbench_no_reset.vhd
as testbench - After the simulation ends, check
non_passati.txt
andpassati.txt
for the results
Based on work of RL-generator-2020-21 by Davide Merli
Pretty print function by Daniele Locatelli
Importing RAM from outside feature by Davide Mornatta
Original testbench code by Mark Zampedroni here