diff --git a/aie_runtime_lib/AIE/aiesim/CMakeLists.txt b/aie_runtime_lib/AIE/aiesim/CMakeLists.txt index b62f624bad..ac39f4e417 100644 --- a/aie_runtime_lib/AIE/aiesim/CMakeLists.txt +++ b/aie_runtime_lib/AIE/aiesim/CMakeLists.txt @@ -7,7 +7,6 @@ set(INSTALLS - Makefile genwrapper_for_ps.cpp) diff --git a/aie_runtime_lib/AIE/aiesim/Makefile b/aie_runtime_lib/AIE/aiesim/Makefile deleted file mode 100644 index 722af0b6b6..0000000000 --- a/aie_runtime_lib/AIE/aiesim/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. -# # SPDX-License-Identifier: MIT - -# -# From one diretory up, you can invoke the simulator by typing -# > make -C sim -# -# If you want to change the host source file, you can redefine host: -# > make -C sim host=../yourhost.cpp -# -# Note: The host file location is relative to the folder or can -# be an absolute path -# - -MLIR_AIE_INSTALL = $(dir $(shell which aie-opt))/.. - -ifeq ($(host),) -host:=../../test.cpp -endif -ifeq ($(MLIR_AIE_SRC_DIR),) -MLIR_AIE_SRC_DIR:=. -endif -ifeq ($(XILINX_VITIS_AIETOOLS),) -XILINX_VITIS_AIETOOLS = $(dir $(shell which aiesimulator))/.. -endif - -MLIR_AIE_PROJ = $(notdir $(patsubst %/,%,$(dir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))))) - -.PHONY: all link sim clean -.NOTPARALLEL: -all: sim - -CC_ENV := (export LD_LIBRARY_PATH=${XILINX_VITIS_AIETOOLS}/lib/lnx64.o:$(LD_LIBRARY_PATH)) -CC := "${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/bin/g++" -CC_ARGS := -fPIC -fpermissive -c -std=c++17 -D__AIEARCH__=10 -DAIE_OPTION_SCALAR_FLOAT_ON_VECTOR -Wno-deprecated-declarations -DSC_INCLUDE_DYNAMIC_PROCESSES -D__AIESIM__ -D__PS_INIT_AIE__ -DXAIE_DEBUG -Og -flto -D main\(...\)=ps_main\(...\) -I${XILINX_VITIS_AIETOOLS}/include -I${XILINX_VITIS_AIETOOLS}/include/drivers/aiengine -I${XILINX_HLS}/include -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0 -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0/backward -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0/x86_64-pc-linux-gnu -I${XILINX_VITIS_AIETOOLS}/data/osci_systemc/include -I. -I$(MLIR_AIE_SRC_DIR) -I${XILINX_VITIS_AIETOOLS}/include/xtlm/include -I${XILINX_VITIS_AIETOOLS}/include/common_cpp/common_cpp_v1_0/include -I${MLIR_AIE_INSTALL}/runtime_lib/x86_64/test_lib/include -I../../ -I../ - -ps/test.o: $(host) - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/test_library.o: ${MLIR_AIE_INSTALL}/../runtime_lib/test_lib/test_library.cpp - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/genwrapper_for_ps.o: ps/genwrapper_for_ps.cpp - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/ps.so: ps/genwrapper_for_ps.o ps/test.o ps/test_library.o $(eval PATH:=$(XILINX_VITIS_AIETOOLS)/tps/lnx64/gcc/bin/:$(PATH)) - (${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/bin/g++ -o "ps/ps.so" ps/genwrapper_for_ps.o ps/test.o ps/test_library.o -Wl,--as-needed -shared -lxaiengine -lxioutils -ladf_api -lsystemc -lxtlm -flto -L ${XILINX_VITIS_AIETOOLS}/lib/lnx64.o -L${XILINX_VITIS_AIETOOLS}/data/osci_systemc/lib/lnx64) - -link: ps/ps.so - -sim: ps/ps.so - cd ../..; aiesimulator --pkg-dir=./$(MLIR_AIE_PROJ)/sim --dump-vcd foo - -clean: - (rm -rf ps/*.o ps/*.so *.log aiesimulator_output *vcd) diff --git a/aie_runtime_lib/AIE2/aiesim/CMakeLists.txt b/aie_runtime_lib/AIE2/aiesim/CMakeLists.txt index f47215010e..977fdccc7c 100644 --- a/aie_runtime_lib/AIE2/aiesim/CMakeLists.txt +++ b/aie_runtime_lib/AIE2/aiesim/CMakeLists.txt @@ -7,7 +7,6 @@ set(INSTALLS - Makefile genwrapper_for_ps.cpp) diff --git a/aie_runtime_lib/AIE2/aiesim/Makefile b/aie_runtime_lib/AIE2/aiesim/Makefile deleted file mode 100644 index 1e7c476b7a..0000000000 --- a/aie_runtime_lib/AIE2/aiesim/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (C) 2022, Advanced Micro Devices, Inc. All rights reserved. -# # SPDX-License-Identifier: MIT - -# -# From one diretory up, you can invoke the simulator by typing -# > make -C sim -# -# If you want to change the host source file, you can redefine host: -# > make -C sim host=../yourhost.cpp -# -# Note: The host file location is relative to the folder or can -# be an absolute path -# - -MLIR_AIE_INSTALL = $(dir $(shell which aie-opt))/.. - -ifeq ($(host),) -host:=../../test.cpp -endif -ifeq ($(MLIR_AIE_SRC_DIR),) -MLIR_AIE_SRC_DIR:=. -endif -ifeq ($(XILINX_VITIS_AIETOOLS),) -XILINX_VITIS_AIETOOLS = $(dir $(shell which aiesimulator))/.. -endif - -MLIR_AIE_PROJ = $(notdir $(patsubst %/,%,$(dir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))))) - -.PHONY: all link sim clean -.NOTPARALLEL: -all: sim - -CC_ENV := (export LD_LIBRARY_PATH=${XILINX_VITIS_AIETOOLS}/lib/lnx64.o:$(LD_LIBRARY_PATH)) -CC := "${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/bin/g++" -CC_ARGS := -fPIC -fpermissive -c -std=c++17 -D__AIEARCH__=20 -DAIE_OPTION_SCALAR_FLOAT_ON_VECTOR -DAIE2_FP32_EMULATION_ACCURACY_FAST -Wno-deprecated-declarations -DSC_INCLUDE_DYNAMIC_PROCESSES -D__AIESIM__ -D__PS_INIT_AIE__ -DXAIE_DEBUG -Og -flto -D main\(...\)=ps_main\(...\) -I${XILINX_VITIS_AIETOOLS}/include -I${XILINX_VITIS_AIETOOLS}/include/drivers/aiengine -I${XILINX_HLS}/include -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0 -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0/backward -I${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/include/c++/8.3.0/x86_64-pc-linux-gnu -I${XILINX_VITIS_AIETOOLS}/data/osci_systemc/include -I. -I$(MLIR_AIE_SRC_DIR) -I${XILINX_VITIS_AIETOOLS}/include/xtlm/include -I${XILINX_VITIS_AIETOOLS}/include/common_cpp/common_cpp_v1_0/include -I${MLIR_AIE_INSTALL}/runtime_lib/x86_64/test_lib/include -I../../ -I../ - -ps/test.o: $(host) - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/test_library.o: ${MLIR_AIE_INSTALL}/../runtime_lib/test_lib/test_library.cpp - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/genwrapper_for_ps.o: ps/genwrapper_for_ps.cpp - $(CC_ENV);$(CC) $(CC_ARGS) -o $@ $< - -ps/ps.so: ps/genwrapper_for_ps.o ps/test.o ps/test_library.o $(eval PATH:=$(XILINX_VITIS_AIETOOLS)/tps/lnx64/gcc/bin/:$(PATH)) - (${XILINX_VITIS_AIETOOLS}/tps/lnx64/gcc/bin/g++ -o "ps/ps.so" ps/genwrapper_for_ps.o ps/test.o ps/test_library.o -Wl,--as-needed -shared -lxaiengine -lxioutils -ladf_api -lsystemc -lxtlm -flto -L ${XILINX_VITIS_AIETOOLS}/lib/lnx64.o -L${XILINX_VITIS_AIETOOLS}/data/osci_systemc/lib/lnx64) - -link: ps/ps.so - -sim: ps/ps.so - cd ../..; aiesimulator --pkg-dir=./$(MLIR_AIE_PROJ)/sim --dump-vcd foo - -clean: - (rm -rf ps/*.o ps/*.so *.log aiesimulator_output *vcd) diff --git a/python/compiler/aiecc/main.py b/python/compiler/aiecc/main.py index 62dd87190b..7df9a9cf07 100644 --- a/python/compiler/aiecc/main.py +++ b/python/compiler/aiecc/main.py @@ -801,7 +801,6 @@ def make_sim_dir(x): "test_lib", "include", ) - sim_makefile = os.path.join(runtime_simlib_path, "Makefile") sim_genwrapper = os.path.join(runtime_simlib_path, "genwrapper_for_ps.cpp") file_physical = self.prepend_tmp("input_physical.mlir") memory_allocator = os.path.join( @@ -893,8 +892,6 @@ def make_sim_dir(x): ], ) ) - processes.append(self.do_call(task, ["cp", sim_makefile, sim_dir])) - processes.append(self.do_call(task, ["cp", sim_genwrapper, sim_ps_dir])) processes.append( self.do_call( task, @@ -905,7 +902,7 @@ def make_sim_dir(x): "-shared", "-o", os.path.join(sim_ps_dir, "ps.so"), - os.path.join(runtime_simlib_path, "genwrapper_for_ps.cpp"), + sim_genwrapper, *aie_target_defines(aie_target), *host_opts, *sim_cc_args,