Hard Processor System Component Reference Manual: Agilex™ 5 SoCs

ID 813752
Date 8/09/2024
Public
Document Table of Contents

3.1.3.3. Synopsys* VCS* Simulation Steps

  1. Locate your top-level simulation model.
    1. You can locate it at <project directory>/<Platform Designer design name>/sim/.
    2. Use the name located from the previous step (step a) to replace the placeholder names TopLevel.v and TopLevel that are used in the following steps.
  2. Locate the Cadence® setup script.
    1. You can locate it at <project directory>/<Platform Designer design name>/sim/synopsys/vcs/.
    2. Locate vcs_setup.sh.
  3. For this example, the simulator is executed in the sim/synopsys directory where the vcs_setup.sh file is located. Change directory to the sim/synopsys/vcs directory:
    cd <project directory>/<Platform Designer design name>/ \
    sim/synopsys/vcs/
  4. Copy the vcs_setup.sh file to another file. For this exercise, it is called my_vcs_script.sh.
    cp vcs_setup.sh my_vcs_script.sh
  5. In your my_vcs_script.sh file, delete everything except the section between the lines from "TOP-LEVEL TEMPLATE - BEGIN" to "TOP-LEVEL TEMPLATE - END".
  6. In your my_vcs_script.sh file, add additional libraries and flags by adding the following lines at the top of the file:
    rm -rf csrc simv simv.daidir transcript ucli.key \
    vc_hdrs.h (optional)
    MVCHOME=<ACDS directory>/ip/altera/mentor_vip_ae/common/
    export QUESTA_MVC_GCC_LIB=${MVCHOME}/questa_mvc_core/ \
    linux_x86_64_gcc-6.2.0_vcs
    export LD_LIBRARY_PATH=${VCS_HOME}/gnu/linux/gcc-6.2.0/lib64
    export LDFLAGS="-L ${QUESTA_MVC_GCC_LIB} -Wl,-rpath \
    ${QUESTA_MVC_GCC_LIB} -laxi4_IN_SystemVerilog_VCS_full_DVC "
    
  7. Pre-assign USER_DEFINED_ELAB_OPTIONS mentioned in the template as the following:
    USER_DEFINED_ELAB_OPTIONS="\"\
     -full64 \
     -timescale=1ns/1ns \
     +vpi -debug_access+r+w+nomemcbk +vcs+lic+wait \
     ../../TopLevel.v \""
    
  8. Uncomment and modify the lines which sources the vcs_setup.sh script to the following:
    source vcs_setup.sh \
    TOP_LEVEL_NAME=TopLevel \
    USER_DEFINED_ELAB_OPTIONS="$USER_DEFINED_ELAB_OPTIONS" \
    USER_DEFINED_SIM_OPTIONS="'-l transcript'"
    
  9. Save the my_vcs_script.sh file.
  10. Setup your developer environment with the proper resources. Refer to Synopsys* documentation for downloading, installing, and licensing.
  11. Run the simulation script:
    sh my_vcs_script.sh
  12. The simulation is running without any errors. Since no testbench is added, it only shows that all the HPS IP simulation files were successfully compiled and elaborated.