What is the difference between blocking and nonblocking statements in verilog
In verilog, we have two types of assignment operators i.e. blocking (=) and non- blocking (<=). These two have theirs special usages – Here are the differences
1. behavior –
The blocking statements are as similar as any sequential programming language. In short, they execute sequentially.
The non-blocking statements are executed concurrently; it means if five statements are written together then it would depend on the simulator to execute which statement first. Ideally all the statements should execute at the same time.
- Synthesis –
The blocking statements infer simple “connection OR wire” during the synthesis,
Non-blocking statements infer Flop/latch.
- Usage -
The blocking statements are used normally for combinational logic implementation OR whenever the synchronization/sequence required between the assignments,
Non blocking statements are used for sequential implementation
No comments:
Post a Comment