Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructor: Yuzhuang Hu Design strategy in ASM.

Similar presentations


Presentation on theme: "Instructor: Yuzhuang Hu Design strategy in ASM."— Presentation transcript:

1 Instructor: Yuzhuang Hu yhu1@cs.sfu.ca

2 Design strategy in ASM

3 CISC Architecture The 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.

4 Combined CISC-RISC Organization Instruction fetch Decode and operand fetch Execute Write-back Microprogram counter Control ROM

5 CISC CPU Instruction Formats OPCODEDRSASB OPCODEDRSAImmediate 312524201915141090 OPCODEDRSALarge target offset OPCODEDRSASBShort target offset Three register type Two register type Branch 1 Branch 2

6 Micro-programmed Control +1 MC MS MI MZ MZ-1 PS Z ME SACACA-1 0 1 2 3 Mux E Address Microcode ROM Data MZCA MZ-1CA-1 DOF EX

7 Address Control

8 Load Indirect Indexed(LII) Action Add ress Microinistructions MZMZ CACA RWRW DXMDMD BSPSPS MWMW FSFS LCLC MAMA MBMB AXAX BXCXCX R16<- R[SA]+zf IM L LII0 01001100000020 1 MC<-MC+1 (NOP) LII1 01000 0 0000 0 R17<-M[R16]LII2 01001111000000 01000 MC<- MC+1(NOP) LII3 01000 0 0000 0 R[DR]<- M[R17] LII4 10ID LE 1011000000 01100

9 A Personal Computer Screen Keyboard Hard drive Drive Controller Bus Interface RAM Processor Graphics Adapter CPU, FPU, MMU Internal Cache External Cache

10 Access Times Cache: 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*10 7 =3.05ns

11 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.

12

13

14

15

16

17

18 Write Methods Write 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.

19

20

21 THANKS!


Download ppt "Instructor: Yuzhuang Hu Design strategy in ASM."

Similar presentations


Ads by Google