Professional Documents
Culture Documents
CH 07
CH 07
7-1
groups of bits that select the paths in multiplexers, decoders, and arithmetic logic units
The control logic is implemented with gates, F/Fs, decoders, and other digital circuits + Fast operation, - Wiring change(if the design has to be modified) The control information is stored in a control memory, and the control memory is programmed to initiate the required sequence of microoperations + Any required change can be done by updating the microprogram in control memory, - Slow operation
Control Word The control variables at any given time can be represented by a string of 1s and 0s. Microprogrammed Control Unit A control unit whose binary control variables are stored in memory (control memory).
Computer System Architecture
7-2
Microinstruction : Control Word in Control Memory The microinstruction specifies one or more microoperations Microprogram A sequence of microinstruction
Dynamic microprogramming : Control Memory = RAM
RAM can be used for writing (to change a writable control memory) Microprogram is loaded initially from an auxiliary memory such as a magnetic disk Control words in ROM are made permanent during the hardware production.
Main Memory : for storing user program (Machine instruction/data) Control Memory : for storing microprogram (Microinstruction)
Determine the address sequence that is read from control memory Next address of the next microinstruction can be specified several way depending on the sequencer input : p. 217, [1, 2, 3, and 4]
7-3
RISC Architecture Concept RISC(Reduced Instruction Set Computer) system use hardwired control rather than microprogrammed control : Sec. 8-8
Subroutine : program used by other ROUTINES Routine Microinstruction are stored in control memory in groups
Mapping Instruction Code
Address in control memory(where routine is located)
Address Sequencing Capabilities : control memory address 1) Incrementing of the control address register 2) Unconditional branch or conditional branch, depending on status bit conditions 3) Mapping process ( bits of the instruction address for control memory ) 4) A facility for subroutine return
Computer System Architecture
7-4
Ma p p ing lo g ic
Inc re me nte r
Co ntro l me mo ry
Mic ro o pe ra tio ns
7-5
Branch Logic
Test the specified condition and Branch to the indicated address if the condition is met ; otherwise, the control address register is just incremented.
Branch Logic
Input Logic(Tab. 7-4)
Opcode
: Fig. 7-8
1 0 1 1 0 x x x x 0 1 0 1 1 0 0 0 0
Address
4 bit Opcode = specify up to 16 distinct instruction Mapping Process : Converts the 4-bit Opcode to a 7-bit control memory address
1) Place a 0 in the most significant bit of the address 2) Transfer 4-bit Operation code bits 3) Clear the two least significant bits of the CAR ( , 4
Microinstruction
Mapping Function : Implemented by Mapping ROM or PLD Control Memory Size : 128 words (= 27)
Chap. 7 Microprogrammed Control Dept. of Info. Of Computer
7-6
) Memory Reference
Operand
Effective Address
Subroutine
p. 228, Tab. 7-2 INDRCT ( FETCH Subroutine ORG 64, 1000000 - 1111111
7-7
10 AR
Ad d re s s
Me m o ry 2 0 4 8 1 6
MUX
6 S BR
6 C AR
0 15 DR 0
C o ntro l m e m o ry 1 2 8 2 0
) 010 001 000 Clear AC to 0 and subtract DR from AC at the same time stand for a transfer from DR to AC (T = to)
Co ntro l unit 15 AC 0
7-8
1 CAR n CAR 1 2 CAR n AD Save Return Address 1 CAR n CAR 1 2 CAR n AD , SBR n CAR 1 Restore Return Address 3 CAR n SBR 4 CAR ( 2 5) n DR (11 14 ), CAR (0, 1, 6) n 0
01 : CALL
10 : RET 11 : MAP
Labe l FET H:
J P J P P
NE T NE T 0
r pe rat O G 64 P T E , IN P T
Symbolic Microinstruction Label Field : Terminated with a colon ( : ) Microoperation Field : one, two, or three symbols, separated by commas CD Field : U, I, S, or Z BR Field : JMP, CALL, RET, or MAP
7-9
AD Field a. Symbolic Address : Label ( = Address ) b. Symbol NEXT : next address c. Symbol RET or MAP : AD field = 0000000 ORG : Pseudoinstruction(define the origin, or first address of routine)
I Opcode
C
Address
MP MP MAP
& &
% %
pe rat
NEXT NEXT 0
Dept. of Info. Of Computer
! $
#" !
7-10
Symbolic Microprogram : Tab. 7-2 The execution of MAP microinstruction in FETCH subroutine
Branch to address 0xxxx00 (xxxx = 4 bit Opcode)
ADD : 0 0000 00 = 0 BRANCH : 0 0001 00 = 4 STORE : 0 0010 00 = 8 EXCHANGE : 0 0011 00 = 12, ( 16, 20, , 60 )
Indirect Address : I = 1
Indirect Addressing : AR n M [ AR ]
AR
DR
,
CD
AR
D NE T 0
INDRCT subroutine
RE D DRT R J RET
Execution of Instruction
ADD instruction
1) ADD FETCH subroutine Opcode fetch , MAP MAP branch ( Opcode = 0000, Fig. 7-5(b) ) Process CAR = 0 0000 00 2) ADD Address 0 CD Indirect = 1 INDRCT subroutine Effective Address AR Return . 3) ADD Address 1 AR Memory DR . 4) ADD Address 2 AC + DR AC , FETCH subroutine Branch 1) PC Fetch MAP Routine Address Branch .
6 6
5 5
L b l INDRCT:
7) 4
3 '1 ( 2 21 0)
( '
DR n M [ AR ] AR n DR
7-11
BRANCH instruction
Branch
Binary Microprogram : Tab. 7-3 Symbolic microprogram(Tab. 7-2) must be translated to binary either by means of an assembler program or by the user Control Memory
Most microprogrammed systems use a ROM for the control memory
Cheaper and faster than a RAM Prevent the occasional user from changing the architecture of the system
7-12
F1
F2
38 d e c o d e r
7 6 5 4 3 2 1 0
F3
38 d e c o d e r
7 6 5 4 3 2 1 0
38 d e c o d e r
7 6 5 4 3 2 1 0
From DR
AND ADD DRTAC
PCTAR
DRTAR Lo a d
Fro m PC 0 S e le c t
AC
Multiple xe rs
Lo a d
AR
Clo c k
7-13
Microprogram Sequencer : Fig. 7-8 Microprogram Sequencer select the next address for control memory MUX 1
Select an address source and route to CAR CAR + 1 JMP/CALL Mapping Subroutine Return JMP
Io Input I1 lo g ic T
L 3 S1 S0
0 S BR Lo ad
MUX 1
CALL
JMP : AD MUX 1 2 CAR CALL : AD MUX 1 2 CAR , CAR + 1(Return Address) LOAD SBR .
1 I S Z
MUX 2 S elec t
Tes t
Inc rementer
Clo c k
CAR
MUX 2
Test a status bit and the result of the test is applied to an input logic circuit
One of 4 Status bit is selected by Condition bit (CD)
Co ntro l memo ry Mic ro o ps CD BR AD
7-14
I0, I1 from Branch bit (BR) T from MUX 2 (T) MUX 1 Select signal (S0, S1) S1 = I1I0 + I1I0 = I1(I0 + I0) = I1 S0 = I1I0T + I1I0T + I1I0 = I1T(I0 + I0) + I1I0 = I1T + I1I0 SBR Load signal (L) L = I1I0T
0 0 0 0 1 1
BR Fie ld 0 0 1 1 0 1 I1 0 0 0 0 1 1
Output :
Input I0 0 0 1 1 0 1
MUX 1 T 0 1 0 1 x x S1 0 0 0 0 1 1 S0 0 1 0 1 0 1
Load SBR L 0 0 0 1 0 0
CALL