提示的错误是:terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
遇上这个问题,我该怎么改变我的代码呢?
之前使用`uvm_create(req)产生req,然后给req中的动态数组赋值,然后使用`uvm_send发送出去,但是因为在transfer中增加了一个随机化的变量,要求的是transfer中的动态数组给特定的值,但是新增的随机变量需要让它自己随机产生。所以使用原来的`uvm_send就不能满足要求了,而`uvm_rand_send则将动态数组的值也给随机化了,不知道有什么办法能解决这个问题呀?
If you want to load a specific image, you should do it in the definition of transaction. You can define a flag to distinguish it with random value. And the flag can be changed in body depending on you.