summaryrefslogtreecommitdiff
path: root/tests/realmath
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-06-14 20:38:40 +0200
committerClifford Wolf <clifford@clifford.at>2014-06-14 21:00:51 +0200
commit11d2add1b9984a9dabe02e5073e09ca497024dd8 (patch)
tree4c837cac4cece95e63c1bbcd88ee1dafb77b18f2 /tests/realmath
parent149fe83a8dbe37fecc16326163bbc40400147a9a (diff)
improved realmath test bench
Diffstat (limited to 'tests/realmath')
-rw-r--r--tests/realmath/generate.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/realmath/generate.py b/tests/realmath/generate.py
index f280e1c3..af7648b8 100644
--- a/tests/realmath/generate.py
+++ b/tests/realmath/generate.py
@@ -63,7 +63,10 @@ for idx in range(100):
print(' input [7:0] i;')
print(' input [63:0] r, s;')
print(' begin')
- print(' $display("%d: %b %b", i, r, s);')
+ print(' if (-3 < $signed(r-s) && $signed(r-s) < +3)')
+ print(' $display("%d: %b %b", i, r, s);')
+ print(' else')
+ print(' $display("%d: %b %b %s", i, r, s, r !== s ? "TRIG" : "");')
print(' end')
print('endtask')
print('initial begin #1;')