instructor: yuzhuang hu [email protected]. design strategy in asm
TRANSCRIPT
![Page 1: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/1.jpg)
Instructor: Yuzhuang [email protected]
![Page 2: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/2.jpg)
Design strategy in ASM
![Page 3: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/3.jpg)
CISC ArchitectureThe goal of the CISC architecture is to match more
closely the operations used in programming language and to provide instructions that facilitate compact programs and conserve memory.
A purely CISC architecture has the following properties: Memory access is directly available to most types of
instructions. Addressing modes are substantial in number. Instruction formats are of different lengths. Instructions perform both elementary and complex
operations.
![Page 4: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/4.jpg)
Combined CISC-RISC Organization
Instruction fetch
Decode and operand fetch
Execute
Write-back
Microprogram counter
Control ROM
![Page 5: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/5.jpg)
CISC CPU Instruction Formats
OPCODE
DR SA SB
OPCODE
DR SA Immediate
31 2524 2019 1514 109 0
OPCODE
DR SA Large target offset
OPCODE
DR SA SB Short target offset
Three register type
Two register type
Branch 1
Branch 2
![Page 6: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/6.jpg)
Micro-programmed Control
+1
MC
MS
MI
MZMZ-1PSZ
ME
SA CA CA-1
0 1 2 3
Mux E
AddressMicrocode ROM
Data
MZ CA
MZ-1
CA-1
DOF
EX
![Page 7: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/7.jpg)
Address Control
![Page 8: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/8.jpg)
Load Indirect Indexed(LII)
ActionAddress
Microinistructions
MZ
CA
RW
DX
MD
BS PS
MW
FS
LC
MA
MB
AX
BX
CX
R16<-R[SA]+zf IML
LII0
01
00
1 10 0 00 0 0 2 0 00 1 00 00 00
MC<-MC+1 (NOP)
LII1
01
00
0 00 0 00 0 0 0 0 00 0 00 00 00
R17<-M[R16]
LII2
01
00
1 11 1 00 0 0 0 0 00 0 10 00 00
MC<-MC+1(NOP)
LII3
01
00
0 00 0 00 0 0 0 0 00 0 00 00 00
R[DR]<-M[R17]
LII4
10
IDLE
1 01 1 00 0 0 0 0 00 0 11 00 00
![Page 9: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/9.jpg)
A Personal ComputerScree
n
Keyboard
Hard drive
Drive Controll
er
Bus Interface
RAMProcesso
r
Graphics
Adapter
CPU, FPU, MMUInternal Cache
External Cache
![Page 10: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/10.jpg)
Access TimesCache: 1 ns, memory: 10 ns, hard drive: 13
ms
Assume that 95% of the fetches will be from a cache and about 4.999995 percent of the fetches will be from main memory. The average access time then is:
0.95*2+0.49999995*10+5*10-
8*1.3*107=3.05ns
![Page 11: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/11.jpg)
Locality of Reference
Temporal Locality: refers to the relative times at which instructions and operands are accessed.
Spatial Locality: refers to the relative locations at which they reside in main memory.
![Page 12: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/12.jpg)
![Page 13: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/13.jpg)
![Page 14: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/14.jpg)
![Page 15: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/15.jpg)
![Page 16: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/16.jpg)
![Page 17: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/17.jpg)
![Page 18: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/18.jpg)
Write MethodsWrite the result into main memory. This is
also called write-through.
Write the result into the cache if there is a cache hit. This is also called write-back.write-allocate: when a cache miss happens,
read the line containing the word to be written from main memory into the cache, with the new word written into both the cache and main memory. Dirty bit of a line.
![Page 19: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/19.jpg)
![Page 20: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/20.jpg)
![Page 21: Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM](https://reader035.vdocuments.us/reader035/viewer/2022062314/56649f205503460f94c38937/html5/thumbnails/21.jpg)
THANKS!