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.

Verilog Blocking and non-blocking Statements

Status
Not open for further replies.

flash23

Newbie level 3
Joined
Aug 13, 2010
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
india
Activity points
1,306
Code:
module blocking(a,b,c);
  output reg a,b;
  input c;
  
  initial 
  begin
  $monitor (",monitor=",a,$time);
    a<= #5 1'b0;
    a<= #10 1'b1;
    
    $strobe ("strobe=",a,$time);
  end
  
  endmodule

The output I'm getting is
Code:
run
# ,monitor=x                   0
# strobe=x                   0
# ,monitor=0                   5
# ,monitor=1                  10

WHich according to my understanding should be
Code:
run
# ,monitor=x                   0
# strobe=x                   0
# ,monitor=1                  10

As after calculating the RHS of first statement it will go to the next statement. And there it will overwrite the previous assignment scheduled to 'a' of '0'.
I am using questa sim 6.6d.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top