Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoeders committed Sep 11, 2024
1 parent bea47c3 commit 2db02c8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bfasst/flows/rand_soc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,28 @@
from bfasst.tools.design_create.rand_soc import RandSoC
from bfasst.tools.impl.vivado_impl import VivadoImpl
from bfasst.tools.synth.vivado_synth import VivadoSynth
from bfasst.paths import ROOT_PATH


class RandSoc(FlowNoDesign):
"""Flow to create random soc block designs in Vivado"""

def __init__(self, num_designs=1, part=None):
def __init__(self, num_designs=1, part=None, randsoc_config_path=None):
# pylint: disable=duplicate-code
super().__init__()

# Override default part
if part is not None:
self.part = part

self.rand_soc_tool = RandSoC(self, num_designs=num_designs)
# Get configuration of random SoC creator
randsoc_config_path = ROOT_PATH / randsoc_config_path
assert randsoc_config_path.exists(), f"Config file {randsoc_config_path} does not exist"

# Create all random designs
self.rand_soc_tool = RandSoC(self, num_designs=num_designs, config_path=randsoc_config_path)

# Build each random design
for design in self.rand_soc_tool.outputs["design_tcl"]:
synth_tool = VivadoSynth(self, design.parent)
synth_tool.synth_build["tcl_sources"] = [str(design)]
Expand Down

0 comments on commit 2db02c8

Please sign in to comment.