mirror of
https://github.com/supleed2/ELEC50010-IAC-CW.git
synced 2024-12-22 21:35:48 +00:00
Add more testcases for mthi, mtlo, mult, multu
This commit is contained in:
parent
0d731c74b2
commit
85e23d824c
4
inputs/mthi/mthi-2.data.txt
Normal file
4
inputs/mthi/mthi-2.data.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
00000000
|
||||
00000000
|
||||
00000000
|
||||
10000000
|
5
inputs/mthi/mthi-2.instr.txt
Normal file
5
inputs/mthi/mthi-2.instr.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
3404100A
|
||||
8C840002
|
||||
00800011
|
||||
00001010
|
||||
00000008
|
1
inputs/mthi/mthi-2.ref.txt
Normal file
1
inputs/mthi/mthi-2.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
268435456
|
4
inputs/mtlo/mtlo-2.data.txt
Normal file
4
inputs/mtlo/mtlo-2.data.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
00000000
|
||||
00000000
|
||||
00000000
|
||||
10101100
|
5
inputs/mtlo/mtlo-2.instr.txt
Normal file
5
inputs/mtlo/mtlo-2.instr.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
3404100A
|
||||
8C840002
|
||||
00800013
|
||||
00001012
|
||||
00000008
|
1
inputs/mtlo/mtlo-2.ref.txt
Normal file
1
inputs/mtlo/mtlo-2.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
269488384
|
|
@ -2,5 +2,4 @@
|
|||
34050003
|
||||
00850018
|
||||
00001012
|
||||
00000000
|
||||
00000008
|
4
inputs/mult/mult-2.data.txt
Normal file
4
inputs/mult/mult-2.data.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
00000000
|
||||
FFFFFFFF
|
||||
00000000
|
||||
00010000
|
9
inputs/mult/mult-2.instr.txt
Normal file
9
inputs/mult/mult-2.instr.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
3404100A
|
||||
8C840002
|
||||
34051002
|
||||
8CA50002
|
||||
00850018
|
||||
00002812
|
||||
00002010
|
||||
00000008
|
||||
00851021
|
1
inputs/mult/mult-2.ref.txt
Normal file
1
inputs/mult/mult-2.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
4294901759
|
7
inputs/mult/mult-3.instr.txt
Normal file
7
inputs/mult/mult-3.instr.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
3404A000
|
||||
00840018
|
||||
00001012
|
||||
00002812
|
||||
00002010
|
||||
00000008
|
||||
00851021
|
1
inputs/mult/mult-3.ref.txt
Normal file
1
inputs/mult/mult-3.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
1677721600
|
7
inputs/mult/mult-4.instr.txt
Normal file
7
inputs/mult/mult-4.instr.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
3C04FFFF
|
||||
3484A000
|
||||
00840018
|
||||
00002812
|
||||
00002010
|
||||
00000008
|
||||
00851021
|
1
inputs/mult/mult-4.ref.txt
Normal file
1
inputs/mult/mult-4.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
603979776
|
5
inputs/mult/mult-5.instr.txt
Normal file
5
inputs/mult/mult-5.instr.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
3C05A000
|
||||
34040001
|
||||
00850018
|
||||
00001010
|
||||
00000008
|
1
inputs/mult/mult-5.ref.txt
Normal file
1
inputs/mult/mult-5.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
4294967295
|
7
inputs/multu/multu-2.instr.txt
Normal file
7
inputs/multu/multu-2.instr.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
3C04FFFF
|
||||
3484A000
|
||||
00840019
|
||||
00002812
|
||||
00001010
|
||||
00000008
|
||||
00451021
|
1
inputs/multu/multu-2.ref.txt
Normal file
1
inputs/multu/multu-2.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
603930624
|
|
@ -1,4 +1,4 @@
|
|||
00000000
|
||||
12345678
|
||||
00000000
|
||||
0000F0A0
|
||||
00000000
|
|
@ -1,5 +1,6 @@
|
|||
34041002
|
||||
8C820002
|
||||
3404F0A0
|
||||
34051006
|
||||
8CA40002
|
||||
00000008
|
||||
00441025
|
|
@ -112,8 +112,8 @@ end
|
|||
|
||||
MUL: begin
|
||||
SMulRes = $signed(A) * $signed(B);
|
||||
temp_Hi = SMulRes[63:32];
|
||||
temp_Lo = SMulRes[31:0];
|
||||
temp_Hi = SMulRes[63:32];
|
||||
temp_Lo = SMulRes[31:0];
|
||||
end
|
||||
|
||||
DIV: begin
|
||||
|
@ -241,8 +241,8 @@ end
|
|||
|
||||
MULU: begin
|
||||
UMulRes = A * B;
|
||||
temp_Hi = UMulRes[63:32];
|
||||
temp_Lo = UMulRes[31:0];
|
||||
temp_Hi = UMulRes[63:32];
|
||||
temp_Lo = UMulRes[31:0];
|
||||
end
|
||||
|
||||
DIVU: begin
|
||||
|
|
Loading…
Reference in a new issue