Powerthirst
From Ece
Contents |
Team Members
Team Leader: Ryan Storment
Team Member: Ivan Akimov
Design Overview
Most modern processors must support object-oriented programming efficiently, as many single-purpose devices are used as platforms for Java or C/C++, in which procedures and methods are called often (and recursively) in the code. For this reason, our instruction set will be designed to enhance the branching capabilities of MIPS. This will be done by providing several branching instructions, along with a dedicated "status" register in which each bit will represent some meta-data about the previously executed instruction, much like the architecture of the PIC family of processors. Register $t9 will be renamed $status for this purpose, and will not be user-modifiable. In addition, we will assume a falling-edge triggered configuration, in order to avoid the line interference caused by the pull-downs on a rising-edge configuration. This does, however, increase clock propagation time because of the combinational logic necessary to invert the signal.
Instruction Formats
In addition to the R, I, and J formats, a fourth format called ADDI was created to facilite larger unsigned integers to be used as arguments to the addi and subi instructions. This will allow values between 0 and 29-1, or 512 different values, up to 0x01FF to be specified.
R Format
| Opcode | Rs | Rt | Rd | Func |
| 4 bits | 3 bits | 3 bits | 3 bits | 3 bits |
I Format
| Opcode | Rs | Rt | Immediate |
| 4 bits | 3 bits | 3 bits | 6 bits |
ADDI Format
| Opcode | Rs | Immediate |
| 4 bits | 3 bits | 9 bits |
J Format
| Opcode | Address |
| 4 bits | 12 bits |
Instruction Set
| Name | Mnem | Operation | Opcode | Func | Format |
| And | and | And $s1,$s2,$s3; $s1 = $s2&$s3 | 0000 (ALUop) | 000 | R |
| Or | or | Or $s1,$s2,$s3; $s1 = $s2 | $s3 | 001 | R | |
| Add | add | Add $s1,$s2,$s3; $s1 = $s2+$s3 | 010 | R | |
| Subtract | sub | Sub $s1,$s2,$s3; $s1 = $s2-$s3 | 011 | R | |
| Exclusive Or | xor | Xor $s1, $s2, $s3; $s1 = $s2⊕$s3 | 100 | R | |
| Nor | Nor | nor $s1, $s2, $s3; $s1 = $s2 $s3 | 101 | R | |
| Add Immediate | addi | Addi $s1, 100; $s1 = $s1+100 | 0001 | xxx | ADDI |
| Subtract Immediate | subi | Subi $s1, 100; $s1 = $s1-100 | 0010 | xxx | ADDI |
| Shift Left | sll | sll $s1,$s2,L; $s1 = $s2<<L | 0011 | xxx | I |
| Shift Right | srl | srl $s1,$s2,L; $s1 = $s2>>L | 0100 | xxx | I |
| Or Immediate | ori | Ori $s1,$s2,100; $s1 = $s2 | 100 | 0101 | xxx | I |
| And Immediate | andi | Andi $s1,$s2,100; $s1 = $s2 & 100 | 0110 | xxx | I |
| Branch if equal | beq | Beq $s1,$s2,25; if($s1==$s2) go to PC + 2 + 100 | 0111 | xxx | I |
| Branch if greater than | bgt | Bgt $s1, $s2, L; if ($s1 > $s2) goto L | 1000 | xxx | I |
| Branch if less than or equal to | blte | Blte $s1, $s2, L; if ($s1 <= $s2) goto L | 1001 | xxx | I |
| Branch if not equal to | bne | Bgt $s1, $s2, L; if ($s1 != $s2) goto L | 1010 | xxx | I |
| Branch if last result zero | bz | Bz L; if (~$status[ZERO]) goto L | 1011 | xxx | J |
| Branch if last result not zero | bnz | Bnz L; if ($status[ZERO]) goto L | 1100 | xxx | J |
| Jump | j | J 2500; go to 5000 | 1101 | xxx | J |
| Load word | lw | lw $s1,100($s2); $s1=Memory[$s2 + 100] | 1110 | xxx | I |
| Store word | sw | sw $s1,100($s2); Memory[$s2 + 100]=$s1 | 1111 | xxx | I |




