proj fib

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Code Example – Fibonacci Series:

Code Example – Fibonacci Series Fibonacci Series: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34… Code in Block regime: Init : addi $s1, $zero, 2 addi $t1, $zero, 1 lui $t0, 0 lui $s0, 0 loop : add $t0, $t0, $t1 subi $s1, $s1, 2 sw $t0, 0($s0) bne $s1, $zero, loop add $t1, $t0, $t1 addi $s0, $s0, 8 sw $t1, 4($s0) nop s0 = s1 = t0 = t1 = 0 2 0 1  0 0  1  1  8 0  1  2 0 1 1 2 8 -2  3  2 16 -2  3 5 0: 4: 8: 12: Memory Map Registers

Fibonacci Series – Continue:

Fibonacci Series – Continue IPC – Instructions Per Cycle Regular MIPS (w/o branch predictor) Init : IPC = 4/4 = 1 Loop: IPC = 7/7 = 1 Superscalar MIPS (w/o branch predictor) Init : IPC = 4/1 = 4 Loop: IPC = 7/2 = 3.5

authorStream Live Help