I am trying to study for a test where I have to know something about MIPS and assembly code. I will try to write what I think is a correct answer for the given questions but I'm not sure if I'm right
Can direct operand 32 bit operand in MIPS contain any 32 bit value?
I think "no - never" because first 16 bits are reserved for opcode and source + final registers. Is it right or are there some instructions that can contain any 32-bit value?
We have times for instruction (IF = 400ps, ID = 500ps, EX = 450ps, MEM = 500ps, WB = 150ps)
Whats the clock tact for
a) processor without pipeline?
b) processor with pipeline?I think that a) is 2000ps (sum of all times) and b) 500ps (the biggest time in a table) but again, Im not sure.
I have the following assembly code:
0x0000 addi t0, $0, 5 0x0004 loop: beq t0, $0, done 0x0008 nop 0x000C lw t1, 0x4($0) 0x0010 lw t2, 0x24($0) 0x0014 addi t0, t0, -1 0x0018 j loop 0x001C nop 0x0020 done
I am not 100% sure what it does (because I don't fully understand what is the result of
0x4($0)
operation in load). I know that there is a for cycle (for t=5, ,t >0 t--
).The question is - what is hit rate and miss rate of this cache and how do you calculate it?
If you could answer at least the first two questions, it would be great.