delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/02/19/23:25:15

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sun, 19 Feb 2012 23:24:42 -0500
From: gene glick <geneglick AT optonline DOT net>
Subject: [geda-user] verilog question - blocking/non-blocking
To: geda-user AT delorie DOT com
Message-id: <4F41CB0A.2020902@optonline.net>
MIME-version: 1.0
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110323
Thunderbird/3.1.9
Reply-To: geda-user AT delorie DOT com

consider this code:

always @(posedge clk)
  begin
     count = count + 1;    // blocking method
     if (count == 0)
       do_something
  end


then this way . . .


always @(posedge clk)
  begin
     count <= count + 1;   // non-blocking method
     if (count == 0)
       do_something
  end
-------------------------------------------

The 1st way, do_something occurs when the count is actually at 0. The 
second way, do_something occurs when the count is 1. Subtle difference. 
I don't have a synthesis tool ready to run, otherwise I'd try it. 
Question : does one method synthesize significantly different logic than 
the other?





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019