Skip to content

Commit

Permalink
[hardware] Solve type conv warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Jan 13, 2025
1 parent 829d58d commit 05f0c50
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 14 deletions.
5 changes: 5 additions & 0 deletions hardware/src/ara_dispatcher.sv
Original file line number Diff line number Diff line change
Expand Up @@ -362,10 +362,15 @@ module ara_dispatcher import ara_pkg::*; import rvv_pkg::*; #(
vtype : csr_vtype_q,
emul : csr_vtype_q.vlmul,
eew_vs1 : csr_vtype_q.vsew,
old_eew_vs1 : csr_vtype_q.vsew,
eew_vs2 : csr_vtype_q.vsew,
eew_vd_op : csr_vtype_q.vsew,
eew_vmask : eew_q[VMASK],
cvt_resize : CVT_SAME,
fp_rm : fpnew_pkg::RNE,
op : VADD,
conversion_vs1 : OpQueueConversionNone,
conversion_vs2 : OpQueueConversionNone,
default : '0
};
ara_req_valid = 1'b0;
Expand Down
52 changes: 38 additions & 14 deletions hardware/src/lane/lane_sequencer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
default: '0
};
// Since this request goes outside of the lane, we might need to request an
Expand Down Expand Up @@ -495,9 +497,11 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
eew : EW64,
vtype : pe_req.vtype,
vl : pe_req.vl / NrLanes / ELEN,
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default: '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -514,9 +518,11 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
eew : EW64,
vtype : pe_req.vtype,
vl : pe_req.vl / NrLanes / ELEN,
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default: '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -534,10 +540,10 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
target_fu: MFPU_ADDRGEN,
vl : pe_req_i.vl / NrLanes,
scale_vl : pe_req_i.scale_vl,
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
vtype : pe_req_i.vtype,
hazard : pe_req_i.hazard_vs2 | pe_req_i.hazard_vd,
cvt_resize: CVT_SAME,
default : '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -555,11 +561,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
eew : pe_req.old_eew_vs1,
conv : pe_req.conversion_vs1,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vl : vfu_operation_d.vl,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs1 | pe_req.hazard_vd,
target_fu : ALU_SLDU,
cvt_resize: CVT_SAME,
default : '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -577,9 +584,11 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
eew : EW64,
vtype : pe_req.vtype,
vl : pe_req.vl / NrLanes / ELEN,
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default: '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -598,10 +607,10 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
target_fu: MFPU_ADDRGEN,
vl : pe_req_i.vl / NrLanes,
scale_vl : pe_req_i.scale_vl,
cvt_resize : pe_req.cvt_resize,
vstart : vfu_operation_d.vstart,
vtype : pe_req_i.vtype,
hazard : pe_req_i.hazard_vs2 | pe_req_i.hazard_vd,
cvt_resize: CVT_SAME,
default : '0
};
// Since this request goes outside of the lane, we might need to request an
Expand All @@ -620,10 +629,10 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
target_fu: ALU_SLDU,
is_slide : 1'b1,
scale_vl : pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs2 | pe_req.hazard_vd,
cvt_resize: CVT_SAME,
default : '0
};
operand_request_push[SlideAddrGenA] = pe_req.use_vs2;
Expand Down Expand Up @@ -680,10 +689,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vs : VMASK,
eew : EW64,
is_slide: 1'b1,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
operand_request_push[MaskM] = !pe_req.vm;
Expand Down Expand Up @@ -722,10 +733,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
id : pe_req.id,
vs : pe_req.vs1,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs1 | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
// Since this request goes outside of the lane, we might need to request an
Expand Down Expand Up @@ -753,10 +766,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vs : pe_req.vs2,
eew : pe_req.eew_vs2,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs2 | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
// Since this request goes outside of the lane, we might need to request an
Expand Down Expand Up @@ -784,11 +799,13 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vs : pe_req.vs1,
eew : pe_req.eew_vs1,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vl : pe_req.vl / NrLanes,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs1 | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
// This is an operation that runs normally on the VMFPU, and then gets *condensed* and
Expand All @@ -806,11 +823,13 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vs : pe_req.vs2,
eew : pe_req.eew_vs2,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vl : pe_req.vl / NrLanes,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs2 | pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
// This is an operation that runs normally on the VMFPU, and then gets *condensed* and
Expand All @@ -828,10 +847,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
id : pe_req.id,
vs : pe_req.vd,
scale_vl: pe_req.scale_vl,
cvt_resize : pe_req.cvt_resize,
vtype : pe_req.vtype,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vd,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default : '0
};
// vl and eew depend on the real eew on which we are working on
Expand Down Expand Up @@ -863,10 +884,12 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vs : VMASK,
eew : EW64,
vtype : pe_req.vtype,
cvt_resize : pe_req.cvt_resize,
vl : (pe_req.vl / NrLanes / ELEN),
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vm,
target_fu : ALU_SLDU,
conv : OpQueueConversionNone,
cvt_resize: CVT_SAME,
default: '0
};
// Request a balanced load from every lane despite it being active or not.
Expand All @@ -888,6 +911,7 @@ module lane_sequencer import ara_pkg::*; import rvv_pkg::*; import cf_math_pkg::
vl : vfu_operation_d.vl,
vstart : vfu_operation_d.vstart,
hazard : pe_req.hazard_vs2,
target_fu : ALU_SLDU,
default : '0
};
operand_request_push[MaskB] = 1'b1;
Expand Down
5 changes: 5 additions & 0 deletions hardware/src/lane/operand_requester.sv
Original file line number Diff line number Diff line change
Expand Up @@ -506,34 +506,39 @@ module operand_requester import ara_pkg::*; import rvv_pkg::*; #(
wen : 1'b1,
wdata : alu_result_wdata_i,
be : alu_result_be_i,
opqueue: AluA,
default: '0
};
operand_payload[NrOperandQueues + VFU_MFpu] = '{
addr : mfpu_result_addr_i >> $clog2(NrBanks),
wen : 1'b1,
wdata : mfpu_result_wdata_i,
be : mfpu_result_be_i,
opqueue: AluA,
default: '0
};
operand_payload[NrOperandQueues + VFU_MaskUnit] = '{
addr : masku_result_addr >> $clog2(NrBanks),
wen : 1'b1,
wdata : masku_result_wdata,
be : masku_result_be,
opqueue: AluA,
default: '0
};
operand_payload[NrOperandQueues + VFU_SlideUnit] = '{
addr : sldu_result_addr >> $clog2(NrBanks),
wen : 1'b1,
wdata : sldu_result_wdata,
be : sldu_result_be,
opqueue: AluA,
default: '0
};
operand_payload[NrOperandQueues + VFU_LoadUnit] = '{
addr : ldu_result_addr >> $clog2(NrBanks),
wen : 1'b1,
wdata : ldu_result_wdata,
be : ldu_result_be,
opqueue: AluA,
default: '0
};

Expand Down

0 comments on commit 05f0c50

Please sign in to comment.