Fix klayout options setup
@@ -24,14 +24,7 @@ def setup_tool(chip, step):
def setup_options(chip,step):
options = chip.get('flow', step, 'option')
- return options
-################################
-# Pre/Post Processing
-################################
-def pre_process(chip, step):
- ''' Tool specific function to run before step execution
- '''
scriptdir = os.path.dirname(os.path.abspath(__file__))
sc_root = re.sub('siliconcompiler/eda/klayout',
'siliconcompiler',
@@ -48,30 +41,41 @@ def pre_process(chip, step):
tech_file = '%s/setup/klayout/%s.lyt'%(
foundry_path,
chip.cfg['target']['value'][-1])
+
if step == 'export':
- chip.add('flow', step, 'option', '-nn')
- chip.add('flow', step, 'option', tech_file)
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'design_name=%s'%(
+ options.append('-nn')
+ options.append(tech_file)
+ options.append('-rd')
+ options.append('design_name=%s'%(
chip.cfg['design']['value'][-1]))
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'in_def=inputs/%s.def'%(
+ options.append('-rd')
+ options.append('in_def=inputs/%s.def'%(
chip.cfg['design']['value'][-1]))
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'seal_gds=""')
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'in_gds=%s/%s'%(
+ options.append('-rd')
+ options.append('seal_gds=""')
+ options.append('-rd')
+ options.append('in_gds=%s/%s'%(
sc_root,
chip.cfg['stdcell']['NangateOpenCellLibrary']['gds']['value'][-1]))
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'out_gds=outputs/%s.gds'%(
+ options.append('-rd')
+ options.append('out_gds=outputs/%s.gds'%(
chip.cfg['design']['value'][-1]))
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'tech_file=%s'%tech_file)
- chip.add('flow', step, 'option', '-rd')
- chip.add('flow', step, 'option', 'foundry_lefs=%s'%lefs_path)
- chip.add('flow', step, 'option', '-rm')
- chip.add('flow', step, 'option', 'def2gds.py')
+ options.append('-rd')
+ options.append('tech_file=%s'%tech_file)
+ options.append('-rd')
+ options.append('foundry_lefs=%s'%lefs_path)
+ options.append('-rm')
+ options.append('def2gds.py')
+
+ return options
+
+################################
+# Pre/Post Processing
+################################
+def pre_process(chip, step):
+ ''' Tool specific function to run before step execution
+ '''
+ pass
def post_process(chip, step):
''' Tool specific function to run after step execution
