You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module test #(
parameter n = 5
)
(
input clk_i,
input [n:0] x,
input [n:0] y,
output [n:0] z);
generate
genvar i;
for (i = 0; i < n; i = i + 1) begin
if (i != 2) begin
assign z[i] = x[i] & y[i];
end
always @(clk_i) begin
assert (z[i] != (x[i] & y[i]));
end
end
endgenerate
endmodule
As far as I can see, there is no way to determine which assertion has failed (in this case assert (z[2] != (x[2] & y[2]))) directly from the Symbiyosys's terminal output, or any other way, except for looking through the generated trace.
This is usually not a problem for small designs, but as you start to verify larger Verilog designs that rely on generators and parameters to be configurable, this becomes an annoying and time consuming problem as you need to figure out which assertion failed from the trace. This is especially problematic for designs that have a lot of repeating signals for different modules, e.g. interconnects.
This can probably be addressed by using assert (<cnd>) else $error(<msg>); pattern provided by SystemVerilog assertions, but this pattern is not supported in open source version of Symbiyosys.
Is there any way to get around this in the open source version of Symbiyosys?
I would argue that this problem can be a major drawback for using open source version of Symbiyosys in industrial setting.
Note that this problem might be specific to smtbmc backend.
The text was updated successfully, but these errors were encountered:
Compounding this problem, if you try to give a label to the assertion, it errors out:
always @(clk_i) begin
p_label: assert (z[i] != (x[i] & y[i]));
end
SBY 15:34:50 [test_t_bmc] base: starting process "cd test_t_bmc/src; yosys -ql ../model/design.log ../model/design.ys"
SBY 15:34:50 [test_t_bmc] base: test.v:20: ERROR: Cannot add procedural assertion `\p_label' because a cell with the same name was already created at test.v:20.9-20.48!
With the verific frontend that would work around it by generating a different instance name for each iteration of the generate:
If I run the following program (
test.v
)with script
I get the following output
As far as I can see, there is no way to determine which assertion has failed (in this case
assert (z[2] != (x[2] & y[2]))
) directly from the Symbiyosys's terminal output, or any other way, except for looking through the generated trace.This is usually not a problem for small designs, but as you start to verify larger Verilog designs that rely on generators and parameters to be configurable, this becomes an annoying and time consuming problem as you need to figure out which assertion failed from the trace. This is especially problematic for designs that have a lot of repeating signals for different modules, e.g. interconnects.
This can probably be addressed by using
assert (<cnd>) else $error(<msg>);
pattern provided by SystemVerilog assertions, but this pattern is not supported in open source version of Symbiyosys.Is there any way to get around this in the open source version of Symbiyosys?
I would argue that this problem can be a major drawback for using open source version of Symbiyosys in industrial setting.
Note that this problem might be specific to smtbmc backend.
The text was updated successfully, but these errors were encountered: