In this assignment, your task is to utilize Logisim, a tool designed for constructing
and simulating digital logic circuits.
This assignment is closely related to hardware design, giving you insight into how
your computer functions at a fundamental level.
Most of the necessary information about using Logisim can be found in the
documentation here:
http://www.cburch.com/logisim/docs/2.7/en/html/guide/tutorial/tutor-orient.html
This guide provides a detailed tutorial on building, simulating, and testing digital logic
circuits in Logisim, covering everything from the basic orientation to more advanced
features.
You can follow a similar process for downloading, installing, and setting up
Logisim as you did for MARS, since both are Java-based software.
Link and Instructions for downloading: Logisim: Download
You can directly download from
SourceForge:https://sourceforge.net/projects/circuit/
Submission and General Guidelines:
Submit your Logisim project as a .circ file.
Include a report in PDF format detailing your design, implementation and outlining each
step involved in the process in detail.
Provide screenshots of your circuit with different input instructions, along with the
resulting control signals and ALU decisions. Ensure that you include all formats of
instructions (R-type, I-type, and J-type) at least 3 instructions of each type.
Organize your Logisim circuit neatly, using labels for different sections (e.g., Decoder,
Control Signals, Input, Output, etc. ).
Submit your report using the filename format your_roll_no.pdf and your circuit design
file as roll_no.circ.

Design of a MIPS Control Unit using Logisim
1. The goal of this assignment is to design and simulate a basic MIPS control unit in
Logisim. The control unit will take an assembled MIPS instruction as input, decode it to
generate the appropriate control signals, and check for whether an ALU operation is
required, and if so, which ALU operation is needed. [30]

Task Description:
1. Input:
○ The circuit takes a 32-bit binary MIPS instruction as input, similar to how
you converted instructions into binary in your previous assignment(use
those binary instructions).
2. Decoding the Instruction:
○ Split the 32-bit instruction into parts.
3. Control Signals Generation:
○ Generate the following control signals based on the opcode and function
code:
■ RegDst: Chooses destination register (R-type or I-type)
■ ALUSrc: Selects ALU second input (register or immediate value)
■ MemToReg: Chooses between memory data or ALU result for writing
to registers
■ RegWrite: Enables writing to register
■ MemRead: Enables reading from memory (for lw)
■ MemWrite: Enables writing to memory (for sw)
■ Branch: Enables branching (for beq)
■ ALUOp: Controls the ALU operation (2 bit signal )

4. Checking if ALU Operation is Required:
○ R-type instructions use the ALUOp = 10 and rely on the Funct field to
determine the exact ALU operation.

○ I-type instructions generally utilize ALUOp = 00 for operations such as
addi, lw, and sw, which primarily involve addition. However, in some
instances, logical operations like AND and OR may also be necessary to
determine the exact ALU operation. To achieve this, you are required to
implement an additional multiplexer or combinational logic that takes both

ALUOp and the Opcode as inputs to generate the correct ALU control
signal for I-type instructions. Additionally, when ALUOp = 01, it indicates
branch instructions like beq, which require subtraction.

○ J-type instructions do not require ALU operations, and the ALURequired
signal is set to 0.

5. Output:
○ The circuit should output the 9 control signals .
○ Include an additional signal ALURequired which is 1 if the instruction
requires an ALU operation and 0 otherwise.
○ The ALU operation to be executed (e.g., ADD, SUB, AND, OR)

2. You will analyze the impact of modifying the most significant bits (MSB) of the opcode,
on the control signals in a MIPS control unit. [20]
Set the 1st and 2nd MSB bits of the opcode to 1 and 0, (stuck at 0 and stuck at 1)
respectively, and observe the changes in control signals for R-type, I-type and J-type
instructions.
● stuck at 0 (Set 1st MSB to 0)
● stuck at 0 (Set 2nd MSB to 0)
● Combined stuck (Set 1st MSB to 0 and 2nd MSB to 0)
● stuck at 1 (Set 1st MSB to 1)
● stuck at 1 (Set 2ndt MSB to 1)
● Combined stuck (Set 1st MSB to 1 and 2nd MSB to 1)
● Combined stuck (Set 1st MSB to 1 and 2nd MSB to 0) and also their converse.

You will document whether any faults occur or if a specific combination of control signals
is generated based on these modifications. Additionally, you will analyze the impact of
the newly generated control signals and clearly present the details in the report.
*Use subcircuits in Logisim that can help you organize and manage complex designs
more effectively. make a step by step guide