From: Clifford Wolf Date: Sat, 14 Jun 2014 18:38:40 +0000 (+0200) Subject: improved realmath test bench X-Git-Tag: yosys-0.4~601 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=11d2add1b9984a9dabe02e5073e09ca497024dd8;p=yosys.git improved realmath test bench --- diff --git a/tests/realmath/generate.py b/tests/realmath/generate.py index f280e1c3d..af7648b87 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;')