Added defines to Yosys call

This commit is contained in:
Wojciech Gryncewicz 2020-12-30 17:12:07 +01:00
parent ae1e5f6181
commit 9afd6a8f50
1 changed files with 1 additions and 2 deletions

View File

@ -34,11 +34,10 @@ def write_netlistsvg(cellpath, define_data):
print("No verilog file in", cellpath) print("No verilog file in", cellpath)
assert os.path.exists(verilog), verilog assert os.path.exists(verilog), verilog
yosyscmd = ['yosys', '-p'] yosyscmd = ['yosys', '-D NO_PRIMITIVES', '-D UNIT_DELAY #1', '-p']
yosyscmd.append ('prep -top ' + define_data['verilog_name'] + '; write_json ' + netlist_json) yosyscmd.append ('prep -top ' + define_data['verilog_name'] + '; write_json ' + netlist_json)
yosyscmd.append (verilog) yosyscmd.append (verilog)
if subprocess.call( yosyscmd ) : if subprocess.call( yosyscmd ) :
print ('EERROR')
yosyscmd[2] = '"' + yosyscmd[2] + '"' yosyscmd[2] = '"' + yosyscmd[2] + '"'
print (''.join(yosyscmd)) print (''.join(yosyscmd))
raise ChildProcessError(define_data['file_prefix'],"yosys execution failed") raise ChildProcessError(define_data['file_prefix'],"yosys execution failed")