diff --git a/hw/rtl/VX_gpu_pkg.sv b/hw/rtl/VX_gpu_pkg.sv index f94714d06..1a55a18fe 100644 --- a/hw/rtl/VX_gpu_pkg.sv +++ b/hw/rtl/VX_gpu_pkg.sv @@ -461,6 +461,21 @@ package VX_gpu_pkg; endcase end end + `EX_SFU: begin + case (`INST_SFU_BITS'(op_type)) + `INST_SFU_TMC: `TRACE(level, ("TMC")); + `INST_SFU_WSPAWN:`TRACE(level, ("WSPAWN")); + `INST_SFU_SPLIT: begin if (op_args.wctl.is_neg) `TRACE(level, ("SPLIT.N")); else `TRACE(level, ("SPLIT")); end + `INST_SFU_JOIN: `TRACE(level, ("JOIN")); + `INST_SFU_BAR: `TRACE(level, ("BAR")); + `INST_SFU_PRED: begin if (op_args.wctl.is_neg) `TRACE(level, ("PRED.N")); else `TRACE(level, ("PRED")); end + `INST_SFU_CSRRW: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRWI")); else `TRACE(level, ("CSRRW")); end + `INST_SFU_CSRRS: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRSI")); else `TRACE(level, ("CSRRS")); end + `INST_SFU_CSRRC: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRCI")); else `TRACE(level, ("CSRRC")); end + default: `TRACE(level, ("?")); + endcase + end + `ifdef EXT_F_ENABLE `EX_FPU: begin case (`INST_FPU_BITS'(op_type)) `INST_FPU_ADD: begin @@ -632,20 +647,7 @@ package VX_gpu_pkg; default: `TRACE(level, ("?")); endcase end - `EX_SFU: begin - case (`INST_SFU_BITS'(op_type)) - `INST_SFU_TMC: `TRACE(level, ("TMC")); - `INST_SFU_WSPAWN:`TRACE(level, ("WSPAWN")); - `INST_SFU_SPLIT: begin if (op_args.wctl.is_neg) `TRACE(level, ("SPLIT.N")); else `TRACE(level, ("SPLIT")); end - `INST_SFU_JOIN: `TRACE(level, ("JOIN")); - `INST_SFU_BAR: `TRACE(level, ("BAR")); - `INST_SFU_PRED: begin if (op_args.wctl.is_neg) `TRACE(level, ("PRED.N")); else `TRACE(level, ("PRED")); end - `INST_SFU_CSRRW: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRWI")); else `TRACE(level, ("CSRRW")); end - `INST_SFU_CSRRS: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRSI")); else `TRACE(level, ("CSRRS")); end - `INST_SFU_CSRRC: begin if (op_args.csr.use_imm) `TRACE(level, ("CSRRCI")); else `TRACE(level, ("CSRRC")); end - default: `TRACE(level, ("?")); - endcase - end + `endif default: `TRACE(level, ("?")); endcase endtask diff --git a/hw/rtl/Vortex.sv b/hw/rtl/Vortex.sv index 875faf47e..8f171a486 100644 --- a/hw/rtl/Vortex.sv +++ b/hw/rtl/Vortex.sv @@ -189,6 +189,12 @@ module Vortex import VX_gpu_pkg::*; ( `endif + // dump device configuration + initial begin + `TRACE(0, ("CONFIGS: num_threads=%0d, num_warps=%0d, num_cores=%0d, num_clusters=%0d, socket_size=%0d, local_mem_base=0x%0h, num_barriers=%0d\n", + `NUM_THREADS, `NUM_WARPS, `NUM_CORES, `NUM_CLUSTERS, `SOCKET_SIZE, `LMEM_BASE_ADDR, `NUM_BARRIERS)); + end + `ifdef DBG_TRACE_MEM always @(posedge clk) begin if (mem_req_fire) begin diff --git a/hw/rtl/afu/opae/vortex_afu.vh b/hw/rtl/afu/opae/vortex_afu.vh index 6aa532983..31f09ae90 100644 --- a/hw/rtl/afu/opae/vortex_afu.vh +++ b/hw/rtl/afu/opae/vortex_afu.vh @@ -1,10 +1,10 @@ // Copyright © 2019-2023 -// +// // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 -// +// // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,9 +17,9 @@ `define AFU_ACCEL_NAME "vortex_afu" `define AFU_ACCEL_UUID 128'h35F9452B_25C2_434C_93D5_6F8C60DB361C -`define AFU_IMAGE_CMD_MEM_READ 1 +`define AFU_IMAGE_CMD_MEM_READ 1 `define AFU_IMAGE_CMD_MEM_WRITE 2 -`define AFU_IMAGE_CMD_RUN 3 +`define AFU_IMAGE_CMD_RUN 3 `define AFU_IMAGE_CMD_DCR_WRITE 4 `define AFU_IMAGE_CMD_MAX_VALUE 4 diff --git a/tests/regression/demo/common.h b/tests/regression/demo/common.h index 98b8ff587..be200ec04 100644 --- a/tests/regression/demo/common.h +++ b/tests/regression/demo/common.h @@ -2,7 +2,7 @@ #define _COMMON_H_ #ifndef TYPE -#define TYPE float +#define TYPE int #endif typedef struct { @@ -10,7 +10,7 @@ typedef struct { uint32_t task_size; uint64_t src0_addr; uint64_t src1_addr; - uint64_t dst_addr; + uint64_t dst_addr; } kernel_arg_t; #endif