tensor: Add ready signal to enforce 1 warp occupancy

Currently disabled as the timing behavior is already ~accurate
This commit is contained in:
Hansung Kim
2024-05-16 12:49:15 -07:00
parent 1a1094b2bb
commit 89e7d65926
4 changed files with 28 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ module VX_tensor_dpu #(
input stall,
input valid_in,
output ready_in,
input [3:0][1:0][31:0] A_tile,
input [1:0][3:0][31:0] B_tile,
input [3:0][3:0][31:0] C_tile,
@@ -24,12 +25,20 @@ module VX_tensor_dpu #(
dpi_hmma(valid_in, A_tile, B_tile, C_tile, result_hmma);
end
logic ready_reg;
always @(posedge clk) begin
if (~reset && valid_in) begin
if (reset) begin
ready_reg <= '1;
end else if (valid_in) begin
ready_reg <= '0;
dpi_print_results(int'(ISW), int'(OCTET), A_tile, B_tile, C_tile, result_hmma);
end else if (valid_out) begin
ready_reg <= '1;
end
end
// ready as soon as valid_out
assign ready_in = ready_reg || valid_out;
VX_shift_register #(
.DATAW (1 + $bits(D_tile)),