I’m aware how the uvm_pool works and how we can share data across components essentially through a hashmap (or associative array in systemverilog terminology), but honestly I’m always scared about these global data structures with global scope.
The UVM user guide doesn’t mention it at all and searching across the web hasn’t really highlighted a useful pattern, so my question here is, what is in your opinion the best use of such data structure?
UVM was developed with input from many different agencies, so there are a lot of components which carry over from older methodologies. Just because something exists in the code doesn’t mean that you should try and find a use for it. The uvm_pool would be a component that shouldn’t be used in the typical environment.
I agree with @cgales that there is way too much stuff in the UVM. The vast majority of verification environments will never these extra classes, but if you ever do, they are there so you don’t have to reinvent it.
uvm_pool is the foundation for a number of other classes like the barrier, callbacks, and catchers classes. uvm_pool is available if you needed a container around an associative array, just like it has for events and queues.
Given the lack of published material around it I guess there’s also a fair possibility they are not necessarily working as documented and therefore expose the users to unnecessary risks. Some constructs may make sense in some cases, but I wouldn’t try to use them when other mechanisms to share data do exist and are battle proven.