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

Adding Remote hw_target support in Vivado backend with 'hw_server_url' tool option. #267

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion edalize/templates/vivado/vivado-program.tcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if { $explicit_hw_target != "" } {

# Connect to Xilinx Hardware Server
if { [ catch { open_hw_manager } ] } { open_hw }
connect_hw_server
connect_hw_server{{ url }}

if { $explicit_hw_target == "" } {
set hw_targets [get_hw_targets]
Expand Down
15 changes: 14 additions & 1 deletion edalize/vivado.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ def get_doc(cls, api_ver):
{'name' : 'hw_target',
'type' : 'Description',
'desc' : 'A pattern matching a board identifier. Refer to the Vivado documentation for ``get_hw_targets`` for details. Example: ``*/xilinx_tcf/Digilent/123456789123A``'},
{'name' : 'hw_server_url',
'type' : 'String',
'desc' : 'The host and port for remote hardware targets. ex. ``10.0.0.3:3121``'},
]}

""" Get tool version
Expand Down Expand Up @@ -139,6 +142,8 @@ def configure_main(self):
else:
unused_files.append(f)



template_vars = {
'name' : self.name,
'src_files' : '\n'.join(src_files),
Expand Down Expand Up @@ -215,8 +220,15 @@ def configure_main(self):
commands.set_default_target(bitstream)
commands.write(os.path.join(self.work_root, 'Makefile'))

url = self.tool_options.get('hw_server_url', None)

pgm_template_vars = {
'url' : ' -url ' + str(url) if url is not None else ''
}

self.render_template('vivado-program.tcl.j2',
self.name+"_pgm.tcl")
self.name+"_pgm.tcl",
pgm_template_vars)

def build_main(self):
logger.info("Building")
Expand All @@ -234,6 +246,7 @@ def build_main(self):
correct FPGA board and then downloads the bitstream. The tcl script is then
executed in Vivado's batch mode.
"""

def run_main(self):
if 'pnr' in self.tool_options:
if self.tool_options['pnr'] == 'vivado':
Expand Down