From 5bdc0cbc63229ed4533c08b6c527e198a4806423 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 24 May 2022 16:19:14 +0200 Subject: [PATCH] build/osfpga: Add macros dict and use it for now to derivate macro from device. --- litex/build/osfpga/osfpga.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/litex/build/osfpga/osfpga.py b/litex/build/osfpga/osfpga.py index d69ca648d..5911171b8 100644 --- a/litex/build/osfpga/osfpga.py +++ b/litex/build/osfpga/osfpga.py @@ -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.