摘要:
'赋值过程 module datt (); reg [7:0] mem; initial begin $monitor("ans is %b", mem); end initial begin mem=0; #10 mem=1; #10 mem='1; #10 $finish; end bit[7: 阅读全文
摘要:
默认位宽 module test (); initial begin $display("ans is %b", 5'd17); $display("ans is %b", 7'hfa); $display("ans is %b", 12); $display("ans is %b", 'h56); 阅读全文
摘要:
solve a before data约束的存在,随机变量a会先被赋予随机值,a为1或0的概率为1/2,接下来再为data随机变量赋随机值,其概率取决于a的值,最终保持组合的值实现均匀分布。 class transaction; rand bit a; rand bit[1:0] data; con 阅读全文