CS 3410 Design Guidelines for Logisim: Bad Practices to Avoid


Bad design #1: Unlabeled circuit diagrams

For both your own understanding and our grading, it is easier to follow your logic if you specify what the subcircuits are and what they're used for.

Bad design #2: Too many muxes

As in the case with V in the ALU, there is no need for a 16 bit mux in ALU32. The cases in which V appears was few and the majority of the time it should be 0 instead. Instead of selecting V on the ALU opcode, think of other simpler options.

Bad design #3: Multibit constant

Bit extender is neater and easier to understand.

Bad idea: Using a splitter and constant to perform extension.
extend wrong
wrong
extend right
right
It is better design to use as few constants as possible.

Bad design #4: Muxing a signal and its inverse

This can easily be replaced with an XOR gate.

Bad idea: Use a multiplexor with inverses as inputs.
inverse wrong
wrong
inverse right
right
The circuits on the left and right are equivalent.

Bad design #5: Improper use of constants

The only (rare) exceptions are for (a) providing inputs to a sub-circuit that has more inputs than you need, or (b) making your circuit look slightly simpler in certain cases. Any time you feel like putting down a constant, ask "can I just optimize this away by using a different gate?"

Bad idea: Use a multiplexor with constants as inputs.
constant wrong
wrong
constant wrong
right
These almost always reduce to just an AND gate, without the constant. Or in the worst case, a no-op.

Bad design #6: Repetitive use of input to both data and control

This case is very similar to the case above. It can easily be replaced with logic gates.

Bad idea: Use a multiplexor with same signal as input and control.
signal wrong
wrong
signal right
right
These circuits are equivalent. The control is just a case of OR.

Bad design #7: Repetitive use of input to both multi-bit data and control

Like the case above, it can easily be replaced with a mulit-bit logic gate with a sign-extended control bit.

Bad(ish) idea: Use a multiplexor with same signal as multi-bit input and control.
multisignal wrong
wrong
multisignal right
right
These circuits are equivalent. The control bit is extended into a string of all 0s or all 1s.

Bad design #8: Useless sub-circuits

Instead, just use the component itself. An exception to this rule is the "bit reverser" circuit that many of you built (with no components, just splitters and wires), since it takes up so much screen space.

Annoyance: unnecessary and distracting sub-circuits
useless wrong
wrong
useless wrong
also wrong
These sub-circuits are just re-packaging and re-naming already existing Logisim primitives. Just use the primitive instead.

Bad design #9: Not testing completely

At minimum, do positive+positive, positive+negative, negative+negative, and negative+positive. And try a couple of each combination, too.

Bad design #10: Using external file dependencies

Bad design #11: Crossing wires over subcircuits

Bad idea: Crossing the beams wires with subcircuits
overlap wrong
wrong
overlap right
right
The right circuit looks much cleaner and more readable.

Logisim quirk: data flow

This is a minor point. But you have probably noticed that logisim likes data to flow left-to-right on the screen. For example, the default orientation of primitives are all left-to-right, and multiplexors can't be rotated at all. Many of you displayed an amazing stubbornness by having your circuits go in other directions.

right to left
wrong
left to right
right
Don't fight it.