Skip to content

Commit f231041

Browse files
Fix various tool compatibility issues (#4)
* Fix tool compatibility issues
1 parent 3b1f7af commit f231041

File tree

8 files changed

+22
-13
lines changed

8 files changed

+22
-13
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,9 @@ If you use FPnew in your work, you can cite us:
165165
}
166166
```
167167

168+
<p>
169+
</details>
170+
168171
If you use FPnew SDOTP in your work, you can cite us:
169172

170173
<details>

docs/CHANGELOG-PULP.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
77
In this sense, we interpret the "Public API" of a hardware module as its port/parameter list.
88
Versions of the IP in the same major relase are "pin-compatible" with each other. Minor relases are permitted to add new parameters as long as their default bindings ensure backwards compatibility.
99

10+
## [0.1.1] - 2023-05-05
11+
12+
### Fixed
13+
- Fix various tool compatibility issues
14+
1015
## [0.1.0] - 2023-05-04
1116

1217
### Added

src/fpnew_opgroup_block.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ module fpnew_opgroup_block #(
2525
parameter fpnew_pkg::fmt_unit_types_t FmtUnitTypes = '{default: fpnew_pkg::PARALLEL},
2626
parameter fpnew_pkg::pipe_config_t PipeConfig = fpnew_pkg::BEFORE,
2727
parameter type TagType = logic,
28-
parameter int unsigned TrueSIMDClass = 0,
29-
parameter logic CompressedVecCmpResult = 0,
28+
parameter logic TrueSIMDClass = 1'b0,
29+
parameter logic CompressedVecCmpResult = 1'b0,
3030
parameter fpnew_pkg::rsr_impl_t StochasticRndImplementation = fpnew_pkg::DEFAULT_NO_RSR,
3131
// Do not change
3232
localparam int unsigned NUM_FORMATS = fpnew_pkg::NUM_FP_FORMATS,

src/fpnew_opgroup_fmt_slice.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ module fpnew_opgroup_fmt_slice #(
2222
parameter int unsigned NumPipeRegs = 0,
2323
parameter fpnew_pkg::pipe_config_t PipeConfig = fpnew_pkg::BEFORE,
2424
parameter type TagType = logic,
25-
parameter int unsigned TrueSIMDClass = 0,
26-
parameter logic CompressedVecCmpResult = 0,
25+
parameter logic TrueSIMDClass = 1'b0,
26+
parameter logic CompressedVecCmpResult = 1'b0,
2727
// Do not change
2828
localparam int unsigned NUM_OPERANDS = fpnew_pkg::num_operands(OpGroup),
2929
localparam int unsigned NUM_LANES = fpnew_pkg::num_lanes(Width, FpFormat, EnableVectors),

src/fpnew_opgroup_multifmt_slice.sv

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ or on 16b inputs producing 32b outputs");
315315
.busy_o ( lane_busy[lane] )
316316
);
317317
end else if (OpGroup == fpnew_pkg::DIVSQRT) begin : lane_instance
318-
if (!PulpDivsqrt && LANE_FORMATS[0] && (LANE_FORMATS[1:fpnew_pkg::NUM_FP_FORMATS-1] == '0)) begin : gen_th_32_divsqrt
318+
if (!PulpDivsqrt) begin : gen_th_32_divsqrt
319319
// The T-head-based DivSqrt unit is supported only in FP32-only configurations
320320
fpnew_divsqrt_th_32 #(
321321
.NumPipeRegs ( NumPipeRegs ),
@@ -433,6 +433,7 @@ or on 16b inputs producing 32b outputs");
433433
assign lane_out_valid[lane] = 1'b0; // unused lane
434434
assign lane_in_ready[lane] = 1'b0; // unused lane
435435
assign lane_aux[lane] = 1'b0; // unused lane
436+
assign lane_masks[lane] = 1'b1; // unused lane
436437
assign lane_tags[lane] = 1'b0; // unused lane
437438
assign lane_ext_bit[lane] = 1'b1; // NaN-box unused lane
438439
assign local_result = {(LANE_WIDTH){lane_ext_bit[0]}}; // sign-extend/nan box
@@ -571,7 +572,7 @@ or on 16b inputs producing 32b outputs");
571572
assign fmt_conv_cpk_result = '0;
572573
end
573574

574-
if (PulpDivsqrt) begin
575+
if (PulpDivsqrt && (OpGroup == fpnew_pkg::DIVSQRT)) begin
575576
// Synch lanes if there is more than one
576577
assign simd_synch_rdy = EnableVectors ? &divsqrt_ready : divsqrt_ready[0];
577578
assign simd_synch_done = EnableVectors ? &divsqrt_done : divsqrt_done[0];

src/fpnew_sdotp_multi.sv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ module fpnew_sdotp_multi #(
12701270
// Set up some constants
12711271
localparam int unsigned EXP_BITS = fpnew_pkg::exp_bits(fpnew_pkg::fp_format_e'(fmt));
12721272
localparam int unsigned MAN_BITS = fpnew_pkg::man_bits(fpnew_pkg::fp_format_e'(fmt));
1273-
localparam int unsigned ALL_EXTRA_BITS = SUPER_DST_MAN_BITS-MAN_BITS+1+DST_PRECISION_BITS+PRECISION_BITS+2+1;
1273+
localparam int unsigned ALL_EXTRA_BITS = fpnew_pkg::maximum(SUPER_DST_MAN_BITS-MAN_BITS+1+DST_PRECISION_BITS+PRECISION_BITS+2+1, 1);
12741274

12751275
logic [EXP_BITS-1:0] pre_round_exponent;
12761276
logic [MAN_BITS-1:0] pre_round_mantissa;

src/fpnew_sdotp_multi_wrapper.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module fpnew_sdotp_multi_wrapper #(
2828
// Do not change
2929
localparam fpnew_pkg::fmt_logic_t FpSrcFmtConfig = FpFmtConfig[0] ? (FpFmtConfig & 6'b001111) : (FpFmtConfig & 6'b000101),
3030
localparam fpnew_pkg::fmt_logic_t FpDstFmtConfig = fpnew_pkg::get_dotp_dst_fmts(FpFmtConfig, FpSrcFmtConfig),
31-
localparam int SRC_WIDTH = fpnew_pkg::max_fp_width(FpSrcFmtConfig),
32-
localparam int DST_WIDTH = 2*fpnew_pkg::max_fp_width(FpSrcFmtConfig), // do not change, current assumption of sdotpex_multi
31+
localparam int SRC_WIDTH = fpnew_pkg::maximum(fpnew_pkg::max_fp_width(FpSrcFmtConfig), 1),
32+
localparam int DST_WIDTH = fpnew_pkg::maximum(2*fpnew_pkg::max_fp_width(FpSrcFmtConfig), 1), // do not change, current assumption of sdotpex_multi
3333
localparam int OPERAND_WIDTH = LaneWidth,
3434
localparam int unsigned NUM_FORMATS = fpnew_pkg::NUM_FP_FORMATS
3535
) (

src/fpnew_top.sv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ module fpnew_top #(
2020
// PulpDivSqrt = 0 enables T-head-based DivSqrt unit. Supported only for FP32-only instances of Fpnew
2121
parameter logic PulpDivsqrt = 1'b1,
2222
parameter type TagType = logic,
23-
parameter int unsigned TrueSIMDClass = 0,
24-
parameter int unsigned EnableSIMDMask = 0,
25-
parameter logic CompressedVecCmpResult = 0, // conceived for RV32FD cores
23+
parameter logic TrueSIMDClass = 1'b0,
24+
parameter logic EnableSIMDMask = 1'b0,
25+
parameter logic CompressedVecCmpResult = 1'b0, // conceived for RV32FD cores
2626
parameter fpnew_pkg::rsr_impl_t StochasticRndImplementation = fpnew_pkg::DEFAULT_NO_RSR,
2727
// Do not change
2828
localparam int unsigned NumLanes = fpnew_pkg::max_num_lanes(Features.Width, Features.FpFmtMask, Features.EnableVectors),
@@ -99,7 +99,7 @@ module fpnew_top #(
9999

100100
// Filter out the mask if not used
101101
MaskType simd_mask;
102-
assign simd_mask = simd_mask_i | ~{NumLanes{logic'(EnableSIMDMask)}};
102+
assign simd_mask = simd_mask_i | ~{NumLanes{EnableSIMDMask}};
103103

104104
// -------------------------
105105
// Generate Operation Blocks

0 commit comments

Comments
 (0)