Skip to content

Commit

Permalink
Add xsa option to vivado flow too.
Browse files Browse the repository at this point in the history
  • Loading branch information
stridge-cruxml authored and QuantamHD committed Sep 7, 2023
1 parent 7fcbce7 commit 3ba0ef0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions vivado/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ vivado_placement = rule(
],
)

def _vivado_place_optimi outputs = [bitstream]ze_impl(ctx):
def _vivado_place_optimize_impl(ctx):
placement_checkpoint = ctx.actions.declare_file("{}.dcp".format(ctx.label.name))
timing_summary_report = ctx.actions.declare_file("{}_timing.rpt".format(ctx.label.name))
util_report = ctx.actions.declare_file("{}_util.rpt".format(ctx.label.name))
Expand Down Expand Up @@ -593,7 +593,7 @@ def _vivado_write_bitstream_impl(ctx):

outputs = [bitstream]

if ctx.with_xsa:
if ctx.attr.with_xsa:
with_xsa_str = "1"
xsa_out = ctx.actions.declare_file("{}.xsa".format(ctx.label.name))
xsa_path = xsa_out.path
Expand Down Expand Up @@ -653,7 +653,7 @@ vivado_write_bitstream = rule(
],
)

def vivado_flow(name, module, module_top, part_number, xilinx_env, tags = [], ip_blocks = []):
def vivado_flow(name, module, module_top, part_number, xilinx_env, tags = [], ip_blocks = [], with_xsa=False):
"""Runs the entire bitstream flow as a convenience macro.
Args:
Expand All @@ -664,6 +664,7 @@ def vivado_flow(name, module, module_top, part_number, xilinx_env, tags = [], ip
xilinx_env: The shell script to setup the Xilinx/vivado environment.
tags: Optional tags to use for the rules.
ip_blocks: Optional ip blocks to include in a design.
with_xsa: Also generate the xsa file.
"""
vivado_synthesize(
name = "{}_synth".format(name),
Expand Down Expand Up @@ -708,6 +709,7 @@ def vivado_flow(name, module, module_top, part_number, xilinx_env, tags = [], ip
checkpoint = "{}_route".format(name),
xilinx_env = xilinx_env,
tags = tags,
with_xsa = with_xsa,
)

def _xsim_test_impl(ctx):
Expand Down

0 comments on commit 3ba0ef0

Please sign in to comment.