Skip to content

Commit

Permalink
CR-1132341 - Update to aie_pl_test to support aie2 on v70 (Xilinx#7164)
Browse files Browse the repository at this point in the history
* Update to aie_pl_test to support aie2 on v70

Signed-off-by: Jeff Lin <[email protected]>

* Updated according to PR comments

Signed-off-by: Jeff Lin <[email protected]>

* Changes to use boost filesystem

Signed-off-by: Jeff Lin <[email protected]>

* Update related to PR comments

Signed-off-by: Jeff Lin <[email protected]>

* Updates related to latest PR comments
Updated xbutil validate so it works for both vck5000 and v70

Signed-off-by: Jeff Lin <[email protected]>

* Update error message when aie pl test files are not found

Signed-off-by: Jeff Lin <[email protected]>

* Updated copyright year for SubCmdValidate.cpp

Signed-off-by: Jeff Lin <[email protected]>

* Updated xbutil validate command

Signed-off-by: Jeff Lin <[email protected]>

* Modified checking for aie-pl test existance to check for json file instead of xclbin

Signed-off-by: Jeff Lin <[email protected]>

Signed-off-by: Jeff Lin <[email protected]>
Co-authored-by: Jeff Lin <[email protected]>
  • Loading branch information
jeffli-xilinx and Jeff Lin authored Jan 27, 2023
1 parent 21bcfe2 commit 94bcc5d
Show file tree
Hide file tree
Showing 9 changed files with 885 additions and 261 deletions.
9 changes: 5 additions & 4 deletions src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright (C) 2019-2022 Xilinx, Inc
// Copyright (C) 2022 Advanced Micro Devices, Inc. All rights reserved.
// Copyright (C) 2019-2023 Xilinx, Inc
// Copyright (C) 2022-2023 Advanced Micro Devices, Inc. All rights reserved.

// ------ I N C L U D E F I L E S -------------------------------------------
// Local - Include Files
Expand Down Expand Up @@ -279,7 +279,8 @@ runTestCase( const std::shared_ptr<xrt_core::device>& _dev, const std::string& p
{ "versal_23_bandwidth.py", "kernel_bw.exe" },
{ "host_mem_23_bandwidth.py", "hostmemory.exe" },
{ "xcl_vcu_test.exe", "xcl_vcu_test.exe"},
{ "xcl_iops_test.exe", "xcl_iops_test.exe"}
{ "xcl_iops_test.exe", "xcl_iops_test.exe"},
{ "aie_pl.exe", "aie_pl.exe"}
};

// Validate the legacy names
Expand Down Expand Up @@ -1318,7 +1319,7 @@ static std::vector<TestCollection> testSuite = {
{ create_init_test("hostmem-bw", "Run 'bandwidth kernel' when host memory is enabled", "bandwidth.xclbin"), hostMemBandwidthKernelTest },
{ create_init_test("bist", "Run BIST test", "verify.xclbin", true), bistTest },
{ create_init_test("vcu", "Run decoder test", "transcode.xclbin"), vcuKernelTest },
{ create_init_test("aie-pl", "Run AIE PL test", "vck5000_pcie_pl_controller.xclbin.xclbin"), aiePlTest }
{ create_init_test("aie-pl", "Run AIE PL test", "aie_control_config.json"), aiePlTest }
};


Expand Down
3 changes: 2 additions & 1 deletion tests/validate/aie_pl_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2022 Xilinx, Inc. All rights reserved.
# Copyright (C) 2022-2023 Xilinx, Inc. All rights reserved.
#
set(TESTNAME "aie_pl.exe")

Expand All @@ -16,6 +16,7 @@ add_executable(${TESTNAME}
../common/includes/cmdparser/cmdlineparser.cpp
../common/includes/logger/logger.cpp
src/pl_controller.cpp
src/pl_controller_aie2.cpp
src/host.cpp
)

Expand Down
121 changes: 83 additions & 38 deletions tests/validate/aie_pl_test/src/enums.hpp
Original file line number Diff line number Diff line change
@@ -1,47 +1,92 @@
/**
* Copyright (C) 2019-2022 Xilinx, Inc
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/*
* Copyright 2022-2023 Xilinx, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef _XF_PLCTRLAIE_ENUMS_HPP_
#define _XF_PLCTRLAIE_ENUMS_HPP_
namespace xf {
namespace plctrl {
namespace enums {
enum class aie_cmd

// re-use this code from "./core/edge/common/aie_parser.h"
struct tile_type
{
ADF_GRAPH_RUN = 0,
ADF_GRAPH_WAIT = 1,
ADF_GRAPH_RTP_UPDATE = 2,
ADF_GRAPH_RTP_READ = 3,
WAIT_FOR_DMA_IDLE = 4,
SET_DMA_BD_LENGTH = 5,
ENQUEUE_DMA_BD = 6,
LOAD_AIE_PM = 7,
SLEEP = 8,
HALT = 9,
SET_AIE_ITERATION = 10,
ENABLE_AIE_CORES = 11,
DISABLE_AIE_CORES = 12,
SYNC = 13,
LOOP_BEGIN = 14,
LOOP_END = 15,
SET_DMA_BD = 16,
UPDATE_AIE_RTP = 17
uint16_t row;
uint16_t col;
uint16_t itr_mem_row;
uint16_t itr_mem_col;
uint64_t itr_mem_addr;

bool is_trigger;
};
} // end of namespace enums
using namespace enums;
struct rtp_type
{
std::string name;

uint16_t selector_row;
uint16_t selector_col;
uint16_t selector_lock_id;
uint64_t selector_addr;

uint16_t ping_row;
uint16_t ping_col;
uint16_t ping_lock_id;
uint64_t ping_addr;

uint16_t pong_row;
uint16_t pong_col;
uint16_t pong_lock_id;
uint64_t pong_addr;

bool is_plrtp;
bool is_input;
bool is_async;
bool is_connected;
bool require_lock;
};
struct buffer_type
{
uint16_t row;
uint16_t col;
uint16_t ch_num;
uint16_t lock_id;
uint16_t bd_num;
bool s2mm;
};

enum CMD_TYPE {
ADF_GRAPH_RUN = 0,
ADF_GRAPH_WAIT = 1,
ADF_GRAPH_RTP_UPDATE = 2,
ADF_GRAPH_RTP_READ = 3,
WAIT_FOR_DMA_IDLE = 4,
SET_DMA_BD_LENGTH = 5,
ENQUEUE_DMA_BD = 6,
LOAD_AIE_PM = 7,
SLEEP = 8,
HALT = 9,
SET_AIE_ITERATION = 10,
ENABLE_AIE_CORES = 11,
DISABLE_AIE_CORES = 12,
SYNC = 13,
LOOP_BEGIN = 14,
LOOP_END = 15,
SET_DMA_BD = 16,
UPDATE_AIE_RTP = 17,
WRITE = 18,
};

} // end of namespace plctrl

} // end of pl
#endif
Loading

0 comments on commit 94bcc5d

Please sign in to comment.