Skip to content

Commit

Permalink
Replaced every call to configure_vivado_synth_tool with VivadoSynth(d…
Browse files Browse the repository at this point in the history
…esign, flow_args.get(synth), ooc=ooc)
  • Loading branch information
yonnorc42 committed Nov 15, 2023
2 parents 5928bb7 + 7b1bc6b commit 1bd8718
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from bfasst.ninja_flows.flow import Flow
from bfasst.ninja_tools.vivado.impl.vivado_impl import VivadoImpl
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class Vivado(Flow):
Expand All @@ -11,7 +11,7 @@ class Vivado(Flow):
def __init__(self, design, flow_args=None, ooc=False):
super().__init__(design)
self.ooc = ooc
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args, ooc)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"), ooc=ooc)
self.vivado_impl_tool = VivadoImpl(design, ooc)

def create_rule_snippets(self):
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_bit_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
from bfasst.ninja_tools.rev_bit.xray import Xray as XrevTool
from bfasst.ninja_tools.transform.netlist_cleanup import NetlistCleanupTool
from bfasst.ninja_tools.transform.netlist_phys_to_logical import NetlistPhysToLogicalTool
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoBitAnalysis(Flow):
"""Flow to reverse a netlist from a bitstream using x-ray."""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.xrev_tool = XrevTool(design)
self.netlist_cleanup_tool = NetlistCleanupTool(design)
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_conformal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from bfasst.ninja_tools.rev_bit.xray import Xray
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.types import Vendor
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoConformal(Flow):
"""Run vivado, phys_netlist, reverse with xray, then compare with conformal."""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.xrev_tool = Xray(design)
self.conformal_tool = Conformal(design)
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_phys_netlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
from bfasst.ninja_tools.vivado.impl.vivado_impl import VivadoImpl
from bfasst.ninja_tools.transform.phys_netlist import PhysNetlist
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoPhysNetlist(Flow):
"""Creates a Vivado netlist that has only physical primitives."""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.phys_netlist_tool = PhysNetlist(design)

Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_phys_netlist_cmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from bfasst.ninja_tools.rev_bit.xray import Xray
from bfasst.ninja_tools.transform.phys_netlist import PhysNetlist
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoPhysNetlistCmp(Flow):
"""Structural Comparison of physical netlist and reversed netlist"""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.phys_netlist_tool = PhysNetlist(design)
self.xray_tool = Xray(design)
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_phys_netlist_xrev.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from bfasst.ninja_tools.rev_bit.xray import Xray
from bfasst.ninja_tools.transform.phys_netlist import PhysNetlist
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoPhysNetlistXrev(Flow):
"""Flow that combines vivado phys netlist and xray/f2b reversal."""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.phys_netlist_tool = PhysNetlist(design)
self.xrev_tool = Xray(design)
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_structural_error_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from bfasst.ninja_tools.transform.error_injector import ErrorInjector
from bfasst.ninja_tools.transform.phys_netlist import PhysNetlist
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth

from bfasst.ninja_utils.error_injector import ErrorType

Expand All @@ -20,7 +20,7 @@ class VivadoStructuralErrorInjection(Flow):
def __init__(self, design, flow_args=None):
super().__init__(design)
random.seed(0)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.phys_netlist_tool = PhysNetlist(design)
self.xrev_tool = Xray(design)
Expand Down
4 changes: 2 additions & 2 deletions bfasst/ninja_flows/vivado_yosys_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
from bfasst.ninja_tools.compare.yosys.yosys import Yosys
from bfasst.ninja_tools.rev_bit.xray import Xray
from bfasst.paths import NINJA_FLOWS_PATH
from bfasst.ninja_flows.flow_utils import configure_vivado_synth_tool
from bfasst.ninja_tools.vivado.synth.vivado_synth import VivadoSynth


class VivadoYosysImpl(Flow):
"""Flow to compare reversed netlist to original using yosys."""

def __init__(self, design, flow_args=None):
super().__init__(design)
self.vivado_synth_tool = configure_vivado_synth_tool(design, flow_args)
self.vivado_synth_tool = VivadoSynth(design, flow_args.get("synth"))
self.vivado_impl_tool = VivadoImpl(design)
self.xrev_tool = Xray(design)
self.yosys_tool = Yosys(design)
Expand Down

0 comments on commit 1bd8718

Please sign in to comment.