add assertion

This commit is contained in:
lf 2020-07-24 23:11:21 +08:00
parent 7ccc619bb9
commit 04690d631e

View File

@ -62,10 +62,22 @@ always @(posedge sm3_pad_reg_cmpr) begin
$display("Mess:@%0t:result compare %d times",$time,total_cnt);
foreach(gldn_pttrn[i])
sm3_gldn_pttrn_reg[511 -32*i-:32] = gldn_pttrn[i];//do a copy to a ref array .hhh
if (sm3_gldn_pttrn_reg == sm3_pad_lst_blk_reg) begin
// if (sm3_gldn_pttrn_reg == sm3_pad_lst_blk_reg) begin
// ok_cnt++;
// $display("Mess:@%0t:check ok and ok %d times",$time,ok_cnt);
// end else begin
// fail_cnt++;
// $display("Err:@%0t:check fail and fail %d times",$time,fail_cnt);
// $stop;
// end
cmpr_a1:assert (sm3_gldn_pttrn_reg == sm3_pad_lst_blk_reg)
begin
ok_cnt++;
$display("Mess:@%0t:check ok and ok %d times",$time,ok_cnt);
end else begin
end
else begin
fail_cnt++;
$display("Err:@%0t:check fail and fail %d times",$time,fail_cnt);
$stop;