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

  1. Name            Gates;
  2. Partno          CA0001;
  3. Revision        02;
  4. Date            9/12/83;
  5. Designer        G. Woolhiser;
  6. Company         Assisted Technology, Inc.;
  7. Location        San Jose, CA.;
  8. Assembly        Example;
  9.  
  10. /****************************************************************/
  11. /*                                                              */
  12. /*      This is a example to demonstrate how CUPL               */
  13. /*      compiles simple gates.                                  */
  14. /*                                                              */
  15. /****************************************************************/
  16. /*      Taget Devices:  P16L8, P16LD8, P16P8, EP300, and 82S153 */
  17. /****************************************************************/
  18.  
  19. /*
  20.  * Inputs:  define inputs to build simple gates from
  21.  */
  22.  
  23. Pin 1 =  a;
  24. Pin 2 =  b;
  25.  
  26. /*
  27.  * Outputs:  define outputs as active HI levels
  28.  *
  29.  * Note: For PAL16L8 and PAL16LD8, DeMorgan's Theorem is applied to
  30.  *       invert all outputs due to fixed inverting buffer in the device.
  31.  */
  32.  
  33. Pin 12 = inva;
  34. Pin 13 = invb;
  35. Pin 14 = and;
  36. Pin 15 = nand;
  37. Pin 16 = or;
  38. Pin 17 = nor;
  39. Pin 18 = xor;
  40. Pin 19 = xnor;
  41.  
  42. /*
  43.  * Logic:  examples of simple gates expressed in CUPL
  44.  */
  45.  
  46. inva = !a;              /* inverters */
  47. invb = !b;
  48. and  = a & b;           /* and gate */
  49. nand = !(a & b);        /* nand gate */
  50. or   = a # b;           /* or gate */
  51. nor  = !(a # b);        /* nor gate */
  52. xor  = a $ b;           /* exclusive or gate */
  53. xnor = !(a $ b);        /* exclusive nor gate */
  54.