home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / sci / electron / 21670 < prev    next >
Encoding:
Internet Message Format  |  1992-12-29  |  2.0 KB

  1. Path: sparky!uunet!gatech!udel!wupost!psuvax1!rutgers!uwvax!zazen!doug.cae.wisc.edu!kolstad
  2. From: kolstad@cae.wisc.edu (Joel Kolstad)
  3. Newsgroups: sci.electronics
  4. Subject: Latching stuff with GALs
  5. Message-ID: <1992Dec28.215248.9654@doug.cae.wisc.edu>
  6. Date: 29 Dec 92 03:52:48 GMT
  7. Distribution: usa
  8. Organization: U of Wisconsin-Madison College of Engineering
  9. Lines: 41
  10.  
  11.  
  12. Hi,
  13.  
  14.     I have a circuit in which I'd like a latch to maintain its value
  15. when a state machine isn't in a certain state, and to acquire new data when
  16. the state machine is in a certain state.  I would think that doing the
  17. following would suffice:
  18.  
  19.     Out.d=Out&!In_Magic_State#Latch_Me&In_Magic_State
  20.  
  21.     This is in CUPL syntax, and In_Magic_State would expand to look
  22. something like S2*!S1*!S0, meaning that it would be true in state 100.
  23.  
  24.     The problem is that this doesn't work.  The latched output goes
  25. high for one clock cycle if Latch_Me is high, but then always dives back to
  26. zero on the next clock cycle.
  27.  
  28.     So far I've tried added a #Out&In_Magic_State on the off chance
  29. that there was a static hazard floating around, but this didn't help.
  30.  
  31.     I haven't yet tried this circuit at slow speeds, but I will
  32. soon.  Even so, I'm using 25ns GALs with about a 500kHz clock -- not
  33. exactly blindingly fast.
  34.  
  35.     What's strange is that if I actually go to the trouble to properly
  36. design the above equation as a state machine (i.e., specify both outputs 0
  37. and 1 as states and specify how you get from one to another), the thing
  38. works.  The logic equation produced by this approach is different than the one 
  39. above, but it's hard to tell exactly what the difference is since the GAL has 
  40. inverted outputs and Demorgan's Theorem has been distributed over whatever 
  41. final equation was used (in other words, the end equation looks little like the 
  42. beginning equation).
  43.  
  44.     So... can someone tell me that the above equation really should
  45. work, and that something else is getting screwed up somewhere?  Or better
  46. yet... do you know which equation would work?  (And why?)
  47.  
  48.     Thanks...
  49.  
  50.                         ---Joel Kolstad
  51.                         kolstad@cae.wisc.edu
  52.