Skip to content

Commit 187bf95

Browse files
committed
Disabling hw_Emu for dfx boards
1 parent ca3a5dd commit 187bf95

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

sys_opt/kernel_swap/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ VPP := v++
6464
SDCARD := sd_card
6565

6666
include $(ABS_COMMON_REPO)/common/includes/opencl/opencl.mk
67+
include ./config.mk
68+
6769
CXXFLAGS += $(opencl_CXXFLAGS) -Wall -O0 -g -std=c++11
6870
LDFLAGS += $(opencl_LDFLAGS)
6971

sys_opt/kernel_swap/config.mk

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright 2020 Xilinx, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
#Checks for g++
18+
ifneq ($(HOST_ARCH), x86)
19+
device_type := embedded
20+
endif

sys_opt/kernel_swap/description.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
"name": "generic launch for all flows"
8181
}
8282
],
83+
"config_make": "./config.mk",
8384
"contributors": [
8485
{
8586
"url": "http://www.xilinx.com",

sys_opt/kernel_swap/src/host.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,20 @@
1818
#include <vector>
1919

2020
#define LENGTH 1024
21+
#ifndef device_type
22+
#define device_type 1
23+
#endif
2124

2225
int main(int argc, char **argv) {
2326
// Command Line Parser
2427
sda::utils::CmdLineParser parser;
2528

29+
std::cout << "device_type : " << device_type << std::endl;
30+
if (device_type != 0 and xcl::is_hw_emulation()) {
31+
std::cout << "INFO: This example is not supported for dfx platforms for hw_emu" << std::endl;
32+
return EXIT_SUCCESS;
33+
}
34+
2635
// Switches
2736
//**************//"<Full Arg>", "<Short Arg>", "<Description>", "<Default>"
2837
parser.addSwitch("--xclbin_file_krnl_mmult", "-x1",

0 commit comments

Comments
 (0)