Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolberg committed Oct 18, 2024
1 parent 02399ac commit 8cfdc88
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/modules/OPAECompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ function(opae_add_executable)
target_compile_definitions(${OPAE_ADD_EXECUTABLE_TARGET}
PRIVATE
HAVE_CONFIG_H=1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${OPAE_ADD_EXECUTABLE_TARGET}
PRIVATE
LIBOPAE_DEBUG=1)
endif()
# endif()

target_link_libraries(${OPAE_ADD_EXECUTABLE_TARGET} ${OPAE_ADD_EXECUTABLE_LIBS})

Expand Down Expand Up @@ -278,11 +278,11 @@ function(opae_add_shared_library)
target_compile_definitions(${OPAE_ADD_SHARED_LIBRARY_TARGET}
PRIVATE
HAVE_CONFIG_H=1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${OPAE_ADD_SHARED_LIBRARY_TARGET}
PRIVATE
LIBOPAE_DEBUG=1)
endif()
# endif()

if(OPAE_ADD_SHARED_LIBRARY_VERSION AND OPAE_ADD_SHARED_LIBRARY_SOVERSION)
set_target_properties(${OPAE_ADD_SHARED_LIBRARY_TARGET} PROPERTIES
Expand Down Expand Up @@ -374,11 +374,11 @@ function(opae_add_module_library)
target_compile_definitions(${OPAE_ADD_MODULE_LIBRARY_TARGET}
PRIVATE
HAVE_CONFIG_H=1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${OPAE_ADD_MODULE_LIBRARY_TARGET}
PRIVATE
LIBOPAE_DEBUG=1)
endif()
# endif()

target_link_libraries(${OPAE_ADD_MODULE_LIBRARY_TARGET} ${OPAE_ADD_MODULE_LIBRARY_LIBS})

Expand Down Expand Up @@ -460,11 +460,11 @@ function(opae_add_static_library)
PRIVATE
PIC=1
HAVE_CONFIG_H=1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_compile_definitions(${OPAE_ADD_STATIC_LIBRARY_TARGET}
PRIVATE
LIBOPAE_DEBUG=1)
endif()
# endif()

target_link_libraries(${OPAE_ADD_STATIC_LIBRARY_TARGET}
${OPAE_ADD_STATIC_LIBRARY_LIBS})
Expand Down
9 changes: 9 additions & 0 deletions samples/mem_tg/tg_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <string>
#include <condition_variable>
#include <mutex>
#include <cinttypes>

#include "afu_test.h"
#include "mem_tg.h"
Expand Down Expand Up @@ -169,10 +170,18 @@ class tg_test : public test_command
tg_exe_->write32(tg_exe_->tg_offset_+TG_LOOP_COUNT, tg_exe_->loop_);
tg_exe_->write32(tg_exe_->tg_offset_+TG_WRITE_COUNT, tg_exe_->wcnt_);
tg_exe_->write32(tg_exe_->tg_offset_+TG_READ_COUNT, tg_exe_->rcnt_);
printf("[%s] read TG_SEQ_START_ADDR_WR_L = 0x%" PRIx32 "\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_L));
printf("[%s] read TG_SEQ_START_ADDR_WR_H = 0x%" PRIx32 "\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_H));
printf("[%s] read TG_SEQ_START_ADDR_RD_L = 0x%" PRIx32 "\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_L));
printf("[%s] read TG_SEQ_START_ADDR_RD_H = 0x%" PRIx32 "\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_H));
tg_exe_->write32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_L, tg_exe_->waddr_ & 0xFFFFFFFF);
tg_exe_->write32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_H, tg_exe_->waddr_ >> 32);
tg_exe_->write32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_L, tg_exe_->raddr_ & 0xFFFFFFFF);
tg_exe_->write32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_H, tg_exe_->raddr_ >> 32);
printf("[%s] wrote TG_SEQ_START_ADDR_WR_L = 0x%" PRIx32 " (expected 0x%" PRIx64 ")\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_L), tg_exe_->waddr_ & 0xFFFFFFFF);
printf("[%s] wrote TG_SEQ_START_ADDR_WR_H = 0x%" PRIx32 " (expected 0x%" PRIx64 ")\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_WR_H), tg_exe_->waddr_ >> 32);
printf("[%s] wrote TG_SEQ_START_ADDR_RD_L = 0x%" PRIx32 " (expected 0x%" PRIx64 ")\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_L), tg_exe_->raddr_ & 0xFFFFFFFF);
printf("[%s] wrote TG_SEQ_START_ADDR_RD_H = 0x%" PRIx32 " (expected 0x%" PRIx64 ")\n", tg_exe_->mem_ch_[0].c_str(), tg_exe_->read32(tg_exe_->tg_offset_+TG_SEQ_START_ADDR_RD_H), tg_exe_->raddr_ >> 32);
tg_exe_->write32(tg_exe_->tg_offset_+TG_BURST_LENGTH, tg_exe_->bcnt_);
tg_exe_->write32(tg_exe_->tg_offset_+TG_SEQ_ADDR_INCR, tg_exe_->stride_);
tg_exe_->write32(tg_exe_->tg_offset_+TG_PPPG_SEL, tg_exe_->pattern_);
Expand Down

0 comments on commit 8cfdc88

Please sign in to comment.