A STUFF ERROR has to be detected at the bit time of the 6 consecutive equal bit level in a message field .
means 5 consecutive bit are 1 than 6th bit should be 0 vice versa also.
please help me how to write property for above logic in assertion
A STUFF ERROR has to be detected at the bit time of the 6 consecutive equal bit level in a message field .
means 5 consecutive bit are 1 than 6th bit should be 0 vice versa also.
please help me how to write property for above logic in assertion
In reply to raj@123:
bit clk, signal;
property stuff(value, repetition );
@(posedge clk) value[* repetition] |-> ##1 !(value);
endproperty
stuff_0: assert property (stuff(signal==1,5));
stuff_1: assert property (stuff(signal==0,5));
In reply to dave_59:
property bit_stuffing_on_diffrent_field_of_remote_frame(1,5);
@(posedge (phase_seg2)) 1[*5] |-> ##1 !(1);
endproperty
stuff1: assert property (bit_stuffing_on_diffrent_field_of_remote_frame(intf.CAN_H==1,5));
stuff0: assert property (bit_stuffing_on_diffrent_field_of_remote_frame(intf.CAN_H==0,5));
begin
`disp_ast" VALID FRAME WITHOUT STUFF ");
end
else
begin
`TC_CAN_ASSERTION_E_003
end
cov_bit_stuff: cover property(bit_stuffing_on_diffrent_field_of_remote_frame);
this one throuhinh error let me know what is mistake here .
In reply to raj@123:
Are you trying to compile the same code?
bit_stuffing_on_diffrent_field_of_remote_frame**(1,5)**
can integer be there in property’s argument declaration? shouldn’t it be a variable?
property bit_stuffing_on_diffrent_field_of_remote_frame(1,5); //shouldn't (1,5) be variable?
@(posedge (phase_seg2)) 1[*5] |-> ##1 !(1); //!(1) -> how will this be true at any point of time?
endproperty
In reply to raj@123:
Basic, issue seems to me.
// Number are not allowed as variable name
property bit_stuffing_on_diffrent_field_of_remote_frame(1,5);
// You need to change your code as per Dave's.
property bit_stuffing_on_diffrent_field_of_remote_frame(value, repetitions);
Thanks!