# Design functions when the clock is inverted

**URL:** <https://discourse.myhdl.org/t/design-functions-when-the-clock-is-inverted/453>\
**Category:** Support\
**Created:** [February 17, 2021, 8:39pm UTC](https://discourse.myhdl.org/t/design-functions-when-the-clock-is-inverted/453 "2021-02-17T20:39:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kc64](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/kc64/32/83_2.png) [@kc64](https://discourse.myhdl.org/u/kc64)\
**Post date:** [February 17, 2021, 8:39pm UTC](https://discourse.myhdl.org/t/design-functions-when-the-clock-is-inverted/453/1 "2021-02-17T20:39:51Z")

</div>

I have a design that functions when my simulation stimulus contains

```
clock = Signal(False) # works

```

but does not function when the simulation contains

```
clock = Signal(True) # does not work

```

All clocking in the design is positive edge. Nothing else in the source files are changed. Since the MyHDL simulator is purely functional, what could cause such behavior? I don’t understand how this case could occur.

---

<div class="post-metadata">

**Author:** ![DrPi](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/drpi/32/36_2.png) [@DrPi](https://discourse.myhdl.org/u/DrPi)\
**Post date:** [February 17, 2021, 10:04pm UTC](https://discourse.myhdl.org/t/design-functions-when-the-clock-is-inverted/453/2 "2021-02-17T22:04:39Z")

</div>

Hard to say without a code snippet showing the problem…

---

<div class="post-metadata">

**Author:** ![josyb](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.myhdl.org/josyb/32/5_2.png) [@josyb](https://discourse.myhdl.org/u/josyb)\
**Post date:** [February 18, 2021, 11:39am UTC](https://discourse.myhdl.org/t/design-functions-when-the-clock-is-inverted/453/3 "2021-02-18T11:39:16Z")

</div>

You have to look at the code that drives the clock signal; apparently this code does not start when the initial value of the clock signal is set to `True`. As @DrPi says: without the actual source code it is impossible to accurately pinpoint the issue.
