Modelsim se仿真Xilinx IPcore
方法:先写好do文件常规框架,根据modelsim报错再添加ise IP核库仿真文件。注:记得添加并仿真glbl.v全局控制仿真文件到sim/ise_lib下
步骤:
- 查看modelsim提示的错误信息:Error:./../ise_prj/ipcore_dir/sync_fifo_8x256.v(493):Module’FIFO_GENERATOR_V9_3’is not defined
- 找到ise安装路径:在快捷键上右键-属性-打开文件位置
*./14.7/ISE_DS/ISE/verilog/src 在这个路径下搜索FIFO_GENERATOR_V9_3文件,选中FIFO_GENERATOR_V9_3.v文件复制到sim仿真目录下建ise_lib文件夹下。
3. 每个Xilinx仿真都加到ise_lib下,并且在do文件内也要编译vsim -voptargs=+acc work.tb_ex_ise_fifo work.glbl
仿真Xilinx FIFO do文件示例:
quit -sim
.main clear
vlib work
vlog ./tb_ex_ise_fifo.v
vlog ./../design/ex_ise_fifo.v
vlog ./../ise_prj/ipcore_dir/*.v
vlog ./ise_lib/*.v
vsim -voptargs=+acc work.tb_ex_ise_fifo work.glbl
add wave tb_ex_ise_fifo/ex_ise_fifo_inst/*
run 10us
仿真Altera IPcore 文件示例:
quit -sim
.main clear
vlib work
vlog ./tb_ex_dds.v
vlog ./altera_lib/altera_mf.v
vlog ./altera_lib/220model.v
vlog ./../design/*.v
vlog ./../quartus_prj/ipcore_dir/sp_ram_256x8.v
vlog ./../quartus_prj/ipcore_dir/mult_8x8_l0.v
vsim -voptargs=+acc work.tb_ex_dds
add wave tb_ex_dds/ex_dds_inst/*
run 10us