|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
请教一下各位,下面的代码理论上应该是没有什么问题的,但是用xrun跑会报问题,请教一下怎么解决?跟版本有关?
//***********************
rand bit [7:0] data [][];
rand bit [2:0] b_size;
rand bit [3:0] b_len;
constraint data_size {
/* solve order constraints */
solve b_len before data;
solve b_size before data;
/* rand variable constraints */
data.size() == b_len+1;
foreach (data[i] )
data[i].size() == 2**b_size;
}
//***********************
报的log:
solve b_len before data;
|
xmsim: *E,RNDCNSTE (./transaction.sv,62|30): Randomization constraint has this error, which will cause the randomize function to return 0 and no new rand values will be set:
Solve before not allowed on empty array.
|
|