BLOGGER TEMPLATES AND TWITTER BACKGROUNDS »

Saturday 15 December 2012

MIPS, I-TYPE / J-TYPE


B.       Immediate type
l  Include instruction with :
1.        Immediate operand
2.        Branch instructions
3.        Load and store instruction
l  All opcodes except 000000, 00001x, and 0100xx are used for this instruction.
bits
6
5
5
16
Instructions syntax
Operation code (op)
Source register specifier (rs)
Target register specifier or branch condition (rt)
Immediate, branch displacement or address displacement (immediate)


Example :

lw  $t0 , 1200($t1)

35
9
8
-1200
100011
01001
01000
0000010010110000
Decimal representation
Binary representation  



C.       Jump type
l  Two direct jump instructions (j and jal).
l  Require a memory address to specify their operand
l  Opcodes 00001x
bits
6
26
Instructions syntax
Operation code (op)
Target address (target)
INSTRUCTION TYPE APPLICATION
31             26
25           21
20           16
15           11
10            6
5             0
op
rs
rt
rd
shamt
funct

Example :
i.              add  rd,  rs,  rt [non-jump R-type]
ii.              jalr  rd,  rs [jump register, R-type)
BY LUA XIN LIN
B031210345

0 comments: