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