Skip to content

Commit

Permalink
Missing::
Browse files Browse the repository at this point in the history
  • Loading branch information
pvasireddy-amd committed Nov 6, 2024
1 parent dd87d0b commit 30b7f84
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions test/npu-xrt/dynamic_object_fifo/sliding_window/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +33,21 @@

#include "test_utils.h"

std::vector<uint32_t> load_instr_sequence(std::string instr_path) {
std::ifstream instr_file(instr_path);
std::string line;
std::vector<uint32_t> 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<uint32_t> instr_v = test_utils::load_instr_sequence(INSTS_TXT);
Expand Down

0 comments on commit 30b7f84

Please sign in to comment.