Computer Design: Understanding Processing Units and Data Manipulation, Exams of Design

An overview of computer design, focusing on the processing unit and data manipulation. Topics include the structure of a computer, the role of control and datapath, finite state machines, data manipulation operations, and register transfer control. It also covers the concept of arithmetic circuits and memory organization in both Harvard and Princeton architectures.

Typology: Exams

2021/2022

Uploaded on 09/12/2022

kiras
kiras 🇬🇧

4.7

(21)

292 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
 

Computer design – an application of digital logic design procedures
Computer = processing unit + memory system
Processing unit = control + datapath
Control = finite state machine
inputs = machine instruction, datapathconditions
outputs = register transfer control signals, ALU operation codes
instruction interpretation = instruction fetch, decode, execute
Datapath = functional units + registers
functional units = ALU, multipliers, dividers, etc.
registers = program counter, shifters, storage registers
 











 


Block diagram view



 
! ""#

$%&
'

$%
()
(*
(+
(,
(-
(.
(/
(0
!
)
*
+
,
-
.
/
0 !1
Selectively loaded – EN or LD input
Output enable – OE input
Multiple registers – group 4 or 8 in parallel
 

Point-to-point connection
dedicated wires
muxes on inputs of
each register
Common input from multiplexer
load enables
for each register
control signals
for multiplexer
Common bus with output enables
output enables and load
enables for each register

2

2

2
3,
2

2
  3,
4
   3,
 
3%
34
35
6%
64
65
-
.
/
0
(-
(.
(/
(0

Collections of registers in one package
two-dimensional array of FFs
address used as index to a particular word
can have separate read and write addresses so can do both at same time
4 by 4 register file
16 D-FFs
organized as four words of four bits each
write-enable (load)
read-enable (output enable)
 
3
63
57
58
5)
5*
5+
5,
5-
5.
5.
5/
50
9$-
9$.
9$/
9$0

Larger collections of storage elements
implemented not as FFs but as much more efficient latches
high-density memories use 1 to 5 switches (transitors) per memory bit
Static RAM – 1024 words each 4 bits wide
once written, memory holds forever (not true for denser dynamic RAM)
address lines to select word (10 lines for 1024 words)
read enable
same as output enable
often called chip select
permits connection of many
chips into larger array
write enable (same as load enable)
bi-directional data lines
output when reading, input when writing
pf3
pf4
pf5

Partial preview of the text

Download Computer Design: Understanding Processing Units and Data Manipulation and more Exams Design in PDF only on Docsity!

 Computer design – an application of digital logic design procedures

 Computer = processing unit + memory system

 Processing unit = control + datapath

 Control = finite state machine

 inputs = machine instruction, datapath conditions

 outputs = register transfer control signals, ALU operation codes

 instruction interpretation = instruction fetch, decode, execute

 Datapath = functional units + registers

 functional units = ALU, multipliers, dividers, etc.

 registers = program counter, shifters, storage registers

 Block diagram view

 Selectively loaded – EN or LD input

 Output enable – OE input

 Multiple registers – group 4 or 8 in parallel

 Point-to-point connection

 dedicated wires

 muxes on inputs of

each register

 Common input from multiplexer

 load enables

for each register

 control signals

for multiplexer

 Common bus with output enables

 output enables and load

enables for each register

 Collections of registers in one package

 two-dimensional array of FFs

 address used as index to a particular word

 can have separate read and write addresses so can do both at same time

 4 by 4 register file

 16 D-FFs

 organized as four words of four bits each

 write-enable (load)

 read-enable (output enable)

 Larger collections of storage elements

 implemented not as FFs but as much more efficient latches

 high-density memories use 1 to 5 switches (transitors) per memory bit

 Static RAM – 1024 words each 4 bits wide

 once written, memory holds forever (not true for denser dynamic RAM)

 address lines to select word (10 lines for 1024 words)

 read enable

 same as output enable

 often called chip select

 permits connection of many

chips into larger array

 write enable (same as load enable)

 bi-directional data lines

 output when reading, input when writing

 Example – an instruction to

add the contents of two registers (Rx and Ry)

and place result in a third register (Rz)

 Step 1: get the ADD instruction from memory into an instruction register

 Step 2: decode instruction

 instruction in IR has the code of an ADD instruction

 register indices used to generate output enables for registers Rx and Ry

 register index used to generate load signal for register Rz

 Step 3: execute instruction

 enable Rx and Ry output and direct to ALU

 setup ALU to perform ADD operation

 direct result to Rz so that it can be loaded into register

 Data manipulation

 add, subtract

 increment, decrement

 multiply

 shift, rotate

 immediate operands

 Data staging

 load/store data to/from memory

 register-to-register move

 Control

 conditional/unconditional branches in program flow

 subroutine call and return

 Standard FSM elements

 state register

 next-state logic

 output logic (datapath/control signalling)

 Moore or synchronous Mealy machine to avoid loops unbroken by FF

 Plus additional "control" registers

 instruction register (IR)

 program counter (PC)

 Inputs/outputs

 outputs control elements of data path

 inputs from data path used to alter flow of program (test if zero)

 Control state diagram (for each diagram)

 reset

 fetch instruction

 decode

 execute

 Instructions partitioned into three classes

 branch

 load/store

 register-to-register

 Different sequence through

diagram for each

instruction type

 Arithmetic circuits constructed

in hierarchical and modular fashion

 each bit in datapath

is functionally identical

 4-bit, 8-bit, 16-bit, 32-bit datapaths

 ALU block diagram

 input: data and operation to perform

 output: result of operation and status information

 Princeton architecture

 Register file

 Instruction register

 PC incremented

through ALU

 Modeled after

MIPS rt

(used in 378

textbook by

Patterson &

Hennessy)

 really a 32-bit

machine

 we’ll do a 16-bit

version

 Synchronous Mealy or Moore machine

 Multiple cycles per instruction

 Three principal types (16 bits in each instruction)

type op rs rt rd funct

R(egister) 3 3 3 3 4

I(mmediate) 3 3 3 7

J(ump) 3 13

 Some of the instructions

add 0 rs rt rd 0 rd = rs + rt

sub 0 rs rt rd 1 rd = rs - rt

and 0 rs rt rd 2 rd = rs & rt

or 0 rs rt rd 3 rd = rs | rt

slt 0 rs rt rd 4 rd = (rs < rt)

lw 1 rs rt offset rt = mem[rs + offset]

sw 2 rs rt offset mem[rs + offset] = rt

beq 3 rs rt offset pc = pc + offset, if (rs == rt)

addi 4 rs rt offset rt = rs + offset

j 5 target address pc = target address

halt 7 - stop execution until reset

A

 Instruction: r3 = r1 + r

R 0 rs=r1 rt=r2 rd=r3 funct=

 1. instruction fetch

 move instruction address from PC to memory address bus

 assert memory read

 move data from memory data bus into IR

 configure ALU to add 1 to PC

 configure PC to store new value from ALUout

 2. instruction decode

 op-code bits of IR are input to control FSM

 rest of IR bits encode the operand addresses (rs and rt)

 these go to register file

 Instruction: r3 = r1 + r

R 0 rs=r1 rt=r2 rd=r3 funct=

 3. instruction execute

 set up ALU inputs

 configure ALU to perform ADD operation

 configure register file to store ALU result (rd)

 Step 1

 Step 2

 Step 3

 Control

 transfer data between registers by asserting appropriate control signals

 Register transfer notation - work from register to register

 instruction fetch:

mabus ← PC; – move PC to memory address bus (PCmaEN, ALUmaEN)

memory read; – assert memory read signal (mr, RegBmdEN)

IR ← memory; – load IR from memory data bus (IRld)

op ← add – send PC into A input, 1 into B input, add

(srcA, srcB0, scrB1, op)

PC ← ALUout – load result of incrementing in ALU into PC (PCld, PCsel)

 instruction decode:

IR to controller

values of A and B read from register file (rs, rt)

 instruction execution:

op ← add – send regA into A input, regB into B input, add

(srcA, srcB0, scrB1, op)

rd ← ALUout – store result of add into destination register

(regWrite, wrDataSel, wrRegSel)

 How many states are needed to accomplish these transfers?

 data dependencies (where do values that are needed come from?)

 resource conflicts (ALU, busses, etc.)

 In our case, it takes three cycles

 one for each step

 all operation within a cycle occur between rising edges of the clock

 How do we set all of the control signals to be output by the state machine?

 depends on the type of machine (Mealy, Moore, synchronous Mealy)

93← BC'

← D/'

5←  ← 5D

  "    E

      F

5 A

 First pass at deriving the state diagram (Moore machine)

 these will be further refined into sub-states