home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p078 / 7.img / TUTOR.PLB / MOD60A.PLD < prev    next >
Encoding:
Text File  |  1990-12-11  |  1.3 KB  |  38 lines

  1.                                MODULO-60 C0UNTER
  2.  
  3. This is an alternative way to describe a modulo-60 counter, which steps
  4. through the sequence 0, 1, 2, ..., 57, 58, 59, 0.  This one uses a
  5. numerical equation rather than a map.  Contrast this form with the
  6. equivalent numerical map in file MOD60.PLD.
  7.  
  8. Q[5..0] is the six-bit counter value.
  9.  
  10. HOLD is an input signal which prevents the counter from advancing.
  11.  
  12. RESET is an input signal which clears the counter to zero on the next
  13. clock edge.
  14.  
  15. HOLDO is an output signal which prevents any higher-order counters in a
  16. cascade from advancing until the lower-level counters overflow.
  17.  
  18. CLK is the clock signal.
  19.  
  20.  
  21. |PAL16R6 in:(HOLD, RESET), out:Q[5..0], io:HOLDO, clock:CLK
  22. |
  23. | Active-Low:    "All"
  24. | Conditioning:   CLK // Q[5..0]
  25. |
  26. | Q[5..0] = (Q[5..0]+1 & RESET' & HOLD' & Q[5..0]/=59)
  27. |         # (Q[5..0]   & RESET' & HOLD )
  28. |
  29. | HOLDO = Q[5..0]/=59
  30.  
  31.  
  32. |Vectors:
  33. |{ Display CLK, (Q[5..0])d, HOLDO
  34. |  Test RESET=1; CLK
  35. |  Test RESET=0; CLK=65(0,1)
  36. |  End }
  37.  
  38.