home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s079 / 1.img / V8REGS.APL < prev    next >
Encoding:
Text File  |  1992-11-17  |  6.0 KB  |  184 lines

  1. TITLE 'APEEL FILE:18CV8 BASIC REGISTERS and LATCHES,
  2. DESIGNER:Robin Jigour
  3. DATE: 8/16/87'
  4.  
  5. PEEL18CV8
  6.  
  7. "DESCRIPTION"
  8.  
  9. "                      PEEL18CV8
  10.  
  11. "              Basic Registers and Latches
  12. "                     ____  ____
  13. "                    |    \/    |
  14. "               CLK  { 1     20 }  Vcc
  15. "                 D  { 2     19 }- Q_D
  16. "                 T  { 3     18 }- Q_T
  17. "                 J  { 4     17 }- Q_JK
  18. "                 K  { 5     16 }- Q_SR
  19. "                 S  { 6     15 }- Q_SL
  20. "                 R  { 7     14 }- Q_GL
  21. "               LAT  { 8     13 }  A_RES
  22. "               LEN  { 9     12 }  S_SET
  23. "                Gnd {10     11 }  S_RES
  24. "                    |__________|
  25. "                   ( - = output )
  26.  
  27. " This application examples demonstrates the implementation of
  28. " several basic registers and latches within a PEEL18CV8.  Four
  29. " register types are included, D, T, JK, and SR, all of which are
  30. " clocked by the CLK input.  All registers can be synchronously
  31. " reset, set,and asynchronously reset using the SRES, SSET and ARES
  32. " inputs respectively. Besides the registers, an SR latch and a
  33. " Gated Latch circuit show how independant asynchronous storage
  34. " elements can be implemented.  Only the Q outputs of these
  35. " registers and latches are provided at the output pins.
  36. " The /Q outputs could easily be accessed by inverting the
  37. " macro cell output polarity.  Truth table operation can be
  38. " referenced via the test vectors.
  39.  
  40.  
  41. "Inputs"
  42.  
  43. CLK        pin 1
  44. D          pin 2                       "Register and latch inputs.
  45. T          pin 3
  46. J          pin 4
  47. K          pin 5
  48. R          pin 6
  49. S          pin 7
  50. LAT        pin 8                        "Gated latch.
  51. LEN        pin 9                        "Enable for gated latch.
  52. SRES       pin 11                       "Synchronous reset.
  53. SSET       pin 12                       "Synchronous set.
  54. ARES       pin 13                       "Asynchronous reset.
  55.                                         "Pins 12 and 13 macro configurations are
  56.                                         "defaulted to 'pos com feed_pin'.
  57.  
  58. "Outputs and Macro Cell definitions
  59.  
  60. Q_GL      pin 14 = pos com feed_or   "Latch outputs internal feedback.
  61. Q_SL      pin 15 = neg com feed_pin
  62. Q_SR      pin 16 = pos reg feed_reg  "Register outputs.
  63. Q_JK      pin 17 = pos reg feed_reg
  64. Q_T       pin 18 = pos reg feed_reg
  65. Q_D       pin 19 = pos reg feed_reg
  66.  
  67.  
  68. "Internal Nodes"
  69.  
  70.  AC        node 21                    "Asynchronous Clear node.
  71.  SP        node 22                    "Synchronous Preset node.
  72.  
  73.  
  74. EQUATIONS
  75.  
  76. SP = SSET                              "Synchronous Preset.
  77. AC = ARES                              "Asynchronous Clear.
  78.  
  79. Q_D  := !SRES & D                      "D register.
  80.  
  81. Q_T  := !SRES &  T & !Q_T #            "T register.
  82.         !SRES & !T &  Q_T
  83.                                        "Please note that the feedback Q_T has
  84.                                        "the same signal level as the previous
  85.                                        "signal level of the output Q_T
  86.                                        "regardless of type of POLARITY or
  87.                                        "FEEDBACK PATH.
  88.  
  89. Q_JK := !SRES &  J & !K #              "JK register.
  90.         !SRES & !J & !K  &  Q_JK #
  91.         !SRES &  J &  K  & !Q_JK
  92.  
  93. Q_SR := !SRES &  S & !R #              "SR register (clocked).
  94.         !SRES & !S & !R  &  Q_SR
  95.  
  96. Q_SL  = !( R # !S & !Q_SL )            "SR latch.
  97.  
  98. "       ^  =>  As in the V8GATES.APL, this '!' is actually ignored by APEEL.
  99. "              The output's NEG polarity is actually doing the inversion.
  100.  
  101. Q_GL  =  LEN & LAT #                   "Gated latch.
  102.         !LEN & Q_GL #
  103.          LAT & Q_GL                    "Fix hazard when Q_GL=1.
  104.  
  105.  
  106. TEST_VECTORS "D Register"
  107.  
  108. (  CLK  D  SRES  SSET  ARES   ->   Q_D  )
  109.     0   0    0    0      1    ->     X
  110.     0   0    0    0      1    ->     L
  111.     C   0    0    1      0    ->     H
  112.     C   0    1    0      0    ->     L
  113.     C   0    1    1      0    ->     H
  114.     C   0    0    0      0    ->     L
  115.     C   1    0    0      0    ->     H
  116.     C   0    0    0      0    ->     L
  117.     C   1    0    0      0    ->     H
  118.  
  119.  
  120. TEST_VECTORS "T Register"
  121.  
  122. (  CLK  T  SRES  SSET  ARES   ->   Q_T  )
  123.     0   0    0    0      1    ->     L
  124.     C   0    0    1      0    ->     H
  125.     C   0    1    0      0    ->     L
  126.     C   0    1    1      0    ->     H
  127.     C   0    1    1      0    ->     H
  128.     C   1    0    0      1    ->     L
  129.     C   0    0    0      0    ->     L
  130.     C   1    0    0      0    ->     H
  131.  
  132.  
  133. TEST_VECTORS "JK Register"
  134.  
  135. (  CLK   J  K   SRES  SSET  ARES   ->   Q_JK  )
  136.     0    0  0    0     0     1     ->     L
  137.     C    0  0    0     1     0     ->     H
  138.     C    0  0    1     0     0     ->     L
  139.     C    0  0    1     1     0     ->     H
  140.     C    0  0    0     0     0     ->     H
  141.     C    0  1    0     0     0     ->     L
  142.     C    1  0    0     0     0     ->     H
  143.     C    1  1    0     0     0     ->     L
  144.     C    0  0    0     0     0     ->     L
  145.     C    1  0    0     0     0     ->     H
  146.     C    0  1    0     0     0     ->     L
  147.     C    1  1    0     0     0     ->     H
  148.  
  149.  
  150. TEST_VECTORS "SR Regsister  (clocked)"
  151.  
  152. (  CLK  SRES  S  R  SSET  ARES  ->   Q_SR  )
  153.     C     0   0  0    0     0   ->     X
  154.     C     0   1  0    0     0   ->     H
  155.     C     0   0  0    0     0   ->     H
  156.     C     0   0  1    0     0   ->     L
  157.     C     0   0  0    0     0   ->     L
  158.     C     0   1  1    0     0   ->     L
  159.  
  160.  
  161. TEST_VECTORS "SR Latch"
  162.  
  163. (  S  R   ->   Q_SL  )
  164.    0  0   ->     X
  165.    1  0   ->     H
  166.    0  0   ->     H
  167.    0  1   ->     L
  168.    0  0   ->     L
  169.    1  1   ->     L
  170.  
  171.  
  172. TEST_VECTORS "Gated Latch"
  173.  
  174. (  LAT  LEN   ->    Q_GL  )
  175.      0   0    ->     X
  176.      0   1    ->     L
  177.      0   0    ->     L
  178.      1   0    ->     L
  179.      0   1    ->     L
  180.      1   1    ->     H
  181.      1   0    ->     H
  182.      0   0    ->     H
  183.      0   1    ->     L
  184.      0   0    ->     L