home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p078 / 7.img / TUTOR.PLB / SHIFT.PLD < prev    next >
Encoding:
Text File  |  1990-12-11  |  768 b   |  18 lines

  1.                   ROTARY SHIFTER AS AN INDEXED EQUATION
  2.  
  3. This rotary shifter accepts input signals D3, D2, D1, and D0 and
  4. rotates them left 0, 1, 2, or 3 bits, according to the shift amount on
  5. signals S1 and S0.  The logic is defined as a two-dimensional indexed
  6. equation, so the entire definition fits on one source line.  See
  7. Chapter 4 of the reference guide a complete discussion.
  8.  
  9. |PAL14H4 in:(D[3..0], S[1..0]), out:Q[3..0]
  10. |
  11. |   i=3..0:  n=0..3:  Q[i] = D[(i-n)\4] & S[1,0]==n
  12.  
  13. | Vectors:
  14. | { Display D[3..0]," rotated left ",(S1,S0)d," yields ",Q[3..0],"."
  15. |   Test D[3..0], S[1..0]
  16. |   End }
  17.  
  18.