210 likes | 326 Views
CMPT 250 Computer Architecture. Instructor: Yuzhuang Hu yhu1@cs.sfu.ca. Design strategy in ASM. CISC Architecture.
E N D
CMPT 250 Computer Architecture Instructor: Yuzhuang Hu yhu1@cs.sfu.ca
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.
Combined CISC-RISC Organization Instruction fetch Microprogram counter Decode and operand fetch Control ROM Execute Write-back
CISC CPU Instruction Formats 31 25 24 20 19 15 14 10 9 0 Three register type OPCODE DR SA SB Two register type OPCODE DR SA Immediate Branch 1 OPCODE DR SA Large target offset OPCODE DR SA SB Branch 2 Short target offset
Micro-programmed Control SA CA CA-1 MS MI +1 MZ 0 1 2 3 Mux E ME MZ-1 MC PS Z Address Microcode ROM Data MZ CA DOF EX MZ-1 CA-1
A Personal Computer Screen Hard drive Keyboard Drive Controller Bus Interface Graphics Adapter RAM Processor CPU, FPU, MMU Internal Cache External Cache
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*107=3.05ns
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.
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.