program mtest;
initial begin
bit[128:0] ddr[100];
std::randomize(ddr) with {
foreach(ddr[i]) {
ddr[i] inside {[0:100]};
}
};
foreach(ddr[i])
$display("ddr[%0d]= %h", i, ddr[i]);
$writememh("./mtest_log", ddr, 0, 100-1 );
end
endprogram
网友评论