Jump to content
Sign in to follow this  
krunalk

Dynamic Packed Array

Recommended Posts

Hello,

I have declared dynamic packed array in my .sv test file

 

logic [31:0] txdata [];

 

and I want to configure it to another variable in transaction block.

so, I am using  uvm_resource_db#(logic)::set("TEST_TO_TRANS","txdata_vip",vip_txdata,this); in test side and using statement  void'(uvm_resource_db#(logic)::read_by_name("TEST_TO_TRANS","txdata_vip",TXDATA)); in transaction side.

 

but It shows type error, so what should I use in #(type)??

 

 

 

 

Share this post


Link to post
Share on other sites

You will need to do a typedef and use it, something like:

 

 

typedef  logic [31:0] dyn_d_t [];

 

  dyn_d_t txdata;

 

 (at both read_by_name and set sides). Then use #(dyn_d_t)

 

Try it, if it doesn't work show us more code.

 

HTH

Srini

www.cvcblr.com
 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×