SystemVerilog-如何将push_back值转换为解压缩数组

时间:2016-10-06 06:20:41

标签: system-verilog push-back

bit [31:0] transfers [$];
string str = "some string";
bit [31:0] transfer;
int temp;
   for (int i = 0; i <= len; i++) begin
      temp = $sscanf(str, "%h", transfer);
      if (temp <= 0) `uvm_error("ERROR:"," THE LENGHT PARAM IS WRONG- too big")
    transfers.push_back(transfer);//is it correct?
      str = str.substr(13+(i+1)*8,str.len()-1);
   end//end for

如何将push_back值转换为解压缩数组(我写得正确吗?)?

0 个答案:

没有答案