modesim 安装目录下找到
modelsim.ini
verilog = $MODEL_TECH/../verilog
std_developerskit = $MODEL_TECH/../std_developerskit
synopsys = $MODEL_TECH/../synopsys
modelsim_lib = $MODEL_TECH/../modelsim_lib
sv_std = $MODEL_TECH/../sv_std
mtiAvm = $MODEL_TECH/../avm
mtiOvm = $MODEL_TECH/../ovm-2.1.1
mtiUvm = $MODEL_TECH/../uvm-1.0p1
mtiUPF = $MODEL_TECH/../upf_lib
mtiPA = $MODEL_TECH/../pa_lib
floatfixlib = $MODEL_TECH/../floatfixlib
mc2_lib = $MODEL_TECH/../mc2_lib
;vhdl_psl_checkers = $MODEL_TECH/../vhdl_psl_checkers // Source files only for this release
;verilog_psl_checkers = $MODEL_TECH/../verilog_psl_checkers // Source files only for this release
;mvc_lib = $MODEL_TECH/../mvc_lib
secureip = D:/modeltech_10.0b/modelsim_lib/secureip
simprim = D:/modeltech_10.0b/modelsim_lib/simprim
simprims_ver = D:/modeltech_10.0b/modelsim_lib/simprims_ver
unimacro = D:/modeltech_10.0b/modelsim_lib/unimacro
unimacro_ver = D:/modeltech_10.0b/modelsim_lib/unimacro_ver
unisim = D:/modeltech_10.0b/modelsim_lib/unisim
unisims_ver = D:/modeltech_10.0b/modelsim_lib/unisims_ver
xilinxcorelib = D:/modeltech_10.0b/modelsim_lib/xilinxcorelib
xilinxcorelib_ver = D:/modeltech_10.0b/modelsim_lib/xilinxcorelib_ver
带 D:\就是自己添加的。
你按照你的目录给添加进去即可。
哦,对了,要把 modelsim.ini 这个文件的只读选项给去掉。