Skip to content

Commit

Permalink
Fix(PA/datapath/alu): support SRAV and more instructions.
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
Triple-Z committed Jun 22, 2017
1 parent 71e9187 commit d15bd2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
15 changes: 9 additions & 6 deletions Project_Assignment/code.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
25280004
2948ffff
2d480006
31a8000c
3988000c
3c08000f
012c4026
012c4027
00094080
000c4082
000c4043
01694004
016c4006
000d4022
01684007
2 changes: 1 addition & 1 deletion Project_Assignment/datapath/alu.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module alu (ALUop, a, b, result);
4'b0101: result <= a ^ b;// xor|xori;
4'b0110: result <= b << a[4:0];// sll;
4'b0111: result <= b >> a[4:0];// srl|srlv;
4'b1000: result <= $signed(b) >> a[4:0];// sra|srav;
4'b1000: result <= $signed(b) >>> a[4:0];// sra|srav;
4'b1001: begin// mult;
{HI, LO} = a * b;
end
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
|`supported` | subu |000000 |100011 |0001 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | and |000000 |100100 |0010 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | or |000000 |100101 |0011 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`untested` | xor |000000 |100110 |0101 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`untested` | nor |000000 |100111 |0100 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | xor |000000 |100110 |0101 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | nor |000000 |100111 |0100 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | slt |000000 |101010 |1011 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | sltu |000000 |101011 |1010 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | addiu |001001 |x |0000 |0 |0 |00 |01 |00 |00 |01 |00 |00 |00 |x |
Expand All @@ -30,12 +30,12 @@
|`supported` | andi |001100 |x |0010 |0 |0 |00 |01 |00 |00 |01 |00 |00 |00 |x |
|`supported` | ori |001101 |x |0011 |0 |0 |00 |01 |00 |00 |01 |00 |00 |00 |x |
|`supported` | xori |001110 |x |0101 |0 |0 |00 |01 |00 |00 |01 |00 |00 |00 |x |
|`untested` | sll |000000 |000000 |0110 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`untested` | srl |000000 |000010 |0111 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`untested` | sra |000000 |000011 |1000 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`untested` | sllv |000000 |000100 |0110 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`untested` | srlv |000000 |000110 |0111 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`untested` | srav |000000 |000111 |1000 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | sll |000000 |000000 |0110 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`supported` | srl |000000 |000010 |0111 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`supported` | sra |000000 |000011 |1000 |0 |0 |01 |00 |01 |00 |01 |00 |x |00 |x |
|`supported` | sllv |000000 |000100 |0110 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | srlv |000000 |000110 |0111 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | srav |000000 |000111 |1000 |0 |0 |01 |00 |00 |00 |01 |00 |x |00 |x |
|`supported` | lui |001111 |x |0110 |0 |0 |00 |01 |10 |00 |01 |00 |00 |00 |x |x |0x00000010 |
|`supported` | lw |100011 |x |0000 |0 |0 |00 |01 |00 |01 |01 |00 |01 |00 |11 |
|`supported` | sw |101011 |x |0000 |0 |0 |x |01 |00 |x |00 |01 |01 |00 |11 |
Expand Down

0 comments on commit d15bd2c

Please sign in to comment.