Jump to content

Can't record dynamic array in sequence item in QuestaSim 10.3a_1


Recommended Posts

I am using QuestaSim 10.3a_1 and try to record a dynamic array in the sequence item. But it doesn't show in the waveform window. When I try to fix the array size and use uvm_field_sarray_int to record it, it works well and data show as expected in the waveform windows.


My code:




# sequence item
parameter int P_BIT_DEPTH = 10;
rand int unsigned data_len;
rand bit unsigned [P_BIT_DEPTH-1:0] data [];
...
`uvm_field_array_int(data, UVM_ALL_ON+UVM_UNSIGNED)
`uvm_field_int (data_len, UVM_ALL_ON+UVM_UNSIGNED)
...
constraint c_data_size { data.size() == data_len; };
constraint c_data_size_order { solve data_len before data; };

# Sequence body task
start_item(req);
if (! req.randomize() with { data_len == 2; })
`uvm_error(tID, "Can't randomize ingress packet")
finish_item(req);
 

req.sprintf() always prints the right information, no matter data is dynamic or static array.


post-1859-0-04386200-1401142558_thumb.png


Link to comment
Share on other sites

Recoding dynamically sized arrays and queues requires the the vsim -classdebug switch. Use of the `uvm_field macros are not required. Check the reference manual for other options related to the "add wave" command regarding dynamic memories. For more help, please contact Mentor Support.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...