Skip to content

Random test generator for Reti Logiche 2021-2022 project at Politecnico di Milano

Notifications You must be signed in to change notification settings

GiorgioSeguini/RL-generator-2021-2022

 
 

Repository files navigation

Politecnico di Milano - Progetto Reti Logiche 2021-2022

Test Generator

written in python3

How to install

To install dependencies

pip3 install -r requirements.txt 

or

pip install -r requirements.txt 

depending on system installation

How to generate tests

python3 generator.py

or

python generator.py

depending on system installation

Usage: generator.py [OPTIONS]

Options:
  --size INTEGER   Number of tests to generate  [default: 100]
  --limit INTEGER  Maximum input stream lenght size  [default: 128]
  --help           Show this message and exit.

test_values.txt will contain all details about every single generated test, for debugging. ram_content.txt is the file that will be read by Vivado to load the ram values

Example:

python generator.py --size 1000 --limit 16

How to import in Vivado

You can directly import the gen_testbench_reset.vhd (or gen_testbench_no_reset.vhd) file as source in Vivado, then modify this file to match the folder containing the generated ram files. Instruction on how to modify it are included in the .vhd file itself.

Credits

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

About

Random test generator for Reti Logiche 2021-2022 project at Politecnico di Milano

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • VHDL 74.1%
  • Python 25.9%