Skip to content

Commit

Permalink
mem_tg: print major and minor version
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolberg committed Nov 5, 2024
1 parent fd02872 commit 7c16751
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions samples/mem_tg/tg_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ class tg_test : public test_command
}
}

const uint64_t tg_version = tg_exe_->read64(TG_VERSION);
const uint64_t major_vers = (tg_version >> 12) & 0xf;
const uint64_t minor_vers = (tg_version >> 48) & 0xf;

const uint64_t mem_tg_ctrl = tg_exe_->read64(MEM_TG_CTRL);
const uint64_t num_channels = popcount64(mem_tg_ctrl);

Expand All @@ -299,6 +303,8 @@ class tg_test : public test_command
const uint64_t channels_per_noc = num_channels / num_nocs;
const uint64_t channel_width = bit_width64(channels_per_noc);

printf("[DEBUG] tg_major_vers = %" PRIu64 "\n", major_vers);
printf("[DEBUG] tg_minor_vers = %" PRIu64 "\n", minor_vers);
printf("[DEBUG] num_channels = %" PRIu64 "\n", num_channels);
printf("[DEBUG] noc_width = %" PRIu64 "\n", noc_width);
printf("[DEBUG] num_nocs = %" PRIu64 "\n", num_nocs);
Expand Down

0 comments on commit 7c16751

Please sign in to comment.