Name Barrel22c; Partno CA0006; Date 05/11/89; Revision 02; Designer Kahl; Company Logical Devices, Inc.; Assembly None; Location None; Device g22V10lcc; /****************************************************************/ /* */ /* 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 2 = clock; /* Register Clock */ PIN [3..7] = [D4..0]; /* Data Inputs */ PIN [9..11] = [D7..5]; PIN [12,13,16] = [S2..0]; /* Shift Count Select Inputs */ PIN 17 = !out_enable; /* Register Output Enable */ PIN 27 = preset; /* Set to Ones Input */ /** Outputs **/ PIN 18,19,20,21 = Q3,Q2,Q1,Q0; /* Register Outputs */ PIN 23,24,25,26 = Q7,Q6,Q5,Q4; /** 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 = preset; /* synchronous preset */ output.oe = out_enable; /* tri-state control */ output.ar = 'h'00; /* asynchronous reset not used */