Computer Architecture75 [CA] Lecture #19 Steps in Executing RISC-V IF: Instruction fetch from memory. ID: Instruction decode & register read. (어떤 instruction인지, register 값) EX: Execute operation (R-format), calculate address (lw, sw). MEM: Access memory operand. WB: Write result back to register. Pipeline Performance Ideal Speedup : instruction의 단계를 동일한 시간으로 나눌 수 없기 때문에, 단계의 수 만큼 speed up 할 수는 없다. Pipelined Execution Representation Rev.. 2023. 11. 9. [CA] Lecture #18 Immediate Generation Unit : 32-bit로 sign-extenstion Branch Implementation Branch 하지 않으면: PC+4 Branch 하면: (Sign-extended offset field 2023. 11. 8. [CA] Lecture #17 1. IF: Instruction Fetch Instruction memory Program counter (PC) : PC가 가리키는 메모리 주소에 저장된 instruction이 수행되고, PC값이 (PC+4)로 증가한다. R-Format: ALU Operations R-format의 ALU operation에서는 ALU 단계에서, Register File에 어떤 일이 일어날까? 예) add x2, x1, x0 // x2 = x1 + x0 Read Register 1: rs (첫 번째 source) --> Read Data 1: 첫 번째 source의 register 값 Read Register 2: rt (두 번째 source) --> Read Data 2: 두 번째 source의 register 값.. 2023. 11. 7. [컴퓨터구조] 1101 Pipeline Hazards Structural hazard: Attempt to use the same resource twice. 예) 하나의 Memory에 IF와 MEM stage가 겹치면, 문제가 생긴다. Control hazard: Attempt to make decision before condition is evaluated. 예) branch -- ALU에서 subtraction이 완료되어야 branch 여부를 결정할 수 있다. Data hazard: Attempt to use data before it is ready. 예) 하나의 Register file에 ID와 WB을 동시에 하면, 문제가 생긴다. (destination이 source가 될 때) 1. Structural Hazard.. 2023. 11. 5. [CA] Lecture #16 - Ch4: The Processor Ch4: The Processor Building a Datapath Pipeline Hazards - Structural hazard - Data hazard - Control hazard Introduction Execution IF: Instruction Fetch PC를 instruction을 가지고 있는 메모리로 보내서, fetch the instruction from that memory. (Instruction Memory) ID: Instruction Decode instruction format을 통해 읽어야 할 레지스터를 확인하고, 레지스터 값을 읽는다. (Register File) ALU: ALU 연산 (ALU) MEM: Memory read(lw), write(sw) (Data Me.. 2023. 11. 5. [컴퓨터구조] 1030 Control Unit Structure 1. Modified Control Unit Structure funct + ALUop --> ALU operation : 2비트 제어 필드(ALUop), 6비트 funct 필드를 사용하여 ALU operation을 만든다. (decomposing) (ALU operation부터 생각하자!) Processor Design - ALU Operation Opcode를 이용해서 ALUop를 만든다. ALUop, funct를 이용해서 Operation을 만든다. ALU Usage in Processor Design ▶ Data transfer(lw, sw): ALUop --> ALU operation (항상 addition이다.) ▶ Branch(beq): ALUop -.. 2023. 11. 2. [CA] Lecture #12 Arithmetic for Multimedia Multiplication Optimized Multiplier Example: Optimized Multiplier Faster Multiplier RISC-V Multiplication (Four Instructions) Division Division Hardware Example: Division Hardware RISC-V Division (Four Instructions) Floating Point IEEE Floating-Point Format Floating-Point Example 2023. 10. 24. [컴퓨터구조] 4. The Processor (1) Review The Five Classic Components Processor Operation Processor fetches instruction from memory. (by. memory address) Processor executes machine language instruction. - Perform calculation - Read/Write data Repeat with "next" instruction: 4 bytes away from current PC Steps in Processor Design Analyze instruction set; get datapath requirements. Select datapath components and establish clock meth.. 2023. 10. 22. [컴퓨터구조] 3. Arithmetic for Computers (4) Division Overview Dividend: 나눠지는 수 Divisor: 나누는 수 Quotient: 몫 Remainder: 나머지 Division Hardware Division Hardware - 1st version Division Hardware - 2nd version Division Hardware - 3rd version Dividing Signed Numbers Dividend(나눠지는 수), Divisor(나누는 수)의 sign bit 확인하기 Quotient(몫): 두 수의 sign bit이 서로 다르면, 음수이다. Remainder(나머지): Dividend(나눠지는 수)와 부호가 같다. MIPS Divide Instructions ▶ Results in Lo, Hi regist.. 2023. 10. 22. 이전 1 2 3 4 5 6 7 ··· 9 다음