Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

doubt regarding blocking and non blocking statements in verilog?

Status
Not open for further replies.

walkman

Member level 1
Joined
Jul 24, 2010
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
hyderabac
Activity points
1,532
delays.JPG
could any one explain slid above slid?
please...
 

Note that all the statements will be executed whenever the value of "in" changes.

1). In o1=in; as soon as the value of in chnges, the same value is assigned to o1. So o1 is same as in.

2). In o2<=in; as soon as the value of "in" changes, its value is kept in a temporary variable and assigned to o2 at the end of the time.

3). #5 o3=in; In this case when value of in changes it enters into always block. Then waits for 5 time units and executes the command o3=in. So it follows the input till 30 time unit. After that when in=1, always block again executes,and waits for 5 time unit, but before 5 time unit (TU) gets over, the value of in changes to 0. So again it enters in always block and tries to wait for 5 TU, but before that again the value of in changes. Hence abrut changes between 30 to 40 TU are not traced to output.

4). #5 o4<=in; This case for this example is much similar to above point no. 3. However there will be difference in output if in changes its value once, and after 5 TU, again changes its value.

5). o5=#5 in; in this case, always block gets executed, and the statement also gets executed. But however, it waits for 5 TU, then takes the input and immediately assigns it to o5. So all the abrupt changes in time less than 5 TU are ignored.

6). o6 <= #5 in; In this case the value of in is taken immediately, and assignes to o6 after 5 TU. So output is the delayed version of input, where delay is 5 TU.

Comment for any clarifications.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top