Académique Documents
Professionnel Documents
Culture Documents
CONTROL UNIT
Control unit (CU) of a processor translates from machine instructions to the control signals for the microoperations that implement them Control units are implemented in one of two ways Hardwired Control CU is made up of sequential and combinational circuits to generate the control signals Microprogrammed Control A control memory on the processor contains microprograms that activate the necessary control signals We will consider a hardwired implementation of the control unit for the Basic Computer
Other inputs
3x8 decoder 7 6543 210 I D0 D7 T15 T0 15 14 . . . . 2 1 0 4 x 16 decoder Increment (INR) Clear (CLR) Clock Combinational Control logic Control signals
Datapath Design
Similarity in functions for the datapath design Given the steps for unsigned multiplication and 2s complement multiplication, it would be more efficient to have a single datapath
Simply control the datapath different for each function Costly to have a custom datapath for each function (instruction) Thus, part of efficient datapath design is control unit design
Processor Model
C (in) condition signals from the data path C (out) control signals to the data path C (in) control signals from other components C (out) control signals to external components
Each node (or state) in the graph should indicate the control signals
Hardwired Design
Designing a custom digital circuit using digital logic and states (D-flip flops or registers) Digital logic course on building truth tables and Finite State Machines (FSM)
Sequential Circuit
3 Bits
Sequential Circuit
State machine is only counting after the control unit receives the RESET_H signal State machine stops counting (waits in state 3) until the datapath signal COUNTIS6_H signal states that 6 repetitions of that state have occurred.
Microprogram Control
Use ROM and RAM memories to implement the combinatorial circuit A control unit whose circuit makes use of a ROM or RAM is called a microprogrammed control unit The memory used in the circuit is called control memory The practice of designing a control unit with ROM&RAM is called: microprogramming First introduced by Maurice Wilkes
ROM or RAM
Micro-instruction
Each micro-instruction has three components Condition signals
Correspond to the the controls of the datapath or other external devices
Condition Masks
Similar to branch instructions Generally, what happens if the next micro-instruction to be executed depends on what the datapath condition signals are: Example: staying in state 3 for 6 executions to output ADD_H signal If the current micro-instruction is at address 000, and depends on the condition COUNTIS6_H to determine the next state, then the system needs to pay attention to COUNTIS6_H and cant simply use the Next Address field
Next-Address Logic
Assigning microinstructions to CM
2) Instruction DECODE
ADD or SUB
CONTROL MEMORY
DECODER
Starting Address
MULTIPLY
Waste of space
Microprogramming Summary
Currently characterizes almost all modern microprocessor designs Datapaths and control units can be shared or be similar between generations of processors (PentiumII and Pentium III, ahead) Encoding signals into codes saves space, but codes must then be decoded (using logic)