赞
踩
软件版本:Intel® Quartus® Prime Design Suite: 23.2
方式参考附件Intel 官方文档:Questa*-Intel® FPGA Edition Quick-Start: Intel® Quartus® Prime Pro Edition
打开modelsim,在Transcript栏中,cd切换到mentor_example.do所在路径, 敲入do mentor_example.do,运行该脚本文件。
#删除旧的work库
file delete -force ./libraries/work
#在当前目录下新建一个work目录
vlib ./libraries/work
# #将目前的逻辑工作库work和实际工作库work映射对应。
vmap work ./libraries/work
偶尔会报错如下:
解决办法:先新建libraries文件夹
注意:vlib ./libraries/work,不仅仅创建了一个work文件夹,同时还创建了_info文件,因此不能自己创建空的work文件夹拿来用。
为了防止仿真时优化掉信号使得仿真没有波形,需要打开mentor路径下的modelsim.ini文件,使得其中的VoptFlow=0
可以创建一个run_simulation.bat的批处理脚本文件,这样可以不用每次打开modelsim输入命令,只需要双击run_simulation.bat文件即可进行仿真,内容如下:
在进行过仿真后,添加需要的波形以及相应的设置后,在wave窗口中选择File-Save Format,保存到mentor文件夹下即可
.vhd 用vcom命令编译
.v 和.sv用vlog命令编译
# vlog -reportprogress 300 C:/intelfpga_pro/21.4/quartus/eda/sim_lib/ct1_hssi_atoms_ncrypt.sv -work fourteennm_hssi_ver
# ** Error: (vlog-13069) C:/intelfpga_pro/21.4/quartus/eda/sim_lib/ct1_hssi_atoms_ncrypt.sv(119): syntax error in protected region.
#
# ** Error: C:/intelfpga_pro/21.4/quartus/eda/sim_lib/ct1_hssi_atoms_ncrypt.sv(119): (vlog-13205) Syntax error found in the scope following '<protected>'. Is there a missing '::'?
发现是在执行dev_com(Compile device library files,编译设备库文件)时报错,打开msim_setup.tcl文件,找到dev_com,注释掉加密的文件,仍未能成功
alias dev_com {
if [string is false -strict $SILENCE] {
echo "dev_com"exec
}
if [string is false -strict [modelsim_ae_select $FORCE_MODELSIM_AE_SELECTION]] {
eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_primitives.v" -work altera_ver
eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/220model.v" -work lpm_ver
eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/sgate.v" -work sgate_ver
eval vlog $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_mf.v" -work altera_mf_ver
eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/altera_lnsim.sv" -work altera_lnsim_ver
eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/fourteennm_atoms.sv" -work fourteennm_ver
#eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/fourteennm_atoms_ncrypt.sv" -work fourteennm_ver
eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hssi_atoms.sv" -work fourteennm_hssi_ver
#eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hssi_atoms_ncrypt.sv" -work fourteennm_hssi_ver
eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hip_atoms.sv" -work fourteennm_hssi_ver
#eval vlog -sv $USER_DEFINED_VERILOG_COMPILE_OPTIONS $USER_DEFINED_COMPILE_OPTIONS "$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hip_atoms_ncrypt.sv" -work fourteennm_hssi_ver
}
}
无奈只能放弃编译加密文件,打开mentor_example.do文件,自己添加并编译设备库文件成功,如下图:
成功编译设备库文件,modelsim仿真运行成功,目前没发现一定需要编译这三个加密的_ncrypt设备库文件!
这三个加密的.sv设备库文件部分工程不需要编译,如我的工程只用到了ram和fifo:
$QUARTUS_INSTALL_DIR/eda/sim_lib/mentor/fourteennm_atoms_ncrypt.sv
$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hssi_atoms_ncrypt.sv
$QUARTUS_INSTALL_DIR/eda/sim_lib/ct1_hip_atoms_ncrypt.sv
参考链接:
Questa*-Intel® FPGA Edition Quick-Start: Intel® Quartus® Prime Pro Edition
其他连接:
Intel® Quartus® Prime Pro Edition User Guide: Third-party Simulation
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。