Visible to Intel only — GUID: uzb1635578318763
Ixiasoft
1.5. Simulating the Design Example Testbench
Procedure
Follow these steps to simulate the testbench:
- At the command prompt, change to the testbench simulation directory <design_example_dir>/example_testbench.
cd <my_design>/example_testbench
- Run quartus_tlg on the generated project file:
- For CPRI Multirate Design Example:
quartus_tlg cpriphy_dr_ed_hw
- For Ethernet Multirate Design Example:
quartus_tlg eth_f_hw
- For CPRI Multirate Design Example:
- Run ip-setup-simulation:
- For CPRI Multirate Design Example:
ip-setup-simulation –output-directory=./sim_script \ –quartus-project=cpriphy_dr_ed_dut_hw.qpf
- For Ethernet Multirate Design Example:
ip-setup-simulation –output-directory=./sim_script \ –quartus-project=eth_f_hw.qpf
- For CPRI Multirate Design Example:
- Run the simulation script for the supported simulator of your choice. The script compiles and runs the testbench in the simulator. Refer to the table Steps to Simulate the Testbench.
- Analyze the results. The successful simulation displays "Testbench Passed" message.
Table 6. Steps to Simulate the Testbench in Synopsys VCS* Simulator Simulator Instructions VCS* In the command line, type: sh run_vcs.sh
VCS* MX In the command line, type: sh run_vcsmx.sh
ModelSim* SE or Questa* In the command line, type: vsim -do run_vsim.do
If you prefer to simulate without bringing up the GUI, type:vsim -c -do run_vsim.do
Xcelium* In the command line, type: sh run_xcelium.sh
The following sample output illustrates a successful simulation test run for the CPRI multirate design example testbench.NIOS is entering reset NIOS is exiting reset basic_avl_tb_top.cpriphy_dr_ed_hw__tiles.z1577a_x0_y0_n0.z1577a.z1577a_inst.PROTECTED: The downstream component is backpressuring by deasserting ready, but the upstream component can't be backpressured. SIM Mode Conversion TX AM PERIOD Standard Mode: 163832 Sim Mode: 2552 ** Info: Configuring ED to CPRI 10G .... ** Info: Wait for DR Ready.... ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Starting CPRI 10G.... ** Address offset = 0x1, WriteData = 0x00000001 ** Address offset = 0x2, WriteData = 0x00008006 ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Trigger DR interrupt ** Address offset = 0x0, WriteData = 0x00000001 ** Info: Wait for DR interrupt Ack.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: Wait for DR Config to be done.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: DONE Reconfigure to CPRI 10G .... ** Address offset = 0x0, WriteData = 0x00000009 ** Address offset = 0x1, WriteData = 0x00000009 ** Info: De-asserting reset to CPRI .... Waiting for TX ready TX is ready is high at time 689130000 Waiting for RX ready RX is ready is high at time 709850000 *** sending packets in progress, waiting for checker pass *** ** Channel 0: RX checker has received packets correctly! ** PASSED ** Info: Configuring ED to CPRI 9p8G .... ** Info: Wait for DR Ready.... ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Starting CPRI 9p8G.... ** Address offset = 0x1, WriteData = 0x00000006 ** Address offset = 0x2, WriteData = 0x00008007 ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Trigger DR interrupt ** Address offset = 0x0, WriteData = 0x00000001 ** Info: Wait for DR interrupt Ack.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: Wait for DR Config to be done.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: DONE Reconfigure to CPRI 9p8G .... ** Address offset = 0x0, WriteData = 0x00000006 ** Address offset = 0x1, WriteData = 0x00000006 ** Info: De-asserting reset to CPRI .... Waiting for TX ready TX is ready is high at time 1561660000 Waiting for RX ready RX is ready is high at time 1579800000 *** sending packets in progress, waiting for checker pass *** ** Channel 0: RX checker has received packets correctly! ** PASSED ** Info: Configuring ED to CPRI 4p9G .... ** Info: Wait for DR Ready.... ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Starting CPRI 4p9G.... ** Address offset = 0x1, WriteData = 0x00000007 ** Address offset = 0x2, WriteData = 0x00008009 ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Trigger DR interrupt ** Address offset = 0x0, WriteData = 0x00000001 ** Info: Wait for DR interrupt Ack.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: Wait for DR Config to be done.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: DONE Reconfigure to CPRI 4p9G .... ** Address offset = 0x0, WriteData = 0x00000004 ** Address offset = 0x1, WriteData = 0x00000004 ** Info: De-asserting reset to CPRI .... Waiting for TX ready TX is ready is high at time 2415120000 Waiting for RX ready RX is ready is high at time 2433780000 *** sending packets in progress, waiting for checker pass *** ** Channel 0: RX checker has received packets correctly! ** PASSED ** Info: Configuring ED to CPRI 2p4G .... ** Info: Wait for DR Ready.... ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Starting CPRI 2p4G.... ** Address offset = 0x1, WriteData = 0x00000009 ** Address offset = 0x2, WriteData = 0x0000800b ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Trigger DR interrupt ** Address offset = 0x0, WriteData = 0x00000001 ** Info: Wait for DR interrupt Ack.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: Wait for DR Config to be done.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: DONE Reconfigure to CPRI 2p4G .... ** Address offset = 0x0, WriteData = 0x00000002 ** Address offset = 0x1, WriteData = 0x00000002 ** Info: De-asserting reset to CPRI .... Waiting for TX ready TX is ready is high at time 3269140000 Waiting for RX ready RX is ready is high at time 3287790000 *** sending packets in progress, waiting for checker pass *** ** Channel 0: RX checker has received packets correctly! ** PASSED ** Info: Configuring ED to CPRI 24p3G_RSFEC .... ** Info: Wait for DR Ready.... ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Starting CPRI 24p3G_RSFEC.... ** Address offset = 0x1, WriteData = 0x0000000b ** Address offset = 0x2, WriteData = 0x00008001 ** Address offset = 0x0, ReadData = 0x00000002 ** Info: Trigger DR interrupt ** Address offset = 0x0, WriteData = 0x00000001 ** Info: Wait for DR interrupt Ack.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: Wait for DR Config to be done.... ** Address offset = 0x0, ReadData = 0x00000000 ** Info: DONE Reconfigure to CPRI 24p3G_RSFEC .... ** Address offset = 0x0, WriteData = 0x0000001b ** Address offset = 0x1, WriteData = 0x0000001b ** Info: De-asserting reset to CPRI .... Waiting for TX ready TX is ready is high at time 4158420000 Waiting for RX ready RX is ready is high at time 4196310000 *** sending packets in progress, waiting for checker pass *** ** Channel 0: RX checker has received packets correctly! ** PASSED ** Testbench Completed ** Testbench Passed $finish called from file "basic_avl_tb_top.sv", line 452. $finish at simulation time 4196335ns
The following sample output illustrates a successful simulation test run for the 100G-4 Ethernet multirate dynamic reconfiguration IP core variant.---SRC IP sequence TX ch0 completed ---- ---SRC IP sequence TX ch1 completed ---- ---SRC IP sequence RX ch0 completed ---- ---SRC IP sequence RX ch1 completed ---- ---Test 50G ch 0; ---Total 16 packets to send ---- Clearing counters -----Start 50G pkt gen TX ---- -----Checking 50G Packet TX/RX result ---- ---------- 16 packets Sent; 0 packets Received ---- ------ALL 16 packets Sent out --- ---------- 16 packets Sent; 16 packets Received ---- ------ALL 16 packets Received --- ------50G TX/RX packet check OK --- ---Test 50G ch 1; ---Total 32 packets to send ---- Clearing counters -----Start 50G pkt gen TX ---- -----Checking 50G Packet TX/RX result ---- ---------- 16 packets Sent; 0 packets Received ---- ---------- 32 packets Sent; 32 packets Received ---- ------ALL 32 packets Sent out --- ------ALL 32 packets Received --- ------50G TX/RX packet check OK --- ******************************************* ** Testbench complete ** Testbench Passed ** *******************************************