Add more testcases for mthi, mtlo, mult, multu

This commit is contained in:
jl7719 2020-12-19 15:34:35 +00:00
parent 0d731c74b2
commit 85e23d824c
21 changed files with 71 additions and 7 deletions

View file

@ -0,0 +1,4 @@
00000000
00000000
00000000
10000000

View file

@ -0,0 +1,5 @@
3404100A
8C840002
00800011
00001010
00000008

View file

@ -0,0 +1 @@
268435456

View file

@ -0,0 +1,4 @@
00000000
00000000
00000000
10101100

View file

@ -0,0 +1,5 @@
3404100A
8C840002
00800013
00001012
00000008

View file

@ -0,0 +1 @@
269488384

View file

@ -2,5 +2,4 @@
34050003 34050003
00850018 00850018
00001012 00001012
00000000
00000008 00000008

View file

@ -0,0 +1,4 @@
00000000
FFFFFFFF
00000000
00010000

View file

@ -0,0 +1,9 @@
3404100A
8C840002
34051002
8CA50002
00850018
00002812
00002010
00000008
00851021

View file

@ -0,0 +1 @@
4294901759

View file

@ -0,0 +1,7 @@
3404A000
00840018
00001012
00002812
00002010
00000008
00851021

View file

@ -0,0 +1 @@
1677721600

View file

@ -0,0 +1,7 @@
3C04FFFF
3484A000
00840018
00002812
00002010
00000008
00851021

View file

@ -0,0 +1 @@
603979776

View file

@ -0,0 +1,5 @@
3C05A000
34040001
00850018
00001010
00000008

View file

@ -0,0 +1 @@
4294967295

View file

@ -0,0 +1,7 @@
3C04FFFF
3484A000
00840019
00002812
00001010
00000008
00451021

View file

@ -0,0 +1 @@
603930624

View file

@ -1,4 +1,4 @@
00000000 00000000
12345678 12345678
00000000 0000F0A0
00000000 00000000

View file

@ -1,5 +1,6 @@
34041002 34041002
8C820002 8C820002
3404F0A0 34051006
8CA40002
00000008 00000008
00441025 00441025

View file

@ -112,8 +112,8 @@ end
MUL: begin MUL: begin
SMulRes = $signed(A) * $signed(B); SMulRes = $signed(A) * $signed(B);
temp_Hi = SMulRes[63:32]; temp_Hi = SMulRes[63:32];
temp_Lo = SMulRes[31:0]; temp_Lo = SMulRes[31:0];
end end
DIV: begin DIV: begin
@ -241,8 +241,8 @@ end
MULU: begin MULU: begin
UMulRes = A * B; UMulRes = A * B;
temp_Hi = UMulRes[63:32]; temp_Hi = UMulRes[63:32];
temp_Lo = UMulRes[31:0]; temp_Lo = UMulRes[31:0];
end end
DIVU: begin DIVU: begin