To gain experience using circuit-simulation software (Logisim-evolution, in particular) and better understand how to implement either bit shifters or MIPS-like register files. For the register file, to gain experience working with clocked, write-enabled state elements. For the bit shifters, to gain experience working with subcircuits and applying principles of modularity, reuse, and hierarchical design.
What you need to do:
read this document in its entirety
choose whether to implement bit shifters or a register file (email your selection in response to the email officially announcing this assignment by no later than Wednesday, December 7 at 5pm)
implement and thoroughly test your circuit in Logisim-evolution
submit your circuit file via email attachment in response to my email officially announcing the assignment.
Register file.
Implement a register file representing four 8-bit registers such that:
Reading register 0 is always 0 regardless of whether it has ever been written.
The register file is clocked: writes can only occur once per clock cycle.
The destination register, specified by a two-bit input, can only be written to if the write-enable bit is high.
The output of the register file are the eight bits corresponding to the register specified by two-bit register-source input.
The only state elements you should use are Logisim-evolution’s standard Register (the 8-bit version). Otherwise, use only wire manipulations and simple, standard combinational components (such as AND, OR, NOT, XOR, multiplexers, demultiplexers, decoders). If you are not sure if you can use a component, check first.
You can and should work with this starter circuit. It provides a framework for you to test your register file. You should confine your edits to the register-file subcircuit.
(If you choose to implement the register file, you are encouraged to read subsection of the course text entitled “Register Files” - pp. B-54-B-56 in - Appendix B.)
Bit shifters.
Implement three different bit-shifting subcircuits corresponding to
the MIPS operations sll
, srl
, and
sra
such that:
The shifters work on byte-sized inputs meaning each shifter should have two inputs - one 8-bit data input and one 3-bit value indicating how much to shift (anywhere from 0-7 bits).
Each shifter should have one 8-bit output.
They are completely combinational (they require no state elements).
They only use wire manipulations and simple logic gates (such as AND, OR, NOT, XOR, and, maybe, multiplexers). If you are not sure if you can use a component, check first.
They demonstrate principles of modularity, reuse, and hierarchical design. Create and use auxiliary subcircuits where appropriate.
You can and should work with this
starter circuit. It provides a framework for you to test your bit
shifters. The starter circuit contains a main testing circuit
(shift_test
) and the initial setup for the three shifter
circuits and two other subcircuits that you may find useful (either as
example of how to work with subcircuits that rely basically on simple
wire manipulations or as actual elements for building your
shifters).
implement both the register file and the bit shifters
for the bit shifters: write a short summary of your approach and draw an analogy between writing reusable functions in programming and designing reusable subcircuits in circuit design
for the register file: augment your register file so that it accepts two different sets of two-bit inputs for the register sources and has two eight-bit outputs based on those sources
implement a circuit that demonstrates how to use RAM components.