Docsity

External CPU Bus Activity - Computer Architecture - Lecture Slides, Slides of Computer Architecture and Organization

Toggle sidebar
bg1
External CPU Bus Activity
Example problem:
(a) What will be the logic levels on the external SRC buses when each of
the following SRC instruction is executing on the processor? Complete the
table given. All numbers are in the decimal number system, unless noted
otherwise.
(b) Specify memory addressing modes for each of the SRC instructions
given.
SRC Instruction RTL equivalent Address Bus
<31..0>
Data Bus
<31..0>
MRead MWrite
ld r7, 12(r5)
ld r2, 32
la r9, 32
ldr r12, -4
lar r3, 0
st r2, 0(r6)
str r3, -8
st r4, 32
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download External CPU Bus Activity - Computer Architecture - Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

External CPU Bus Activity

Example problem:

(a) What will be the logic levels on the external SRC buses when each of

the following SRC instruction is executing on the processor? Complete the table given. All numbers are in the decimal number system, unless noted otherwise. (b) Specify memory addressing modes for each of the SRC instructions given. SRC Instruction RTL equivalent Address Bus <31..0>

Data Bus <31..0>

MRead MWrite

ld r7, 12(r5)

ld r2, 32

la r9, 32

ldr r12, -

lar r3, 0

st r2, 0(r6)

str r3, -

st r4, 32

  • All memory content is aligned

properly.

 In other words, all the memory accesses start at addresses divisible by 4. (cf. p98, H&J)

  • Value in the PC = 000DC348h

Assumptions:

Register Map

with assumed

values

Register Name Content

R[0] 0012A54Bh

R[1] 10234CB8h

R[2] D296492Fh

R[3] 001400CDh

R[4] B7432301h

R[5] 00AB1234h

R[6] 00000020h

R[7] 01432D7Fh

R[8] 00B94821h

R[9] 00CDA7A3h

R[10] 0031A0F0h

R[11] 0012A246h

R[12] 000FAB17h

SRC Instruction RTL equivalent Address Bus *

Data Bus

M

R

M

W

ld r7, 12(r5) R[7] M[12+R[5]] 00AB1240h 0785E53Dh 1 0

ld r2, 32 R[2] M[32] 00000020h D296492Fh 1 0

la r9, 32 R[9] 32 Unknown Unknown??

ldr r12, -4 R[12] M[PC-4] 000DC344h 4423E3D5h 1 0

lar r3, 0 R[3] PC Unknown Unknown??

st r2, 0(r6) M[R[6]] R[2] 00000020h D296492Fh 0 1

str r3, -8 M[PC-8] R[3] 000DC340h 001400CDh 0 1

st r4, 32 M[32] R[4] 00000020h B7432301h 0 1

* SRC uses big-endian convention

Solution Part (a):

MAR Connections

LMAR MAR

from CPU’s data bus

MRead

3-state buffers

3-state buffers

MARout

to internal bus

MBR connections

LMBR MBR

to CPU’s data bus

from CPU’s data bus

MWrite

MRead

3-state buffers 3-state buffers

3-state buffers 3-state buffers

INT2MBR

MBRout

to internal bus

from internal bus

31…27 26…22 21…17 16…12 11 IR^ opc^ ra^ rb^ rc

(^5) 5-to-32 decoder

RAE 5 5 5 RCE

Generating control signals for the register file

RBE

…..

…..

R
R
R
R2BUS

R0out

R1out

R31out

LR
LR
LR
BUS2R

…..

R
R
R

Control signals to register file

Alternate control circuitry for register select

IR opc ra rb rc …..

5-to-32 decoder

RCE

…..

R0C

R1C

R31C

5-to-32 decoder

RAE

…..

R0A

R1A

R31A

5-to-32 decoder

RBE

…..

R0B

R1B

R31B

This part will be repeated for R2BUS as shown on the next slide

LR
LR
LR
BUS2R

…..

R
R
R
R0A
R0C
R0B

Repeat 32 times

R0A
R0C
R0B

…..

Step RTN Control Signals

T0 – T2 Instruction Fetch As before

T3 A R[rb]; RBE, R2BUS, LA

T4 C A+R[rc]; RCE, R2BUS, ADD, LC

T5 R[ra] C; Cout’ RAE, BUS2R

Control signals for the add instruction

Syntax: add ra, rb, rc

How to perform sign extension?

Tri-state buffers

IR … c

16 ….. 0

Tri-state buffers

Bus<16..0>

Bus<31..17>

…

Sign extension of the 22 bit constant c will be done in the same way

31 …..

c2out

Enable

Enable

31…27 26…22 21…17 16…12 11 Op (^) ra rb rc IR

(^5) 5-to-32 decoder

5 5 5

RAE

RCE
RBE

…..

…..

R
R
R
R2BUS

R0out

R1out

R31out

Tri-state buffers

Hardwired to^ To internal bus Logic 0

ZR2BUS

Enable

RBE

Don’t connect this line to the tri- state buffer at the output of R

How to place a 0 on the bus when rb=0 in a ld or st instruction?

5-to-32 decoder

RBE

…..

R0B

R1B

R31B

From IR<21..17> Tri-state buffers

To internal bus

Hardwired to Logic 0

ZR2BUS

Enable

For the alternate circuitry

Instead of connecting this line to the input of the gates, connect it to the enable of the tri-state buffers as shown here

How to place a 0 on the bus when rb=0 in a ld or st instruction?

Step RTL for Id Control Signals

T0-T2 Instruction fetch As before T3 A ((rb = 0) : 0, (rb ≠ 0): R[rb]); RBE, R2BUS, LA

T4 C A + (16αIR<16> ©IR<15..0>); C2out, ADD, LC

T5 MAR C; Cout, LMAR

T6 MBR M[MAR]; MARout, MRead, LMBR

T7 R[ra] MBR; MBRout, RAE, BUS2R

Control signals for the ld instruction

Syntax: ld ra, c2(rb)