home *** CD-ROM | disk | FTP | other *** search
CUPL PLD Program format | 1991-12-08 | 1.9 KB | 56 lines |
- Name Barrel22;
- Partno CA0006;
- Date 5/11/84;
- Revision 01;
- Designer Kahl;
- Company Assisted Technology;
- Assembly None;
- Location None;
-
- /****************************************************************/
- /* */
- /* 8-Bit Registered Barrel Shifter */
- /* */
- /* This 8-bit registered barrel shifter takes 8 data inputs */
- /* and cyclically rotates the data from 0 to 7 places under */
- /* control of the select ( S0, S1, S2 ) inputs. A SET input */
- /* can be used to initialize the outputs to the all ones state */
- /****************************************************************/
- /** Allowable Target Device Types : PAL22V10 */
- /****************************************************************/
-
- /** Inputs **/
-
- PIN 1 = clock; /* Register Clock */
- PIN [2..9] = [D7..0]; /* Data Inputs */
- PIN [10,11,14] = [S2..0]; /* Shift Count Select Inputs */
- PIN 13 = !out_enable; /* Register Output Enable */
- PIN 23 = SET; /* Set to Ones Input */
-
- /** Outputs **/
-
- PIN [15..22] = [Q7..0]; /* Register Outputs */
-
- /** Declarations and Intermediate Variable Definitions **/
-
- field shift = [S2..0]; /* Shift Width Field */
- field input = [D7..0]; /* Inputs Field */
- field output = [Q7..0]; /* Outputs Field */
-
- /** Logic Equations **/
-
- output.d = [D7, D6, D5, D4, D3, D2, D1, D0] & shift:0
- # [D0, D7, D6, D5, D4, D3, D2, D1] & shift:1
- # [D1, D0, D7, D6, D5, D4, D3, D2] & shift:2
- # [D2, D1, D0, D7, D6, D5, D4, D3] & shift:3
- # [D3, D2, D1, D0, D7, D6, D5, D4] & shift:4
- # [D4, D3, D2, D1, D0, D7, D6, D5] & shift:5
- # [D5, D4, D3, D2, D1, D0, D7, D6] & shift:6
- # [D6, D5, D4, D3, D2, D1, D0, D7] & shift:7;
-
- output.sp = SET; /* synchronous preset for SET */
-
- output.oe = out_enable; /* tri-state control */
-
- output.ar = 'b'0; /* asynchronous reset not used */
-