The module to be verified is as follows... The module has an input in1 and an output out1, on alternating clock cycles, out1 is the buffered and inverted value of in1.
I tried coding the checker module using a recursive property.
module check (input in1, out1, clk);
property p1(bit state);
bit nxt;
@(posedge clk)
(1 ,nxt=!state) |-> (out1 == (nxt) ? !in1 : in1) and
nexttime p1(nxt);
endproperty
initial assert property(p1(0)) else $fatal(3, "Failed!");
endmodule
However, running the code at edaplayground throws this error...
RROR VCP2000 "Syntax error. Unexpected token: nexttime[_NEXTTIME]. The 'nexttime' is a SystemVerilog keyword and cannot be used as an identifier.
I know that this assertion can be done without recursion but I would like to use recursion to write it.
The error says that you have used
nexttime
which is a systemverilog property keyword in a wrong manner. This operator checks that "if the clock ticks once more, thena
shall be true at the next clock tick" in the following codeBy default, the concurrent assertions shall be checked on every clock pulse, so there is no need of recursion here. Roughly, you can do something like this: