I am investigating the usability of formal verification in FPGA designs using VHDL, PSL, SymbiYosys, and GHDL. I've watched several webinars, read a PSL book, and gone through tutorials. Currently, I am attempting to create test assertions, but I'm facing numerous challenges, especially with what I believe are basic constructs.
I would like to test following cases:
- Sequence:
req_i (when reset is not asserted) -> data_en_o* -> eot_o** -> ack_i
* (1)data_en_o should be raised exactly 2 clks later
(2)data_en_o should be raised at some undefined point in the future, but it must occur
** (1)eot_o should be raised next clk after data_en_o is deasserted
(2)eot_o should be raised precisely on the last clock cycle when data_en_o is asserted.
During my tests I was trying this approach:
f_seq : assert always (rst_n_i -> req_i -> next[2](data_en_o) -> eventually! eot_o);
Symbiyosys complained about:
- "next[2](data_en_o) -> eventually! eot_o : left-hand side operand of logical '->' must be a boolean". I don't understand why it is not correct as next2out_data_en_o is also check for specific condition (output should be boolean)
- when I removed " -> next[2](data_en_o) " the assertion is passing even without eot_o asserted. Eventually! is 'strong' so assertion of eot_o should occur before end of the test.
Additionally, I am also interested in how to formulate these assertions using SERE.