# Difference between input and wire clock to an interface

**URL:** <https://verificationacademy.com/forums/t/difference-between-input-and-wire-clock-to-an-interface/40399>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, interface\
**Created:** [May 15, 2022, 12:46pm UTC](https://verificationacademy.com/forums/t/difference-between-input-and-wire-clock-to-an-interface/40399 "2022-05-15T12:46:12Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rraa](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/r/53a042/32.png) [@rraa](https://verificationacademy.com/forums/u/rraa)\
**Post date:** [May 16, 2022, 5:27am UTC](https://verificationacademy.com/forums/t/difference-between-input-and-wire-clock-to-an-interface/40399/3 "2022-05-16T05:27:06Z")

</div>

_In reply to [dave\_59](https://verificationacademy.com/forums/t/difference-between-input-and-wire-clock-to-an-interface/40399/2):_

First thanks to for your answer.

I am trying to add a light bus that will replace an existing VIP, the interface of the VIP doesn’t give the clock of the interface as input but assign as a wire, in order to avoid ifdef I want to connect the clock of the light bus same.

\*\*So want I need to know if there is any difference between both below examples.  
\*\*  
_Example 1, clk is wire:_  
Declare the interface:  
light\_bus\_if bus\_if();

assign the clk:  
bus\_if.clk = `TOP.clk;

in the interface:  
wire clk;  
…  
clocking cb @(posedge clk);

_Example 2, clk is input:_  
Declare the interface and give the clock :  
light\_bus\_if bus\_if(.clk(`TOP.clk));

in the interface:  
interface light\_bus\_if (input bit clk)  
…  
clocking cb @(posedge clk);

Thanks

---

_[View the full topic](https://verificationacademy.com/forums/t/difference-between-input-and-wire-clock-to-an-interface/40399)._
