From a67cd6e442b8601fde54fefe63dbcab04d3b3a79 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 24 May 2022 17:11:01 +0200 Subject: [PATCH] build/osfpga: Add include_path support. --- litex/build/osfpga/osfpga.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/litex/build/osfpga/osfpga.py b/litex/build/osfpga/osfpga.py index 5911171b8..c0a4e5419 100644 --- a/litex/build/osfpga/osfpga.py +++ b/litex/build/osfpga/osfpga.py @@ -26,7 +26,7 @@ def _build_sdc(clocks, vns, build_name): # Script ------------------------------------------------------------------------------------------- -def _build_tcl(name, device, files, build_name): +def _build_tcl(name, device, files, build_name, include_paths): tcl = [] # Create Design. @@ -38,7 +38,9 @@ def _build_tcl(name, device, files, build_name): tcl.append(f"set_macro {macro}") # Add Include Path. - # TODO. + tcl.append("add_include_path ./") + for include_path in include_paths: + tcl.append(f"add_include_path {include_path}") # Add Sources. for f, typ, lib in files: @@ -108,10 +110,11 @@ class OSFPGAToolchain: # Generate build script (.tcl) script = _build_tcl( - name = platform.devicename, - device = platform.device, - files = platform.sources, - build_name = build_name, + name = platform.devicename, + device = platform.device, + files = platform.sources, + build_name = build_name, + include_paths = platform.verilog_include_paths, ) # Run