計算機系統(tǒng)結構:WinDLX 例程– 數(shù)據(jù)定向和結構相關_第1頁
計算機系統(tǒng)結構:WinDLX 例程– 數(shù)據(jù)定向和結構相關_第2頁
計算機系統(tǒng)結構:WinDLX 例程– 數(shù)據(jù)定向和結構相關_第3頁
全文預覽已結束

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

1、WinDLX 例程 數(shù)據(jù)定向和結構相關 Figure 3.10 in textbook;-; Example to illustrate RAW w and w/o data forwarding, similar to; Figure 3.10 in textbook;-main: add r1,r2,r3 ;store a new value in r1 sub r4,r1,r5 ;use r1 and r6,r1,r7 ;use r1 or r8,r1,r9 ;use r1 xor r10,r1,r11 ;use r1 nop nop nop nop add r1,r2,r3 ;stor

2、e a new value in r1 sub r4,r1,r5 ;use r1 & store new r4 and r6,r4,r7 ;use r4 or r8,r6,r9 ;use r6 xor r10,r8,r11 ;use r8 Finish: trap 0Figures 3.11 and 3.12 in textbook;-; Example to illustrate RAW w and w/o data forwarding, similar to; Figures 3.11 and 3.12 in textbook;-main: add r1,r2,r3 lw r4,0(r1

3、) ;load into r4 using r1 sw 12(r1),r4 ;store r4 using r1 nop nop nop nop lw r1,0(r2) sub r4,r1,r5 and r6,r1,r7 or r8,r1,r9Finish: trap 0Example to illustrate multiple data and structural hazards;-; Example to illustrate data and structural hazards ;-main: addf f1,f2,f3 multf f2,f4,f5 addf f3,f3,f4 m

4、ultf f6,f6,f6 addf f1,f3,f5 addf f2,f3,f4Finish: trap 0WinDLX 例程 指令再定序 To run these programs select the floating point stages in the configuration menu and set the number of division units to 3 and the delay of the addition, multiplication and division to 3 cycles. Original program ;-; Example to il

5、lustrate instruction scheduling;-.data.globalONEONE:.word1.text.globalmainmain:lff1,ONE;turn divf into a movecvti2ff7,f1;by storing in f7 1 innop;floating-point formatdivff1,f8,f7;move Y=(f8) into f1divff2,f9,f7;move Z=(f9) into f2addff3,f1,f2divff10,f3,f7;move f3 into X=(f10)divff4,f11,f7;move B=(f

6、11) into f4divff5,f12,f7;move C=(f12) into f5multff6,f4,f5divff13,f6,f7;move f6 into A=(f13)Finish: trap0Reordered program;-; Example to illustrate instruction scheduling - reordered instructions;-.data.globalONEONE:.word1.text.globalmainmain:lff1,ONE;turn divf into a movecvti2ff7,f1;by storing in f7 1 innop;floating-point formatdivff1,f8,f7;move Y=(f8) into f1divff2,f9,f7;move Z=(f9) into f2divff4,f11,f7;move B=(f11) into f4divff5,f12,f7;move C=(f12) into f5add

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論