Computer System Architecture
Processor Part IV
Chalermek Intanagonwiwat
Slides courtesy of John Hennessy ard David Patterson
Microprogramming
i as f
Rast Ws
. Ciena a
¥ ¢: en gee OMMT Fe
“Macroinstruction" Interpretation comssmot
nl race inden XemnnteRe a
i ar 1. West groarem FNAL:
Memon | this can change!
—— x ‘neeaginetud tn
aa
‘one of these is
fPata———} mapped into one
ptthese
[execution
unit
Fone 1%
a
lances jah
eg. Fetch
ale Operand Addr
B sence
Eten Qperanls)
prrdrction gob power
cal
Save Answer(s)
(haiyinnroura
Microprogramming Pros and Cons
+ Ease of design
* Flexibility =» os ae ;
- Easy to adapt to changes in organization, °° i
timing, technology
- Can make changes late in design cycle, or
even in the field \ bane ror uni
+ Can implement very powerful instruction
sets (just more control memory)Microprogramming Pros and Cons
(cont.)
+ Generality iemyeetionn
~ Can implement multiple instruction sets on
same machine. \
| = Can tailor instruction set to application.
Compatibility
- Many organizations, same instruction set
Slow -wdnnerivinigicverbodhaied
(atu)
piel Pov fst
Exceptions (cont.)
cememmecileaies in
+ Exception = unprogrammed control
transfer
- system takes action to handle the
exception —-antinsl id bannil
+ must record the address of the offending
instruction
- returns control to user
~ must seve & Pestere user state
Exceptions
cde vnccgtin vt Sank
mr
tour rom
creepten
ronal ono ow
eqvertal jumps branches, a, etm
Two Types of Exceptions
+ Interrupts
caused by external events
asynchronous to program execution
Qua? 7 may be handled between instructions -»ss=
os
- simply suspend and resume user program 4
wuctaagyTwo Types of Exceptions MIPS Convention
(cont.)
Type of event
ae taeiatuniaminnene
* Traps / 60'S
ype From where? MIPS terminology
Heyrvie address hide , divide by aero a0 depelrequest-5Exemer TMeTuet
~ caused by internal events Invoke OS from user
+ exceptional conditions (overflow) program Internal Exception |
+ errors (parity) Sitwell
+ faults (non-resident page) laa ciSidk Arithmetic overflow Internal Exception
~ synchronous to program execution a | ;
~ condition must be remedied by the handler Using an undefined
. . 2 . instruction Internal Exception
~ instruction may be retried or simulated and
program continued or program may be aborted
deh
Addressing the Exception Addressing the Exception
Handler ; Handler (cont.)
Troate
+ Traditional Approach: Interupt Vector + RISC Handler Table
- PC <- MEM[ IV_base + cause || 00] ~ PC<- IV_base + cause || 0000 *
- Eg., Vax, 80x86 Sort oF sear omaescreelu — saves state and jumps
ia - Eg., Sparc
oe honed 9 SP
| vsune psinter Yds nomdter code ‘
< frandier . ‘handler entry code
base cose
Fivtsleogbn = - vira ten pase couse
— verlyy 7 pavidermagt
adit Fee,
JBlawriovirvs