Logisim Reference
Back to Project 3 Specs
A few initial notes
-
The official documentation for Logisim can be found here. Alternatively, you can access the same documentation through the "Help" menu in Logisim.
The Library Reference gives detailed notes about the behavior of each block.
-
It is strongly recommended that you download and run Logisim on your local machine while developing your processor to avoid overwhelming the instructional machines. Though Logisim is relatively stable compared to prior semesters, it is still recommended that you save often and also make backup copies of your .circ files early and often. The official version of Logisim we will be using for evaluation is v2.7.1.
You can obtain a copy here
-
Do not gate the clock!
This is very bad design practice when making real circuits, so we will discourage you from doing this by heavily penalizing your project if you gate your clock.
-
Logisim offers some functionality for automating circuit implementation given a truth table, or vice versa. Though not disallowed (enforcing such a requirement is impractical), use of this feature is discouraged. Remember that you will not be allowed to have a laptop running Logisim on the final.
Useful Components
-
Tunnels
Tunnels allow you to transmit signals without using wires.
Tunnels can be found in the menu (Wiring > Tunnel)
It is recommended that you use tunnels for control signals, the clock, and
other common values that may require excessive wiring to connect otherwise.
-
Wire Splitters
Wire splitters allow you to split a multi-bit wire into smaller wires (an 8-bit wire into 2 4-bit wires,
for example). They also work the other way; you can combine multiple wires into a single wire with
a wider bit width.
Splitters can be found in the menu (Wiring > Splitter)
Wire splitters have fan out and a bit width in properties.
"Fan Out" controls how many teeth the wire splitter has.
"Bit Width In" controls the actual size of the data the splitter is splitting.
If you have more data bits than teeth, some of the teeth will start carrying two
or more data bits.
-
Subcircuits
Subcircuits let you package up a part of your circuit into a neat, reusable block. You already start
with subcircuits for the ALU and RegFile. Feel free to create additional subcircuits to clean up your
main circuit.
You can create a new subcircuit with (Project > Add Circuit)
You can edit a subcircuit's appearance with (Project > Edit Circuit Appearance) or on the toolbar:
Not only will this let you change what the subcircuit block looks like, but it will also let you move
around/check the external ports. Click on one of the ports and Logisim will highlight in the bottom right corner the
corresponding I/O pin.
Make sure that for subcircuits with many ports you check to make sure each external port is connected to the correct output pin inside the subcircuit.
Things to watch out for (Logisim Bugs)
-
BE CAREFUL with copying and pasting from different Logisim windows.
Logisim has been known to have trouble with this in the past.
-
Sometimes, a wire may appear connected but Logisim will still highlight it in red/blue. In this case, you can try deleting the wire
and redrawing it. If this still does not work, try drawing the wire along a different path, or restarting Logisim.
If you are having trouble with Logisim, RESTART IT and RELOAD your circuit!
Don't waste your time chasing a bug that is not your fault.
However, if restarting doesn't solve the problem, it is more likely that the bug is a flaw in your project.
Please post to Piazza about any crazy bugs that you find and we will investigate.
Tips and tricks
- When you import another file (Project --> Load Library --> Logisim Library...), it will appear as a folder in the left-hand viewing pane.
- Changing attributes before placing a component changes the default settings for that component. So if you are about to place many 16-bit pins, this might be desireable. If you only want to change that particular component, place it first before changing the attributes.
-
When you change the inputs and outputs of a sub-circuit that you have already placed in main, Logisim will automatically add/remove the ports when you return to main and this sometimes shifts the block itself. If there were wires attached, Logisim will do its automatic moving of these as well, which can be extremely dumb in some cases. Before you change the inputs and outputs of a block, it can sometimes be easier to first disconnect all wires from it.
- Error signals (red wires) are obviously bad, but they tend to appear in complicated wiring jobs such as the one you will be
implementing here. It's good to be aware of the common causes while debugging:
Logisim's Combinational Analysis Feature
Logisim offers some functionality for automating circuit implementation given a truth table, or vice versa.
Though not disallowed (enforcing such a requirement is impractical), use of this feature is discouraged.
Remember that you will not be allowed to have a laptop running Logisim on the final.
Back to Project 3 Specs