build/osfpga: Add macros dict and use it for now to derivate macro from device.

This commit is contained in:
Florent Kermarrec 2022-05-24 16:19:14 +02:00
parent c2e9125d05
commit 5bdc0cbc63
1 changed files with 3 additions and 2 deletions

View File

@ -33,8 +33,9 @@ def _build_tcl(name, device, files, build_name):
tcl.append(f"create_design {build_name}")
# Set Device.
# TODO (Use Macro for now).
tcl.append("set_macro P1=10 P2=20")
# FIXME: Directly pass Devices instead of Macro when possible.
macro = {"test": "P1=10 P2=20"}[device]
tcl.append(f"set_macro {macro}")
# Add Include Path.
# TODO.