passes quick test: sll, srl, sra

This commit is contained in:
2020-10-16 18:25:10 -06:00
parent 913ffb3af6
commit 52a28d4e47
3 changed files with 51 additions and 1302 deletions

View File

@ -309,13 +309,13 @@ always @(*) begin
s_ex_alu_out = s_ex_data1 & s_ex_data2;
end
ALUOP_SL: begin
s_ex_alu_out = s_ex_data1 << s_ex_data2;
s_ex_alu_out = s_ex_data1 << s_ex_data2[4:0];
end
ALUOP_SRL: begin
s_ex_alu_out = s_ex_data1 >> s_ex_data2[5:0]; // NOTE: shamt is only 5 bits. Increased for gcc support
s_ex_alu_out = s_ex_data1 >> s_ex_data2[4:0];
end
ALUOP_SRA: begin
s_ex_alu_out = $signed(s_ex_data1) >>> s_ex_data2[5:0]; // NOTE: shamt is only 5 bits. Increased for gcc support
s_ex_alu_out = $signed(s_ex_data1) >>> s_ex_data2[4:0];
end
ALUOP_SLT: begin
s_ex_alu_out = $signed(s_ex_data1) < $signed(s_ex_data2);