Pipeline Sorunları ve Out-Of-Order Execution - Bölüm 1

In-Order Pipeline

  1. Komutu bellekten oku (Instruction Fetch-IF)
  2. Komuttaki yazmaçları oku ve komutu çözümle. (Instruction Decode-ID)
  3. Komutu çalıştır(Execute-EX)
  4. Eğer gerekliyse belleğe eriş(load-store komutları). (Memory Access-MEM)
  5. Yazmaçların yeni değerlerini Register File’a yaz (Writeback-WB)

Pipeline Hazards

Structural Hazards

Data Hazards

add x3, x1, x2 # x3 = x1 + x2
sub x4, x3, x2 # x4 = x3 + x2
ld x3, 10(x1) # x3 = *(x1 + 10)
sub x4, x3, x2 # x4 = x3 + x2

Control Hazards

sub x1, x4, x5 # x1 = x4 - x5
beq x0, x1, done # if(x0 == x1) goto done
add x3, x4, x5 # x3 = x4 - x5
...
...
done:
...
...

MultiCycle Execution Units

fmul.d f0, f1, f2 # f0 = f1 * f2
add x0, x1, x2 # x0 = x1 + x2
1. fld f4, 20(x1)   # f4 = *(x1+20)
2. fmul.d f1, f4, f2 # f1 = f4 * f2
3. fsub.d f0, f8, f1 # f0 = f8 - f1
4. fadd.d f0, f2, f3 # f0 = f2 - f3
5. fadd.d f8, f6, f4 # f8 = f6 - f4

Precise Exceptions

fdiv.d f0, f1, f2 # f0 = f1 / f2
fadd.d f3, f4, f5 # f3 = f4 + f5
fsub.d f6, f7, f8 # f6 = f7 - f8

Reorder Buffer

fadd.d f0 , f1 , f2 # f0 = f1 / f2
fdiv.d f3 , f2 , f4 # f3 = f2 / f4
….
….
….
fsub.d f5 , f0 , f1 # f5 = f0 - f1
fadd.d f0 , f1 , f2 # f0 = f1 + f2

Kaynaklar:

--

--

--

Computer Architecture, C++, Linux

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yusuf Yamak

Yusuf Yamak

Computer Architecture, C++, Linux

More from Medium

Caveat with COVID Testing

Automation Framework using Playwright

source: google images

Parallel execution of Cucumber scenarios on different hosts

Realize Basic Logic Gates Using 2:1 MUX In Verilog