Skip to content

Commit 65a83b2

Browse files
committed
[Builder] Relax requirements to derive fpga part for specific board
1 parent ba0261f commit 65a83b2

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/finn/builder/build_dataflow_config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from typing import Any, List, Optional
3636

3737
from finn.transformation.fpgadataflow.vitis_build import VitisOptStrategy
38-
from finn.util.basic import alveo_default_platform, alveo_part_map, pynq_part_map
38+
from finn.util.basic import alveo_default_platform, part_map
3939

4040

4141
class AutoFIFOSizingMethod(str, Enum):
@@ -370,11 +370,10 @@ def _resolve_driver_platform(self):
370370
def _resolve_fpga_part(self):
371371
if self.fpga_part is None:
372372
# lookup from part map if not specified
373-
if self.shell_flow_type == ShellFlowType.VIVADO_ZYNQ:
374-
return pynq_part_map[self.board]
375-
elif self.shell_flow_type == ShellFlowType.VITIS_ALVEO:
376-
return alveo_part_map[self.board]
377-
else:
373+
try:
374+
fpga_part = part_map[self.board]
375+
return fpga_part
376+
except KeyError:
378377
raise Exception("Couldn't resolve fpga_part for " + self.board)
379378
else:
380379
# return as-is when explicitly specified

tests/fpgadataflow/test_fifosizing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def test_fifosizing_linear(method, topology):
7070
synth_clk_period_ns=10.0,
7171
board="Pynq-Z1",
7272
rtlsim_batch_size=100 if topology == "tfc" else 2,
73-
shell_flow_type=build_cfg.ShellFlowType.VIVADO_ZYNQ,
7473
generate_outputs=[
7574
build_cfg.DataflowOutputType.ESTIMATE_REPORTS,
7675
build_cfg.DataflowOutputType.STITCHED_IP,

0 commit comments

Comments
 (0)