Team Rubik's Cubicle:
From Ece
Project Proposal
Contents |
Team Name and Members
Team name: Team Rubik's Cubicle
Team member: Johnson Thomasson
Team member: M.J. Hill
Design Overview
Our processor will have three instruction types: R-type, I-type, and J-type. The R-type instructions will do an operation on two register elements and places the result in a third register. The I-type instructions perform an operation on a register value and an immediate value and place the result in a second register. The J-type instructions perform an unconditional jump to a different part of the program.
We plan to use eight registers for the processor
The clocking methodology:
The reads will be performed on the rising edge of the clock. The writes will be performed on the falling edge of the clock.
Set of Instructions:
R-Type – add, sub, or, sll, xor, srl, and, nor, xor
I-Type – addi, lw, sw, beq, bne, slti
J-Type – j
Instruction format
R-Format:
Opcode |
rs |
rt |
rd |
Func |
4 bits |
3 bits |
3 bits |
3 bits |
3 bits |
I–Format:
Opcode |
rs |
rt |
imm |
|
4 bits |
3 bits |
3 bits |
6 bits |
|
J- Format:
Opcode |
Address |
4 bits |
12 bits |
Instructions
Example:
Name |
Mnemonic |
Operation |
Opcode |
Func |
Form |
Add |
add |
Add $s1, $s2, $s3; $s1 = $s2 + $s3 |
0000 |
000 |
R |
Sub |
Sub |
Sub $s1, $s2, $s3; $s1 = $s2 - $s3 |
0000 |
001 |
R |
And |
And |
And $s1, $s2, $s3; $s1 = $s2 & $s3 |
0000 |
010 |
R |
Or |
Or |
Or $s1, $s2, $s3; $s1 = $s2 || $s3 |
0000 |
011 |
R |
Exclusive Or |
xor |
xor $s1,$s2,$s3; $s1=$s2⊕$s3 |
0000 |
100 |
R |
Set Less Than |
slt |
slt $s1,$s2,$s3; if $s2<$s3 then $s1=1, else $s1=0 |
0000 |
101 |
R |
Nor |
nor |
Or $s1, $s2, $s3; ~($s1 = $s2 | $s3) |
0000 |
110 |
R |
Shift Left Logical |
Sll |
Sll $s1, $s2, 2 $s1 = $s2 << 2 |
1000 |
X |
I |
Shift Right Logical |
Srl |
Srl $s1, $s2, 2 $s1 = $s2 >> 2 |
1001 |
X |
I |
Jump |
J |
j $s1,L1; PC = L1 |
0001 |
X |
J |
Branch if equal |
beq |
beq $s1,$s2,L1; if $s1=$s2 then PC=L1, else PC+=4 |
0010 |
X |
I |
Branch not equal |
bne |
bne $s1,$s2,L1; if $S1!=$S2 then PC=L1, else PC+=4 |
0011 |
X |
I |
Load Word |
Lw |
lw $s1, 3($s2); $s1=Mem[$s2+3] |
0100 |
X |
I |
Store Word |
Sw |
sw $s1, 3($s2); Mem[$s2+3]=$s1 |
0101 |
X |
I |
Add immediate |
addi |
addi $s1, $s2, 100; $s1 = $s2 + 100 |
0110 |
X |
I |
Set Less Than Imm. |
slti |
slti $s1,$s2,9; if $s2<9 then $s1=1, else $s1=0 |
0111 |
X |
I |
Assembly language and machine code for the test program (Pseudocode)
Pseudocode for the test program (refer to the project handout):
while ($a1 > 0) do {
$a1 = $a1 –1;
$t0 = Mem[$a0];
if ($t0 > 0100hex) then {
$v0 = $v0 ÷ 8;
$v1 = $v1 | $v0; //or
Mem[$a0] = FF00hex;
}
else {
$v2 = $v2 × 4;
$v3 = $v3 ⊕ $v2; //xor
Mem[$a0] = 00FFhex;
}
$a0 = $a0 + 2;
}
return;
Registers:
Name |
Register Number |
$a0 |
000 |
$a1 |
001 |
$t0 |
010 |
$t1 |
011 |
$v0 |
100 |
$v1 |
101 |
$v2 |
110 |
$v3 |
111 |
Assembly Language |
Machine Code |
LOOP: |
|
Slti $t0, $a1, 0 |
0111 010 001 000000 |
Beq $t1, $zero, EXIT |
0010 011 000 xxxxxx |
Addi $a1, $a1, -1 |
0110 001 001 100001 |
Lw $t0, 0($a0) |
0100 010 000 000000 |
Slti $t1, $t0, 0x0100 |
0111 011 010 000100 |
Bne $t1, $zero, ELSE |
0011 011 000 xxxxxx |
Srl $v0, $v0, 3 |
1001 100 100 000011 |
Or $v1, $v1, $v0 |
0000 101 101 100 011 |
Addi $t1, $zero, 0xFF00 |
0110 011 000 111100 |
Sw $t1, 0($a0) |
0101 011 000 000000 |
J EndElse |
0001 xxxxxxxxxxxx |
ELSE: |
|
sll $v2, $v2, 2 |
1000 110 110 000010 |
Xor $v3, $v3, $v2 |
0000 111 111 110 100 |
EndElse: |
|
Addi $t1, $zero, 00FF |
0110 011 000 111111 |
Sw $t1, 0($a0) |
0101 011 000 000000 |
Addi $a0, $a0, 2 |
0110 000 000 000010 |
J LOOP |
0001 xxxxxxxxxxxx |
EXIT: |
|
** You can explain your assembly language in brief if needed.
Tasks and Schedule
Tasks |
Schedule |
||||
1st week |
2nd week |
3rd Week |
4th Week |
5th week |
|
Proposal |
X |
|
|
|
|
Proposal Mod |
|
X |
|
|
|
Design |
|
X |
X |
X |
|
Code |
|
|
X |
X |
X |
Wiki Updates |
X |
X |
X |
X |
X |
Final Report |
|
|
X |
X |
X |
Demonstration |
|
|
|
X |
X |
Planned Meetings
The design team will meet on the following dates to discuss the project progress and assigned tasks:
-
Wednesday Oct. 27: 5-6 pm
-
Friday Oct. 29: 5-6 pm
-
Wednesday Nov. 3: 5-6 pm
-
Wednesday Nov. 10: 5-6 pm
-
Wednesday Nob. 17: 5-6 pm
Team Name
Team Rubik’s Cubicle




