Memory & Storage Architecture Seoul National University Computer Architecture Byoungjun Kim School of Computer Science and.

Slides:



Advertisements
Similar presentations
Machine cycle.
Advertisements

University of Amsterdam Computer Systems – the processor architecture Arnoud Visser 1 Computer Systems The processor architecture.
Calling sequence ESP.
RISC and Pipelining Prof. Sin-Min Lee Department of Computer Science.
Pipeline Computer Organization II 1 Hazards Situations that prevent starting the next instruction in the next cycle Structural hazards – A required resource.
Real-World Pipelines: Car Washes Idea  Divide process into independent stages  Move objects through stages in sequence  At any instant, multiple objects.
– 1 – Chapter 4 Processor Architecture Pipelined Implementation Chapter 4 Processor Architecture Pipelined Implementation Instructor: Dr. Hyunyoung Lee.
Randal E. Bryant Carnegie Mellon University CS:APP2e CS:APP Chapter 4 Computer Architecture SequentialImplementation CS:APP Chapter 4 Computer Architecture.
PipelinedImplementation Part I CSC 333. – 2 – Overview General Principles of Pipelining Goal Difficulties Creating a Pipelined Y86 Processor Rearranging.
Chapter 12 CPU Structure and Function. Example Register Organizations.
Assembly תרגול 8 פונקציות והתקפת buffer.. Procedures (Functions) A procedure call involves passing both data and control from one part of the code to.
Randal E. Bryant CS:APP Chapter 4 Computer Architecture SequentialImplementation CS:APP Chapter 4 Computer Architecture SequentialImplementation Slides.
Datapath Design II Topics Control flow instructions Hardware for sequential machine (SEQ) Systems I.
Pipelining III Topics Hazard mitigation through pipeline forwarding Hardware support for forwarding Forwarding to mitigate control (branch) hazards Systems.
David O’Hallaron Carnegie Mellon University Processor Architecture PIPE: Pipelined Implementation Part I Processor Architecture PIPE: Pipelined Implementation.
Y86 Processor State Program Registers
Processor Architecture: The Y86 Instruction Set Architecture
Computer Architecture Project #2 Cache Simulator
Computer Science 210 Computer Organization The von Neumann Architecture.
1 Seoul National University Pipelined Implementation : Part I.
Memory/Storage Architecture Lab Computer Architecture Pipelining Basics.
Randal E. Bryant Carnegie Mellon University CS:APP CS:APP Chapter 4 Computer Architecture SequentialImplementation CS:APP Chapter 4 Computer Architecture.
Randal E. Bryant adapted by Jason Fritts CS:APP2e CS:APP Chapter 4 Computer Architecture SequentialImplementation CS:APP Chapter 4 Computer Architecture.
Datapath Design I Topics Sequential instruction execution cycle Instruction mapping to hardware Instruction decoding Systems I.
Based on slides by Patrice Belleville CPSC 121: Models of Computation Unit 10: A Working Computer.
Sample Code (Simple) Run the following code on a pipelined datapath: add1 2 3 ; reg 3 = reg 1 + reg 2 nand ; reg 6 = reg 4 & reg 5 lw ; reg.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
1 Sequential CPU Implementation. 2 Outline Logic design Organizing Processing into Stages SEQ timing Suggested Reading 4.2,4.3.1 ~
Pipeline Architecture I Slides from: Bryant & O’ Hallaron
Memory & Storage Architecture Seoul National University Python Installation In PC (Window, Mac OS) Byoungjun Kim Ansu
1 SEQ CPU Implementation. 2 Outline SEQ Implementation Suggested Reading 4.3.1,
RISC / CISC Architecture by Derek Ng. Overview CISC Architecture RISC Architecture  Pipelining RISC vs CISC.
Sequential Hardware “God created the integers, all else is the work of man” Leopold Kronecker (He believed in the reduction of all mathematics to arguments.
Real-World Pipelines Idea –Divide process into independent stages –Move objects through stages in sequence –At any given times, multiple objects being.
Sequential CPU Implementation Implementation. – 2 – Processor Suggested Reading - Chap 4.3.
1 Seoul National University Sequential Implementation.
CPSC 121: Models of Computation
Real-World Pipelines Idea Divide process into independent stages
CPSC 121: Models of Computation
Assembly language.
Lecture 13 Y86-64: SEQ – sequential implementation
Project Implementation of Buffer Management
Lecture 14 Y86-64: PIPE – pipelined implementation
Computer Science 210 Computer Organization
Decode and Operand Read
Sequential Implementation
Samira Khan University of Virginia Feb 14, 2017
Computer Architecture adapted by Jason Fritts then by David Ferry
Y86 Processor State Program Registers
Computer Science 210 Computer Organization
Pipelined Implementation : Part I
Seoul National University
Seoul National University
Instruction Decoding Optional icode ifun valC Instruction Format
Pipelined Implementation : Part II
Systems I Pipelining III
Meltdown and Spectre: Complexity and the death of security
Computer Architecture adapted by Jason Fritts
Systems I Pipelining II
Pipelined Implementation : Part I
Seoul National University
Pipeline Architecture I Slides from: Bryant & O’ Hallaron
Pipelined Implementation : Part I
Meltdown and Spectre: Complexity and the death of security
Systems I Pipelining II
Chapter 4 Processor Architecture
Systems I Pipelining II
Real-World Pipelines: Car Washes
Sequential CPU Implementation
Sequential Design תרגול 10.
Presentation transcript:

Memory & Storage Architecture Seoul National University Computer Architecture Byoungjun Kim School of Computer Science and Engineering Seoul National University

Memory & Storage Architecture Seoul National University 목차  Sequential Y86 implementation  설명 : leave instruction 추가하기  숙제 : iaddl, isubl instruction 추가하기  Pipelined Y86 implementation  숙제 : leave, iaddl, isubl instruction 추가하기  숙제 : load forwarding 추가 구현하기

Memory & Storage Architecture Seoul National University  Sequential Y86 implementation  설명 : leave instruction 추가하기  숙제 : iaddl, isubl instruction 추가하기  Pipelined Y86 implementation  숙제 : leave, iaddl, isubl instruction 추가하기  숙제 : load forwarding 추가 구현하기

Memory & Storage Architecture Seoul National University Configuration  tar xvf archlab4u.tar  cd archilab-handout/  tar xvf sim.tar  cd sim/  /archilab/archlab-handout/sim$ make clean; make

Memory & Storage Architecture Seoul National University Sequential Y86 implementation  작업폴더  /sim/seq  작업파일  /sim/seq/seq-full.hcl

Memory & Storage Architecture Seoul National University leave instruction  leave instruction can be used to prepare the stack for returning.  As described in Section in textbook.  It is equivalent to the following code sequence(X86): 1movl %ebp, %espSet stack pointer to beginning of frame 2popl %ebpRestore saved %ebp and set stack ptr to end of caller’s frame  It is equivalent to the following code sequence(Y86): 1rrmovl %ebp, %espSet stack pointer to beginning of frame 2popl %ebpRestore saved %ebp and set stack ptr to end of caller’s frame

Memory & Storage Architecture Seoul National University Computation  (rrmovl %ebp, %esp) 과 (popl %ebp) 이 합쳐진 형태

Memory & Storage Architecture Seoul National University Computation  leave instruction leave icode:ifun  M 1 [PC] Fetch valA  R[ %ebp ] valB  R[ %ebp ] Decode valE  valB + 4 Execute valM  M 4 [valA] Memory R[ %esp ]  valE Write back PC  valP PC update valP  PC+1 R[ %ebp ]  valM

Memory & Storage Architecture Seoul National University Implementation  Fetch stage &

Memory & Storage Architecture Seoul National University Implementation  Decode & Write-back stage

Memory & Storage Architecture Seoul National University Implementation  Execute stage

Memory & Storage Architecture Seoul National University Implementation  Memory stage

Memory & Storage Architecture Seoul National University Implementation  PC update

Memory & Storage Architecture Seoul National University Verification  구현 확인하기  구현한 sequential implementation 을 사용하는 방법  /archilab/archlab-handout/sim/seq$ make clean; make ssim VERSION=full

Memory & Storage Architecture Seoul National University Verification  구현 확인하기  구현 정확성 확인하기 leave instruction 확인하기 : /archilab/archlab-handout/sim/y86-code/asuml.yo 확인 시 실행 파일 : /archilab/archlab-handout/sim/seq/ssim /archilab/archlab-handout/sim/seq$./ssim –t../y86-code/asuml.yo

Memory & Storage Architecture Seoul National University  Sequential Y86 implementation  설명 : leave instruction 추가하기  숙제 : iaddl, isubl instruction 추가하기  Pipelined Y86 implementation  숙제 : leave, iaddl, isubl instruction 추가하기  숙제 : load forwarding 추가 구현하기

Memory & Storage Architecture Seoul National University iaddl, isubl instruction 추가하기 숙제  작업폴더  /sim/seq  작업파일  /sim/seq/seq-full.hcl

Memory & Storage Architecture Seoul National University iaddl, isubl instruction  Computation  irmovl instruction + OPl instruction iaddl V, rB : R[rB]  R[rB] + V isubl V, rB : R[rB]  R[rB] - V

Memory & Storage Architecture Seoul National University Verification  구현 확인하기  구현 정확성 확인하기 iaddl instruction 확인 파일 : /archilab/archlab-handout/sim/y86-code/asumi.yo isubl instruction 확인 파일 : /archilab/archlab-handout/sim/y86-code/asums.yo 확인 시 실행 파일 : /archilab/archlab-handout/sim/seq/ssim  구현 정확성 검증 명령어 iaddl instruction : /archilab/archlab-handout/sim/seq$./ssim –t../y86-code/asumi.yo isubl instruction : /archilab/archlab-handout/sim/seq$./ssim –t../y86-code/asums.yo

Memory & Storage Architecture Seoul National University Current state  iaddl instrunction 검증 ./ssim –t../y86-code/asumi.yo  isubl instruction 검증 ./ssim –t../y86-code/asums.yo

Memory & Storage Architecture Seoul National University Goal state  iaddl instrunction 검증 ./ssim –t../y86-code/asumi.yo  isubl instrunction 검증 ./ssim –t../y86-code/asums.yo

Memory & Storage Architecture Seoul National University  Sequential Y86 implementation  설명 : leave instruction 추가하기  숙제 : iaddl, isubl instruction 추가하기  Pipelined Y86 implementation  숙제 : leave, iaddl, isubl instruction 추가하기  숙제 : load forwarding 추가 구현하기

Memory & Storage Architecture Seoul National University Pipelined Y86 implementation  기본 제공 파일  pipe-std.hcl 기본적인 forwarding 구현  과제  iaddl, isubl, leave instruction 추가하기 작업 폴더 : sim/pipe 작업 파일 : pipe-full.hcl ( 미완성 파일 제공 )  load forwarding 구현 하기 작업 폴더 : sim/pipe 작업 파일 : pipe-lf.hcl ( 미완성 파일 제공 )

Memory & Storage Architecture Seoul National University Load forwarding  Load forwarding  Condition Load instruction 의 target register 와 바로 뒤의 store instruction 의 source register 가 같음 교재 연습문제 4.57 번 참조 Example sequence Arithmetic 연산이 필요 Why?

Memory & Storage Architecture Seoul National University Verification : pipe-full.hcl  구현 확인하기  pipe-full.hcl 사용 하기 /sim/pipe$ make clean; make VERSION=full  구현 정확성 확인하기 leave instruction 확인 파일 : /sim/y86-code/asuml.yo iaddl instruction 확인 파일 : /sim/pipe/y86-code/asumi.yo isubl instruction 확인 파일 : /sim/pipe/y86-code/asums.yo 확인 시 실행 파일 : /sim/pipe/psim  구현 정확성 검증 명령어 leave instruction : /sim/pipe$./psim –t../y86-code/asuml.yo iaddl instruction : /sim/pipe$./psim –t../y86-code/asumi.yo isubl instruction : /sim/pipe$./psim –t../y86-code/asums.yo

Memory & Storage Architecture Seoul National University Verification : pipe-lf.hcl  구현 확인하기  pipe-lf.hcl 사용 하기 /sim/pipe$ make clean; make VERSION=lf  Load forwarding 성능 확인하기 Load forwarding 성능 확인 파일 : /sim/pipe/ldrivers.yo 확인 시 실행 파일 : /sim/pipe/psim  Load forwarding 구현 검증 명령어 leave instruction : /sim/pipe$./psim –t ldrivers.yo

Memory & Storage Architecture Seoul National University Current state : pipe-full.hcl  iaddl instruction 검증  /sim/pipe$./psim –t../y86-code/asumi.yo  isubl, leave instruction  iaddl 의 경우와 동일

Memory & Storage Architecture Seoul National University Goal state asumi.yoasums.yoasuml.yo

Memory & Storage Architecture Seoul National University Current state : pipe-lf.hcl  pipe-std.hcl 을 사용했을 때  make clean; make VERSION=std ./psim –t ldriver.yo

Memory & Storage Architecture Seoul National University Goal state : pipe-lf.hcl  Load forwarding 구현 후  make clean; make VERSION=lf ./psim –t ldriver.yo

Memory & Storage Architecture Seoul National University 보고서 제출  숙제에 대한 보고서  각각에 대해 바꾼 부분에 대한 설명 seq-full.hcl, pipe-full.hcl, pipe-lf.hcl  결과 출력 화면  어려웠던 점 / 해결 방법  프로젝트를 진행하며 느낀 점

Memory & Storage Architecture Seoul National University 제출 방법  과제 확인  제출 기한 12 월 3 일 수요일 자정 전 (pm 23:59) 까지 1 일 delay 당 5 점씩 감점 (100 점 만점 ) 제출 기한 2 일 후까지 제출 가능 -12 월 5 일 금요일 자정 전 (pm 23:59)  제출 방법 조교 메일을 통해 제출 메일 제목 : [ 컴구 과제 ] 학번 _ 이름 -ex)[ 컴구 과제 ] _ 김병준 첨부 파일 : 학번 _ 이름.zip 으로 아래 파일들과 보고서를 함께 제출 - 소스 코드 : seq-full.hcl, pipe-full.hcl, pipe-lf.hcl - 보고서 : 한글 / 워드 중 택하여 학번 _ 이름을 제목으로 함 메일 주소 :