当我试图使用Modelsim模拟器v10.2c在优化模式下运行以下verilog代码片段时,我遇到了问题。
always @ *
if (dut.rtl_module.enable == 1'b1)
force dut.rtl_module.abc_reg = xyz;如果上面的片段是在非优化模式下运行的,这是很好的。但是对于优化的模式,它失败了。
PS:我正在使用-O5优化级别
发布于 2014-06-12 11:41:05
优化通常禁止对模拟器对象的访问。您的force命令要求进行该访问。
您需要显式地启用访问。不幸的是,我在Modelsim AE文档中看不到任何有用的东西,但是来自Riviera-PRO:
+accs
Enables access to design structure. This is the default in -O0,
-O1 and -O2 and may optionally be specified for -O3. If omitted,
the compiler may limit read access to selected objects.Modelsim支持+acc,只是它似乎没有很好的文档。唯一提及的似乎是这一建议:
While optimization is not necessary for class based debugging, you might want to use
vsim -voptargs=+acc=lprn to enable visibility into your design for RTL debugging.https://stackoverflow.com/questions/24179095
复制相似问题