home *** CD-ROM | disk | FTP | other *** search
CUPL PLD Program format | 1991-12-08 | 1.5 KB | 54 lines |
- Name Gates;
- Partno CA0001;
- Revision 02;
- Date 9/12/83;
- Designer G. Woolhiser;
- Company Assisted Technology, Inc.;
- Location San Jose, CA.;
- Assembly Example;
-
- /****************************************************************/
- /* */
- /* This is a example to demonstrate how CUPL */
- /* compiles simple gates. */
- /* */
- /****************************************************************/
- /* Taget Devices: P16L8, P16LD8, P16P8, EP300, and 82S153 */
- /****************************************************************/
-
- /*
- * Inputs: define inputs to build simple gates from
- */
-
- Pin 1 = a;
- Pin 2 = b;
-
- /*
- * Outputs: define outputs as active HI levels
- *
- * Note: For PAL16L8 and PAL16LD8, DeMorgan's Theorem is applied to
- * invert all outputs due to fixed inverting buffer in the device.
- */
-
- Pin 12 = inva;
- Pin 13 = invb;
- Pin 14 = and;
- Pin 15 = nand;
- Pin 16 = or;
- Pin 17 = nor;
- Pin 18 = xor;
- Pin 19 = xnor;
-
- /*
- * Logic: examples of simple gates expressed in CUPL
- */
-
- inva = !a; /* inverters */
- invb = !b;
- and = a & b; /* and gate */
- nand = !(a & b); /* nand gate */
- or = a # b; /* or gate */
- nor = !(a # b); /* nor gate */
- xor = a $ b; /* exclusive or gate */
- xnor = !(a $ b); /* exclusive nor gate */
-