diff --git a/test/npu-xrt/dynamic_object_fifo/sliding_window/test.cpp b/test/npu-xrt/dynamic_object_fifo/sliding_window/test.cpp index 648924ac4f..2ffbd6ba56 100644 --- a/test/npu-xrt/dynamic_object_fifo/sliding_window/test.cpp +++ b/test/npu-xrt/dynamic_object_fifo/sliding_window/test.cpp @@ -14,11 +14,11 @@ #include "xrt/xrt_kernel.h" #ifndef XCLBIN -#define XCLBIN "final.xclbin" +#define XCLBIN "build/final.xclbin" #endif #ifndef INSTS_TXT -#define INSTS_TXT "insts.txt" +#define INSTS_TXT "build/insts.txt" #endif #ifndef KERNEL_NAME @@ -33,6 +33,21 @@ #include "test_utils.h" +std::vector load_instr_sequence(std::string instr_path) { + std::ifstream instr_file(instr_path); + std::string line; + std::vector instr_v; + while (std::getline(instr_file, line)) { + std::istringstream iss(line); + uint32_t a; + if (!(iss >> std::hex >> a)) { + throw std::runtime_error("Unable to parse instruction file\n"); + } + instr_v.push_back(a); + } + return instr_v; +} + int main(int argc, const char *argv[]) { std::vector instr_v = test_utils::load_instr_sequence(INSTS_TXT);