splitting.html 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <html>
  2. <head>
  3. <title>Splitters</title>
  4. </head>
  5. <body bgcolor="FFFFFF">
  6. <h1>Splitters</h1>
  7. <p>When you work with multi-bit values, you will often want to route
  8. different bits in different directions.
  9. The Wiring library's splitter tool
  10. (<img src="../../../../en/icons/splitter.gif" width="16" height="16">)
  11. allows you to accomplish this.</p>
  12. <p>For example, suppose we want a circuit that computes the bitwise
  13. AND of the two nibbles of its eight-bit input (the upper four bits and
  14. the lower four bits). We will have an eight-bit value coming from the
  15. input pin, and we want to split that into two four-bit values. In the
  16. below circuit, we have used a splitter to accomplish this: The 8-bit input
  17. comes into the splitter, which divides the
  18. 8 bits into two 4-bit values, which are then fed into the AND gate and from
  19. there to the output.</p>
  20. <center><img src="../../../../en/img-guide/bundles-splitter-circ.png" width="231" height="99"></center>
  21. <p>In this example, the splitter <q>splits</q> an
  22. incoming value into multiple outgoing values. But splitters can
  23. also work the other way: It can <q>combine</q> multiple values into a single value. In fact,
  24. they are non-directional: They can send values one way at one time
  25. and another way later, and they can even do both at the same
  26. time, as in the below example where a value travels eastward through the two
  27. splitters, then is routed back westward through them again, and then back
  28. eastward where it finally reaches its output.</p>
  29. <center><img src="../../../../en/img-guide/bundles-splitter-2way.png" width="191" height="44"></center>
  30. <p>The key to understanding splitters is their attributes.
  31. In the following, the term <em>split end</em> refers to one of
  32. the multiple wires on one side, while the term <em>combined
  33. end</em> refers to the single wire on the other side.</p>
  34. <ul>
  35. <li> The <strong>Facing</strong> attribute tells where the split ends
  36. should be relative to the combined end.</li>
  37. <li> The <strong>Fan Out</strong> attribute specifies how many
  38. split ends there are.</li>
  39. <li> The <strong>Bit Width In</strong> attribute specifies the bit width of
  40. the combined end.</li>
  41. <li> The <strong>Bit <var>x</var></strong> attribute says which split
  42. end corresponds to bit <em>x</em> of the combined end. If multiple
  43. bits correspond to the same split end, then their relative ordering
  44. will be the same as in the combined end. Logisim splitters cannot
  45. have a bit from the combined end correspond to multiple split ends.</li>
  46. </ul>
  47. <p>Note that any change to the Fan Out or Bit Width In
  48. attributes will reset all Bit <var>x</var> attributes so that
  49. they will distribute the bits of the combined value as evenly
  50. as possible among the split ends.</p>
  51. <p><strong>Next:</strong> <a href="colors.html">Wire colors</a>.</p>
  52. </body>
  53. </html>