home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / verilog / 481 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.2 KB  |  29 lines

  1. Newsgroups: comp.lang.verilog
  2. Path: sparky!uunet!spool.mu.edu!uwm.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!wotan.compaq.com!twisto.eng.hou.compaq.com!tiktok.eng.hou.compaq.com!ehlers
  3. From: ehlers@tiktok.eng.hou.compaq.com (Steve Ehlers)
  4. Subject: Re: execution of always blocks
  5. Message-ID: <1992Dec18.200153.25828@twisto.eng.hou.compaq.com>
  6. Sender: news@twisto.eng.hou.compaq.com (Netnews Account)
  7. Organization: Compaq Computer Corp.
  8. References: <13665@optilink.COM> <1992Dec18.174451.11544@newsgate.sps.mot.com>
  9. Date: Fri, 18 Dec 1992 20:01:53 GMT
  10. Lines: 17
  11.  
  12. In article <1992Dec18.174451.11544@newsgate.sps.mot.com> rajesh@chdasic.sps.mot.com writes:
  13. >manley@optilink.COM (Terry Manley) writes:
  14. >
  15. >> always @(posedge Clk) c = b;
  16. >> always @(posedge Clk) b = a;
  17. >
  18. >If you have to use two always blocks, you could put
  19. >a #0 delay before the procedural assignment that you want
  20. >done last. That will make VerilogXL schedule that event
  21. >for processing at the end of that timestamp.
  22.  
  23. Which is fine if you only care about which ONE is last.  If you have 
  24. three (or more) registers, you'll still have problems.  Using the
  25. non-blocking assignment operator ( <= ) will give you the behavior you want:
  26.  
  27.  always @(posedge Clk) c <= b;
  28.  always @(posedge Clk) b <= a;
  29.