Hi,
I am writing an assertion for one scenario . e.g There is an ALU which has one i/p port for data_in , i/p port for
command(instruction), reset , clk and one o/p port . I want to check the functionality for addition that if command = SUM then along with the command on the same edge data_in for first operand will be taken , then on the second edge second operand will be taken and after 3 clock cycles o/p will be observed.
Here is the assertion which I have written :
property check_out_val(outval,writes,command);
int temp_data1,temp_data2;
@(posedge amd_apb_if.PCLK) disable iff(amd_apb_if.rst)
command |-> (!rst)(temp_data1 = writes) ##1 (temp_data2 = writes) ##3 (outval == (temp_data1 + temp_data2)) ;
endproperty
check_sum : assert property (check_out_val(amd_apb_if.PRDATA,amd_apb_if.PWDATA,amd_apb_if.command))
else
`uvm_error("CCHECK SUM VAL FAILED","sum value")
It’s giving me following Error :
Error-[SE] Syntax error
Following verilog code has syntax error :
token is '('
command |-> (!rst)(temp_data1 = writes) ##1 (temp_data2 = writes) ##3 (outval == (temp_data1 + temp_data2)) ;
^
Can I write the assertion the way I have written ?