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

4 - Full accl support #990

Open
wants to merge 137 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
fe592d5
First steps to supporting accl
cantbeblank24 Oct 4, 2023
39f63dd
Add partition map decorator
cantbeblank24 Oct 6, 2023
af71aeb
Link with cclo bfm
cantbeblank24 Oct 10, 2023
b32cae9
Fix recvbuf bug
cantbeblank24 Oct 11, 2023
4ab3592
Fix accl setup
cantbeblank24 Oct 13, 2023
fca31d8
Fix inputs, outputs
cantbeblank24 Oct 14, 2023
966cb4f
Enable IpGen for ACCL nodes
cantbeblank24 Oct 17, 2023
8d041ca
Fix distributed verification
cantbeblank24 Oct 28, 2023
09d90fa
Rework build flow
cantbeblank24 Oct 28, 2023
d619f33
Restore things to dev
cantbeblank24 Oct 28, 2023
d639540
Cleanup stuff
cantbeblank24 Oct 30, 2023
1b5dc9a
Add axilite interface
cantbeblank24 Nov 6, 2023
69b660f
Add accl submodule
cantbeblank24 Nov 6, 2023
8dfd8b9
Fix issues with synthesis
Nov 9, 2023
d11636e
Fix issues with synthesis
Nov 9, 2023
f28ea54
Merge branch 'accl' of gitlab.ethz.ch:streichg/finn into accl
cantbeblank24 Nov 9, 2023
aa926d9
Fix create stitched IP add start and stop steps
cantbeblank24 Nov 10, 2023
ec43c7d
Update intf fields
Nov 17, 2023
535c45b
Update build scripts
cantbeblank24 Nov 20, 2023
c8d2e55
Compile conv net
Nov 20, 2023
c750280
Remove ap_ctrl_none
Nov 26, 2023
ac53356
Fix bug
cantbeblank24 Nov 27, 2023
ae8ac44
Block until there is data on the stream
cantbeblank24 Nov 27, 2023
174f6f3
Add control port
Nov 29, 2023
1f7643b
Merge branch 'accl' of gitlab.ethz.ch:streichg/finn into accl
cantbeblank24 Nov 29, 2023
3b993cf
Add interface widths
cantbeblank24 Nov 29, 2023
cfa54bb
Three partitions
cantbeblank24 Nov 29, 2023
4e12c67
Clean up code
cantbeblank24 Nov 29, 2023
504ec97
Leave out changes to build flow for now
cantbeblank24 Nov 30, 2023
d08d4c3
Use lower level function for issuing command
cantbeblank24 Nov 30, 2023
99e93d8
Remove changes to create stitched ip from PR
cantbeblank24 Nov 30, 2023
2f8840a
Add tests
cantbeblank24 Dec 1, 2023
c69bce3
Remove partitioning
cantbeblank24 Dec 2, 2023
14429f2
Run pre-commit hooks
cantbeblank24 Dec 2, 2023
a1f6b9f
Fix accl root
cantbeblank24 Dec 2, 2023
c14d469
Add support for coyote shell
ADGLY Nov 16, 2023
3ac3384
Remove connect multiple
ADGLY Nov 18, 2023
3f23e61
Cleanup
ADGLY Nov 18, 2023
2f25280
Support for chaining interconnects
ADGLY Nov 16, 2023
ff20822
Fix axilite addr width
ADGLY Nov 19, 2023
9503700
Make max amount of output parametrizable
ADGLY Nov 19, 2023
ef0f77e
Fix base address for inner interconnects
ADGLY Nov 19, 2023
a8d17ef
Use wrapper file
ADGLY Dec 28, 2023
e75d3dc
Generate width converters
ADGLY Dec 28, 2023
4d954a9
Add HLS bridge
ADGLY Dec 28, 2023
e06cf04
Add address map
ADGLY Jan 5, 2024
e4f1031
Fix chaining interconnects
ADGLY Jan 7, 2024
087ed8b
Prevent creation of interconnect if only one axilite
ADGLY Jan 7, 2024
23cdb74
Fix comments
ADGLY Jan 12, 2024
e3f971a
Add ACCL support
ADGLY Jan 7, 2024
c971219
Test fix weight index
ADGLY Jan 9, 2024
1e22001
Add ACCL mode
ADGLY Jan 12, 2024
ba230ff
Cleanup
ADGLY Jan 12, 2024
ecf2fcc
Fix assertion for weight update
ADGLY Jan 13, 2024
b5b073a
Add early return
cantbeblank24 Jan 14, 2024
3712e63
Setup accl connections
cantbeblank24 Jan 15, 2024
bc1cca6
Apply end to end fixes
Feb 5, 2024
7b1715a
Add custom ipgen cflags
cantbeblank24 Jan 15, 2024
26a72b4
Add ACCLIn as valid start node
Feb 5, 2024
746b806
Merge remote-tracking branch 'fpga/dev' into georg/accl-finn
Feb 5, 2024
16bfff3
Add distributed build function
cantbeblank24 Jan 14, 2024
41ceefd
Add split dataflow transformation
cantbeblank24 Jan 14, 2024
53f6520
Dispatch distributed build from existing build dataflow function
cantbeblank24 Jan 14, 2024
091f018
Fixes
Feb 5, 2024
eb5e630
Merge remote-tracking branch 'xilinx/dev' into georg/accl-finn
Feb 5, 2024
381d009
Merge remote-tracking branch 'xilinx/dev' into georg/distributed_build
Feb 5, 2024
ce4f255
Merge remote-tracking branch 'xilinx/dev' into georg/coyote_changes
Feb 5, 2024
72e3afb
Merge branch 'georg/distributed_build' into georg/accl-build
Feb 5, 2024
4064440
Add accl build step
Feb 5, 2024
6554aa7
Add accl download utils
Feb 5, 2024
513e14e
Merge branch 'georg/distributed_build' into georg/end2end
Feb 5, 2024
7a2e4fd
Merge branch 'georg/accl-build' into georg/end2end
Feb 5, 2024
e68518e
Merge branch 'georg/coyote_changes' into georg/end2end
Feb 5, 2024
209e415
Fix accl utils
Feb 7, 2024
e756e62
Fix node io
Feb 7, 2024
9be51cc
Merge branch 'georg/accl-finn' into georg/end2end
Feb 7, 2024
0882ab6
Merge branch 'georg/accl-build' into georg/end2end
Feb 7, 2024
0fa0f52
Remove ACCL ROOT from dockerfile
Feb 10, 2024
cd1693c
Merge branch 'georg/accl-finn' into georg/end2end
Feb 10, 2024
2e1af9b
Fix accl utils
Feb 7, 2024
e337d7d
Merge branch 'georg/accl-build' into georg/end2end
Feb 10, 2024
4486498
Fix accl utils
Feb 7, 2024
b1af2a9
Merge branch 'georg/accl-build' into georg/end2end
Feb 13, 2024
7daaff2
[Deps] Update finn-experimental commit
auphelia Nov 17, 2023
060dcba
[Floorplan] Fix incorrect break and indent
auphelia Nov 17, 2023
351070d
[Deps] Update finn-experimental commit to main
auphelia Nov 17, 2023
7b6c9b4
[Tests] Update export to qonnx export
auphelia Nov 24, 2023
9ed5f7b
AXI stream data width converter for integer ratios.
preusser Nov 21, 2023
fd65756
[rtllib] Rename clk, rst in dwc module and first draft of verilog wra…
auphelia Nov 22, 2023
da8d173
[CustomOp] Initial draft of custom op for dwc rtl component
auphelia Nov 22, 2023
26fac59
[Transformation] Extend InsertDWC to derive rtl variant when selected
auphelia Nov 22, 2023
ef36a86
Fix clock association and polarity of reset.
preusser Nov 22, 2023
23ab1d9
[Test] Extend dwc testing to test rtl variant of node
auphelia Nov 22, 2023
7877fbe
[Transformation] Use RTL DWC by default
auphelia Nov 22, 2023
d4ce8ef
Extended AXI-lite data bus to next full byte boundary.
preusser Nov 24, 2023
3ca6f3b
[DWC] Add additional sv file to list of files to copy
auphelia Nov 24, 2023
a28f174
[Tests] Remove saving of waveform for dwc test
auphelia Nov 28, 2023
663ddbd
Add support for coyote shell
ADGLY Nov 16, 2023
20131b7
Remove connect multiple
ADGLY Nov 18, 2023
086885c
Cleanup
ADGLY Nov 18, 2023
2fffb41
Support for chaining interconnects
ADGLY Nov 16, 2023
9b11916
Fix axilite addr width
ADGLY Nov 19, 2023
4b1c78b
Make max amount of output parametrizable
ADGLY Nov 19, 2023
25b9ba8
Fix base address for inner interconnects
ADGLY Nov 19, 2023
baa263f
Use wrapper file
ADGLY Dec 28, 2023
8816183
Generate width converters
ADGLY Dec 28, 2023
75e3396
Add HLS bridge
ADGLY Dec 28, 2023
8e7bccf
Add address map
ADGLY Jan 5, 2024
046ecc4
Fix chaining interconnects
ADGLY Jan 7, 2024
de6417f
Prevent creation of interconnect if only one axilite
ADGLY Jan 7, 2024
cbc38ec
Fix comments
ADGLY Jan 12, 2024
bcd7d1e
Add ACCL support
ADGLY Jan 7, 2024
a8b7fe5
Test fix weight index
ADGLY Jan 9, 2024
462949a
Add ACCL mode
ADGLY Jan 12, 2024
bc389a2
Cleanup
ADGLY Jan 12, 2024
0d209e9
Fix assertion for weight update
ADGLY Jan 13, 2024
7d868c4
Fix standalone mode
ADGLY Feb 3, 2024
127086b
Fix Coyote upper limit
ADGLY Feb 5, 2024
2f73653
Disable ACCL mode
ADGLY Feb 14, 2024
e404c39
Merge remote-tracking branch 'origin/georg/end2end' into full_accl_su…
ADGLY Feb 16, 2024
c2a7338
Fixes to make new version work
ADGLY Feb 16, 2024
0625163
Fix ap_ctrl
cantbeblank24 Feb 16, 2024
670fe76
Merge branch 'georg/accl-finn' into full_accl_support
cantbeblank24 Feb 16, 2024
17159ea
Fix interface accl in
ADGLY Feb 16, 2024
a9daa9d
Merge branch 'full_accl_support' of github.com:fpgasystems/finn into …
ADGLY Feb 16, 2024
a3afa68
Revert if
ADGLY Feb 18, 2024
c171bc1
Remove wait for ack
Feb 20, 2024
af6fb9b
Merge branch 'georg/accl-finn' into full_accl_support
Feb 20, 2024
f72397b
Remove wait for ack
Feb 20, 2024
3e82bd7
Fix accl utils
Feb 7, 2024
4b64318
Merge branch 'georg/accl-finn' into full_accl_support
Feb 20, 2024
e1934bd
Merge branch 'georg/accl-build' into full_accl_support
Feb 20, 2024
09edbe7
Cleanup
ADGLY Feb 21, 2024
70024b5
Add None check on steps
ADGLY Feb 21, 2024
10bb603
Remvoe temporary model save
ADGLY Feb 22, 2024
88882fb
Merge remote-tracking branch 'upstream/dev' into adegendt/final/full_…
ADGLY Feb 22, 2024
033594f
Revert brevitas repo
ADGLY Feb 22, 2024
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
29 changes: 29 additions & 0 deletions custom_hls/accl/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
cmake_minimum_required(VERSION 3.9)
project(node_model)

