Anyone know a way to covert a string into a hierarchical path name?
I’d like to use the LL_DRIVER_BFM string to form the path dut_top.(LL_DRIVER_BFM)
const string LL_DRIVER_BFM = "SysLnp_LL_Rx_drv_bfm";
...
uvm_config_db #( virtual LL_driver_bfm )::set( null , "VIRTUAL_INTERFACES", LL_DRIVER_BFM , dut_top.LL_DRIVER_BFM ) ;
Thanks
Brian
In reply to bmorris:
Of course no sooner than I have posted the question, I see a post from Dave from 2011 saying that
hierarchical path names have to be statically typed, SV cannot convert a string name to a path name.
Has anything changed since then, perhaps?
In reply to bmorris:
Nope, you’re going to have to write them all out explicitly. I’d also do the config DB set from the top.
In reply to Tudor Timi:
Well not a big concern. It’s only a single place in the top that’s affected.
I’ve got a dual-top, dut_top (instantiations) and tb_top (db access etc). I picked that up from mentor’s cookbook, just for separating complexity.
In reply to bmorris:
Don’t we have a way yet to do this in SV without much complication ? If there was, it would be very helpful for me, as I would otherwise have to statically type it down for 5105 times as it is a multidimensional array in my case!