Skip to content

Commit

Permalink
[hardware] Remove vl-mask for mask tail elements
Browse files Browse the repository at this point in the history
Mask-producing insn can avoid worrying of tail elements
  • Loading branch information
mp-17 committed Nov 8, 2024
1 parent 6671a5e commit fe570ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 2 additions & 4 deletions hardware/src/masku/masku.sv
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ module masku import ara_pkg::*; import rvv_pkg::*; #(
pe_req_t vinsn_issue;

logic [NrLanes*ELEN-1:0] bit_enable_mask;
logic [NrLanes*ELEN-1:0] bit_enable_shuffle;
logic [NrLanes*ELEN-1:0] alu_result_compressed;

// Performs all shuffling and deshuffling of mask operands (including masks for mask instructions)
Expand Down Expand Up @@ -149,7 +148,6 @@ module masku import ara_pkg::*; import rvv_pkg::*; #(
.masku_operand_m_seq_valid_o ( ),
.masku_operand_m_seq_ready_i ( ),
.bit_enable_mask_o ( bit_enable_mask ),
.shuffled_vl_bit_mask_o ( bit_enable_shuffle ),
.alu_result_compressed_o ( alu_result_compressed )
);

Expand Down Expand Up @@ -453,8 +451,8 @@ module masku import ara_pkg::*; import rvv_pkg::*; #(

// Evaluate the instruction
unique case (vinsn_issue.op) inside
[VMANDNOT:VMXNOR]: alu_result = (masku_operand_alu) | (~bit_enable_shuffle);
[VMFEQ:VMSGTU], [VMSGT:VMSBC]: alu_result = (alu_result_compressed & bit_enable_mask) | (~bit_enable_shuffle);
[VMANDNOT:VMXNOR]: alu_result = masku_operand_alu;
[VMFEQ:VMSGTU], [VMSGT:VMSBC]: alu_result = alu_result_compressed & bit_enable_mask;
[VMSBF:VMSIF] : begin
if (&masku_operand_vs2_seq_valid && (&masku_operand_m_valid || vinsn_issue.vm)) begin
for (int i = 0; i < NrLanes * DataWidth; i++) begin
Expand Down
4 changes: 0 additions & 4 deletions hardware/src/masku/masku_operands.sv
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ module masku_operands import ara_pkg::*; import rvv_pkg::*; #(
output logic [ NrLanes-1:0] masku_operand_m_seq_valid_o,
input logic [ NrLanes-1:0] masku_operand_m_seq_ready_i,
output logic [NrLanes*ELEN-1:0] bit_enable_mask_o, // Bit mask for mask unit instructions (shuffled like mask register)
output logic [NrLanes*ELEN-1:0] shuffled_vl_bit_mask_o, // vl mask for mask unit instructions (first vl bits are 1, others 0) (shuffled like mask register)
output logic [NrLanes*ELEN-1:0] alu_result_compressed_o // ALU/FPU results compressed (from sew to 1-bit) (shuffled, in mask format)
);

Expand Down Expand Up @@ -181,9 +180,6 @@ module masku_operands import ara_pkg::*; import rvv_pkg::*; #(
end
end

assign shuffled_vl_bit_mask_o = shuffled_vl_bit_mask;


// -------------------------------------------
// Compress ALU/FPU results into a mask vector
// -------------------------------------------
Expand Down

0 comments on commit fe570ff

Please sign in to comment.