A group of bits that define such operations as add, subtract, multiply, shift, and
complement(bit 12-15 : 24 = 16 가지 distinct operations)
© Korea Univ. of Tech. & Edu.
Computer System Architecture Chap. 5 Basic Computer Organization and Design Dept. of Info. & Comm.
5-2
Addressing Mode
Immediate operand :
» the second part of an instruction code(address field) specifies an operand
Direct address operand : Fig. 5-2(b)
» the second part of an instruction code specifies the address of an operand
Indirect address operand : Fig. 5-2(c)
I=0 : Direct, » the bits in the second part of the instruction designate an address of a memory word
I=1 : Indirect in which the address of the operand is found (Pointer로 사용됨)
One bit of the instruction code is used to distinguish between a direct and an
indirect address : Fig. 5-2(a)
© Korea Univ. of Tech. & Edu.
Computer System Architecture Chap. 5 Basic Computer Organization and Design Dept. of Info. & Comm.
5-3
Effective Address
The operand address in computation-type instruction or the target address in a
branch-type instruction
5-2 Computer Registers
List of Registers for the Basic Computer : Tab. 5-1
Basic computer registers and memory : Fig. 5-3
Data Register(DR) : hold the operand(data) read from memory
Accumulator Register(AC) : general purpose processing register
Instruction Register(IR) : hold the instruction read from memory
Temporary Register(TR) : hold a temporary data during processing
Address Register(AR) : hold a memory address, 12 bit width
Program Counter(PC) :
» hold the address of the next instruction to be read from memory after the current
instruction is executed
» Instruction words are read and executed in sequence unless a branch instruction is
encountered
» A branch instruction calls for a transfer to a nonconsecutive instruction in the program
» The address part of a branch instruction is transferred to PC to become the address of
the next instruction
» To read instruction, memory read cycle is initiated, and PC is incremented by one (next
instruction fetch)
Write Read
2) Data Register : ADD DR to AC, AND DR
AR
to AC(연산결과는 AC에 저장하고 결과에 1
D2T5 : AC DR , SC 0 DR
3
LD INR CLR
TR
6
LD INR CLR
OUTR
Clock
LD
16-bit common bus
1 1 1 1 I/O Operation
7 6 5 4 3 2 1 0
+ Timing Signal
I D0
Timing Signal = 4 X 16 Decoder + .
.
D7 . Control
Control
4-bit Sequence Counter logic
outputs
gates
Exam) Control timing : Fig. 5-7 T15
.
.
.
.
D3T4 =1 : D3T4 : SC 0 15 14 10
.
.
.
4×16
Memory R/W cycle time > Clock decoder
cycle time
Increment(INR)
» 만약 위와 같이 가정하지 않으면, wait 4-bit
sequence
Clear(CLR)
cycle을 추가해야 함. counter
(SC)
Clock
T15 T0
15 14 10
4×16
decoder
Increment(INR)
4-bit
sequence Clear(CLR)
counter
(SC)
Clock
D3T4 : SC 0
T0 = 1 T0 : AR PC
» 1) Place the content of PC onto the bus by making the bus selection inputs S2S1S0=010
» 2) Transfer the content of the bus to AR by enabling the LD input of AR
© Korea Univ. of Tech. & Edu.
Computer System Architecture Chap. 5 Basic Computer Organization and Design Dept. of Info. & Comm.
5-11
T1 = 1 T1 : IR M [ AR], PC PC 1
» 1) Enable the read input memory
» 2) Place the content of memory onto the bus by making S2S1S0= 111
» 3) Transfer the content of the bus to IR by enable the LD input of IR
» 4) Increment PC by enabling the INR input of PC
Read
Clock
Fig. 5-11
Flowchart for instruction cycle(Initial Common bus
Program Interrupt
I/O Transfer Modes
» 1) Programmed I/O, 2) Interrupt-initiated I/O, 3) DMA, 4) IOP
» 본 교과서에서는 2) Interrupt-initiated I/O 방식 사용(FGI 또는 FGO가 1이면 Int. 발생)
» Maskable Interrupt 사용( ION 또는 IOF 명령을 사용하여 Int. mask 가능)
» During the execute phase, IEN is checked by the control Fetch and decode
Store return address
instruction
in location 0
IEN = 0 : the programmer does not want to use the interrupt, M[0] PC
=1
IEN = 1 : the control circuit checks the flag bit, If either(FGI/FGO) Branch to location 1
PC 1
=1
flag set to 1, R F/F is set to 1 FGI
=0
» At the end of the execute phase, control checks the value of R =1 IEN 0
FGO R 0
R = 0 : 보통의 instruction cycle로 들어감 =0
Register Control : AR
12 12
Control inputs of AR : LD, INR, CLR From Bus AR To Bus
Clock
AR ? Find all the statements that change the AR D'7
I
LD INR CLR
Control functions
pB7 : IEN 1
pB6 : IEN 0
RT2 : IEN 0
© Korea Univ. of Tech. & Edu.
Computer System Architecture Chap. 5 Basic Computer Organization and Design Dept. of Info. & Comm.
5-18
Bus Control
Encoder for Bus Selection : Tab. 5-7
» S0 = x1 + x3 + x5 + x7
» S1 = x2 + x3 + x6 + x7
» S2 = x4 + x5 + x6 + x7
x1 = 1 : Bus AR Find ? AR x1
» D T : PC AR x2
S0
4 4 x3 Multiplexer
D5T5 : PC AR x4
x5
Encoder S1 Bus Select
S2 Input
x6
» Control Function : x1 D4T4 D5T5 x7
x2 = 1 : Bus PC Find ? PC
“
“
x7 = 1 : Bus Memory Find ? M [ AR ]
» Same as Memory Read
» Control Function : x7 R ' T1 D7 ' IT3 ( D0 D1 D2 D3 )T4
» Memory Write :Memory Register Find ? M [ AR]
16
Control
Fig. 5-20 gates
16 16
From adder AC To Bus
and logic
Clock
LD INR CLR
D0 AND
T5
D0T5 : AC AC DR D1 ADD
D1T5 : AC AC DR
D2
D2T5 : AC DR DR
T5
pB11 : AC (0 7) INPR LD p INPR
rB9 : AC AC B11
r
rB7 : AC shr AC , AC (15) E COM
B9
rB6 : AC shr AC , AC (0) E SHR
rB11 : AC 0 CLR B7
INC
B5
CLR
B11
DR(i) AC(i)
INPR
From
INPR Clock
bit(i)
* Fig. 2-11 로 대체 가능
COM
Increment, Clear,
Count 기능
SHR
AC(i+1)
SHL
AC(i-1)