Execution of connect phase twice in simulation

Hi All,

I have one scenario, on which i want to change connections of analysis port run time. so,i thought to use uvm phase jumping, i know this is not as per the guideline, but i have too.
So, my question is, if i jump to connect phase from run phase, for changing the port connection, does uvm has any feature which removes all existing connection? and allow me to do new one.

Please provide any alternate solution as well if any one has,

Thanks and Regards,
Mitesh Patel

In reply to mitesh.patel:
Before I answer that question, you’re going to have to explain exactly why you think you need to change your connections at runtime. You could make all your connections up front and then have your subscribers just ignore the data if you want them to act like they’re disconnected.

In reply to tfitz:

I dont have a switch to disable consumer component(here, scoreboard) its always ON and I can not change it. Neither I can stop producer component(here, monitor) because its encrypted.

So to disable the scoreboard run time I can think of only one option as now. Which is to disconnect the connection of these two components. So the question is it possible to disconnect two components in run_phase? If yes then how can I do that?

Please suggest if you have any better suggestion.

Thanks and Regards,
Mitesh Patel

In reply to mitesh.patel:

You can add a control variable in the scoreboard which can enable/disable certain code and you can set the variable at run time by sending a transaction from monitor (or overridden monitor/new monitor). Care needs to be taken at what time to do this, not to loose any data

In reply to rajesh.deshpande:

Hi Rajesh,

I can not change any existing code of monitor or scoreboard. i have only control of connection in my environment. so there is no point of adding the variable.
Scoreboard and monitor is encrypted.

Please suggest something else.

Since you can’t change connections at runtime, you could connect your monitor to a “forwarder” which would be a subscriber with an analysis port whose write() method would conditionally call ap.write() based on a control variable. Then you would connect forwarder.ap to your scoreboard.

In reply to tfitz:

So, does it mean that we can not disconnect/change the connected connections in uvm?
The suggestion is good for the problem. but i want to know about disconnection of existing connection.

Please provide your inputs on the same.

In reply to mitesh.patel:

The strategy UVM has is seperating test from testbench. But the test can customize the testbench. Any modification will be executed prior to the run_phase. Then it is fix.
If you want to modify connections in your envrionemnt (testbench) you can define a new test doing this.
This approach is very structured and helpful for reuse.

In reply to chr_sue:

Christoph is correct.

In reply to chr_sue:

Hi

If you want to modify connections in your environment (testbench) you can define a new test doing this” What do you mean by creating new test? do you mean that for only this test i have add layer/component between monitor and scoreboard to control the write operations? for rest monitor-scoreboard connection should remains direct?
But still the question is the same. can i disconnect existing connection in uvm?

Thanks
Mitesh Patel

In reply to mitesh.patel:

Creating a test means you are customizing your testbench to the actual needs and selecting a sequence which is running on this specific enviroonment.

In reply to chr_sue:

Thanks chr_sue and tfitz
I got your alternate ways of doing this.

But uvm does not support such disconnection of uvm_components run time?

Thanks and Regards,
Mitesh Patel

In reply to mitesh.patel:

I do not see any need to have this functionality because the TLM modelling does not require such a behavior. In contrast to the RTL/pinlevel behavior no data are trasmitted from one component to another one automatically. You have always to make afunction call.

In reply to chr_sue:

Ohh Thanks, i got it.
Thank you so much for giving such a valuable information.

Regards,
Mitesh Patel