Skip to content

Commit

Permalink
Add traces for VPU for RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJSr committed Oct 30, 2024
1 parent b47cbaa commit 93afdc8
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions hw/rtl/VX_gpu_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ package VX_gpu_pkg;
`EX_SFU: `TRACE(level, ("SFU"))
`ifdef EXT_F_ENABLE
`EX_FPU: `TRACE(level, ("FPU"))
`endif
`ifdef VECTOR_ENABLE
`EX_VPU: `TRACE(level, ("VPU"))
`endif
default: `TRACE(level, ("?"))
endcase
Expand Down Expand Up @@ -522,6 +525,11 @@ package VX_gpu_pkg;
`TRACE(level, ("CSRRC"))
end
end
`ifdef VECTOR_ENABLE
`INST_VPU_VSETVL: `TRACE(level, ("VSET")) // Move these to VPU
`INST_VPU_VSETVLI: `TRACE(level, ("VSET"))
`INST_VPU_VSETIVLI: `TRACE(level, ("VSET"))
`endif
default: `TRACE(level, ("?"))
endcase
end
Expand Down Expand Up @@ -706,6 +714,13 @@ package VX_gpu_pkg;
default: `TRACE(level, ("?"))
endcase
end
`endif
`ifdef VECTOR_ENABLE
`EX_VPU: begin
case (op_type)
default: `TRACE(level, ("?"))
endcase
end
`endif
default: `TRACE(level, ("?"))
endcase
Expand All @@ -727,11 +742,21 @@ package VX_gpu_pkg;
if (`INST_SFU_IS_CSR(op_type)) begin
`TRACE(level, (", addr=0x%0h, use_imm=%b, imm=0x%0h", op_args.csr.addr, op_args.csr.use_imm, op_args.csr.imm))
end
`ifdef VECTOR_ENABLE
if ((op_type == `INST_VPU_VSETVL) || (op_type == `INST_VPU_VSETIVLI) || (op_type == `INST_VPU_VSETVLI)) begin
`TRACE(level, (", lmul=%b, sew=%b, ta=%b, ma=%b, ill=%b", op_args.vpu.vlmul, op_args.vpu.vsew, op_args.vpu.vta, op_args.vpu.vma, op_args.vpu.vill))
end
`endif
end
`ifdef EXT_F_ENABLE
`EX_FPU: begin
`TRACE(level, (", fmt=0x%0h, frm=0x%0h", op_args.fpu.fmt, op_args.fpu.frm))
end
`endif
`ifdef VECTOR_ENABLE
`EX_VPU: begin
`TRACE(level, (", lmul=%b, sew=%b, ta=%b, ma=%b, ill=%b", op_args.vpu.vlmul, op_args.vpu.vsew, op_args.vpu.vta, op_args.vpu.vma, op_args.vpu.vill))
end
`endif
default:;
endcase
Expand Down

0 comments on commit 93afdc8

Please sign in to comment.