• Techo

[IC驗證] Using countones to constraint 2'b01 in 20bits data on Systemverilog

class Pattern;

rand bit[19:0] data;

constraint c {

$countones(data[19:1]&(~data[18:0])) == 5;

}

function show();

$display("%b",data);

endfunction


endclass


84 次瀏覽0 則留言
Logo2020.JPG