Micro Code Control Document
Micro Code Control Document
Micro Code Control Document
Table of Contents
Micro Code Control Document ............................................................................................................................. 1
By Muhammad Niyamathullah Khan ................................................................................................................ 1
Student Number: 7228968 .................................................................................................................................... 1
Date: 03/24/2017 ..................................................................................................................................................... 1
Ver. 1.1 ............................................................................................................................................................................ 1
1.Introduction .............................................................................................................. 3
1.1 Design Objective .................................................................................................... 3
1.2 Block Diagram ........................................................................................................ 4
2. Specification & Requirement .................................................................................... 4
3. Implementation Method .......................................................................................... 5
3.1 Design Flow ............................................................................................................ 5
3.1.2 Implementation Required (Outcome) .................................................................. 8
3.2 Technical Questions and Answers .......................................................................... 8
3.2.1 To Do List. ........................................................................................................... 8
3.2.2 Answers TO DO list. ............................................................................................. 9
3.3 Verification and Validation (End to End Testing) ..................................................... 9
4. Resources and Reference. ...................................................................................... 10
1.Introduction
Control logic is a sequential circuit that has internal states that dictate the control
commands for the system. However there are two types of control logic viz.
hardwired and Micro programmed.
Hardwired control logic uses the sequential circuits directly; changes to the control
algorithm require changes to the circuits and give the fastest operation.
A Micro programmed control logic stores the control information in memory,
changes in the algorithm require only changes/flashing the memory.
This document outlines only the micro programmed control logic.
Fig. 1 Micro control logic Block diagram
3. Implementation Method
Fig. 4 Register File
• ALU: The arithmetic Logical unit is a data processing station for the outputs
taken out from the REGFILE. This data processing station performs
arithmetic and logical operations for combinations of register stored in the
register bank. This is responsible for generating status flags/bits, which
results in its operations. The operations depend on the parameters given to
the function SSEL that performs logical operation i.e. AND, OR, XOR, NOR etc.
and arithmetic operations i.e. addition, subtraction, increment, decrement
etc.
Fig. 5 ALU block
• Shifter: This block is responsible for taking the input from the output of the
ALU and performs shifting operations i.e. Arithmetic shift right/left , Rotate
left/right, Rotate with carry , load all zeros and no shift of the data.
Fig 6. Shifter block.
• Microcode: This is a file, which contains the Control word and Control
address register.
Fig 7. Microinstruction
Referring to Fig 7. The combination of all the registers arranged in this particular
method gives us the 32 bit long Control Word and Control Address Register. These
sequential instructions such as the above form the Micro-Code, which will define the
functioning of the CPU.
3.2.1 To Do List.
1 MUX1 and MUX2 logic to update the CAR for every clock cycle.
2 Linking REGFILE, ALU and Shifter to make it the processor unit.
3 Precedence of Carry from Shifter and ALU.
4 Conflict in Register size as CPU defines it as 8 bits and all other files (REGFILE,
ALU, SHIFTER) are defined as 4 bits.
5 Use of signal doesn’t hold the data for registers such as CAR, A, B etc.
6 Generating the microcode.vhdl file for test cases.
7 Given the HEX displays are limited, how to maximize and show more debug
sections.