Jump to content

Recommended Posts

Posted

 The UVM function uvm_hdl_force   format is 

uvm_hdl_force( string  path,   uvm_hdl_data_t  value )

 

My question is can I use a array path in the path?

 

For example :  uvm_hdl_force(  test_ben.cpu.block[0].instan[1].set[2] ,1 );

 

Can it work? Its compile is no problem.

 

Thank you very much~~

Posted

hi,

 

i think your problem isnt the example you show. as written test_ben.cpu.block[0].instan[1].set[2] must be a string and if this is the case the code should compile

For example :  uvm_hdl_force(  test_ben.cpu.block[0].instan[1].set[2] ,1 );

BUT the hard question is actually if the path argument 

 

A) refers to an instance path in the right language domain (SV,VHDL,SC,..) which the HDL backbone supports (might be vendor dependent)

B) from the vendor support and LRM for your path expression (does the string path involve slices, indices, addon levels via generics)

 

/uwe

Posted

hi,

 

i think your problem isnt the example you show. as written test_ben.cpu.block[0].instan[1].set[2] must be a string and if this is the case the code should compile

For example :  uvm_hdl_force(  test_ben.cpu.block[0].instan[1].set[2] ,1 );

BUT the hard question is actually if the path argument 

 

A) refers to an instance path in the right language domain (SV,VHDL,SC,..) which the HDL backbone supports (might be vendor dependent)

B) from the vendor support and LRM for your path expression (does the string path involve slices, indices, addon levels via generics)

 

/uwe

hi , uwes

Thank you very much

Yes, your example is right.

The path language is Verilog and my env language is System Verilog.

There are many items in the array block[0], so do instan[1] and set[2].

So you mean my path is legal ?

Thank you for your regard

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...