Factory encountered no relevant overrides


When I use my_scoreboard1 which extends from my_scoreboard to override my_scoreboard,I get a message that
################factory Override Information (*)

Given a request for an object of type ‘my_scoreboard1’ with an instance
path of ‘uvm_test_top.env.sb’,the factory encountered
no relevant overrides.
Result:
The factory will produce an object of type ‘my_scoreboard1’
############################

And the test bench still use my_scoreboard not my_scoreboard1
the factory overrides failed
I want to know Why ?

In reply to panwei1988:

There might be several reasons for this message. Did you register my_scoreboard1 with the factory?
Where are you calling the override?
To debug this situation you can call
factory.print();
This gives you all overrides regsitered with the factory.
You should call this from the test you aare running, directly before the run_phase. I do this normally in the start_of_simulation_phase.

In reply to chr_sue:

thanks for your reply!
I have registered my_scoreboard1 with the factory
And I add factory.print() in the connect_phase.
It shows that my_scoreboard1 has been registered.
exactly I modify main_phase in my_scoreboard1, I delete super.main_phase
then it is going like what I expect!

In reply to panwei1988:

Can you share more code, like how you are overriding, where you are overrideing?

I extends my_scoreboard1 from my_scoreboard,
In my_scoreboard1, I rewrite main_phase
then I override my_scoreboard by my_scorebord1 in my_case.

In reply to panwei1988:

Have you looked at the Factory Override page on verification academy ?

https://verificationacademy.com/cookbook/usingfactoryoverrides

You should not need to use ‘delete’ anywhere in you code.
You should be using the set_type_override or set_inst_override methods as shown

In reply to graeme_jessiman:

Hi Graeme, I did not get your point. I did not see panwei is using the delete method. As I understood from him it is working now.
Panwei can you please confirm again? Thanks.
Christoph

In reply to chr_sue:

[quote]In reply to graeme_jessiman:

Hi Christoph
Panweil mentioned in his earlier post “exactly I modify main_phase in my_scoreboard1, I delete super.main_phase”.

I took this to mean that he was trying to override the component in the main_phase of his extended class and I thought he was using a delete method but I reading it again he was just deleting the call to super.main_phase.
Anyway… sounds like he was heading down the wrong path and he should use the set_type_override or set_inst_override methods as described on the URL I mentioned.
Graeme

In reply to graeme_jessiman:

[quote]In reply to chr_sue:

Hi Greame, I see there is still space for interpretation. I was reading panweis explanation that he is replacing super.main_phase with super.run_phase. Nevertheless in the run_phase the testbench has to be created and all testbench components are connected. Removing super.main_phase or super.run_phase might have influence only on the exection of the sequences.
To investigate this, more code would be needed.
Christoph