《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 07 Instruction Decode

高级计算机体系结构设计及其在数据中心和云计算的应用Lecture 7Instruction Decode
高级计算机体系结构设计及其在数据中心和云计算的应用 Lecture 7 Instruction Decode

高级计算机体系结构设计及其在数据中心和云计算的应用RiSC ISA Format. This should be review...Fixed-length.MIPSallinstsare32-bits/4bytes一Fewformats: MiPs has 3 formats: R (reg, reg, reg), I (reg, reg, imm), J (addr)·Alphahas5:Operate,Opw/Imm,Mem,Branch,Fp- Regularity across formats (when possible/practical)MiPs&Alphaopcodeinsamebit-positionforallformats.MiPS rs& rt fields in samebit-positionforRandIformats.Alphara/fafieldinsamebit-positionforall5formats
高级计算机体系结构设计及其在数据中心和云计算的应用 RISC ISA Format • This should be review. – Fixed-length • MIPS all insts are 32-bits/4 bytes – Few formats • MIPS has 3 formats: R (reg, reg, reg), I (reg, reg, imm), J (addr) • Alpha has 5: Operate, Op w/ Imm, Mem, Branch, FP – Regularity across formats (when possible/practical) • MIPS & Alpha opcode in same bit-position for all formats • MIPS rs & rt fields in same bit-position for R and I formats • Alpha ra/fa field in same bit-position for all 5 formats

