Skip to content
Jens Janssen edited this page Sep 9, 2015 · 31 revisions

Preparing for Simulation

To run the simulation together with FE-I4A the following prerequisites needs to be installed:

pyBAR and basil

Please clone the pyBAR and basil git repository and place it into the same directory (e.g. “dev” folder).

FE-I4A Sources

If you want to run simulation with another firmware than the default one, FE-I4A Source are necessary. The FE-I4A sources are available to ATLAS members and can be downloaded here. Check out the SVN repository and place it into the same folder where pyBAR and basil are placed.

If no change to the firmware is necessary, the existing sim_build.zip can be used to run the simulation.

cocotb

Download and extract cocotb. Export cocotb path:

export COCOTB=/path/to/cocotb

Icarus Verilog

Install Icarus Verilog via package manager (Ubuntu strongly recommended):

sudo add-apt-repository -y ppa:team-electronics/ppa
sudo apt-get update
sudo apt-get install iverilog-daily

GTKWave

Install GTKWave via package manager:

sudo apt-get install gtkwave

XILINX Unisims

Export path to folder containing unisims folder (Xilinx Simulation Library):

export XILINX=/path/to/folder/containing/unisims/folder

Generating sim.vvp from Latest Firmware

Cd into firmware/mio/cosim and run:

make -f Makefile results.xml
Zip the sim_build directory and and move the sim_build.zip into tests/test_interface.
Note: The process might not finish, but the sim.vvp is created.

Running the Simulation

Starting the Simulation

Cd into tests and run:

python test_interface.py

Waveforms

Opening waveform with:

gtkwave tb.vcd

Q&A

  1. Q: The following error occurs:
    vvp: symbol lookup error: /home/jens/miniconda/lib/libreadline.so.6: undefined symbol: PC
     
    A: Uninstall readline package:
    conda uninstall readline
    or remove library:
    rm -f /path/to/miniconda/envs/test-environment/lib/libreadline.so.6
Clone this wiki locally