Altera Quartus17.1 Modelsim 库编译与仿真

1 关联Modelsim配置

2 器件库编译

复制代码
Info: Start compiling process
Info: Args:  -tool modelsim -language verilog -tool_path D:/modeltech64_2020.4/win64 -directory D:/modeltech64_2020.4/altera_simlib -log modelsim_verilog_no_rtl -rtl_only
Info: *******************************************************************
Info: Running Quartus Prime Shell
    Info: Version 17.1.0 Build 590 10/25/2017 SJ Standard Edition
    Info: Copyright (C) 2017  Intel Corporation. All rights reserved.
    Info: Your use of Intel Corporation's design tools, logic functions 
    Info: and other software and tools, and its AMPP partner logic 
    Info: functions, and any output files from any of the foregoing 
    Info: (including device programming or simulation files), and any 
    Info: associated documentation or information are expressly subject 
    Info: to the terms and conditions of the Intel Program License 
    Info: Subscription Agreement, the Intel Quartus Prime License Agreement,
    Info: the Intel FPGA IP License Agreement, or other applicable license
    Info: agreement, including, without limitation, that your use is for
    Info: the sole purpose of programming logic devices manufactured by
    Info: Intel and sold by Intel or its authorized distributors.  Please
    Info: refer to the applicable agreement for further details.
    Info: Processing started: Thu Sep 04 09:27:46 2025
Info: Command: quartus_sh --simlib_comp -tool modelsim -language verilog -tool_path D:/modeltech64_2020.4/win64 -directory D:/modeltech64_2020.4/altera_simlib -log modelsim_verilog_no_rtl -rtl_only
Info: Quartus(args): -tool modelsim -language verilog -tool_path D:/modeltech64_2020.4/win64 -directory D:/modeltech64_2020.4/altera_simlib -log modelsim_verilog_no_rtl -rtl_only
Info: Changing the current directory to output directory D:/modeltech64_2020.4/altera_simlib ..
Info: Using Path D:/modeltech64_2020.4/win64 that was set in EDA Simulation Library Compiler Options
Info: Generating commands to compile library altera_ver ...
Info: Generating commands to compile library lpm_ver ...
Info: Generating commands to compile library sgate_ver ...
Info: Generating commands to compile library altera_mf_ver ...
Info: Generating commands to compile library altera_lnsim_ver ...
Info: Executing command file containing library compilation commands
Info: Reading pref.tcl
Info: # 2020.4
Info: # do temp_simlib_comp.tmp
Info: # Model Technology ModelSim SE-64 vlog 2020.4 Compiler 2020.10 Oct 13 2020
Info: # Start time: 09:27:48 on Sep 04,2025
Info: # vlog -work altera_ver -vlog01compat d:/intelfpga/17.1/quartus/eda/sim_lib/altera_primitives.v 
Info: # -- Compiling module global
Info: # -- Compiling module carry
Info: # -- Compiling module cascade

...............
...............
...............


Info: # -- Loading package cycloneiv_pllpack
Info: # -- Loading entity cycloneiv_mn_cntr
Info: # -- Loading entity cycloneiv_scale_cntr
Info: # -- Loading entity cycloneiv_dffe
Info: # -- Loading entity cycloneiv_pll_reg
Info: # -- Compiling entity cycloneiv_pll
Info: # -- Compiling architecture vital_pll of cycloneiv_pll
Info: # End time: 09:28:21 on Sep 04,2025, Elapsed time: 0:00:00
Info: # Errors: 0, Warnings: 1
Info: # Model Technology ModelSim SE-64 vcom 2020.4 Compiler 2020.10 Oct 13 2020
Info: # Start time: 09:28:21 on Sep 04,2025
Info: # vcom -work cycloneiv -93 d:/intelfpga/17.1/quartus/eda/sim_lib/cycloneiv_components.vhd 
Info: # -- Loading package STANDARD
Info: # -- Loading package TEXTIO
Info: # -- Loading package std_logic_1164
Info: # -- Loading package VITAL_Timing
Info: # -- Loading package VITAL_Primitives
Info: # -- Loading package cycloneiv_atom_pack
Info: # -- Compiling package cycloneiv_components
Info: # End time: 09:28:21 on Sep 04,2025, Elapsed time: 0:00:00
Info: # Errors: 0, Warnings: 0
Info: Successfully compiled the libraries
Info: Compilation was successful. 0 errors, 5 warnings

3 关联库

复制代码
altera_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/altera_ver
lpm_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/lpm_ver
sgate_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/sgate_ver
altera_mf_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/altera_mf_ver
altera_lnsim_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/altera_lnsim_ver
cyclone10lp_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/cyclone10lp_ver
cycloneive_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/cycloneive_ver
cycloneiv_hssi_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/cycloneiv_hssi_ver
cycloneiv_pcie_hip_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/cycloneiv_pcie_hip_ver
cycloneiv_ver = D:/modeltech64_2020.4/altera_simlib/verilog_libs/cycloneiv_ver
altera = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/altera
lpm = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/lpm
sgate = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/sgate
altera_mf = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/altera_mf
altera_lnsim = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/altera_lnsim
cyclone10lp = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/cyclone10lp
cycloneive = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/cycloneive
cycloneiv_hssi = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/cycloneiv_hssi
cycloneiv_pcie_hip = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/cycloneiv_pcie_hip
cycloneiv = D:/modeltech64_2020.4/altera_simlib/vhdl_libs/cycloneiv

将上述库信息,更新到安装目录下的modelsim.ini文件,重启modelsim,可看到库文件已经映射到工具中。

4 仿真运行

复制代码
vlib work 

vlog "../src/sim_demo.v"   
vlog "tb_demo.v"  
vsim -voptargs="+acc" -L altera_ver -L lpm_ver -L sgate_ver -L altera_mf_ver -L altera_lnsim_ver -L cyclone10lp_ver -L cycloneive_ver -L cycloneiv_hssi_ver -L cycloneiv_pcie_hip_ver -L cycloneiv_ver -gui work.tb_demo
log -r /*
相关推荐
我送炭你添花5 小时前
电子世界的奇妙冒险:从一个电阻开始(系列目录)
人工智能·单片机·嵌入式硬件·fpga开发
知识充实人生7 小时前
FPGA设计杂谈之九:HRIO/HPIO/HDIO
fpga开发·xilinx·hr i/o·hp i/o·hd i/o·io类型
maverick_11116 小时前
【FPGA】 在Verilog中,! 和 ~ 的区别
fpga开发
黄埔数据分析2 天前
QDMA把描述符当数据搬移, 不用desc engine
fpga开发
南檐巷上学2 天前
基于FPGA的正弦信号发生器、滤波器的设计(DAC输出点数受限条件下的完整正弦波产生器)
fpga开发·数字信号处理·dsp·dds
嵌入式-老费2 天前
Linux Camera驱动开发(fpga + csi rx/csi tx)
fpga开发
ALINX技术博客3 天前
【202601芯动态】全球 FPGA 异构热潮,ALINX 高性能异构新品预告
人工智能·fpga开发·gpu算力·fpga
JJRainbow3 天前
SN75176 芯片设计RS-232 转 RS-485 通信模块设计原理图
stm32·单片机·嵌入式硬件·fpga开发·硬件工程
s9123601013 天前
FPGA眼图
fpga开发
北京青翼科技3 天前
【PCIe732】青翼PCIe采集卡-优质光纤卡- PCIe接口-万兆光纤卡
图像处理·人工智能·fpga开发·智能硬件·嵌入式实时数据库