# Bind interface for internal DUT forcing

**URL:** <https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120>\
**Category:** UVM\
**Tags:** UVM\
**Created:** [May 14, 2017, 12:57pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120 "2017-05-14T12:57:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 14, 2017, 12:57pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/1 "2017-05-14T12:57:07Z")

</div>

Hi,

I want to connect an interface to and internal DUT signals and connect it to a VIP driver, then force it through a task that is defined in the interface as follows:

```verilog
interface vip_axi_wrapper_lbw_if (input aclk, input aresetn, 
    output wire DUT_MASTER_awvalid[0:FC_MAX_NUM_OF_LBW_MASTERS-1],
    .
    task drive_if();
	 force DUT_MASTER_awvalid[0] = axi_if.master_if[0].awvalid;
endinterface

```

Then I’m binding it to the DUT internal signals as foolows:

```verilog
bind top_tb vip_axi_wrapper_lbw_if pcie_rtr_vif (.aclk(top_if0.lbw_clk[0][0]), 
    .DUT_MASTER_awvalid ('{`RTR_0_0_PATH_TMP.lbw_mstr_awvalid, top_if0.dummy}));

```

After that I’m passing it through the set\_config as follows to an agent:

```verilog
initial uvm_config_db#(virtual vip_axi_wrapper_lbw_if)::set(null, "*" , "pcie_rtr_lbw_vif", top_tb.pcie_rtr_vif);

```

The problem is the force doesn’t apply on the RTL signal which is driven by the RTL and I see 'x’s. Is there a way of doing this?  
Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 14, 2017, 2:33pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/2 "2017-05-14T14:33:24Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120):_

I have two questions:  
(1) why does your SV interface has ports?  
(2) you are binding this Interface to tb\_vip and not to the DUT. Is this what you want?

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 14, 2017, 2:49pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/3 "2017-05-14T14:49:19Z")

</div>

Hi,

Thanks for the response.

1. The reason for the ports is that I’m trying to create a generic IF that I could connect RTL internal AXI interfaces in different blocks in my DUT, and force them to an AXI VIP. If I won’t use ports I’ll have to create an individual IF per RTL AXI end point.
2. No, I’m binding the generic IF I created (vip\_axi\_wrapper\_lbw\_if) to my DUT that instantiated in the top\_tb. After that I’m passing it through the factory to my agent, which will initiate the internal IF task that force the ports which was binded to the DUT.

I managed to make this work in the EDA playground with a simple example. But since I’m using the set\_config\_db to pass the virtual IF, I think it might cause this to fail.

Please advise.

Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 14, 2017, 3:29pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/4 "2017-05-14T15:29:14Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/3):_

Unfortunately I do not understand your Explanation for (1). Having ports in an SV Interface Limits the usage of this Interface.  
The Syntax for the bind construct is as follows  
bind \<inst. name of this module\>

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 14, 2017, 4:05pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/5 "2017-05-14T16:05:15Z")

</div>

Hi,

Sorry for being unclear, I’ll try to be more clear this time.  
My main purpose is to drive internal design IFs when those are already driven by RTL drivers.

For this discussion these IFs are standard AXI4 IFs. Now, lets say I have few AXI4 IFs in the entire design, and I want to control which are driven by the VIP and overcome the RTL drivers and which are not forced by the VIP and driven by the RTL drivers as usual.

For that purpose I created only one IF that has ports which correspond to AXI4, and a task that force those ports when the task is activated - as seen above. In this way I can connected each of the AXI4 internal RTL signals to an instance of this IF wrapper, and send them to the factory for the agent to pick them up and control which is active and which is not.

The problem is that the force only apply on the ports, but the RTL signals, which are driven by the RTL, becomes ‘x’.  
I there a better way of doing what I just described?

Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 14, 2017, 5:39pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/6 "2017-05-14T17:39:06Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/5):_

Your wording is still a Little bit confusing to me.  
(1) I guess you want to drive internal nodes or signals and not complete IFs. Right?  
(2) What are RTL drivers? A node/Signal is driven by a RTL signel. Right?  
(3) what is the implementation language of your design?

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 14, 2017, 6:36pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/7 "2017-05-14T18:36:09Z")

</div>

Hi,

1)Yes. For example I have 3 RTL modules that connected one to another.  
ModuleA → ModuleB → ModuleC  
IF1 IF2  
I would like to drive IF1 and IF2 instead of ModuleA and moduleB respectively.  
But the way I want to do it is as mentioned. Encapsulate IF1 and IF2 in a virtual IF with a task that controls whether I force a VIP on them or not, send it to the UVM factory, and use the task during the simulation.  
2) RTL drivers are moduleA and moduleB in my example.  
3) The design is in Verilog and I do verification in SV and UVM.

Thanks.

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 15, 2017, 6:04am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/8 "2017-05-15T06:04:31Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/7):_

OK, I understand now. You have IF1 in between ModuleA and ModuleB, IF2 in between moduleB and moduleC.  
Why do you not implement in the SV Interfaces a MUX? One Input is used for the chain and the other one to drive from your testbench?

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 6:31am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/9 "2017-05-15T06:31:24Z")

</div>

Hi Thanks.

The modules A-C are a part of the DUT. I do not have access to change them. I wish to force IF1 and IF2 from my test, depending on the configuration object defined by the user running the test.

My idea was to connect an interface to IF1 and IF2, and use the force task inside it during the simulation. The problem is that I’m getting 'X’s.

Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 15, 2017, 7:39am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/10 "2017-05-15T07:39:18Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/9):_

Please check this contribution:  
[https://verificationacademy.com/forums/uvm/how-force-dut-internal-signals-uvm-Environment](https://verificationacademy.com/forums/uvm/how-force-dut-internal-signals-uvm-Environment)

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 8:34am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/11 "2017-05-15T08:34:03Z")

</div>

Thanks very much.  
I read this contribution, but the problem with that is that they instantiate the DUT, which in my case is already instantiated and is a sub-block of the whole DUT.  
They do:  
dut dut\_instance(.dut\_pin(if\_instance.dut\_pin)); //connect if to DUT

In my casr I tried something similar:  
dut\_if if\_instance(.dut\_pin(`PATH\_TO\_SUB\_BLOCK.dut\_instance.dut\_pin)); //connect DUT to if

