Library: | Base |
Introduced: | 2.0 Beta 1 |
The wiring tool is the tool for creating wire segments that carry values from one endpoint to another. The bit width of these values can be anything; exactly which bit width is automatically inferred from the components to which the wires are ultimately attached. If it is not attached to any components, the wire will be drawn gray to indicate that its bit width is unknown; if the components at the locations that the wire helps to connect disagree on the bit width, then the wire will be drawn orange to indicate the conflict, and the wire will in fact refuse to carry any values at all until the user resolves the conflict.
A single drag of the mouse can create multiple wire segments. The precise process is a little confusing in its description; but it works quite intuitively in practice: If you request a particular wire segment using the Wiring Tool, that segment will be split apart wherever it hits a pin for an existing component, or wherever it hits the endpoint of an existing wire segment. Also, if an endpoint of any of the new wire segments hit somewhere in the middle of an existing wire, then that wire will be split into multiple segments itself.
For some components that draw short stubs to which wires can connect (such as an OR gate or a controlled buffer), Logisim will silently correct attempts to create wires that slightly overshoot the stub's end.
You can also shorten an existing wire segment using the Wiring Tool, using a drag that starts or ends at a terminus of the segment, and that overlaps the existing segment.
All wires in Logisim are either horizontal or vertical.
Wires are also non-directional; that is, they carry values from either endpoint to the other. Indeed, a wire can carry values in both directions simultaneously; the center wire in the below example is doing this.
The wiring tool does not itself have attributes, but the wires that it creates do.
When you click an existing wire segment using the Poke Tool, Logisim displays the current value traveling through that wire. This is illustrated in the above screen shot of a wire carrying values in both directions simultaneously. The behavior is particularly useful for multi-bit wires, whose black color provide no visual feedback about what value the wire is carrying.
For multi-bit values, you can configure exactly how the value is displayed (in binary, decimal, or hexadecimal, for example) using the Canvas pane of the Project Options dialog box.