Hi, I have declared payload as dynamic array and randomized with constraint payload_c. I got a runtime error as below.
KERNEL:
RUNTIME: Fatal Error: RUNTIME_0317 testbench.sv (12): The randomized size of ‘pkt_h.payload’ exceeds the specified limit (10000). Use the rc_constrained_size_limit variable to set the limit.
KERNEL: Time: 0 ns, Iteration: 0, Instance: /test, Process: @INITIAL#38_0@.
KERNEL: stopped at time: 0 ns
From the above log , my question is this variable “rc_constrained_size_limit” a tool specific one? . What parameter limits the maximum size a dynamic array or an unbounded mailbox in any simulator?
class eth_pkt;
rand bit [2:0] sa;
rand bit [2:0] da;
rand bit [7:0] payload [ ];
rand bit [2:0] sof;
static int count;
string pkt_name;
constraint payload_c {payload.size() >10;}
function new(string pkt_name);
count ++;
this.pkt_name = pkt_name;
$display("pkt count is %d\n",count);
endfunction:new
function void print();
$display("pkt_name is %s\n",pkt_name);
$display("sa is %d \n",sa);
$display("da is %d \n",da);
$display("payload is %p\n",payload);
$display("sof is %d\n",sof);
endfunction:print
endclass: eth_pkt