home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s078 / 1.img / MULTIBUS.PLD < prev    next >
Encoding:
CUPL PLD Program format  |  1991-12-08  |  4.2 KB  |  118 lines

  1. Name      Multibus;
  2. Partno      CA0025;
  3. Date      10/13/86;
  4. Revision  01;
  5. Designer  Kahl;
  6. Company   Personal CAD Systems, Inc.;
  7. Assembly  Multibus CPU Card;
  8. Location  IC43;
  9. Device    p23s8;
  10.  
  11. /****************************************************************/
  12. /*                                */
  13. /* Multibus Arbiter and Controller                */
  14. /*                                */
  15. /* This chip implements a serial or parallel priority MULTIBUS    */
  16. /* arbiter.  The bus logic decides when to issue a bus request    */
  17. /* using !BUSADR along with a qualified read or write request    */
  18. /* (!RD or !WR).  This signal is then fed thru a double        */
  19. /* synchronizer (NOP and REQBUS) states.  This creates an    */
  20. /* internally stable bus request signal for the arbiter state    */
  21. /* machine.  After the request is made, bus status lines    */
  22. /* determine whether to acquire the bus, give it up after the     */
  23. /* current cycle is complete, or hold the bus.  After acquiring    */
  24. /* the bus, the appropriate control signals (!MRDC, !MWTC,     */
  25. /* !IORC, !IOWC) are asserted after generating the address     */
  26. /* buffer enable (!AEN) and output buffer enable (!OEN)     */
  27. /* signals.                            */
  28. /****************************************************************/
  29. /* Allowable Target Device Types :  AmPAL23S8                      */
  30. /****************************************************************/
  31.  
  32. /**  Inputs  **/
  33.  
  34. pin 1  = BUS_CLK;         /* Multibus Clock        */
  35. pin 2  = !BUSADR;             /* External Multibus Address    */
  36. pin 3  = !RESET;          /* System Reset Line            */
  37. pin 4  = !RD;              /* Read Cycle Request        */
  38. pin 5  = !WR;            /* Write Cycle Request        */
  39. pin 6  = !MREQ;            /* Memory Cycle Request        */
  40. pin 7  = !IORQ;            /* I/O Cycle Request        */
  41. pin 8  = !BPRN;            /* Bus Priority In Input    */
  42. pin 9  = !BUSYIN;        /* Bus Busy Input        */
  43.  
  44. /**  Outputs  **/
  45.  
  46. pin 15 = !BPRO;            /* MULTIBUS Bus Priority Out    */
  47. pin 14 = !CBRQ;            /* MULTIBUS Common Bus Request    */
  48. pin 17 = !BREQ;            /* MULTIBUS Parallel Bus Request*/
  49. pin 16 = !BUSY;            /* MULTIBUS Bus Busy Status Bit    */
  50. pin 19 = !MWTC;            /* Memory Write Command        */
  51. pin 18 = !MRDC;            /* Memory Read Command        */
  52. pin 13 = !IOWC;            /* I/O Write Command        */
  53. pin 12 = !IORC;            /* I/O Read Command        */
  54.  
  55. /**  Internal Node Declarations  **/
  56.  
  57. node AEN;                  /* Address Buffer Enable    */
  58. node OEN;            /* Output Buffer Enable        */
  59. node [A,B,C];           /* Internal State Bit Nodes    */
  60.  
  61. /** Declarations and Intermediate Variable Definitions **/
  62.  
  63. Field bus_state = [A,B,C];    /* State Machine Field for BUS    */
  64. bus_cycle = BUSADR & RD & BPRN & !BUSYIN
  65.           # BUSADR & WR & BPRN & !BUSYIN;
  66.  
  67. $define IDLE   'b'000       /* IDLE   - reset state        */
  68. $define NOP    'b'001       /* NOP    - BUSADR detected    */
  69. $define REQBUS 'b'011        /* REQBUS - assert BPRO output    */
  70. $define GETBUS 'b'010        /* GETBUS - get control of bus     */
  71. $define HLDBUS 'b'110        /* HLDBUS - hold MULTIBUS    */
  72.  
  73. /** Logic Equations **/
  74.  
  75. sequence bus_state {
  76.  
  77. present IDLE     if BUSADR & RD    next NOP;
  78.         if BUSADR & WR    next NOP;
  79.         default     next IDLE;
  80.  
  81. present    NOP    if BUSADR & RD    next REQBUS    out BPRO;
  82.                if BUSADR & WR    next REQBUS    out BPRO;
  83.         default        next IDLE;
  84.  
  85. present REQBUS    if !BUSADR    next NOP    out BPRO;
  86.         if bus_cycle    next GETBUS    out [AEN,BUSY,BREQ,BPRO];
  87.         if bus_cycle    next GETBUS    out [AEN,BUSY,BREQ,BPRO];
  88.         default        next REQBUS    out [BREQ,BPRO];
  89.  
  90. present GETBUS    if !BUSADR    next IDLE;
  91.         if bus_cycle    next HLDBUS    out [AEN,BUSY,OEN,BREQ,CBRQ,BPRO];
  92.         if bus_cycle    next HLDBUS    out [AEN,BUSY,OEN,BREQ,CBRQ,BPRO];
  93.         default        next REQBUS    out BPRO;
  94.  
  95. present HLDBUS    if bus_cycle    next HLDBUS    out [AEN,BUSY,OEN,BREQ,CBRQ,BPRO];
  96.         if bus_cycle    next HLDBUS    out [AEN,BUSY,OEN,BREQ,CBRQ,BPRO];
  97.         default        next IDLE;
  98.         if MREQ & RD            out MRDC;
  99.         if MREQ & WR            out MWTC;
  100.         if IORQ & RD            out IORC;
  101.         if IORQ & WR            out IOWC;
  102.  
  103. }
  104.  
  105. /* Because of programmable polarity output enables, the .oe equation
  106.    polarity must match the polarity declared in the pin statement */
  107.  
  108. ![MRDC,MWTC,IORC,IOWC].oe = AEN & BUSADR;
  109. !CBRQ.oe = AEN & BPRO;
  110. !BUSY.oe = AEN;
  111. ![BREQ,BPRO].oe = 'b'11;
  112.  
  113. /* Features without polarity control do not require pin polarity
  114.    adjustments */
  115.  
  116. [BUSY,BREQ,CBRQ,AEN,BPRO,OEN,A,B,C].ar = RESET;
  117. [BUSY,BREQ,CBRQ,AEN,BPRO,OEN,A,B,C].sp = 'h'00;
  118.