a test bench includes one test bench controller that excecutes reset (verilog, prs), the
simulation step and the time out/end of the simulation (verilog)
Note:
because the controller sets the time out in verilog set your simulation time in your simulator to way more than needed, the TB will end the simulation for you!
this unit is called **control**, it reads a file with the name `control.csv`.
step 0 is the test initialisation - so the reset sequence - and is always
executed, it can not be used in the test bench.
verilog: wait statements are in ns (default for candence AMS) but can be changed in the simulatior options.
actsim: 0 means no wait, any positive number is waiting untill all signals have settled "cycle" (@TODO not supported yet)
the controll needs to be connected to sources, checkers and dumps, with both sim_step and done (excep dump)
before the test bench proceeds to the next simulation step, it waits until
- all sources have sent their test vectors
- all checkes have recieved all exspeced inputs
- the specified wait time for the simulation step has elapsed after the 2 conditions above have been satisfied.
## The Sources
the async sources present a word and initiate a handshake.
the csv format is: ``` <simulation_step>; <datatosend>```
the file name is `source_<ID>.csv`. the ID is a variable specified during the buiding of the test bench, the numbering does not have to be consecutive.
for the normal sources excl. fifo/serial, the maximum vector width is assumed with 64 bits, as limited by actsim plugin system
the simultaion_step has to be >= 1
## The Checkers
the testers compare the in coming data to the vectors written in the csv
file.
there are different checkers:
- check in order: all vectors have to appear in the order of the file inside a simulation step
- check out of order: all vector can appear in random order, but each vector can only be used once.
the csv format is: ``` <simulation_step>; <datatosend>```
the file name is `check_<ID>.csv`. the ID is a variable specified during the buiding of the test bench, the numbering does not have to be consecutive.
for the normal checkers excl. fifo/serial, the maximum vector width is assumed with 64 bits, as limited by actsim plugin system
## The Dumpers
the dumpers just write any incomming vector to file with format:
the csv format is: ``` <simulation_step>; <datatosend>```
the file name is `dump_<ID>.csv`. the ID is a variable specified during the buiding of the test bench, the numbering does not have to be consecutive.
the maximum vector width is assumed with 64 bits, as limited by actsim plugin system
## CSV file stucture and location
currenty the files are read and searched in the excecution folder of actsim.