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 c25d9358f6..5c78b0e986 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 @@ -28,15 +28,27 @@ #define INPUT_SIZE (100 * sizeof(int)) // in bytes #define OUTPUT_SIZE (100 * sizeof(int)) // in bytes #define WIDTH_SIZE (10 * sizeof(int)) // in bytes -#define WIDTH 10 #define INPUT_ROWS INPUT_SIZE / WIDTH_SIZE #define OUTPUT_ROWS OUTPUT_SIZE / WIDTH_SIZE -#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); + std::vector instr_v = load_instr_sequence(INSTS_TXT); assert(instr_v.size() > 0); // Get a device handle