zoukankan      html  css  js  c++  java
  • ncsim仿真VHDL

    ncsim仿真VHDL

    1、文件列表

    ctrl.vhd

    design_io.vhd

    tb.vhd

    compile.nc

    simulate.nc

    ./shm/shmtb.tcl

    2、 Compile你的VHDL设计文件[compile.nc]

     1 #!/bin/csh -f
     2 #----------------------------------------------------------------------
     3 
     4 # ------------------------------------------------------------------- #
     5 # Directories location
     6 # ------------------------------------------------------------------- #
     7 
     8 setenv src_dir ../src
     9 setenv tb_dir  ./
    10 setenv work_dir ./lib
    11 
    12 # ------------------------------------------------------------------- #
    13 # Library creation
    14 # ------------------------------------------------------------------- #
    15 
    16 setenv CDS_VHDL /user/EDA_Tools/Cadence/IUS_11.10_lnx86/tools.lnx86/inca
    17 
    18 echo "softinclude $CDS_VHDL/files/cds.lib" > cds.lib
    19 echo "define work ./lib" >> cds.lib
    20 echo " " > hdl.var
    21 mkdir -p $work_dir
    22 
    23 # Compile Key Expander
    24 #
    25 ncvhdl -v93 -work work $src_dir/ctrl.vhd 
    26 
    27 #
    28 # Compile Testbench 
    29 #
    30 ncvhdl -v93 -work work $tb_dir/design_io.vhd
    31 ncvhdl -v93 -work work $tb_dir/tb.vhd
    compile.nc

    3、simulate生成波形[simulate.nc]

     1 #!/bin/csh -f
     2 #----------------------------------------------------------------------
     3 # ------------------------------------------------------------------- #
     4 # Elaborating the Design
     5 # ------------------------------------------------------------------- #
     6 
     7 ncelab -work work work.tb:beh -access wrc
     8 
     9 # ******************************************************************* #
    10 # ------------------------------------------------------------------- #
    11 # Simulating the Design
    12 # ------------------------------------------------------------------- #
    13  
    14 ncsim tb +acssce+rwc -MESSAGES -input ./shm/shmtb.tcl
    simulate.nc

    4、Tcl脚本文件控制生成波形[./shm/shmtb.tcl]

    1 #生成VCD文件
    2 database -open ./waves/tbvcdwaves -vcd -default
    3 probe -create beh -depth all -all -vcd -database ./waves/tbvcdwaves
    4 
    5 #生成shm文件
    6 database -open ./waves/tbwaves -shm -default
    7 probe -create beh -depth all -all -shm -database ./waves/tbwaves
    8 run 
    9 exit
    shmtb.tcl

    5、 运行脚本run[run]

     注意将相关文件权限更新为可执行

    1 ./compile.nc
    2 ./simulate.nc
    run

    6、使用simvison查看波形

    simvision ./waves/tbwaves.shm/tbwaves.trn &
  • 相关阅读:
    springboot 获取enviroment.Properties的几种方式
    Spring Boot加载配置文件的完整步骤
    SpringBoot测试Controller层
    SpringBoot集成测试
    PowerMockito模拟private static final类变量
    玩转Spring JUnit+mockito+powermock单元测试
    Junit测试Controller(MockMVC使用),传输@RequestBody数据解决办法
    spring boot 使用@ConfigurationProperties加载配置文件到类中
    Rsync命令参数详解
    Linux PS 命令详解
  • 原文地址:https://www.cnblogs.com/OneFri/p/5896760.html
Copyright © 2011-2022 走看看