naveeng Posted April 18, 2012 Report Share Posted April 18, 2012 Hi, Does someone have existing code-piece for a collector that iterates aftter build from uvm_root, and collects all instances of a certain uvm type - lets say tlm fifo? Thanks. Naveen Quote Link to comment Share on other sites More sharing options...
naveeng Posted April 19, 2012 Author Report Share Posted April 19, 2012 Just realize that tlm fifo is a templated specialization of uvm_component. I wanted to collect all such tlm fifoes, in an environment developed my scores of people, and thereby have handy access to tlm fifo allowing me to control/be aware of the "size" - unbounded and unconnected tlm fifoes have been a source of bother. I can however collect tlm fifoes in a "uvm_component" type array :- is there a distinguishing property that can be accessed in a uvm_component indicating it is a "tlm fifo type"? Quote Link to comment Share on other sites More sharing options...
dave_59 Posted April 19, 2012 Report Share Posted April 19, 2012 Since tlm_fifo is not registered with factory, you can use uvm_root::find_all() to get a list of all components, and then iterate over the list using $cast() to select the types you are interested in. Quote Link to comment Share on other sites More sharing options...
naveeng Posted April 19, 2012 Author Report Share Posted April 19, 2012 (edited) Since tlm_fifo is not registered with factory, you can use uvm_root::find_all() to get a list of all components, and then iterate over the list using $cast() to select the types you are interested in.Dave, The issue is that the uvm_tlm_fifo_base#(T) class is parameterized, and extends directly off the uvm_component. Therefore, to get all possible specializations of the tlm fifo, thru' $cast from a uvm_component list, would require I have access to ALL transaction types - this is not much different from the problem that I started off with. Can you explain pls - i likely didnt follow, Edited April 19, 2012 by naveeng Quote Link to comment Share on other sites More sharing options...
dave_59 Posted April 19, 2012 Report Share Posted April 19, 2012 I think you are out of luck with the existing library, unless people name give instance names of all their fifos you can match. Quote Link to comment Share on other sites More sharing options...
uwes Posted April 19, 2012 Report Share Posted April 19, 2012 that is an SV limitation around parameterized types. what might work as a workaround is to look at get_type_name() or $typename() and trying to extract the typename from it. /uwe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.