Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Architecture HW #3

Similar presentations


Presentation on theme: "Computer Architecture HW #3"— Presentation transcript:

1 Computer Architecture HW #3
School of Computer Science and Engineering Seoul National University

2 Mission Sequential Y86 implementation Pipelined Y86 implementation
설명 : leave instruction 추가하기 숙제 : iaddl, isubl instruction 추가하기 Pipelined Y86 implementation 숙제 : leave, iaddl, isubl instruction 추가하기 숙제 : load forwarding 추가 구현하기

3 Sequential Y86 implementation
설명 : leave instruction 추가하기 숙제 : iaddl, isubl instruction 추가하기 Pipelined Y86 implementation 숙제 : leave, iaddl, isubl instruction 추가하기 숙제 : load forwarding 추가 구현하기

4 Configuration tar xvf archlab4u.tar cd archilab-handout/
tar xvf sim.tar cd sim/ /archilab/archlab-handout/sim$ make clean; make

5 Sequential Y86 implementation
작업폴더 /sim/seq 작업파일 /sim/seq/seq-full.hcl

6 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): 1 movl %ebp, %esp Set stack pointer to beginning of frame 2 popl %ebp Restore saved %ebp and set stack ptr to end of caller’s frame It is equivalent to the following code sequence(Y86): 1 rrmovl %ebp, %esp Set stack pointer to beginning of frame 2 popl %ebp Restore saved %ebp and set stack ptr to end of caller’s frame

7 Computation (rrmovl %ebp, %esp) 과 (popl %ebp) 이 합쳐진 형태

8 Computation leave instruction leave icode:ifun  M1[PC] Fetch
valA  R[%ebp] valB  R[%ebp] Decode valE  valB + 4 Execute valM  M4[valA] Memory R[%esp]  valE Write back PC  valP PC update valP  PC+1 R[%ebp]  valM

9 Implementation Fetch stage &

10 Implementation Decode & Write-back stage

11 Implementation Execute stage

12 Implementation Memory stage

13 Implementation PC update

14 Verification 구현 확인하기 구현한 sequential implementation을 사용하는 방법
/archilab/archlab-handout/sim/seq$ make clean; make ssim VERSION=full

15 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

16 Sequential Y86 implementation
설명 : leave instruction 추가하기 숙제 : iaddl, isubl instruction 추가하기 Pipelined Y86 implementation 숙제 : leave, iaddl, isubl instruction 추가하기 숙제 : load forwarding 추가 구현하기

17 iaddl, isubl instruction 추가하기 숙제
작업폴더 /sim/seq 작업파일 /sim/seq/seq-full.hcl

18 iaddl, isubl instruction
Computation irmovl instruction + OPl instruction iaddl V, rB : R[rB]  R[rB] + V isubl V, rB : R[rB]  R[rB] - V

19 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

20 Current state iaddl instrunction 검증 isubl instruction 검증
./ssim –t ../y86-code/asumi.yo isubl instruction 검증 ./ssim –t ../y86-code/asums.yo

21 Goal state iaddl instrunction 검증 isubl instrunction 검증
./ssim –t ../y86-code/asumi.yo isubl instrunction 검증 ./ssim –t ../y86-code/asums.yo

22 Sequential Y86 implementation
설명 : leave instruction 추가하기 숙제 : iaddl, isubl instruction 추가하기 Pipelined Y86 implementation 숙제 : leave, iaddl, isubl instruction 추가하기 숙제 : load forwarding 추가 구현하기

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

24 Why? Load forwarding Load forwarding Condition Arithmetic 연산이 필요
Load instruction의 target register와 바로 뒤의 store instruction의 source register가 같음 교재 연습문제 4.57번 참조 Example sequence Arithmetic 연산이 필요 Why?

25 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

26 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

27 Current state : pipe-full.hcl
iaddl instruction 검증 /sim/pipe$ ./psim –t ../y86-code/asumi.yo isubl, leave instruction iaddl의 경우와 동일

28 Goal state asumi.yo asuml.yo asums.yo

29 Current state : pipe-lf.hcl
pipe-std.hcl을 사용했을 때 make clean; make VERSION=std ./psim –t ldriver.yo

30 Goal state : pipe-lf.hcl
Load forwarding 구현 후 make clean; make VERSION=lf ./psim –t ldriver.yo

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

32 제출 방법 과제 확인 제출 기한 제출 방법 12월 5일 월요일 자정 전(pm 23:59)까지
1일 delay 당 5점씩 감점 (100점 만점) 제출 기한 2일 후까지 제출 가능 12월 7일 수요일 자정 전(pm 23:59) 제출 방법 조교 메일을 통해 제출 메일 제목 : [컴구 과제]학번_이름 ex)[컴구 과제] _홍길동 첨부 파일 : 학번_이름.zip으로 아래 파일들과 보고서를 함께 제출 소스 코드 : seq-full.hcl, pipe-full.hcl, pipe-lf.hcl 보고서 : pdf 형식 학번_이름을 제목으로 함 메일 주소 :


Download ppt "Computer Architecture HW #3"

Similar presentations


Ads by Google