Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External library support for Riviera-PRO #258

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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