Giter Site home page Giter Site logo

thegoldgoat / rl-generator-2021-2022 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from giorgioseguini/rl-generator-2021-2022

1.0 0.0 0.0 20.46 MB

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

Python 41.98% VHDL 58.02%

rl-generator-2021-2022's Introduction

Politecnico di Milano - Progetto Reti Logiche 2021-2022

How to install

First clone this repo, then:

pip3 install -r requirements.txt

or

pip install -r requirements.txt

How to generate tests

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

Output

  1. test_values.txt: human readable file containing the generated tests
  2. ram_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.

How to use in Vivado

  1. Import gen_testbench_no_reset.vhd file in Vivado
  2. Update the file with the correct file paths for ram_content.txt, non_passati.txt and passati.txt
  3. Run the simulation using gen_testbench_no_reset.vhd as testbench
  4. After the simulation ends, check non_passati.txt and passati.txt for the results

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

rl-generator-2021-2022's People

Contributors

alessandrozito98 avatar davidemerli avatar davidemornatta avatar giorgioseguini avatar thegoldgoat avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.