# Verilog blocking/nonblocking assignment in clk generator with self triggered

**URL:** <https://verificationacademy.com/forums/t/verilog-blocking-nonblocking-assignment-in-clk-generator-with-self-triggered/29734>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, verilog-blocking-assignments\
**Created:** [July 23, 2014, 8:02am UTC](https://verificationacademy.com/forums/t/verilog-blocking-nonblocking-assignment-in-clk-generator-with-self-triggered/29734 "2014-07-23T08:02:58Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![haitao73](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/haitao73/32/2385_2.png) [@haitao73](https://verificationacademy.com/forums/u/haitao73)\
**Post date:** [July 23, 2014, 8:47am UTC](https://verificationacademy.com/forums/t/verilog-blocking-nonblocking-assignment-in-clk-generator-with-self-triggered/29734/2 "2014-07-23T08:47:35Z")

</div>

hi,  
@clk and #10 clk = ~clk is blocking assignment, the two statement are scheduled at Active region,  
but @clk and #10 clk \<= ~clk, the first statement is scheduled at Active region and the sencond is scheduled at NBA region, when clk \<= ~clk hanpen, the toggle of clk will reactive the @clk hanppen, and periodic trigger the non-blocking statement.

the generally writing style like below:

always #10 clk = ~clk; or  
always #10 clk \<= ~clk;

ps:no @clk condition

Thanks a lot!

---

_[View the full topic](https://verificationacademy.com/forums/t/verilog-blocking-nonblocking-assignment-in-clk-generator-with-self-triggered/29734)._
