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

  1. Name      Barrel22;
  2. Partno      CA0006;
  3. Date      5/11/84;
  4. Revision  01;
  5. Designer  Kahl;
  6. Company   Assisted Technology;
  7. Assembly  None;
  8. Location  None;
  9.  
  10. /****************************************************************/
  11. /*                                */
  12. /* 8-Bit Registered Barrel Shifter                */
  13. /*                                */
  14. /* This 8-bit registered barrel shifter takes 8 data inputs    */
  15. /* and cyclically rotates the data from 0 to 7 places under    */
  16. /* control of the select ( S0, S1, S2 ) inputs.  A SET input    */
  17. /* can be used to initialize the outputs to the all ones state    */
  18. /****************************************************************/
  19. /** Allowable Target Device Types :  PAL22V10            */
  20. /****************************************************************/
  21.  
  22. /**  Inputs  **/
  23.  
  24. PIN 1        = clock;    /* Register Clock        */
  25. PIN [2..9]    = [D7..0];    /* Data Inputs            */
  26. PIN [10,11,14]    = [S2..0];    /* Shift Count Select Inputs    */
  27. PIN 13        = !out_enable;    /* Register Output Enable    */
  28. PIN 23        = SET;        /* Set to Ones Input        */
  29.  
  30. /**  Outputs  **/
  31.  
  32. PIN [15..22] = [Q7..0];     /* Register Outputs        */
  33.  
  34. /** Declarations and Intermediate Variable Definitions **/
  35.  
  36. field shift  = [S2..0];     /* Shift Width Field        */
  37. field input  = [D7..0];     /* Inputs Field         */
  38. field output = [Q7..0];     /* Outputs Field        */
  39.  
  40. /** Logic Equations **/
  41.  
  42. output.d  =  [D7, D6, D5, D4, D3, D2, D1, D0]  &  shift:0
  43.       #  [D0, D7, D6, D5, D4, D3, D2, D1]  &  shift:1
  44.       #  [D1, D0, D7, D6, D5, D4, D3, D2]  &  shift:2
  45.       #  [D2, D1, D0, D7, D6, D5, D4, D3]  &  shift:3
  46.       #  [D3, D2, D1, D0, D7, D6, D5, D4]  &  shift:4
  47.       #  [D4, D3, D2, D1, D0, D7, D6, D5]  &  shift:5
  48.       #  [D5, D4, D3, D2, D1, D0, D7, D6]  &  shift:6
  49.       #  [D6, D5, D4, D3, D2, D1, D0, D7]  &  shift:7;
  50.  
  51. output.sp = SET;        /* synchronous preset for SET    */
  52.  
  53. output.oe = out_enable;     /* tri-state control        */
  54.  
  55. output.ar = 'b'0;        /* asynchronous reset not used    */
  56.