Jump to content
Sign in to follow this  

M_UVM_FIELD_QDA_INT does not work with dynamic arrays or queues

Recommended Posts

I've found a use for set_int_local and noticed that it does not work with dynamic arrays or queues. 

Issue can be demonstrated with this code: https://www.edaplayground.com/x/6B8e

The problem appears to be on the first line of this code block:

              else if(uvm_is_match(str__, {__m_uvm_status_container.scope.get_arg(),$sformatf("[%0d]", index__)})) begin \
                if(index__+1 > ARG.size()) begin \
                  int sz = index__; \
                  int tmp__; \
                  `M_UVM_``TYPE``_RESIZE(ARG,tmp__) \
                end \
                if (__m_uvm_status_container.print_matches) \
                  uvm_report_info("STRMTC", {"set_int()", ": Matched string ", str__, " to field ", __m_uvm_status_container.get_full_scope_arg()}, UVM_LOW); \
                ARG[index__] =  uvm_object::__m_uvm_status_container.bitstream; \
                __m_uvm_status_container.status = 1; \
              end \

At this line, str__ is set to "cfg.arr_var[0]", this:

{__m_uvm_status_container.scope.get_arg(),$sformatf("[%0d]", index__)} 

evaluates only to "arr_var[0]", hence the match does not succeed. I believe that the code would be correct if it used get() instead of get_arg().


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