From 3345fa0bab5d343a9cd5a9dde6486e4e876fe8da Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 21 Jun 2014 21:43:04 +0200 Subject: Little steps in realmath test bench --- tests/realmath/generate.py | 4 ++-- tests/simple/realexpr.v | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/realmath/generate.py b/tests/realmath/generate.py index 53015381..972021dc 100644 --- a/tests/realmath/generate.py +++ b/tests/realmath/generate.py @@ -43,12 +43,12 @@ for idx in range(100): with file('temp/uut_%05d.v' % idx, 'w') as f, redirect_stdout(f): print('module uut_%05d(output [63:0] %s);\n' % (idx, ', '.join(['y%02d' % i for i in range(100)]))) for i in range(30): - if idx < 10 or True: + if idx < 10: print('localparam p%02d = %s;' % (i, random_expression())) else: print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression())) for i in range(30, 60): - if idx < 10 or True: + if idx < 10: print('localparam p%02d = %s;' % (i, random_expression(maxparam = 30))) else: print('localparam%s p%02d = %s;' % (random.choice(['', ' real', ' integer']), i, random_expression(maxparam = 30))) diff --git a/tests/simple/realexpr.v b/tests/simple/realexpr.v index 35166110..2adffe2d 100644 --- a/tests/simple/realexpr.v +++ b/tests/simple/realexpr.v @@ -13,3 +13,9 @@ module demo_001(y1, y2, y3, y4); assign y4 = p4 + 0.2; endmodule +module demo_002(y1); + output [3:0] y1; + + assign y1 = 1'bx >= (-1 * -1.17); +endmodule + -- cgit v1.2.3