build/osfpga: Add include_path support.
This commit is contained in:
parent
3bf5c11928
commit
a67cd6e442
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue