URL
https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk
Subversion Repositories riscv_vhdl
[/] [riscv_vhdl/] [trunk/] [docs/] [doxygen/] [04_rtl_verif.doxy] - Rev 5
Compare with Previous | Blame | View Log
/** @page verification_page RTL Verification@section sim_tb_link Top-level simulation@par Test-bench exampleUse file <b>work/tb/riscv_soc_tb.vhd</b> to run simulation scenario. You canget the following time diagram after simulation of 2 ms interval.<img src="../doxygen/pics/soc_sim.png" alt="Simulating top">@latexonly {\includegraphics[scale=0.75]{../doxygen/pics/soc_sim.png}} @endlatexonly@note Simulation behaviour depends of current firmware image. It maysignificantly differs in a new releases either as Zephyr OS kernelimage is absolutely different relative GNSS FW image.Some FW versions can detect RTL simulation target by reading <i>'Target'Register</i> in PnP device that allows to speed-up simulationby removing some delays and changing Devices IO parameters (UART speedfor example).@par Running on FPGASupported FPGA:<ul><li>ML605 with Virtex6 FPGA using ISE 14.7 (default).</li><li>KC705 with Kintex7 FPGA using Vivado 2015.4.</li></ul>@warning In a case of using GNSS FW without connected RF front-enddon't forget to <em><b>switch ON DIP[0] (i_int_clkrf) to enableTest Mode</b></em>. Otherwise therewouldn't be generated interrupts and, as result, no UARToutput.@section auto_compare_page VCD-files automatic comparision@subsection gen_sysc_vcd Generating VCD-pattern form SystemC modelEdit the following attributes in SystemC target script<i>debugger/targets/sysc_river_gui.json</i> to enable vcd-file generation.<ul><li>['InVcdFile','i_river','Non empty string enables generation of stimulus VCD file'].</li><li>['OutVcdFile','o_river','Non empty string enables VCD file with reference signals']</li></ul>Files <em>i_river.vcd</em> and <em>o_river.vcd</em> will be generated.The first one will be used as a RTL simulation stimulus to generate inputsignals. The second one as a reference.@subsection run_vcd_compare Compare RIVER SystemC model relative RTLRun simulation in ModelSim with the following commands using correct pathesfor your host:vcd2wlf E:/Projects/GitProjects/riscv_vhdl/debugger/win32build/Debug/i_river.vcd -o e:/i_river.wlfvcd2wlf E:/Projects/GitProjects/riscv_vhdl/debugger/win32build/Debug/o_river.vcd -o e:/o_river.wlfwlf2vcd e:/i_river.wlf -o e:/i_river.vcdvsim -t 1ps -vcdstim E:/i_river.vcd riverlib.RiverTopvsim -view e:/o_river.wlfadd wave o_river:/SystemC/o_*add wave sim:/rivertop/*run 500uscompare start o_river simcompare add -wave sim:/RiverTop/o_req_mem_valid o_river:/SystemC/o_req_mem_validcompare add -wave sim:/RiverTop/o_req_mem_write o_river:/SystemC/o_req_mem_writecompare add -wave sim:/RiverTop/o_req_mem_addr o_river:/SystemC/o_req_mem_addrcompare add -wave sim:/RiverTop/o_req_mem_strob o_river:/SystemC/o_req_mem_strobcompare add -wave sim:/RiverTop/o_req_mem_data o_river:/SystemC/o_req_mem_datacompare add -wave sim:/RiverTop/o_dport_ready o_river:/SystemC/o_dport_readycompare add -wave sim:/RiverTop/o_dport_rdata o_river:/SystemC/o_dport_rdatacompare run@note In this script I've used \c vcd2wlf and \c wlf2vcd utilities to formcompatible with ModelSim VCD-file. Otherwise there're will be errors becauseModelSim cannot parse std_logic_vector siganls (only std_logic).*/
