Computer Architecture Lab/SS2013/GROUP2 LAB2

ISA
32-bit architecture, based on MIPS

Registers

 * 32 x 32-bit GPR name R0-R31, R0 always contains ‘0’, even if other value is stored in it.
 * PC – Program Counter, inaccessible directly from assembler
 * IF/ID, ID/EX, EX/MEM, MEM/WB – for pipeline, inaccessible from assembler (IF - instruction    fetch, ID  -  instruction decode, EX -  execute, MEM - memory access, WB - write back)
 * AOL, AOH - registers that store 64-bit result of ALU operation (for 64-bit operands and 32-    bit operands multiplication/division).  AOL (states for Alu-Out-Low) contains lower 32 bits of     result, AOH (Alu - Out - High) - higher 32 bits. (equivalent of LO and HI in MIPS!)

32-bit (ALU operands)

 * Rd = Rs (fuction) Rt

64-bit (ALU operands)

 * AOH AOL = (( [ Rs+1]&lt;&lt;32)+Rs) (function) (( [Rt+1] &lt;&lt;32)+Rt)

Or, more formally:
 * AOL = ((([Rs+1]&lt;&lt;32)+Rs) (function) (([Rt+1]&lt;&lt;32)+ Rt)) AND (232 -1)
 * AOH = ((([Rs+1]&lt;&lt;32)+Rs) (function) (([Rt+1]&lt;&lt;32)+ Rt)) &gt;&gt; 32

Note: (Rs or Rt = 31 will be coupled with R0! It gives us simple way to add 64- and 32-bit numbers by putting 32-bit one in R31) (It is some kind of Little Endian that simplifies implementation)

Immediate

 * Rd = Rs (function) Value

Branch
Value is signed

Instruction Set
Note 1: Constant in all branches is signed!

Note 2: In MIPS only branches ‘equal’ and ‘not equal’ are implemented, but we can implement other using multiple ALU flags to determine if statement is true or not (e.g. A is greater than B if A-B results in flags Negative and Zero both equal to 0).

Changes
List of changes in comparison with word doc (too much to put in the summary): There is some free opcodes that can be used to implement functions like 'multiply immediate' or '64-bit something immediate', but they are not neccesery and I would prefer to have some free opcodes ;).
 * 64-bit ALU operations use only 2 registers instead of 4 (Rs+1 and Rt+1 replace Ru and Rv)
 * 64-bit CONTROL instructions were added (thanks previous change).