But when I do get\_uvm\_db of the virtual vif in my testcase and drive vif.ctrl to ‘1’:  
if(ctrl) begin  
force dut\_pin = dut\_pin\_desired\_val;  
end, the forces  
the result is 'X’s on the `PATH\_TO\_SUB\_BLOCK.dut\_instance.dut\_pin.

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 8:39am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/12 "2017-05-15T08:39:33Z")

</div>

Here is another example of what I’m trying to do:  
interface whitebox\_if(  
output wire sig  
);  
task drive\_if();  
force sig = vip.some\_value;  
endtask  
endinterface

module top;  
bind inst\_dut whitebox\_if wb\_if( sub\_1.sig ); // bind interface to DUT + connect internal signals  
initial  
uvm\_config\_db #(virtual whitebox\_if)::set(null, “\*”, dut.wb\_if); // place (bound/buried) interface into database  
endmodule

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 15, 2017, 12:06pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/13 "2017-05-15T12:06:56Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/12):_

You are using in this example a hierarchical path (vip.some\_value) and the bind. This might conflict.

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 12:28pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/14 "2017-05-15T12:28:24Z")

</div>

This is not the problem, since I have vip class instance in the virtual interface, so you can assume this:

force sig = 'h1212;

So the problem here is much deeper That I can’t figure out. I think this is connected to the fact I’m using the factory to pass the virtual interface.

Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 12:30pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/15 "2017-05-15T12:30:34Z")

</div>

BTW, I can solve the whole problem by forcing to the exact RTL internal signal, and not using the ports, but this means I will have to create a unique interface per sub-block (IF1, IF2, IF3 …), and since the interfaces are pretty much the same per block, this will be very ugly.

Thanks,  
Berry

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 15, 2017, 1:02pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/16 "2017-05-15T13:02:34Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/15):_

You are using the config\_db. This is a very simple and straight Forward mechanism. I do not believe it Comes from there.

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 15, 2017, 1:05pm UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/17 "2017-05-15T13:05:53Z")

</div>

Yes. But this is the only thing I have in mind here. So why does this strategy fail?

Thanks.

---

<div class="post-metadata">

**Author:** ![berryvai](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@berryvai](https://verificationacademy.com/forums/u/berryvai)\
**Post date:** [May 16, 2017, 8:10am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/18 "2017-05-16T08:10:46Z")

</div>

Anyone has more ideas, please?

---

<div class="post-metadata">

**Author:** ![chr\_sue](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/chr_sue/32/1199_2.png) [@chr\_sue](https://verificationacademy.com/forums/u/chr_sue)\
**Post date:** [May 16, 2017, 11:06am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/19 "2017-05-16T11:06:11Z")

</div>

_In reply to [berryvai](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/18):_

I was working on a simple example. It is quick and dirty but it works.  
Can you please respond on my email:  
[Christoph@christoph-suehnel.de](mailto:Christoph@christoph-suehnel.de)

---

<div class="post-metadata">

**Author:** ![Adithya0708](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/a/f0a364/32.png) [@Adithya0708](https://verificationacademy.com/forums/u/Adithya0708)\
**Post date:** [February 20, 2026, 6:15am UTC](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120/20 "2026-02-20T06:15:57Z")

</div>

Hi Berry,

I am newbie to verification and my thoughts are , why cant we directly take the hierarchical path for the signal and force it in the DUT(simplest solution possible).

why do we even need an interface and task to do the same? Is it for configurability or something else?

please suggest the best solution if you have one.

Thank you.

[Next page](https://verificationacademy.com/forums/t/bind-interface-for-internal-dut-forcing/33120.md?page=2)