set(CMAKE_CXX_STANDARD 17)

add_subdirectory($ENV{ACCL_ROOT}/test/model/bfm ${CMAKE_CURRENT_BINARY_DIR}/bfm)
add_subdirectory($ENV{ACCL_ROOT}/driver/utils/accl_network_utils
${CMAKE_CURRENT_BINARY_DIR}/accl_network_utils
)

file(GLOB NODE_SRCS ${CODE_GEN_DIR}/*.cpp $ENV{FINN_ROOT}/deps/cnpy/cnpy.cpp)

add_executable(node_model ${NODE_SRCS})

set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES /usr/local/lib ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES})

target_link_libraries(node_model PRIVATE z vnx network_roce_v2 zmq zmqpp cclobfm accl_network_utils)
target_include_directories(node_model PRIVATE
$ENV{FINN_ROOT}/src/finn/qnn-data/cpp
$ENV{FINN_ROOT}/deps/cnpy
$ENV{FINN_ROOT}/deps/finn-hlslib
$ENV{FINN_ROOT}/custom_hls
$ENV{HLS_PATH}/include
)

set_target_properties(node_model
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CODE_GEN_DIR}
)
120 changes: 120 additions & 0 deletions custom_hls/accl/funcs.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
#pragma once

#ifdef CPPSIM
#include <iostream>
#endif

const size_t accl_width = 512;

template<unsigned int stream_width, unsigned int num_bits, unsigned int step>
void accl_out(
unsigned int dest_rank,
ap_uint<32> comm_adr,
ap_uint<32> dpcfg_adr,
STREAM<command_word> &cmd_to_cclo,
STREAM<command_word> &sts_from_cclo,
STREAM<stream_word> &data_to_cclo,
hls::stream<ap_uint<stream_width>> &in
) {
STREAM<stream_word> data_from_cclo;

if (in.empty()) {
// Wait until we have some input to make sure that the driver has time to configure
// the node.
return;
}

ap_uint<32> cflags = 0;
ap_uint<32> sflags = 3;
accl_hls::ACCLCommand accl(
cmd_to_cclo, sts_from_cclo,
comm_adr, dpcfg_adr,
cflags, sflags
);
accl_hls::ACCLData data(data_to_cclo, data_from_cclo);

ap_uint<accl_width> accl_word;
ap_uint<stream_width> stream_word;

#ifdef CPPSIM
std::cerr << "accl_out starting to output data to rank " << dest_rank << " (" << num_bits << " bits)" << std::endl;
#endif

int num_transfer_bits = ((num_bits + accl_width - 1) / accl_width) * accl_width;

send: for (int i = 0; i < num_bits - step + 1; i += step) {
if (i % stream_width == 0) {
stream_word = in.read();
}

int ni = i + step - 1;

accl_word(ni % accl_width, i % accl_width) =
stream_word(ni % stream_width, i % stream_width);

if ((ni + 1) % accl_width == 0) {
data.push(accl_word, 0);
}
}

if (num_bits < num_transfer_bits) {
data.push(accl_word, 0);
}

unsigned int data_from_cclo_id = 9;

// Currently the hls driver does not allow us to call stream_put in a non-blocking
// way. So we call the lower level function directly.
accl.start_call(
ACCL_SEND, num_transfer_bits / 32,
comm_adr, dest_rank, 0, data_from_cclo_id,
dpcfg_adr, cflags, sflags | 0x2,
0, 0, 0
);

#ifdef CPPSIM
std::cerr << "accl_out waiting on ack" << std::endl;
#endif

accl.finalize_call();

#ifdef CPPSIM
std::cerr << "accl_out finished" << std::endl;
#endif
}

template<unsigned int stream_width, unsigned int num_bits, unsigned int step>
void accl_in(
unsigned int source,
STREAM<stream_word> &data_from_cclo,
hls::stream<ap_uint<stream_width>> &out
) {
STREAM<stream_word> data_to_cclo;
accl_hls::ACCLData data(data_to_cclo, data_from_cclo);

ap_uint<accl_width> accl_word;
ap_uint<stream_width> stream_word;

#ifdef CPPSIM
std::cerr << "accl_in starting to receive data from rank " << source << " (" << num_bits << " bits)" << std::endl;
#endif

recv: for (int i = 0; i < num_bits - step + 1; i += step) {
if (i % accl_width == 0) {
accl_word = data.pull().data;
}

int ni = i + step - 1;

stream_word(ni % stream_width, i % stream_width) =
accl_word(ni % accl_width, i % accl_width);

if ((ni + 1) % stream_width == 0) {
out.write(stream_word);
}
}

#ifdef CPPSIM
std::cerr << "accl_in finished" << std::endl;
#endif
}
43 changes: 43 additions & 0 deletions custom_hls/accl/sim.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#include <iostream>
#include <memory>

#include <accl.hpp>
#include <accl_network_utils.hpp>

#include "cclo_bfm.h"

std::unique_ptr<ACCL::ACCL> init_accl(
unsigned int world_size,
unsigned int rank,
unsigned int start_port
) {
accl_network_utils::acclDesign design = accl_network_utils::acclDesign::AXIS3x;

std::vector<ACCL::rank_t> ranks;
ranks = accl_network_utils::generate_ranks(true, rank, world_size, start_port, 16 * 1024);
return accl_network_utils::initialize_accl(ranks, rank, true, design);
}

std::unique_ptr<CCLO_BFM> init_cclo_and_wait_for_input(
unsigned int zmqport,
unsigned int rank,
unsigned int world_size,
hlslib::Stream<command_word> &cmd_to_cclo,
hlslib::Stream<command_word> &sts_from_cclo,
hlslib::Stream<stream_word> &data_from_cclo,
hlslib::Stream<stream_word> &data_to_cclo
) {
std::vector<unsigned int> dest{9};

auto cclo = std::make_unique<CCLO_BFM>(zmqport, rank, world_size, dest,
cmd_to_cclo, sts_from_cclo, data_from_cclo, data_to_cclo);

cclo->run();

// Makeshift barrier
std::cout << "CCLO BFM started" << std::endl;
std::string inp;
std::cin >> inp;

return cclo;
}
19 changes: 18 additions & 1 deletion docker/Dockerfile.finn
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,19 @@ RUN apt-get update && \
python-is-python3 \
python3-pip \
python3-setuptools-scm \
python3-venv
python3-venv \
# support Coyote
cmake \
# support ACCL
xvfb \
libgtk-3-dev \
libtinfo5 \
doxygen \
libboost-dev \
libjsoncpp-dev \
libtclap-dev \
libzmq3-dev

RUN echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
RUN locale-gen "en_US.UTF-8"

Expand Down Expand Up @@ -125,6 +137,11 @@ RUN pip install tokenize-rt==4.2.1
# pyverilator
RUN pip install tclwrapper==0.0.1

RUN git clone https://github.com/zeromq/zmqpp && \
cd zmqpp && \
make && \
make install PREFIX=/usr/

# extra environment variables for FINN compiler
ENV VIVADO_IP_CACHE "/tmp/vivado_ip_cache"

Expand Down
62 changes: 62 additions & 0 deletions src/finn/builder/build_dataflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
import sys
import time
import traceback
from concurrent import futures
from copy import deepcopy
from qonnx.core.modelwrapper import ModelWrapper
from qonnx.custom_op.registry import getCustomOp

from finn.builder.build_dataflow_config import (
DataflowBuildConfig,
Expand Down Expand Up @@ -108,6 +111,10 @@ def build_dataflow_cfg(model_filename, cfg: DataflowBuildConfig):
:param model_filename: ONNX model filename to build
:param cfg: Build configuration
"""
# Dispatch a distributed build if we are splitting up the model as part of the build.
if cfg.steps is not None and "step_split_dataflow" in cfg.steps:
build_distributed_dataflow_cfg(model_filename, cfg)

# if start_step is specified, override the input model
if cfg.start_step is None:
print("Building dataflow accelerator from " + model_filename)
Expand Down Expand Up @@ -189,6 +196,61 @@ def build_dataflow_cfg(model_filename, cfg: DataflowBuildConfig):
return 0


def run_async_build_iter(cfg, local_cfg, node, i):
# TODO: Make the output dir match the rank of the partition
local_cfg.output_dir = f"{cfg.output_dir}/{i}"

node_inst = getCustomOp(node)
child_model_filename = node_inst.get_nodeattr("model")

print(f"Launching build for partition {i}")
build_dataflow_cfg(child_model_filename, local_cfg)


def build_distributed_dataflow_cfg(model_filename, cfg: DataflowBuildConfig):
steps = resolve_build_steps(cfg, partial=False)
step_names = list(map(lambda x: x.__name__, steps))

# TODO: Not sure if splitting up the config implicitly up is the best way to do this.
# Maybe it would be better for the user to explicitly provide global and local build
# configs.

split_step = "step_split_dataflow"
if split_step not in step_names:
print("Dataflow should be split up as part of distributed build")
return -1

split_idx = step_names.index(split_step) + 1

global_cfg = deepcopy(cfg)
global_cfg.steps = steps[:split_idx]

local_cfg = deepcopy(cfg)
local_cfg.steps = steps[split_idx:]

if not cfg.save_intermediate_models:
print("save_intermediate_models must be enabled for distributed build")
return -1

if not cfg.start_step or cfg.start_step in step_names[:split_idx]:
if build_dataflow_cfg(model_filename, global_cfg) != 0:
print("Global build failed")
return -1

local_cfg.start_step = None

if cfg.stop_step and cfg.stop_step in step_names[:split_idx]:
return 0

intermediate_models_dir = cfg.output_dir + "/intermediate_models"
parent_model = ModelWrapper(f"{intermediate_models_dir}/{split_step}.onnx")

sdp_nodes = parent_model.get_nodes_by_op_type("StreamingDataflowPartition")
with futures.ProcessPoolExecutor() as pool:
for i, node in enumerate(sdp_nodes):
pool.submit(run_async_build_iter, cfg, local_cfg, node, i)


def build_dataflow_directory(path_to_cfg_dir: str):
"""Best-effort build a dataflow accelerator from the specified directory.

Expand Down
18 changes: 15 additions & 3 deletions src/finn/builder/build_dataflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ShellFlowType(str, Enum):

VIVADO_ZYNQ = "vivado_zynq"
VITIS_ALVEO = "vitis_alveo"
COYOTE_ALVEO = "coyote_alveo"


class DataflowOutputType(str, Enum):
Expand Down Expand Up @@ -104,6 +105,8 @@ class VerificationStepType(str, Enum):
STREAMLINED_PYTHON = "streamlined_python"
#: verify after step_apply_folding_config, using C++ for each HLS node
FOLDED_HLS_CPPSIM = "folded_hls_cppsim"
#: verify after step_insert_accl, using C++ for each HLS node
ACCL_HLS_CPPSIM = "insert_accl"
#: verify after step_create_stitched_ip, using stitched-ip Verilog
STITCHED_IP_RTLSIM = "stitched_ip_rtlsim"

Expand Down Expand Up @@ -291,18 +294,21 @@ class DataflowBuildConfig:

#: Which Vitis platform will be used.
#: Only relevant when `shell_flow_type = ShellFlowType.VITIS_ALVEO`
# or `shell_flow_type = ShellFlowType.COYOTE_ALVEO`
#: e.g. "xilinx_u250_xdma_201830_2"
#: If not specified but "board" is specified, will use the FINN
#: default (if any) for that Alveo board
vitis_platform: Optional[str] = None

#: Path to JSON config file assigning each layer to an SLR.
#: Only relevant when `shell_flow_type = ShellFlowType.VITIS_ALVEO`
# or `shell_flow_type = ShellFlowType.COYOTE_ALVEO`
#: Will be applied with :py:mod:`qonnx.transformation.general.ApplyConfig`
vitis_floorplan_file: Optional[str] = None

#: Vitis optimization strategy
#: Only relevant when `shell_flow_type = ShellFlowType.VITIS_ALVEO`
# or `shell_flow_type = ShellFlowType.COYOTE_ALVEO`
vitis_opt_strategy: Optional[VitisOptStrategyCfg] = VitisOptStrategyCfg.DEFAULT

#: Whether intermediate ONNX files will be saved during the build process.
Expand Down Expand Up @@ -361,7 +367,10 @@ def _resolve_hls_clk_period(self):
def _resolve_driver_platform(self):
if self.shell_flow_type == ShellFlowType.VIVADO_ZYNQ:
return "zynq-iodma"
elif self.shell_flow_type == ShellFlowType.VITIS_ALVEO:
elif (
self.shell_flow_type == ShellFlowType.VITIS_ALVEO
or self.shell_flow_type == ShellFlowType.COYOTE_ALVEO
):
return "alveo"
else:
raise Exception("Couldn't resolve driver platform for " + str(self.shell_flow_type))
Expand All @@ -371,7 +380,10 @@ def _resolve_fpga_part(self):
# lookup from part map if not specified
if self.shell_flow_type == ShellFlowType.VIVADO_ZYNQ:
return pynq_part_map[self.board]
elif self.shell_flow_type == ShellFlowType.VITIS_ALVEO:
elif (
self.shell_flow_type == ShellFlowType.VITIS_ALVEO
or self.shell_flow_type == ShellFlowType.COYOTE_ALVEO
):
return alveo_part_map[self.board]
else:
raise Exception("Couldn't resolve fpga_part for " + self.board)
Expand Down Expand Up @@ -406,7 +418,7 @@ def _resolve_vitis_platform(self):
return alveo_default_platform[self.board]
else:
raise Exception(
"Could not resolve Vitis platform:" " need either board or vitis_platform specified"
"Could not resolve Vitis platform: need either board or vitis_platform specified"
)

def _resolve_verification_steps(self):
Expand Down
Loading