priencod.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <html>
  2. <head>
  3. <title>Priority Encoder</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1><img align="center" src="../../../../en/icons/priencod.gif" width="32" height="32">
  7. <em>Priority Encoder</em></h1>
  8. <p><table>
  9. <tr><td><strong>Library:</strong></td>
  10. <td><a href="index.html">Plexers</a></td></tr>
  11. <tr><td><strong>Introduced:</strong></td>
  12. <td>2.3.0</td></tr>
  13. <tr><td valign="top"><strong>Appearance:</strong></td>
  14. <td valign="top"><img src="../../../../en/img-libs/priencod.png" width="44" height="95"></td></tr>
  15. </table></p>
  16. <h2>Behavior</h2>
  17. <p>The component has a number of inputs on its west edge, with the first
  18. labeled <q>0</q> and the other numbered from there. The component determines
  19. the indices of the inputs whose values are 1, and it emits the highest index.
  20. For example, if inputs 0, 2, 5, and 6 are all 1, then the priority encoder
  21. emits a value of 110. If no inputs are 1, or if the component is
  22. disabled, then the output of the priority encoder is floating.</p>
  23. <p>The priority encoder is designed so that a number of encoders can be
  24. daisy-chained to accommodate additional inputs. In particular, the component
  25. includes an enable input and an enable output. Whenever the enable input is 0,
  26. the component is disabled, and the output will be all floating bits. The enable
  27. output is 1 whenever the component is enabled and none of the indexed inputs are
  28. 1. Thus, you can take two priority encoders and connect the enable output
  29. of the first to the enable input of the second: If any of the indexed inputs
  30. to the first are 1, then the second will be disabled and so its output will be
  31. all floating. But if none of the first's indexed inputs are 1, then its output
  32. will be all-floating bits, and the second
  33. priority encoder will be enabled and it will identify the highest-priority
  34. input with a 1.</p>
  35. <p>An additional output of the priority encoder is 1 whenever the priority
  36. encoder is enabled and finds a 1 on one of the indexed inputs. When
  37. chaining priority encoders together, this output can be used to identify
  38. which of the encoders was triggered.</p>
  39. <h2>Pins (assuming component faces east)</h2>
  40. <dl>
  41. <dt>West edge, variable number (inputs, bit width 1)</dt>
  42. <dd>Input values, indexed from 0 at the top/west end of the edge.</dd>
  43. <dt>East edge, upper pin (output, bit width matches Select Bits attribute)</dt>
  44. <dd>Output: the highest index among those inputs whose value is 1 - or all
  45. floating bits if no inputs are 1 or if the component is disabled via the
  46. Enable In input.</dd>
  47. <dt>East edge, lower pin (output, bit width 1)</dt>
  48. <dd>Group Signal: 1 if the component is enabled and at least one indexed input
  49. has a value of 1; otherwise this output is 0.</dd>
  50. <dt>South edge (input, bit width 1)</dt>
  51. <dd>Enable In: if 0, the component is disabled; otherwise the component is
  52. enabled.</dd>
  53. <dt>North edge (output, bit width 1)</dt>
  54. <dd>Enable Out: 1 if this component is enabled and none of the indexed inputs
  55. are 1; otherwise the output is 0.</dd>
  56. </dl>
  57. <h2>Attributes</h2>
  58. <p>When the component is selected or being added,
  59. the digits '1' through '4' alter its <q>Select Bits</q> attribute
  60. and the arrow keys alter its <q>Facing</q> attribute.</p>
  61. <dl>
  62. <dt>Facing</dt>
  63. <dd>The direction of the component (its output relative to its input).</dt>
  64. <dt>Select Bits</dt>
  65. <dd>The bit width of the component's primary output.
  66. The number of indexed inputs to the priority encoder will be
  67. 2<sup><small><var>selectBits</var></small></sup>.</dt>
  68. <dt>Disabled Output</dt>
  69. <dd>Specifies what each bit of the output should be when the component is
  70. disabled (i.e., when the enable pin is 0). Options include zero and floating;
  71. in the latter case, the output is effectively disconnected from any other ports.</dd>
  72. </dl>
  73. <h2>Poke Tool Behavior</h2>
  74. <p>None.</p>
  75. <h2>Text Tool Behavior</h2>
  76. <p>None.</p>
  77. <p><a href="../index.html">Back to <em>Library Reference</em></a></p>
  78. </body>
  79. </html>
  80. -