Question:
I have a temporary situation where I want to change an existing file for one test, just to debug it. I will eventually use a factory over-ride or something similar as a final solution, but I don’t understand why this wouldn’t work.
I was thinking that I could just re-compile a file with different content, but same class names, etc. and it would replace the previously compiled file. When I do this, I get a warning and it does not seem to take the new, most recently compiled code:
UVM_WARNING @ 0: reporter [TPRGED] Type name ‘…_adaptor’ already registered with factory. No string-based lookup support for multiple types with the same type name.
I see this warning when simulating, which seems strange because I would expect the library to no longer have the previous code, nor would I expect anything to be registered with the factory.
The code I’m recompiling is like this:
class completion_adaptor extends uvm_subscriber#(pc_transaction);
// Factory registration macro
`uvm_component_utils(completion_adaptor)
/// Analysis Port
...
//*************************************************************************
// Function: new
//*************************************************************************
function new(
string name = "completion_adaptor",
uvm_component parent
);
super.new(name, parent);
endfunction
QUESTION: Can you explain what’s going on in the compile process that prevents this “compile over” strategy from working? I know the compile-over strategy is not a good long term solution, I’m just trying to understand why this doesn’t work. Does factory registration happen during the compile?
Thanks