Skip to content

Commit ee71a88

Browse files
committed
toolchains/vivado: cleanup
Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
1 parent 80e1c25 commit ee71a88

File tree

1 file changed

+31
-27
lines changed

1 file changed

+31
-27
lines changed

toolchains/vivado.py

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -124,41 +124,45 @@ def add_runtimes(self):
124124
for t in impl_times:
125125
self.add_runtime(t, impl_times[t])
126126

127-
def prepare_edam(self):
128-
chip = self.family + self.device + self.package
129-
130-
vivado_settings = os.getenv('VIVADO_SETTINGS')
131-
132-
options = dict()
133-
options['part'] = chip
134-
options['synth'] = self.synthtool
135-
options['vivado-settings'] = vivado_settings
136-
options['yosys_synth_options'] = self.synthoptions
137-
138-
params = dict(paramtype='vlogdefine', datatype='int', default=1)
139-
140-
edam = dict()
141-
edam['files'] = self.files
142-
edam['name'] = self.project_name
143-
edam['toplevel'] = self.top
144-
edam['tool_options'] = dict(vivado=options)
145-
edam['parameters'] = dict(VIVADO=params)
146-
147-
return edam
148-
149127
def run(self):
150128
with Timed(self, 'total'):
151129
with Timed(self, 'prepare'):
152130
os.makedirs(self.out_dir, exist_ok=True)
153-
154-
edam = self.prepare_edam()
155131
self.backend = edalize.get_edatool('vivado')(
156-
edam=edam, work_root=self.out_dir
132+
edam={
133+
'files':
134+
self.files,
135+
'name':
136+
self.project_name,
137+
'toplevel':
138+
self.top,
139+
'tool_options':
140+
dict(
141+
vivado={
142+
'part':
143+
self.family + self.device +
144+
self.package,
145+
'synth':
146+
self.synthtool,
147+
'vivado-settings':
148+
os.getenv('VIVADO_SETTINGS'),
149+
'yosys_synth_options':
150+
self.synthoptions
151+
}
152+
),
153+
'parameters':
154+
dict(
155+
VIVADO={
156+
'paramtype': 'vlogdefine',
157+
'datatype': 'int',
158+
'default': 1
159+
}
160+
)
161+
},
162+
work_root=self.out_dir
157163
)
158164
self.backend.configure("")
159-
160165
self.backend.build()
161-
162166
self.add_runtimes()
163167
self.add_maximum_memory_use()
164168

0 commit comments

Comments
 (0)