HI ALL,
REFERENCE : Assertion using Generate Block | Verification Academy
The below following code is my assertion,
From the above link,got the solution and able to generate cover property for 320 different TX_DATA values.
Question 1) In the following assertion I want to change tx to rx datalane so that I can check for the rx data lane.
Can I pass the signal name in the sequence so that it will be generic for both tx and rt data lane?
Question 2)(strap_freerunstrben_h == freerunstrben_h)- I am passing value to the signal.I want both LHS and RHS to be passing from the sequence.i.e signal and value both. ( EXAMPLE : sequence ev_frs0_rat2_x8_wid8_tx_pa(strap_freerunstrben_h(singal name),freerunstrben_h(signal value);
Question 3) I am generating 320 cover properties using generate block.when the cover property hits the display statement(below code) prints the current value of the property.Other than this is there any way to print the current values passing to the cover property.(Like adding a display statement inside the generate block some thing like that (we cannot use its compilation error))
Question 4) This is the cover property used "cp_frs0_rat2_x8_wid8_tx_pa: cover property (ev_frs0_rat2_x8_wid8_tx_pa(1’b0,2**(i-1)));"i want to make “cp_frs0_rat2_x8_wid8_tx_pa” generic so that i can make some thing like this cp_frs[j]_rat[j+2]_x8_wid8_tx_pa_i…[0-319].
Can i do this?
sequence ev_frs0_rat2_x8_wid8_tx_pa(logic freerunstrben_h ,bit [319:0] TX_DATA);
@(posedge ickopi_txclk0)
((strobelane0_txactive==1’b1) && (strap_freerunstrben_h == freerunstrben_h) && (strobelane0_powerstate[1:0]== 2’b10) && (strobelane0_rate[1:0]== 2’b10) && (validlane0_txdata[7:0]== 8’h00)) ##1 ((strobelane0_txactive== 1’b1) && (strap_freerunstrben_h == freerunstrben_h) && (strobelane0_powerstate[1:0]== 2’b10) && (strobelane0_rate[1:0]== 2’b10) && (validlane0_txdata[7:0]== 8’hFF)) ##1 ((strobelane0_txactive == 1’b1) && (strap_freerunstrben_h == freerunstrben_h) && (strobelane0_powerstate[1:0]== 2’b10) && (strobelane0_rate[1:0]== 2’b10) && (validlane0_txdata[7:0]== 8’h00) && ({datalane39_txdata[7:0],datalane38_txdata[7:0], datalane37_txdata[7:0],datalane36_txdata[7:0],datalane35_txdata[7:0],datalane34_txdata[7:0],datalane33_txdata[7:0], datalane32_txdata[7:0],datalane31_txdata[7:0],datalane30_txdata[7:0],datalane29_txdata[7:0],datalane28_txdata[7:0], datalane27_txdata[7:0],datalane26_txdata[7:0],datalane25_txdata[7:0],datalane24_txdata[7:0], datalane23_txdata[7:0],datalane22_txdata[7:0],datalane21_txdata[7:0],datalane20_txdata[7:0], datalane19_txdata[7:0],datalane18_txdata[7:0],datalane17_txdata[7:0],datalane16_txdata[7:0], datalane15_txdata[7:0],datalane14_txdata[7:0],datalane13_txdata[7:0],datalane12_txdata[7:0], datalane11_txdata[7:0],datalane10_txdata[7:0],datalane9_txdata[7:0],datalane8_txdata[7:0], datalane7_txdata[7:0],datalane6_txdata[7:0],datalane5_txdata[7:0],datalane4_txdata[7:0],datalane3_txdata[7:0], datalane2_txdata[7:0],datalane1_txdata[7:0],datalane0_txdata[7:0]}== TX_DATA),$display(“TX_DATA = %h \n”, TX_DATA));
endsequence
//cp_frs0_rat2_x8_wid8_tx_pa0: cover property (ev_frs0_rat2_x8_wid8_tx_pa(TX_DATA));
bit [319:0] TX_DATA = 320'b1;
generate
for(genvar i=0;i<320;i++)
begin
if(i == 0)
begin
cp_frs0_rat2_x8_wid8_tx_pa_0: cover property (ev_frs0_rat2_x8_wid8_tx_pa(1'b0,320'b0));
end
begin : assert_array
cp_frs0_rat2_x8_wid8_tx_pa: cover property (ev_frs0_rat2_x8_wid8_tx_pa(1'b0,2**(i-1)));
end
end
endgenerate
I think mail is bit long.
Suggestions would be really helpful.I am trying to make almost 4000+ cover properties into one generic cover property(TX,RX,and for 40 lane.Need to include for each and every lane). when generated I want to make it easy in terms of debug perspective also.
Thanks In Advance.
-Regards,
-Raja