Simply RISC S1 Core - Simulation Environment
|
Simply RISC S1 Core - Simulation Environment
|
============================================
|
============================================
|
|
|
To run a simulation using the free software Icarus Verilog
|
To run a simulation using the free software Icarus Verilog
|
simulator use the following commands:
|
simulator use the following commands:
|
|
|
build_icarus
|
build_icarus
|
run_icarus
|
run_icarus
|
|
|
If you want to use a commercial tool such as Synopsys VCS then
|
If you want to use a commercial tool such as Synopsys VCS then
|
set up your PATH enviroment variable so that you are able to
|
set up your PATH enviroment variable so that you are able to
|
find the "vcs" executable, and then type in the following
|
find the "vcs" executable, and then type in the following
|
commands:
|
commands:
|
|
|
build_vcs
|
build_vcs
|
run_vcs
|
run_vcs
|
|
|
Within this design the only visible difference between Icarus
|
Within this design the only visible difference between Icarus
|
and VCS is the speed: the commercial tool could be hundreds of
|
and VCS is the speed: the commercial tool could be hundreds of
|
times faster than its FLOSS counterpart; but with Icarus if
|
times faster than its FLOSS counterpart; but with Icarus if
|
you have time to wait for some minutes you will obtain exactly
|
you have time to wait for some minutes you will obtain exactly
|
the same results just using free software.
|
the same results just using free software.
|
|
|
At the end of the simulation you can look at the logfile and
|
At the end of the simulation you can look at the logfile and
|
at the waveforms placed at the following paths:
|
at the waveforms placed at the following paths:
|
|
|
run/sim/icarus/sim.log
|
run/sim/icarus/sim.log
|
run/sim/icarus/trace.vcd
|
run/sim/icarus/trace.vcd
|
|
|
run/sim/vcs/sim.log
|
run/sim/vcs/sim.log
|
run/sim/vcs/trace.vcd
|
run/sim/vcs/trace.vcd
|
|
|
Obviously if you do not have access to a commercial tool you
|
Obviously if you do not have access to a commercial tool you
|
can use GTKWave to look at the waveforms: for instance from
|
can use GTKWave to look at the waveforms: for instance from
|
the top-level directory just type in the following command:
|
the top-level directory just type in the following command:
|
|
|
gtkwave run/sim/icarus/trace.vcd &
|
gtkwave run/sim/icarus/trace.vcd &
|
|
|
and then from "File|Read Save File" choose the file named
|
and then from "File|Read Save File" choose the file named
|
"tools/src/gtkwave.sav".
|
"tools/src/gtkwave.sav".
|
|
|
|
|