高级计算机体系结构设计及其在数据中心和云计算的应用RISC Decode (MIPS)2156lopcodeotherfuncR-formatonlyopcode[2,0]000xxx=Br/Jump(exceptfor0ooooo)010o11100101110000jalbeqfuncbneblezrtbgtz0oDaddisltiandiluiaddiusltiuorixori[e's]010rso0lxxx=Immediateo1Cio=xxxx(1S:IXIa7:0X1)00IbIhIwlIwIbuIhuIwro1sbshswlSWswr10lwc3IwcoIwclIwc21SWc3SwcOswcISWC2
高级计算机体系结构设计及其在数据中心和云计算的应用 RISC Decode (MIPS) opcode 6 other 21 func 5 R-format only opcode[2,0] 000 001 010 011 100 101 110 111 000 func rt j jal beq bne blez bgtz 001 addi addiu slti sltiu andi ori xori lui 000xxx = Br/Jump (except for 000000) opcode[5,3] 001 addi addiu slti sltiu andi ori xori lui 010 rs rs rs rs 011 100 lb lh lwl lw lbu lhu lwr 101 sb sh swl sw swr 110 lwc0 lwc1 lwc2 lwc3 111 swc0 swc1 swc2 swc3 1xxxxx = Memory (1x0: L D, 1x1: ST) 001xxx = Immediate

高级计算机体系结构设计及其在数据中心和云计算的应用PLA Decoders (1/2)PLA=Programmable Logic ArraySimple logic to transform opcode to control signals isjump =!op5&!op4 &!op3 & (op2/op1/op0)-use_funct=!op5&!op4&!op3&!op2&!op1&!op0use_imm=op51!op5&!op4&op3is_load=op5&!op3-is_store=op5&op3
高级计算机体系结构设计及其在数据中心和云计算的应用 PLA Decoders (1/2) • PLA = Programmable Logic Array • Simple logic to transform opcode to control signals – is_jump = !op5 & !op4 & !op3 & (op2 | op1 | op0) – use_funct = !op5 & !op4 & !op3 & !op2 & !op1 & !op0 – use_imm = op5 | !op5 & !op4 & op3 – is_load = op5 & !op3 – is_store = op5 & op3

高级计算机体系结构设计及其在数据中心和云计算的应用PLA Decoders (2/2)OP5OP44-inputAND gateOP3ANDArrayOP2OPIOPois_storeis_loadORis_memuse_immArray2-input OR gateuse functis_jump
高级计算机体系结构设计及其在数据中心和云计算的应用 PLA Decoders (2/2) op5 op4 op3 op2 op1 AND Array 4-input AND gate op1 op0 is_store is_load use_imm use_funct is_jump OR is_mem Array 2-input OR gate

高级计算机体系结构设计及其在数据中心和云计算的应用Superscalar Decode for RiSC ISAsDecode Xinsns.per cycle (e.g,4-wide)-Justduplicatethehardware-Instructionsalignedat32-bitboundariesI-Fetch4-wide superscalarfetch32-bitinst32-bitinst32-bitinst32-bitinst32-bit instDecoderDecoderDecoderDecoderDecoderdecodeddecodeddecodeddecodeddecodedinstinstinstinstinstscalarsuperscalar
高级计算机体系结构设计及其在数据中心和云计算的应用 Superscalar Decode for RISC ISAs • Decode X insns. per cycle (e.g., 4-wide) – Just duplicate the hardware – Instructions aligned at 32-bit boundaries 1-Fetch 4-wide superscalar fetch 32-bit inst Decoder decoded inst scalar Decoder Decoder Decoder 32-bit inst Decoder decoded inst superscalar 4-wide superscalar fetch 32-bit inst 32-bit inst 32-bit inst decoded inst decoded inst decoded inst 1-Fetch

高级计算机体系结构设计及其在数据中心和云计算的应用CISC ISARisCfocus onfastaccess to information- Easy decode, IS, large RF's, Ds· Cisc focus on max expressiveness per min space-Designedinerawithfewertransistors,chips- Each memory access very expensive.Packasmuchworkintoasfewbytesaspossible.More“expressive"instructions-Better potential code generation in theory- More complex code generation in practice
高级计算机体系结构设计及其在数据中心和云计算的应用 CISC ISA • RISC focus on fast access to information – Easy decode, I$, large RF’s, D$ • CISC focus on max expressiveness per min space – Designed in era with fewer transistors, chips – Each memory access very expensive • Pack as much work into as few bytes as possible • More “expressive” instructions – Better potential code generation in theory – More complex code generation in practice

高级计算机体系结构设计及其在数据中心和云计算的应用ADDinRISCISAModeExampleMeaningRegisterADD R4,R3, R2R4=R3+R2
高级计算机体系结构设计及其在数据中心和云计算的应用 Mode Example Meaning Register ADD R4, R3, R2 R4 = R3 + R2 ADD in RISC ISA

高级计算机体系结构设计及其在数据中心和云计算的应用ADD in CISCISAModeExampleMeaningRegisterADD R4,R3R4 = R4 + R3ImmediateADD R4,#3R4 = R4 + 3DisplacementADD R4, 100(RI)R4 = R4 + Mem[100+RI]Register IndirectADD R4, (RI)R4 = R4 + Mem[RI]Indexed/BaseADD R3,(RI+R2)R3 = R3 + Mem[RI+R2]Direct/AbsoluteADD RI,(1234)RI = RI + Mem[1234]Memory IndirectADD RI, @(R3)RI = RI + Mem[Mem[R3]]Auto-lncrementADD RI,(R2)+RI = RI + Mem[R2]; R2++Auto-DecrementADD RI, -(R2)R2--; RI = RI + Mem[R2]
高级计算机体系结构设计及其在数据中心和云计算的应用 Mode Example Meaning Register ADD R4, R3 R4 = R4 + R3 Immediate ADD R4, #3 R4 = R4 + 3 Displacement ADD R4, 100(R1) R4 = R4 + Mem[100+R1] Register Indirect ADD R4, (R1) R4 = R4 + Mem[R1] ADD in CISC ISA Indexed/Base ADD R3, (R1+R2) R3 = R3 + Mem[R1+R2] Direct/Absolute ADD R1, (1234) R1 = R1 + Mem[1234] Memory Indirect ADD R1, @(R3) R1 = R1 + Mem[Mem[R3]] Auto-Increment ADD R1,(R2)+ R1 = R1 + Mem[R2]; R2++ Auto-Decrement ADD R1, -(R2) R2-; R1 = R1 + Mem[R2]

高级计算机体系结构设计及其在数据中心和云计算的应用x86CISC, stemmingfrom the original 4004 (~1971)Example:“"Move"instructions-GeneralPurposedatamovement: R>R,M>R, R>M,I>R,>MExchanges.EAX<>ECX,byteorderwithinaregister-StackManipulation.pushpopR<>Stack,PUSHA/POPA-TypeConversion-ConditionalMovesManywaysto dothesame/similaroperation
高级计算机体系结构设计及其在数据中心和云计算的应用 x86 • CISC, stemming from the original 4004 (~1971) • Example: “Move” instructions – General Purpose data movement • RR, MR, RM, IR, IM – Exchanges • EAX ↔ ECX, byte order within a register – Stack Manipulation • push pop R ↔ Stack, PUSHA/POPA – Type Conversion – Conditional Moves Many ways to do the same/similar operation
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 09 Case Study- Jave Branch Prediction Optimization.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 13 An Introduction to Cloud Data Centers.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 10 Out of Order and Speculative Execution.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 11 Multi-core and Multi-threading.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 14 Towards Renewable Energy Powered Sustainable and Green Cloud Datacenters.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 15 GPGPU Architecture and Programming Paradigm.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 12 Shared Memory Multiprocessor.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 1 Instruction Set Architecture(Introduction).pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 0 Introduction and Performance Evaluation.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 3 Pipelining.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 2 Instruction Set Architecture(Microarchitecture Implementation).pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 7 Multiprocessors.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 4 Spectualtive Execution.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 6 Memory Hierarchy and Cache.pdf
- 《现代计算机体系结构》课程教学课件(留学生版)Lecture 5 Out of Order Execution.pdf
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第4章 基于统计决策的概率分类法.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第1章 绪论、第2章 聚类分析.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第3章 判别函数及几何分类法.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第7章 模糊模式识别法.ppt
- 武汉理工大学:《模式识别》课程教学资源(PPT课件)第6章 句法模式识别.ppt
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 08 Instruction Fetch and Branch Predictioin.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 06 Scoreboarding and Tomasulo.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 04 Memory Data Prefetching.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 05 Core Pipelining.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 02 Memory Hierarchy and Caches.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 03 Main Memory and DRAM.pdf
- 《现代计算机体系结构》课程教学课件(英文讲稿)Lecture 01 Introduction and Performance Evaluation-new.pdf
- 东北大学:某学院计算机科学与技术专业《智能信息系统开发》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《软件工程综合实践》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《创新创业设计基础》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《工程领导力》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《高等数学建模》课程教学大纲(二).pdf
- 东北大学:某学院计算机科学与技术专业《数据库原理》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《物理建模》课程教学大纲 A.pdf
- 东北大学:某学院计算机科学与技术专业《Java程序设计基础》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《算法设计与分析》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《Linux操作系统与内核分析》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《计算机体系结构》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《计算机网络组网技术》课程教学大纲.pdf
- 东北大学:某学院计算机科学与技术专业《离散数学》课程教学大纲.pdf