|
发表于 2013-4-10 23:39:12
|
显示全部楼层
哦,这样
axi里面的data的宽度都是以字节byte为基数的,
你可以先定义
rand bit [7:0] data[];
rand unsigned int width;
rand unsigned int burst;
constraint c0 {width inside {1, 2, 4, 8, ...;}
constraint c1 {burst inside {1, 2, 4, 8, 16, ...;}
constraint c2 {data.size() == width * burst;}
constraint c3 {solve width before data.size();
solve burst before data,size();}
大概是这样了,我也是初学者,欢迎交流 |
|