minor update

This commit is contained in:
Blaise Tine 2021-06-12 02:22:01 -04:00
parent a315d0087d
commit 76c4909ae9
3 changed files with 11 additions and 21 deletions

View file

@ -140,7 +140,7 @@ extern int vx_dump_perf(vx_device_h device, FILE* stream) {
auto staging_ptr = (uint32_t*)vx_host_ptr(staging_buf);
for (unsigned core_id = 0; core_id < num_cores; ++core_id) {
ret = vx_copy_from_dev(staging_buf, IO_ADDR_CSR + 64 * sizeof(uint32_t) * core_id, 64 * sizeof(uint32_t), 0);
ret = vx_copy_from_dev(staging_buf, IO_CSR_ADDR + 64 * sizeof(uint32_t) * core_id, 64 * sizeof(uint32_t), 0);
if (ret != 0) {
vx_buf_release(staging_buf);
return ret;

View file

@ -50,35 +50,25 @@
`endif
`ifndef IO_ADDR_SIZE
`define IO_ADDR_SIZE (32'hFFFFFFFF - 32'hFF000000 + 1)
`define IO_ADDR_SIZE (32'hFFFFFFFF - `IO_BASE_ADDR + 1)
`endif
`ifndef IO_ADDR_COUT
`define IO_ADDR_COUT 32'hFFFFFFFC
`ifndef IO_COUT_ADDR
`define IO_COUT_ADDR 32'hFFFFFFC0
`endif
`ifndef IO_ADDR_CSR
`define IO_ADDR_CSR `IO_BASE_ADDR
`ifndef IO_COUT_SIZE
`define IO_COUT_SIZE 64
`endif
`ifndef IO_CSR_ADDR
`define IO_CSR_ADDR `IO_BASE_ADDR
`endif
`ifndef SMEM_BASE_ADDR
`define SMEM_BASE_ADDR `IO_BASE_ADDR
`endif
`ifndef FRAME_BUFFER_BASE_ADDR
`define FRAME_BUFFER_BASE_ADDR 32'hFF000000
`endif
`ifndef FRAME_BUFFER_WIDTH
`define FRAME_BUFFER_WIDTH 16'd1920
`endif
`ifndef FRAME_BUFFER_HEIGHT
`define FRAME_BUFFER_HEIGHT 16'd1080
`endif
`define FRAME_BUFFER_SIZE (FRAME_BUFFER_WIDTH * FRAME_BUFFER_HEIGHT)
`ifndef EXT_M_DISABLE
`define EXT_M_ENABLE
`endif

View file

@ -21,7 +21,7 @@
void vx_perf_dump() {
int core_id = vx_core_id();
uint32_t* const csr_mem = (uint32_t*)(IO_ADDR_CSR + 64 * sizeof(uint32_t) * core_id);
uint32_t* const csr_mem = (uint32_t*)(IO_CSR_ADDR + 64 * sizeof(uint32_t) * core_id);
DUMP_CSR_32(0, CSR_MPM_BASE)
DUMP_CSR_32(32, CSR_MPM_BASE_H)
}