复旦大学:《计算机原理 Computer System》课程PPT课件_09、10 Sequential CPU Implementation

Sequential CPU Implementation
Sequential CPU Implementation

Suggested Reading Chap 4.3 Processor
– 2 – Processor Suggested Reading - Chap 4.3

Y86 Instruction Set P259 Byte 00 addl halt subl rrmovl rA, rB P2|0旧 and16 irmov1V rB rmmovl rA, d(rB)40 rB D mrmovl D(rB), TA [50 TA rB D e OPl rA, rB 6 n[ rBh 1[2 jXX Dest Dest e all dest Dest ne ret pushl rA Ara 8 g WI Tod c- 0|rA8 Processor
– 3 – Processor Y86 Instruction Set P259 Byte 0 1 2 3 4 5 pushl rA A 0 rA 8 jXX Dest 7 fn Dest popl rA B 0 rA 8 call Dest 8 0 Dest rrmovl rA, rB 2 0 rA rB irmovl V, rB 3 0 8 rB V rmmovl rA, D(rB) 4 0 rA rB D mrmovl D(rB), rA 5 0 rA rB D OPl rA, rB 6 fn rA rB ret 9 0 nop 0 0 halt 1 0 addl 6 0 subl 6 1 andl 6 2 xorl 6 3 jmp 7 0 jle 7 1 jl 7 2 je 7 3 jne 7 4 jge 7 5 jg 7 6

Building Blocks p278, P279,P280 fun Combinational Logic A A Compute Boolean functions of Inputs a Continuously respond to input changes MUX a Operate on data and im plement control Storage Elements ■ Store bits SrcA/A Registe dst a Addressable memories Non-addressable registers srcB Clock a Loaded only as clock rises Clock Processor
– 4 – Processor Building Blocks P278, P279, P280 Combinational Logic ◼ Compute Boolean functions of inputs ◼ Continuously respond to input changes ◼ Operate on data and implement control Storage Elements ◼ Store bits ◼ Addressable memories ◼ Non-addressable registers ◼ Loaded only as clock rises Register file A B W dstW srcA valA srcB valB valW Clock A L U fun A B MUX 0 1 = Clock

Hardware Control Language a Very simple hardware description language a Can only express limited aspects of hardware operation e Parts we want to explore and modify Data Types ■boo1: Boolean a, b, C,.. int: words ●A,B,C, e Does not specify word size---bytes, 32-bit words, Statements bool a= bool-expr i nt a int-expr i 5 Processor
– 5 – Processor Hardware Control Language ◼ Very simple hardware description language ◼ Can only express limited aspects of hardware operation ⚫ Parts we want to explore and modify Data Types ◼ bool: Boolean ⚫ a, b, c, … ◼ int: words ⚫ A, B, C, … ⚫ Does not specify word size---bytes, 32-bit words, … Statements ◼ bool a = bool-expr ; ◼ int A = int-expr ;

HCL Operations a Classify by type of value returned Boolean Expressions ■ Logic Operations ●a&&b,al|b,! ■ Word com parisons OA == B,A != B,A B,A>B ■ Set Mem bership A in[ B, C,d 1 ) Same asA== B 二二 Word Expressions a Case expressions A b: B: C: C] O Evaluate test expressions a, b, C,.. in sequence o Return word expression A, B, C,. for first successful test Processor
– 6 – Processor HCL Operations ◼ Classify by type of value returned Boolean Expressions ◼ Logic Operations ⚫ a && b, a || b, !a ◼ Word Comparisons ⚫ A == B, A != B, A = B, A > B ◼ Set Membership ⚫ A in { B, C, D } » Same as A == B || A == C || A == D Word Expressions ◼ Case expressions ⚫ [ a : A; b : B; c : C ] ⚫ Evaluate test expressions a, b, c, … in sequence ⚫ Return word expression A, B, C, … for first successful test

43.1 Instruction Execution Stages P281 Fetch a Read instruction from instruction memory Decode a Read program registers Execute a Compute value or address Memory ■ Read or write data Write Back a Write program registers PC a Update program counter Processor
– 7 – Processor 4.3.1 Instruction Execution Stages P281 Fetch ◼ Read instruction from instruction memory Decode ◼ Read program registers Execute ◼ Compute value or address Memory ◼ Read or write data Write Back ◼ Write program registers PC ◼ Update program counter

Instruction Decoding Optional Optional 50rAIrB D icode ifun TA B valc Instruction Format ■ nstruction byte icode: ifun a Optional register byte rA: rB a Optional constant word valC 8 Processor
– 8 – Processor Instruction Decoding Instruction Format ◼ Instruction byte icode:ifun ◼ Optional register byte rA:rB ◼ Optional constant word valC 5 0 rA rB D icode ifun rA rB valC Optional Optional

Figure 4.16 P283 Executing Arith /Logical Operation OPl rA, rB 6 fn ralrB Fetch Memory Read 2 bytes Do nothing Decode Write back Read operand registers ■ Update register Execute PC Update ■ Perform operation ■ Increment Pc by2 Set condition codes -9 Processor
– 9 – Processor Figure 4.16 P283 Executing Arith./Logical Operation Fetch ◼ Read 2 bytes Decode ◼ Read operand registers Execute ◼ Perform operation ◼ Set condition codes Memory ◼ Do nothing Write back ◼ Update register PC Update ◼ Increment PC by 2 OPl rA, rB 6 fn rA rB

Stage Computation: Arith/Log. Ops P283 igure 4.16 OPl A, rB icode:ifun←-M1[Pc] Read instruction byte rA:rB←M1[Pc+们 Read register byte Fetch vaIP tPC+2 Compute next PC vaA←R[A Read operand a Decode vaB←R[rB] Read operand B vale t valB oP valA Perform ALU operation Execute Set cc Set condition code register Memory Write RrB]←vaE Write back result back PC update PC←vaP Update Pc a Formulate instruction execution as sequence of simple steps a Use same general form for all instructions 10-MPC]表示从PC开始的内存中读取一个字节的数据 Processor
– 10 – Processor Stage Computation: Arith/Log. Ops P283 Figure 4.16 ◼ Formulate instruction execution as sequence of simple steps ◼ Use same general form for all instructions OPl rA, rB icode:ifun M1 [PC] rA:rB M1 [PC+1] valP PC+2 Fetch Read instruction byte Read register byte Compute next PC valA R[rA] valB R[rB] Decode Read operand A Read operand B valE valB OP valA Set CC Execute Perform ALU operation Set condition code register Memory Write R[rB] valE back Write back result PC update PC valP Update PC M1 [PC] 表示从PC开始的内存中读取一个字节的数据
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Processor Architecture.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Heterogeneous Data Structures & Alignment; Putting it Together; Floating Point.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Procedure Call and Array.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Machine-Level Representation of Programs Ⅱ.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Machine-Level Representation of Programs I.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Integer Operations; Floating Points.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Integer Representations.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Introduction to Computer Systems; Information is Bits+Context; Information Storage.ppt
- 复旦大学:《计算机原理 Computer System》课程资源_2006年期中考试题目.doc
- 复旦大学:《计算机原理 Computer System》课程资源_2006年期中考试答案.doc
- 复旦大学:《计算机原理 Computer System》课程资源_教学大纲.pdf
- 复旦大学:《计算机图形学》课后习题答案_7.docx
- 复旦大学:《计算机图形学》课后习题答案_6.docx
- 复旦大学:《计算机图形学》课后习题答案_5.docx
- 复旦大学:《计算机图形学》课后习题答案_4.docx
- 复旦大学:《计算机图形学》课后习题答案_3.docx
- 复旦大学:《计算机图形学》课后习题答案_2.docx
- 复旦大学:《计算机图形学》课后习题答案_1.docx
- 复旦大学:《电子商务》课程PPT课件_第十次课 社会化电子商务——Hold住社会化媒体营销.ppt
- 复旦大学:《电子商务》课程PPT课件_第六次课 电子商务运营与管理 Operating Your E-Business.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Pipelined Implementation Part I.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Pipelined Implementation Part II.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_12b Code Optimization(• Machine-Independent Optimization – Code motion – Memory optimization • Suggested reading).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_13 Code Optimization(• Optimizing Blockers • Understanding Modern Processor • More Code Optimization techniques • Performance Tuning).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Hardware Organization.ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Memory Hierarchy(• Random-Access Memory(RAM)• Nonvolatile Memory • Disk Storage • Locality • Memory hierarchy).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Cache Memory(• General concepts • 3 ways to organize cache memory • Issues with writes • Write cache friendly codes • Cache mountain).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Cache Memory(• Cache mountain • Matrix multiplication).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Virtual Memory(• Virtual Space• Address translation • Accelerating translation• Different points of view).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Virtual Memory(• Multilevel page tables • Different points of view • Pentium/Linux Memory System • Memory Mapping).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Dynamic Memory Allocation(• Implementation of a simple allocator • Explicit Free List • Segregated Free List).ppt
- 复旦大学:《计算机原理 Computer System》课程PPT课件_Linking II(• Static linking • Symbols & Symbol Table • Relocation • Executable Object Files • Loading).ppt
- 复旦大学:《计算机原理 Computer System》习题PPT课件_chapter2.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_Chapter 3 Machine-Level Representation of Programs.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_Chapter 3 Machine-Level Representation of Programs.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_Chapter 3 Machine-Level(2)Representation of Programs.ppt
- 复旦大学:《计算机原理 Computer System》习题PPT课件_chapter4 Processor Architecture.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_chapter5 Optimizing Program Performance.pptx
- 复旦大学:《计算机原理 Computer System》习题PPT课件_chapter6 The Memory Hierarchy.ppt
- 复旦大学:《计算机网络与网页制作》课程教学大纲 Computer Network and Webpage Design.pdf