Wednesday, December 4, 2013

Exercise 4.9

This Exercise is Half Done, Please Ignore

To answer the following questions we will be using the simulator ProcSim

r1-r4 is mapped to temp registers t1-t4 respectively
r16 is mapped to s7

This is my sample asm code for running my simulation:

#init registers
.register $t1 1
.register $t2 2
.register $t3 3
.register $t4 4
.register $s7 200

main: sw $t4, -100($s7)
  slt $t1, $t2, $t3
exit:

4.9.1 What is the value of the instruction word?






a)
10101110111011001111111111111100
op           rs        rt         immediate
101011-10111-01100-1111111111111100
b)
00000001010010110100100000101010
op           rs        rt         rd         shamt  funct
000000-01010-01011-01001-00000-101010

4.9.2 What is the register number supplied to the register file’s “Read register 1” input? Is this register actually read? How about “Read register 2”?

a)10111
Also mentioned above in the machine code breakdown.


b)01010

4.9.3 What is the register number supplied to the register file’s “Write register” input? Is this register actually written?

a)01100
Also mentioned above in the machine code breakdown.


b)01001

3 comments:

  1. Thank so much.. It is very useful for me.^^

    ReplyDelete
  2. minute but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great work.

    ReplyDelete
  3. minute but I have saved it and also included your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the great work. residential architects in georgia

    ReplyDelete