I have two drivers drv1 and drv2. I want to drive mod1 and mod2. There are few signals connected between module1 and module2 and remaining signals are connected directly to the ports. So i want to drive the signals to module2 after the signals from module1 are available. how to synchronize the signals from module1 and signals that are connected directly to the ports.
I have access to all signals that are inputs to module 2, but how to synchronize between the signals that are applied directly and the signals coming from module 1.
What do you mean with ‘applied directly’? All input signals should be driven from any UVM driver. Do you have dependencies between your functtional interfaces?
Every input is driven from UVM driver. I have a DUT which is having 3 sub modules mod1,mod2,mod3. For these DUT i’m trying to construct a TB, by using these TB i should be able to verify individually each module or sub system (ex. mod1+mod2). For each module i am having separate interfaces and agents. so here i want to verify subsystem (mod1+mod2), there are some signals going from mod1 to mod2. FOr mod2 the input signals should be driven from driver after the intermediate signals from mod1 are available. How to synchronize the intermediate signals from mod1 and signals that are driven from driver.
There is a conflict in your description. On the one side you are saying all input signals are driven from the corresponding driver. On the other hand you are saying you have to wait for some signals from another sub-module.
Are you sure your interface definitions are useful?
So, as the example goes, is it true that “enable_1” is being driven from both the interface vif2 for module “def” and also by module “abc” ?
I’ve a crude soln. for this issue. in the driver of the “def” module, which’ll have the handle for vif2, its good to poll for “vif2.enable_1” and if it hasn’t toggled/not driven by mod1, i.e. if it is in a position where it can be driven by vif2, only then drive it.
I’m sure there are better solutions. I’m also looking fwd to know about it.
A simple example will be a shared area such as banks of DRAM with processor and a DMA with an enable for bank. At the end of the day, its just shared resource, isn’t it ?
But I believe I’m wrong in my particular understanding. If I’m not mistaken, the question is about how two modules of an env can be checked together.
In such a scenario, its possible that timing between the two modules might also play a role. I’m also looking to find a particular soln. like this, which i’ll post as a separate thread.
It seems you need really the uvm_event. Please visit page 261 of the UVM Cookbook (Alternative Implementation Pattern Using Events To Signal Completion) to find an example for uvm_event.