7-1. Control Memory 7-1. Control Memory
7-1. Control Memory 7-1. Control Memory
Control Memory 3 / 14
l A control unit whose binary control variables are stored in memory (control l 2) Unconditional branch or conditional branch, depending on status bit conditions
memory). l 3) Mapping process ( bits of the instruction address for control memory )
l 4) A facility for subroutine return
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
u Microinstruction : Control Word in Control Memory u Selection of address for control memory : Fig. 7-2
l The microinstruction specifies one or more microoperations l Multiplexer
u Microprogram
CAR Increment Instruction code
l A sequence of microinstruction
Dynamic microprogramming : Control Memory = RAM JMP/CALL Mapping
logic
RAM can be used for writing (to change a writable control memory)
n
Mapping
n Microprogram is loaded initially from an auxiliary memory such as a magnetic disk
Static microprogramming : Control Memory = ROM Subroutine Return Status
bits
Branch
logic
MUX
select
Multiplexers
n Control words in ROM are made permanent during the hardware production.
l CAR : Control Address Register Subroutine
n Main Memory : for storing user program (Machine instruction/data) 2) Branch address from
n Control Memory : for storing microprogram (Microinstruction) Microprogram control memory
l 2) Control Address Register 3) Mapping Logic Control memory
Microinstruction
Specify the address of the microinstruction 4) SBR : Subroutine Register
l 3) Sequencer (= Next Address Generator) Microoperation l SBR : Subroutine Register Select a status Microoperations
bit
Determine the address sequence that is read from control memory Return Address can not be stored Branch address
Next address of the next microinstruction can be specified several way depending on in ROM
the sequencer input : p. 217, [1, 2, 3, and 4]
Return Address for a subroutine is
stored in SBR
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
7-2. Address Sequencing 5 / 14 7-3. Microprogram Example 7 / 14
l Status Bit Test Branch Logic : Fig. 7-8 l Computer Instruction : Fig. 7-5(b) Address Memory
204816
n 3 , 000(no operation)
Microinstruction Address 0 1 0 1 1 0 0 two or more conflicting microoperations can
not be specified simultaneously Control memory
Arithmetic
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
7-3. Microprogram Example 9 / 14 7-3. Microprogram Example 11 / 14
l Fetch Subroutine : address 64 I Opcode Address u Decoding of Microinstruction Fields : Fig. 7-7
Label Microoperat CD BR AD n l F1, F2, and F3 of Microinstruction are decodedo with a 3 x 8 decoder
ORG 64 l Output of decoder must be connected to the proper circuit to initiate the
FETCH: PCTAR U JMP NEXT
READ, INCPC U JMP NEXT
corresponding microoperation (as specified in Tab. 7-1)
DRTAR U MAP 0
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
Computer System Architecture Chap. 7 Microprogrammed Control Computer System Architecture Chap. 7 Microprogrammed Control
7-3. Microprogram Example 13 / 14
l MUX 1
L 3 2 1 0
Io
Select an address source and route to CAR Input Load
I1 S1 MUX 1 SBR
logic
CAR + 1 T S0
JMP/CALL
Mapping
Subroutine Return 1 Incrementer
I Test
MUX 2
JMP CALL S
Z Select
n JMP : AD MUX 1 2 CAR
Clock CAR
n CALL : AD MUX 1 2 CAR
, CAR + 1(Return Address)
LOAD SBR .
l MUX 2
Test a status bit and the result of the test is Control memory
applied to an input logic circuit Microops CD BR AD
One of 4 Status bit is selected by Condition bit (CD)
l Design of Input Logic Circuit
Select one of the source address(S0, S1) for
CAR
Enable the load input(L) in SBR