要解决此问题,使用 ModelSim 软件的支持版本进行编译。
或者,对于 Verilog HDL 仿真,编辑文件 /eda/sim_lib/altera_lnsim.sv。添加 automatic
到第 1150 行和 10397 行
line 1158:
automatic integer mega = 1000000;
line 10397:
automatic real factor = 10**9;
对于 VHDL 模拟,请使用以下命令抑制错误消息:
vlog -sv -suppress 2244 altera_lnsim_for_vhdl.sv