aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/simple/operators.v61
-rwxr-xr-xtests/tools/autotest.sh6
2 files changed, 43 insertions, 24 deletions
diff --git a/tests/simple/operators.v b/tests/simple/operators.v
index b9bbc13c8..6ca6ca7a8 100644
--- a/tests/simple/operators.v
+++ b/tests/simple/operators.v
@@ -1,8 +1,7 @@
-
module test(clk, mode, u1, s1, u2, s2, y);
input clk;
-input [5:0] mode;
+input [6:0] mode;
input [3:0] u1, u2;
input signed [3:0] s1, s2;
@@ -72,25 +71,45 @@ always @(posedge clk) begin
46: y <= s1 - u2;
47: y <= s1 - s2;
- 48: y <= +u1;
- 49: y <= -u1;
- 50: y <= +s1;
- 51: y <= -s1;
-
- 52: y <= { &u1, ~&u1, |u1, ~|u1, ^u1, ~^u1, ^~u1 };
- 53: y <= { &s1, ~&s1, |s1, ~|s1, ^s1, ~^s1, ^~s1 };
- 54: y <= { &u1[1:0], ~&u1[1:0], |u1[1:0], ~|u1[1:0], ^u1[1:0], ~^u1[1:0], ^~u1[1:0] };
- 55: y <= { &s1[1:0], ~&s1[1:0], |s1[1:0], ~|s1[1:0], ^s1[1:0], ~^s1[1:0], ^~s1[1:0] };
-
- 56: y <= { u1[1:0] && u2[1:0], u1[1:0] && u2[1:0], !u1[1:0] };
- 57: y <= {4{u1[1:0]}};
- 58: y <= {u1, u2} ^ {s1, s2};
- 59: y <= {u1, u2} & {s1, s2};
-
- 60: y <= u1[0] ? u1 : u2;
- 61: y <= u1[0] ? u1 : s2;
- 62: y <= u1[0] ? s1 : u2;
- 63: y <= u1[0] ? s1 : s2;
+ 48: y <= u1 * u2;
+ 49: y <= u1 * s2;
+ 50: y <= s1 * u2;
+ 51: y <= s1 * s2;
+
+ 52: y <= u1 / u2;
+ 53: y <= u1 / s2;
+ 54: y <= s1 / u2;
+ 55: y <= s1 / s2;
+
+ 56: y <= u1 % u2;
+ 57: y <= u1 % s2;
+ 58: y <= s1 % u2;
+ 59: y <= s1 % s2;
+
+ 60: y <= +u1;
+ 61: y <= -u1;
+ 62: y <= ~u1;
+ 63: y <= !u1;
+
+ 64: y <= +s1;
+ 65: y <= -s1;
+ 66: y <= ~s1;
+ 67: y <= !s1;
+
+ 68: y <= { &u1, ~&u1, |u1, ~|u1, ^u1, ~^u1, ^~u1 };
+ 69: y <= { &s1, ~&s1, |s1, ~|s1, ^s1, ~^s1, ^~s1 };
+ 70: y <= { &u1[1:0], ~&u1[1:0], |u1[1:0], ~|u1[1:0], ^u1[1:0], ~^u1[1:0], ^~u1[1:0] };
+ 71: y <= { &s1[1:0], ~&s1[1:0], |s1[1:0], ~|s1[1:0], ^s1[1:0], ~^s1[1:0], ^~s1[1:0] };
+
+ 72: y <= { u1[1:0] && u2[1:0], u1[1:0] && u2[1:0], !u1[1:0] };
+ 73: y <= {4{u1[1:0]}};
+ 74: y <= {u1, u2} ^ {s1, s2};
+ 75: y <= {u1, u2} & {s1, s2};
+
+ 76: y <= u1[0] ? u1 : u2;
+ 77: y <= u1[0] ? u1 : s2;
+ 78: y <= u1[0] ? s1 : u2;
+ 79: y <= u1[0] ? s1 : s2;
endcase
end
diff --git a/tests/tools/autotest.sh b/tests/tools/autotest.sh
index e599db3a1..cb1e3a96d 100755
--- a/tests/tools/autotest.sh
+++ b/tests/tools/autotest.sh
@@ -140,9 +140,9 @@ do
if [ -n "$scriptfiles" ]; then
test_passes
else
- test_passes -p hierarchy -p proc -p memory -p opt -p fsm -p opt
- test_passes -p hierarchy -p proc -p memory -p opt -p fsm -p opt -p techmap -p opt
- # test_passes -p hierarchy -p proc -p memory -p opt -p techmap -p opt -p abc -p opt
+ test_passes -p "hierarchy; proc; memory; opt; fsm; opt"
+ test_passes -p "hierarchy; proc; memory; opt; fsm; opt; techmap; opt"
+ # test_passes -p "hierarchy; proc; memory; opt; fsm; opt; techmap -opt; opt; abc; opt"
fi
touch ../${bn}.log
}