I write some library module on SystemVerilog. I want to check input parameters on synthesis and then if their values are wrong I want to stop synthesis with a custom error that will tell which parameter value is wrong.
For the Quartus I have write checks on the initial block:
module test_module #(parameter TEST_PARAM = 1)
(input some_in,
output some_out);
initial begin
if(TEST_PARAM == 1) $error("TEST_PARAM must be zero");
end
assign some_out = some_in;
endmodule
The Quartus displays my error correctly and stops synthesis.
When I try to synthesis on the Synplify, it did't display my error, synthesizes to the end of my code and set warning:
CG532: Within an initial block, only Verilog force statements and memory $readmemh/$readmemb initialization statements are recognized, and all other content is ignored
If I extract $error(...) from the initial block to the module body the Synplify behaviour is the same, but the warning is:
CG505: Ignoring system task $error. Supported only within an assertion When I try to use an assertion...
module test_module #(parameter TEST_PARAM = 1)
(input some_in,
output some_out);
assert (TEST_PARAM == 1) $error("TEST_PARAM must be zero");
else $error("good!!");
assign some_out = some_in;
endmodule
...the Synplify synthesizes to the end of my code without any warnings or errors.
I have read on pg.15 Synplify Pro Language Support Reference Manual next sentences:
Ignored Verilog Language Constructs. When it encounters certain Verilog constructs, the tool ignores them and continues the synthesis run. The following constructs are ignored: <...> Calls to system tasks and system functions (they are only for simulation)
Is it means that a SystemVerilog code can't stop syntezis on the Synplify with custom error at all? No way?