# How to drive a reg/integer in a dut so as to avoid the error of Illegal combination of structural and procedural drivers

**URL:** <https://verificationacademy.com/forums/t/how-to-drive-a-reg-integer-in-a-dut-so-as-to-avoid-the-error-of-illegal-combination-of-structural-and-procedural-drivers/37651>\
**Category:** UVM\
**Tags:** SystemVerilog, UVM, bind, driver, interface\
**Created:** [May 30, 2020, 9:17pm UTC](https://verificationacademy.com/forums/t/how-to-drive-a-reg-integer-in-a-dut-so-as-to-avoid-the-error-of-illegal-combination-of-structural-and-procedural-drivers/37651 "2020-05-30T21:17:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mandeep](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@Mandeep](https://verificationacademy.com/forums/u/Mandeep)\
**Post date:** [May 30, 2020, 9:17pm UTC](https://verificationacademy.com/forums/t/how-to-drive-a-reg-integer-in-a-dut-so-as-to-avoid-the-error-of-illegal-combination-of-structural-and-procedural-drivers/37651/1 "2020-05-30T21:17:12Z")

</div>

```verilog
module A (
         req
        ,clk
    );

        input req;
        input clk;

        always @ (posedge clk )
        begin
           state_reg <= START;
        end
        reg [1:0] state_reg=INVALID;
         -  
       <REST OF THE CODE in module A>

endmodule

```

My interface :

```verilog
interface A_if(inout state_reg)

 task force_reset();
 force state_reg = 2'b11;
 endtask
endinterface

```

I get this error:  
Illegal combination of structural and procedural drivers.  
Variable “state\_reg” is driven by an invalid combination of structural and  
procedural drivers. Variables driven by a structural driver cannot have any other drivers.

Note I cannot change the dut code i.e (module A) and this is just a dummy code, written to convey the issue.

---

<div class="post-metadata">

**Author:** ![Mandeep](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/6a8cbe/32.png) [@Mandeep](https://verificationacademy.com/forums/u/Mandeep)\
**Post date:** [June 8, 2020, 1:45pm UTC](https://verificationacademy.com/forums/t/how-to-drive-a-reg-integer-in-a-dut-so-as-to-avoid-the-error-of-illegal-combination-of-structural-and-procedural-drivers/37651/2 "2020-06-08T13:45:57Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/how-to-drive-a-reg-integer-in-a-dut-so-as-to-avoid-the-error-of-illegal-combination-of-structural-and-procedural-drivers/37651/2):_

Thanks dave for the prompt reply. Apologies for the delay in response .  
Yes you are correct i am using binds to instantiate my interface.  
The first solution worked for me .
