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

  1. TITLE 'APEEL FILE: PEEL18CV8 CLOCK DIVIDER AND ADDRESS DECODER
  2. DESIGNER: Robin Jigour, ICT
  3. DATE: 9/20/87'
  4.  
  5. PEEL18CV8
  6.  
  7. "DESCRIPTION
  8.  
  9. "                      PEEL18CV8
  10.  
  11. "            Clock Divider and Address Decoder
  12. "                     ____  ____
  13. "                    |    \/    |
  14. "               CLK  { 1     20 }   Vcc
  15. "               SET  { 2     19 }-  CLK2    ( - = output )
  16. "               A08  { 3     18 }-  CLK4
  17. "               A09  { 4     17 }-  CLK8
  18. "               A10  { 5     16 }-  /EPROM
  19. "               A11  { 6     15 }-  /EEPROM
  20. "               A12  { 7     14 }-  /UART
  21. "               A13  { 8     13 }-  /PORT
  22. "               A14  { 9     12 }-  /SRAM
  23. "               Gnd  {10     11 }   A15
  24. "                    |__________|
  25.  
  26. " This application uses the PEEL18CV8 for two common microprocessor
  27. " system functions:a clock divider and a memory mapped address decoder
  28. " The clock divider provides divide 2, 4 and 8 clock outputs. The SET
  29. " input sets all clock outputs high.  The address decoder decodes the
  30. " processor address lines to select one of five memory or I/O devices.
  31. " The chip select for these devices are active low.  The memory map
  32. " over a 64K boundry is shown below.
  33.  
  34. "  Memory Map for Address Decoder
  35. "
  36. "  EPROM  (32K X 8)     8000-FFFF hex
  37. "  EEPROM ( 2K X 8)     5000-5FFF hex
  38. "  UART                 4100-41FF hex
  39. "  PORT                 4000-40FF hex
  40. "  SRAM   ( 8K X 8)     0000-1FFF hex
  41.  
  42.  
  43. "PIN ASSIGNMENTS
  44.  
  45. "Inputs
  46.  
  47.  CLK      pin 1
  48.  SET      pin 2
  49.  A08      pin 3
  50.  A09      pin 4
  51.  A10      pin 5
  52.  A11      pin 6
  53.  A12      pin 7
  54.  A13      pin 8
  55.  A14      pin 9
  56.  A15      pin 11
  57.  
  58.  
  59. "Outputs and Macro Cell definitions
  60.  
  61. SRAM    pin 12 = neg com feed_pin  "5 Combinatorial outputs.
  62. PORT    pin 13 = neg com feed_pin
  63. UART    pin 14 = neg com feed_pin  "Pins 12-16 have active low outputs.
  64. EEPROM  pin 15 = neg com feed_pin
  65. EPROM   pin 16 = neg com feed_pin
  66. CLK8    pin 17 = pos reg feed_reg  "3 Registered outputs.
  67. CLK4    pin 18 = pos reg feed_reg
  68. CLK2    pin 19 = pos reg feed_reg
  69.  
  70.  
  71. "Internal Nodes
  72.  
  73.  AC      node 21                      "Asynchronous Clear - not used.
  74.  SP      node 22                      "Synchronous Preset.
  75.  
  76.  
  77. EQUATIONS
  78.  
  79. "Clock Divider
  80.  
  81. SP = SET                           "If SET=1 set all CLK outputs high.
  82.  
  83. CLK2 := !CLK2                      "CLK divided by 2.
  84.  
  85. CLK4 := !CLK4 &  CLK2 #            "CLK divided by 4.
  86.          CLK4 & !CLK2
  87.  
  88. CLK8 := !CLK8 &  CLK4 &  CLK2 #    "CLK divided by 8.
  89.          CLK8 & !CLK4 #
  90.          CLK8 & !CLK2
  91.  
  92.  
  93. "Address Decoder (active low outputs)
  94.  
  95. /SRAM   =  !A15 & !A14 & !A13      "The '/' is actually ignored by APEEL.
  96.                                    "Here, the '/' is inserted to:
  97.                                    "  (1) indicate that the output is active
  98.                                    "      LOW, and
  99.                                    "  (2) allow the user to match the output
  100.                                    "      signal name with what's on his/her
  101.                                    "      design.
  102.                                    "Note: '/' can be used instead of '!'.
  103.  
  104. /PORT   =  !A15 &  A14 & !A13 & !A12 & !A11 & !A10 & !A09 & !A08
  105.  
  106. /UART   =  !A15 &  A14 & !A13 & !A12 & !A11 & !A10 & !A09 &  A08
  107.  
  108. /EEPROM =  !A15 &  A14 & !A13 &  A12 & !A11
  109.  
  110. /EPROM  =  A15
  111.  
  112.  
  113. TEST_VECTORS "for Clock Divider"
  114.  
  115. (  CLK  SET   ->   CLK8  CLK4  CLK2  )
  116.     C    1    ->     H     H     H
  117.     C    0    ->     L     L     L
  118.     C    0    ->     L     L     H
  119.     C    0    ->     L     H     L
  120.     C    0    ->     L     H     H
  121.     C    0    ->     H     L     L
  122.     C    0    ->     H     L     H
  123.     C    0    ->     H     H     L
  124.     C    0    ->     H     H     H
  125.     C    0    ->     L     L     L
  126.  
  127.  
  128. TEST_VECTORS "for Address Decoder"
  129.  
  130. ( A15 A14 A13 A12 A11 A10 A09 A08  ->   EPROM EEPROM UART PORT SRAM  )
  131.    0   0   0   X   X   X   X   X   ->     H      H     H    H    L
  132.    0   0   1   X   X   X   X   X   ->     H      H     H    H    H
  133.    0   1   0   0   0   0   0   0   ->     H      H     H    L    H
  134.    0   1   0   0   0   0   0   1   ->     H      H     L    H    H
  135.    0   1   0   1   0   X   X   X   ->     H      L     H    H    H
  136.    0   1   1   0   X   X   X   X   ->     H      H     H    H    H
  137.    1   X   X   X   X   X   X   X   ->     L      H     H    H    H