From 4ec20991067de3adf19fba5ae3109a1a2358e78f Mon Sep 17 00:00:00 2001 From: Zhongdi LUO Date: Mon, 13 Jul 2026 07:47:47 +0000 Subject: [PATCH] fix: select tensor DPU datatype at compile time --- hw/rtl/fpu/VX_tensor_dpu.sv | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/rtl/fpu/VX_tensor_dpu.sv b/hw/rtl/fpu/VX_tensor_dpu.sv index 9a8dfa20..e40fe92b 100644 --- a/hw/rtl/fpu/VX_tensor_dpu.sv +++ b/hw/rtl/fpu/VX_tensor_dpu.sv @@ -300,7 +300,7 @@ module VX_tensor_threadgroup #( wire [31:0] d_col_sel = (substep_in == 1'b0) ? d_col : (d_col + 1); // Dot product (FEDP) unit generated from Chisel - if (FP16 != 0) begin +`ifdef TENSOR_DPU_FP16 TensorDotProductUnit fedp ( .clock (clk), .reset (reset), @@ -318,7 +318,7 @@ module VX_tensor_threadgroup #( .io_out_valid (fedp_valids[i]), .io_out_bits_data (D_half[i]) ); - end else begin +`else TensorDotProductUnit fedp ( .clock (clk), .reset (reset), @@ -332,7 +332,7 @@ module VX_tensor_threadgroup #( .io_out_valid (fedp_valids[i]), .io_out_bits_data (D_half[i]) ); - end +`endif end assign valid_out = fedp_valid_out && (substep_out == 1'b1);