为什么 Quartus Prime 不想忽略用于仿真的 systemverilog 断言?
Why Quartus Prime does not want to ignore systemverilog assertion used for simulation?
我有以下 属性 声明并签入我的系统 verilog 文件之一:
property StepOutP_pulse_width;
int count;
@(posedge ClkRs_ix.clk)
($rose(mc.outvec.StepOutP_o),count=STEPPER_PULSE_WIDTH) |->
(mc.outvec.StepOutP_o,count--)[*] ##1 (~mc.outvec.StepOutP_o && count==0);
endproperty // StepOutP_pulse_width
assert property (StepOutP_pulse_width);
这基本上是检查信号 mc.outvec.StepOutP_o
产生的脉冲宽度
当我尝试编译设计时,Quartus Prime 在这个 属性 声明上失败,说
Error (10170): Verilog HDL syntax error at steppingcontroller.sv(404)
near text: "]"; expecting an operand. Check for and fix any syntax
errors that appear immediately before or at the specified keyword. The
Intel FPGA Knowledge Database contains many articles with specific
details on how to resolve this error. Visit the Knowledge Database at
https://www.altera.com/support/support-resources/knowledge-base/search.html
and search for this specific error message number.
现在,我会想,在分析和综合过程中,这些 属性 声明和相关断言 完全被忽略 因为它们只涉及模拟。但显然并非如此。 Modelsim(原始导师图形版本)编译它没有问题,而且断言也符合预期。 Quartus verilog编译设置设置为'SystemVerilog'
如何:
使属性规范与quartus编译器兼容?
或设置编译器忽略这些断言?
谢谢
解决这个问题的一种方法是使用综合指令。您可以指定合成 translate_off 和合成 translate_on 如下所示:
// synthesis translate_off
property StepOutP_pulse_width;
int count;
@(posedge ClkRs_ix.clk)
($rose(mc.outvec.StepOutP_o),count=STEPPER_PULSE_WIDTH) |->
(mc.outvec.StepOutP_o,count--)[*] ##1 (~mc.outvec.StepOutP_o && count==0);
endproperty // StepOutP_pulse_width
assert property (StepOutP_pulse_width);
// synthesis translate_on
在 translate_off 和 translate_on 注释之间编写的任何代码都会被编译器忽略。请注意,此功能可以 disabled/enabled 通过设置选项 ignore_translate_off_and_synthesis_off
我有以下 属性 声明并签入我的系统 verilog 文件之一:
property StepOutP_pulse_width;
int count;
@(posedge ClkRs_ix.clk)
($rose(mc.outvec.StepOutP_o),count=STEPPER_PULSE_WIDTH) |->
(mc.outvec.StepOutP_o,count--)[*] ##1 (~mc.outvec.StepOutP_o && count==0);
endproperty // StepOutP_pulse_width
assert property (StepOutP_pulse_width);
这基本上是检查信号 mc.outvec.StepOutP_o
产生的脉冲宽度当我尝试编译设计时,Quartus Prime 在这个 属性 声明上失败,说
Error (10170): Verilog HDL syntax error at steppingcontroller.sv(404) near text: "]"; expecting an operand. Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number.
现在,我会想,在分析和综合过程中,这些 属性 声明和相关断言 完全被忽略 因为它们只涉及模拟。但显然并非如此。 Modelsim(原始导师图形版本)编译它没有问题,而且断言也符合预期。 Quartus verilog编译设置设置为'SystemVerilog'
如何:
使属性规范与quartus编译器兼容?
或设置编译器忽略这些断言?
谢谢
解决这个问题的一种方法是使用综合指令。您可以指定合成 translate_off 和合成 translate_on 如下所示:
// synthesis translate_off
property StepOutP_pulse_width;
int count;
@(posedge ClkRs_ix.clk)
($rose(mc.outvec.StepOutP_o),count=STEPPER_PULSE_WIDTH) |->
(mc.outvec.StepOutP_o,count--)[*] ##1 (~mc.outvec.StepOutP_o && count==0);
endproperty // StepOutP_pulse_width
assert property (StepOutP_pulse_width);
// synthesis translate_on
在 translate_off 和 translate_on 注释之间编写的任何代码都会被编译器忽略。请注意,此功能可以 disabled/enabled 通过设置选项 ignore_translate_off_and_synthesis_off