diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-05-11 21:46:35 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-05-11 21:58:21 +0200 |
commit | dae00e1d8301aae25f3432ca12995c9a3b380679 (patch) | |
tree | b55a32f53afa4611a6c3a1ef824b2b22b95dcc2e /tests/realmath | |
parent | 42348cddd9218f198e93bc11909e7b118a71c9ba (diff) | |
download | yosys-dae00e1d8301aae25f3432ca12995c9a3b380679.tar.gz yosys-dae00e1d8301aae25f3432ca12995c9a3b380679.tar.bz2 yosys-dae00e1d8301aae25f3432ca12995c9a3b380679.zip |
changed file() to open() in python scripts
Diffstat (limited to 'tests/realmath')
-rw-r--r-- | tests/realmath/generate.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/realmath/generate.py b/tests/realmath/generate.py index 24d13561a..16f68f052 100644 --- a/tests/realmath/generate.py +++ b/tests/realmath/generate.py @@ -40,7 +40,7 @@ def random_expression(depth = 3, maxparam = 0): raise for idx in range(100): - with file('temp/uut_%05d.v' % idx, 'w') as f: + with open('temp/uut_%05d.v' % idx, 'w') as f: with 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): @@ -56,12 +56,12 @@ for idx in range(100): for i in range(100): print('assign y%02d = 65536 * (%s);' % (i, random_expression(maxparam = 60))) print('endmodule') - with file('temp/uut_%05d.ys' % idx, 'w') as f: + with open('temp/uut_%05d.ys' % idx, 'w') as f: with redirect_stdout(f): print('read_verilog uut_%05d.v' % idx) print('rename uut_%05d uut_%05d_syn' % (idx, idx)) print('write_verilog uut_%05d_syn.v' % idx) - with file('temp/uut_%05d_tb.v' % idx, 'w') as f: + with open('temp/uut_%05d_tb.v' % idx, 'w') as f: with redirect_stdout(f): print('module uut_%05d_tb;\n' % idx) print('wire [63:0] %s;' % (', '.join(['r%02d' % i for i in range(100)]))) |