# Clock generation through UVC

**URL:** <https://verificationacademy.com/forums/t/clock-generation-through-uvc/31995>\
**Category:** UVM\
**Tags:** UVM, uvc, clock\
**Created:** [June 29, 2016, 7:44am UTC](https://verificationacademy.com/forums/t/clock-generation-through-uvc/31995 "2016-06-29T07:44:59Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![louis-alexandre.latchimy](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/l/ba9def/32.png) [@louis-alexandre.latchimy](https://verificationacademy.com/forums/u/louis-alexandre.latchimy)\
**Post date:** [June 29, 2016, 10:08am UTC](https://verificationacademy.com/forums/t/clock-generation-through-uvc/31995/6 "2016-06-29T10:08:15Z")

</div>

_In reply to [rohitk](https://verificationacademy.com/forums/t/clock-generation-through-uvc/31995/5):_

I set CLK\_HIGH and CLK\_LOW in the start\_of\_simulation phase of my driver as follow:

```auto
function void start_of_simulation_phase(uvm_phase phase);
    super.start_of_simulation_phase(phase);

    vif.STARTING_SIGNAL_LEVEL = STARTING_SIGNAL_LEVEL;
    vif.CLK_HIGH	= ((NOMINAL_PERIOD/2)*(DUTY_CYCLE/100));
    vif.CLK_LOW = ((NOMINAL_PERIOD/2)*((1-DUTY_CYCLE)/100));
    /*
    STARTING_SIGNAL_LEVEL, NOMINAL_PERIOD and DUTY_CYCLE come from
    a configuration object
    */
endfunction: start_of_simulation_phase

```

Nothing is generated in the waveform.

---

_[View the full topic](https://verificationacademy.com/forums/t/clock-generation-through-uvc/31995)._
