Hi
I have question about this
/*randomize a 2-dimensional array to generate below pattern:
1 2 3 4 5
2 3 4 5 6
3 4 5 6 7
4 5 6 7 8
5 6 7 8 9 */
I complete my code but print in one line not in new line so can you help me. i have attached code and output for your ref.
Code :::
module D20();
class exp;
randc bit [3:0]x[5][5];
constraint array{foreach(x[i,j])
x[i][j]==j+i+1;}
endclass
exp h_1;
initial begin
h_1 = new();
assert(h_1.randomize());
$display(" x =%p \n", h_1.x);
end
endmodule
///// Output //////
# run -all
# x ='{'{1, 2, 3, 4, 5}, '{2, 3, 4, 5, 6}, '{3, 4, 5, 6, 7}, '{4, 5, 6, 7, 8}, '{5, 6, 7, 8, 9}}
but i want this every time new line with centre so please help me