Replace "reporter" string with module hierarchy in reporting functions (UVM 1.1d)

In reply to dave_59:

Thanks a lot Dave, indeed your proposal sounds much more interesting then mine!
I tried to use the context macro, but I did not think hard enough to figure out I could pass a newly created report_object with the name of the module hierarchy.

EDIT: while trying to implement your solution I bumped in a different problem that makes the implementation much harder then the solution I adopted. We have defines (sva_error/sva_warning) that are used by the RTL team to create assertions and their reporting, so in order to modify them throughout the code we need to make sure that each module they are used in we have a uvm_report_object declared, which makes it difficult to do by modifying the sva_error/warning definitions only. We need to ensure the uvm_report_object is instantiated once per module and it will be difficult to achieve this without modifying the RTL as well.

To make it more explicit, we have the following code at the moment:


    `define sva_error(id, msg) `uvm_error(id, $sformatf("%s -- scope: %m", msg))
    `define sva_warning(id, msg) `uvm_warning(id, $sformatf("%s -- scope: %m", msg))

which is used by the assertions.