home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s078 / 1.img / PRIORITY.PLD < prev    next >
Encoding:
Text File  |  1991-12-08  |  2.5 KB  |  74 lines

  1. Name      Priority;
  2. Partno    CA0021;
  3. Date      10/09/86;
  4. Rev       01;
  5. Designer  Woolhiser;
  6. Company   Personal CAD Systems, Inc.;
  7. Assembly  None;
  8. Location  None;
  9. Device    p19l8r;
  10.  
  11. /****************************************************************/
  12. /*                                                              */
  13. /* Priority Interrupt Encoder for the Motorola M68000           */
  14. /*                                                              */
  15. /* Implemented using both "equations method" and "conditional    */
  16. /* syntax".                            */
  17. /****************************************************************/
  18. /* Allowable Target Device Types :  PAL19L8R                    */
  19. /****************************************************************/
  20.  
  21. $define  EQUATIONS      1
  22.  
  23. /**  Inputs  **/
  24.  
  25. Pin [2..8] = ![IREQ1..7];       /* External Interrupt Request Lines */
  26. Pin [16..18] = [FC0..2];        /* M68000 Processor Status          */
  27. Pin 19 = !AS;                   /* M68000 Address Strobe            */
  28. Pin 14 = CPUCLK;        /* M68000 Processor Clock        */
  29.  
  30. /**  Outputs  **/
  31.  
  32. Pin [15,21,22] = ![IPL0..2];    /* M68000 Interrupt Priority Level  */
  33. Pin 20 = !VPA;                  /* M68000 Valid Peripheral Address  */
  34.  
  35. /**  Declarations and Intermediate Variable Definitions  **/
  36.  
  37. LEVEL7INT =  IREQ7.dq;
  38. LEVEL6INT = !IREQ7.dq &  IREQ6.dq;
  39. LEVEL5INT = !IREQ7.dq & !IREQ6.dq &  IREQ5.dq;
  40. LEVEL4INT = !IREQ7.dq & !IREQ6.dq & !IREQ5.dq &  IREQ4.dq;
  41. LEVEL3INT = !IREQ7.dq & !IREQ6.dq & !IREQ5.dq & !IREQ4.dq &  IREQ3.dq;
  42. LEVEL2INT = !IREQ7.dq & !IREQ6.dq & !IREQ5.dq & !IREQ4.dq & !IREQ3.dq &  IREQ2.dq;
  43. LEVEL1INT = !IREQ7.dq & !IREQ6.dq & !IREQ5.dq & !IREQ4.dq & !IREQ3.dq & !IREQ2.dq &  IREQ1.dq;
  44.  
  45. /**  Logic Equations  **/
  46.  
  47. VPA    = 'b'1;            /* By asserting VPA the processor   */
  48. VPA.OE = [FC2..0]:'b'111 & AS;    /* executes an Auto-Vector routine  */   
  49.  
  50. $ifdef EQUATIONS    /* If the string "EQUATIONS" is defined */
  51.             /* Use the EQUATIONS Method        */
  52.  
  53. [IPL2..0] = LEVEL7INT & 'o'7
  54.           # LEVEL6INT & 'o'6
  55.           # LEVEL5INT & 'o'5
  56.           # LEVEL4INT & 'o'4
  57.           # LEVEL3INT & 'o'3
  58.           # LEVEL2INT & 'o'2
  59.           # LEVEL1INT & 'o'1;
  60.  
  61. $else        /* Otherwise, Use CONDITIONAL SYNTAX Method */
  62.  
  63. Condition {
  64.         if LEVEL7INT    out [IPL2,IPL1,IPL0];
  65.             if LEVEL6INT    out [IPL2,IPL1     ];
  66.         if LEVEL5INT    out [IPL2,     IPL0];
  67.         if LEVEL4INT    out [IPL2          ];
  68.         if LEVEL3INT    out [     IPL1,IPL0];
  69.         if LEVEL2INT    out [     IPL1     ];
  70.         if LEVEL1INT    out [          IPL0];
  71. }
  72.  
  73. $endif
  74.