# Forcing values of bind ports through concatenated signals on inner instance port connection

**URL:** <https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948>\
**Category:** SystemVerilog\
**Tags:** bind, force-signal\
**Created:** [November 12, 2024, 8:44am UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948 "2024-11-12T08:44:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuval-Jacoby](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@Yuval-Jacoby](https://verificationacademy.com/forums/u/Yuval-Jacoby)\
**Post date:** [November 12, 2024, 8:44am UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/1 "2024-11-12T08:44:58Z")

</div>

Hello,

I am trying to force values on a module’s output ports (pretty standard procedure) and encountering some odd behavior (simulator is VCS). I have the following setup:

```auto

module unit (
    output a,
    output b
);

...

module unit_bind (
     output a,
    output b
)

drv_data #(.PORT_NUM(2)) drv_outputs(
.clk(clk), 
.data(`TEST_DATA), 
.out_port({a, b}));
...

drv_data #(
    parameter PORT_NUM = 0
)(
    input clk,
    input [SENT_CONN_PACKET_SIZE-1:0] data [PORT_NUM], 
    output out_port [PORT_NUM]
);

    reg temp [PORT_NUM];
    int count, i;

    initial 
        $deposit(count,0);
    
    always @(negedge test_pkg::clk) begin
        for (i=0; i< PORT_NUM; i++) begin
            temp[i] = data[i][(SENT_CONN_PACKET_SIZE-1-count)];
        end 
        force out_port[PORT_NUM-1:0] = temp[PORT_NUM-1:0];
        if (count < SENT_CONN_PACKET_SIZE) begin
            count = count + 1;  
        end
    end
    
endmodule

...

 bind unit unit_bind bind_inst (.*);

```

Inside the drv\_data instance, I see the correct values on “out\_port”. However, the external ports (in the bind) are unaffected.

Would appreciate any help since I am not sure what I’m missing.

---

<div class="post-metadata">

**Author:** ![Yuval-Jacoby](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@Yuval-Jacoby](https://verificationacademy.com/forums/u/Yuval-Jacoby)\
**Post date:** [November 12, 2024, 8:46am UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/2 "2024-11-12T08:46:11Z")

</div>

![image](https://verificationacademy.com/forums/uploads/default/original/2X/b/b65d6379654c0b20068b20465407ff0ea953885f.png)

The first signal is the out\_ports port, whereas the two rows of Xs below it are the bound module’s ports. Furthermore, if I only connect a single signal in the drv\_data instance:

```auto
drv_data #(.PORT_NUM(1)) drv_outputs(
.clk(clk),
.data(`TEST_DATA),
.out_port(a));

```

Then the force statement works as expected.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [November 12, 2024, 2:21pm UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/3 "2024-11-12T14:21:45Z")

</div>

It would be helpful if you provided a complete example which can be compiled and executed, preferably on EDA Playground. It is difficult to discern what you are trying to accomplish with the snippets of code that you provided.

---

<div class="post-metadata">

**Author:** ![Yuval-Jacoby](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@Yuval-Jacoby](https://verificationacademy.com/forums/u/Yuval-Jacoby)\
**Post date:** [November 12, 2024, 3:05pm UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/4 "2024-11-12T15:05:17Z")

</div>

@cgales My apologies. I threw together an example here, apologies if it is slightly spaghetti-like:

> **[EDA Playground](https://edaplayground.com/x/UE42)**
>
> Edit, save, simulate, synthesize SystemVerilog, Verilog, VHDL and other HDLs from your web browser.

You can see that the module port is constantly at 0, while the inner value is forced. The force does not propagate through the port, which is my issue.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [November 12, 2024, 3:28pm UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/5 "2024-11-12T15:28:37Z")

</div>

First thing you should do is closely look at the warnings you are getting, or run with a different simulator. You have several errors which should prevent your code from compiling, but your simulator of choice doesn’t report them as errors.

Also, I don’t see any bind() statement in the code you posted.

---

<div class="post-metadata">

**Author:** ![Yuval-Jacoby](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/y/7ba0ec/32.png) [@Yuval-Jacoby](https://verificationacademy.com/forums/u/Yuval-Jacoby)\
**Post date:** [November 12, 2024, 3:45pm UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/6 "2024-11-12T15:45:39Z")

</div>

@cgales My apologies, that was very unprofessional. I fixed the warnings and added the obviously missing bind statement.

---

<div class="post-metadata">

**Author:** ![cgales](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/c/ccd318/32.png) [@cgales](https://verificationacademy.com/forums/u/cgales)\
**Post date:** [November 12, 2024, 4:27pm UTC](https://verificationacademy.com/forums/t/forcing-values-of-bind-ports-through-concatenated-signals-on-inner-instance-port-connection/48948/7 "2024-11-12T16:27:45Z")

</div>

Your updated code still generates errors in three of the four commercial simulators on EDA Playground. You should analyze these errors and fix your code.
