This document describes the steps required to run functional simulation of Altera Qsys design in Riviera-PRO. The Qsys tutorial design example is used to demonstrate the flow.
This application note assumes the following:
You have the following software installed and licensed:
Altera Quartus® II version 14.1 or later, and all necessary devices from Altera
Riviera-PRO 2015.02 or later
You have downloaded the Qsys tutorial design example (tt_qsys_design.zip) used in this application note. You can download it from the Qsys Tutorial Design Example web page.
You have followed the instructions provided in chapter 5 of the Qsys System Design Tutorial and have generated the rivierapro_setup.tcl script.
Once you generate the simulation models in Qsys, the rivierapro_setup.tcl script is generated in the tt_qsys_design/simulation_tutorial/ pattern_generator/testbench/ pattern_generator_tb/simulation/aldec folder.
Figure 1. rivierapro_setup.tcl script
Open Riviera-PRO. Change the location to point to the rivierapro_setup.tcl script. Execute the following command from the Console:
cd <path to the design>/tt_qsys_design/simulation_tutorial/pattern_generator/testbench/pattern_generator_tb/simulation/aldec
where <path to the design> points to the folder where you extracted the tt_qsys_design_zip archive. Alternatively, you may also navigate using the Filesystem window.
Figure 2. File system window in Riviera-PRO
Open the rivierapro_setup.tcl script. This script sets up all necessary environment variables, compiles Altera libraries, compiles design files, and initializes the simulation. The script can be executed as is, or you can modify any of the commands in it according to your needs.
Table 1, shown below, provides the description of the alias commands used in the script. The commands described below are the alias commands that are defined in the rivierapro_setup.tcl script:
dev_com |
for compilation device library files |
com |
for compilation the design files |
elab |
for elaboration top level design (top level design is defined in script by TOP_LEVEL_NAME variable) |
elab_debug |
for elaboration the top level design with optimization disabled (with -dbg -o2 options) |
ld |
for compilation all the design files and elaboration the top level design |
ld_debug |
for compilation all the design files and elaboration the top level design with optimization disabled with -dbg -o2 options) |
Modify line 33 as follows and save the script:
set QSYS_SIMDIR "../../.."
Execute the script. Right-click the script in the Filesystem window and select Execute from the drop-down menu.
Figure 3. Executing a script in Riviera-PRO
Execute the dev_com command from the Console. This will compile the following libraries:
altera_ver
lpm_ver
sgate_ver
altera_mf_ver
altera_lnsim_ver
cycloneiii_ver
Execute the com command from the Console. This will compile design source files
Execute the elab command from the Console. This will initialize the simulation.
Run the simulation by executing the run 40us command from the Console.
Altera Qsys designs can be successfully simulated in Riviera-PRO. To get detailed information about creating a system with Altera Qsys, refer to the following link:
http://www.altera.com/literature/hb/qts/qsys_intro.pdf?GSA_pos=1&WT.oss_r=1&WT.oss=qsys
If you have difficulty simulating the Qsys design in Riviera-PRO, please contact Aldec Support via customer portal