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

  1.                  PRIORITY ENCODER AS AN INDEXED EQUATION
  2.  
  3. In this 16-bit to 4-bit priority encoder, all of the complexity in the
  4. logic of an encoder is handled by this single-line indexed equation, which
  5. is explained in the reference guide.  Compare this short specification to
  6. the Boolean specification in file ENCODER1.PLD.
  7.  
  8. | in:Q[15..5], io:(Q[4..0], A[3..0], ZERO)
  9. |
  10. | Title:  "16:4 priority encoder"
  11. |
  12. | i=3..0:  n=15..0:  A[i] = Q[15..n]==1 & n[i]
  13. |
  14. | ZERO = Q[15..0]==0
  15.  
  16.