Q1) A CPU has an instruction pipeline with the following 5 segments RISC (Bir CPU'nun a?a??daki 5 segmente sahip RISC
komut hatt? vard?r.)
1. FI (Fetch Instruction) 2. DR (Instruction Decode, Read Register) 3. EX (Execution) 4. ME (Memory) 5.WB (Write Back)
(Using the given architectural command line, generate solutions that optimize the command line in a way that will run the
following program the fastest and calculate the acceleration. Explain your solution by drawing a diagram) Verilen mimari
komut hatt?n? kullanarak a?a??daki program? en h?zl? çal??t?racak ?ekilde komut hatt?n? optimize eden çözümleri üretip
h?zlanmay? hesaplay?n?z. Çözümünüzü ?ekil çizerek aç?klay?n?z.
Mov Cx,10 //Cx=10
Mov Dx,10 //Dx=10
Mov BX,10//Bx=10
D1:
INC DX //Dx = DX+1
INC Bx //Bx = BX+1
Add R1,R2 //R1 = R1+R2
Add R4,R1 // R4 = R4+R1
Add R2,R1 //R2 = R2+R1
loop D1 //if Cx>0 then return D1