Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cocotb_test/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def __init__(
timescale=None,
gui=False,
simulation_args=None,
external_libraries=None,
**kwargs,
):

Expand Down Expand Up @@ -101,6 +102,10 @@ def __init__(
vhdl_sources = []
self.vhdl_sources = self.get_abs_paths(vhdl_sources)

if external_libraries is None:
external_libraries = []
self.external_libraries = self.get_abs_paths(external_libraries)

if includes is None:
includes = []

Expand Down Expand Up @@ -931,6 +936,9 @@ def build_command(self):

do_script += f"alib {as_tcl_value(self.rtl_library)} \n"

for path in self.external_libraries:
do_script += f"alib {as_tcl_value(path)} \n"

if self.vhdl_sources:
compile_args = self.compile_args + self.vhdl_compile_args
do_script += "acom -work {RTL_LIBRARY} {EXTRA_ARGS} {VHDL_SOURCES}\n".format(
Expand Down