Chapter04 ProcessorDesign PDF
Chapter04 ProcessorDesign PDF
CHAPTER 4:
PROCESSOR DESIGN
(part_1)
2
Outline
Ø We introduced new concepts:
ü Instruction sets
ü Instruction types
ü Addressing modes
ü Instruction-execution cycle
ü Processor design flow
Ø Including
ü instruction set design,
ü instruction set flowcharts,
ü component allocation,
ü ASM charts
ü processor architecture
Outline
Ø We introduced new concepts:
ü Instruction sets
ü Instruction types
ü Addressing modes
ü Instruction-execution cycle
ü Processor design flow
Ø Including
ü instruction set design,
ü instruction set flowcharts,
ü component allocation,
ü ASM charts
ü processor architecture
Basic definitions
Ø Processor controls overall system operations, supervising I/O devices
that executes one or more specific tasks much faster than the processor
itself. For this reason, such ASICs are called accelerators, since the
processor offloads computationally intensive tasks to them.
Instruction Set
Ø Instruction Set (IS) is a set of variety of instructions and
instructions format, which will be interpreted by the processor’s
control unit and executed in the processor’s datapath.
Ø An instruction is a string of bits grouped into a number of
different fields, such as
ü Operation code (op-code)
ü Instruction types
ü Addressing fields
Ø Mode field
Lind R2, A ( RF[2] ß Mem[ Mem[A] ] )
Ø Constant field
Add R2, R3, 1 ( RF[2] ß RF[3] + 1 )
9
Ø Code performance:
Addressing modes
Implied
(set, reset ACC/status registers)
Immediate
(incre/decre loop,
array indices, coefficient)
Direct
Indirect
15
Addressing modes
Relative
Branch instructions
Table look-ups
Indexed
“1”
Instruction-execution cycle
IR = Instruction Register
PC = Program Counter
Memory stores all instructions and data
17
Instruction-set design
Ø Programming effeciency vs. program size
Ø Processor cost vs. processor performance
Ø Compromise program size vs. processor size
Ø Complex Instruction-set (CISC)
ü powerful instructions -> shorter programs
ü powerful instructions -> complex datapath, control unit
ü complex instructions -> several clock cycles
ü complex datapath, control unit -> longer clock period
ü complex instructions -> poor pipeline
Ø Reduced Instruction-set (RISC)
ü simple instructions -> longer programs
ü simple instructions -> simple datapath, control unit
ü simple instructions -> single clock cycle
ü simple datapath -> shorter clock period
ü simple instructions -> excellent pipeline
19
b) Memory instructions
load and store
Outline
Ø We introduced new concepts:
ü Instruction sets
ü Instruction types
ü Addressing modes
ü Instruction-execution cycle
ü Processor design flow
Ø Including
ü instruction set design,
ü instruction set flowcharts,
ü component allocation,
ü ASM charts
ü processor architecture
Instruction-set flowchart
Ø Does not presume any architectural details
Ø Does not presume any particular processor datapath
Ø Does not consider any timing constraints or clock cycle
duration
Purpose:
Ø Give the order in which the operations specified by
each instruction will be executed.
CISC Design:
Instruction-set
flowchart
Design process
24
CISC Design:
Instruction-set
flowchart
(cont.)
Design process
26
Processor ASM chart
(scheduled IS chart)
27
28
Processor
schematic
Design process
Pipelined execution
30
b) Memory instructions
load and store Name Action
L immU Dest RF [Dest(31…16)] ß Offset
2 addressing mode:
- Immediate L immL Dest RF [Dest(15…0)] ß Offset
- Relative
L rel Dest, Src2, Offset RF [Dest] ß Mem[RF[Src2] + Offset]
S rel Src1, Src2, Offset Mem[RF[Src2] + Offset] ß RF [Src1]
31
d) Miscellaneous
instructions
no-op, clear, Name Action
set and reset No-op Do nothing
Clear Dest RF [Dest] ß0
Sstat Dest status [Dest] ß 1
Rstat Dest status [Dest] ß 0
32
Stage 2 Stage 3
Stage 1 Stage 4
33
Timing diagram
34
Assembly program
Data dependence:
5 (or 45%) of 11 instructions are No-op
instrucsions à decrease substantially
performance of pipelined processor
Timing diagram
35
sum = a + b
total = sum + c Assembly program
Source program
Timing diagram
36
1-stage
forward path
sum = a + b
total = sum + c
37
endif
Source program Assembly program
result of
Bgoeq inst
Chapter Summary
Ø We introduced new concepts:
ü Instruction sets
ü Instruction types
ü Addressing modes
ü Instruction-execution cycle
ü Processor design flow
Ø Including
ü instruction set design,
ü instruction set flowcharts,
ü component allocation,
ü ASM charts
ü processor architecture
Ø We have demonstrated processor design:
ü 16-bit CISC design
ü 32-bit RISC design
o data-forwarding
o branch prediction