0
私はSystemVerilogの中で、ランダムな動的配列を作成する方法を知っている:SystemVerilogでランダムなダイナミック2D配列を作成するには?
class packet;
rand int unsigned len;
rand byte data[];
constraint size_con {
len < 2000;
data.size = len;
}
endclass: packet
が、私は、ランダムな2D動的配列を使用する方法を見つけ出すことはできませんか?
class video_frame;
rand int unsigned width;
rand int unsigned height;
rand int unsigned data[][];
constraint size_con {
width >= 8;
width <= 4096;
height >= 8;
height >= 2048;
// How to constraint data.size to be [height, width]
}
endclass: video_frame;