Skip to content

Commit

Permalink
FPU: Bump to pulp-v0.2.2 (extends #25)
Browse files Browse the repository at this point in the history
* Bump FPU to pulp-v0.1.1

* Remove vendor folder in CVFPU

* Update Bender.lock

* cvfpu: Exclude util directory

Signed-off-by: Nils Wistoff <[email protected]>

* Bender.lock: Revert unrelated changes

Signed-off-by: Nils Wistoff <[email protected]>

---------

Signed-off-by: Nils Wistoff <[email protected]>
Co-authored-by: Nils Wistoff <[email protected]>
Signed-off-by: Nils Wistoff <[email protected]>
  • Loading branch information
2 people authored and paulsc96 committed Sep 25, 2024
1 parent e87ff4a commit c19c321
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
url = https://github.com/openhwgroup/core-v-verif
[submodule "core/cvfpu"]
path = core/cvfpu
url = https://github.com/openhwgroup/cvfpu.git
url = https://github.com/pulp-platform/cvfpu.git
branch = pulp-v0.2.2
[submodule "core/cache_subsystem/hpdcache"]
path = core/cache_subsystem/hpdcache
url = https://github.com/paulsc96/cv-hpdcache.git
Expand Down
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies:
axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.31.0 }
common_cells:
{ git: "https://github.com/pulp-platform/common_cells", version: 1.23.0 }
fpnew: { git: "https://github.com/openhwgroup/cvfpu.git", version: 0.7.0 }
fpnew: { git: "https://github.com/pulp-platform/cvfpu.git", rev: pulp-v0.2.2 }
tech_cells_generic:
{ git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.13 }

Expand Down
22 changes: 14 additions & 8 deletions core/fpu_wrap.sv
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ module fpu_wrap
Width: unsigned'(CVA6Cfg.FLen), // parameterized using CVA6Cfg.FLen
EnableVectors: CVA6Cfg.XFVec,
EnableNanBox: 1'b1,
FpFmtMask: {CVA6Cfg.RVF, CVA6Cfg.RVD, CVA6Cfg.XF16, CVA6Cfg.XF8, CVA6Cfg.XF16ALT},
FpFmtMask: {
CVA6Cfg.RVF, CVA6Cfg.RVD, CVA6Cfg.XF16, CVA6Cfg.XF8, CVA6Cfg.XF16ALT, CVA6Cfg.XF8ALT
},
IntFmtMask: {
CVA6Cfg.XFVec && CVA6Cfg.XF8,
CVA6Cfg.XFVec && (CVA6Cfg.XF16 || CVA6Cfg.XF16ALT),
Expand All @@ -75,24 +77,27 @@ module fpu_wrap

// Implementation (number of registers etc)
localparam fpnew_pkg::fpu_implementation_t FPU_IMPLEMENTATION = '{
PipeRegs: '{ // FP32, FP64, FP16, FP8, FP16alt
PipeRegs: '{ // FP32, FP64, FP16, FP8, FP16alt, FP8alt
'{
unsigned'(LAT_COMP_FP32),
unsigned'(LAT_COMP_FP64),
unsigned'(LAT_COMP_FP16),
unsigned'(LAT_COMP_FP8),
unsigned'(LAT_COMP_FP16ALT)
unsigned'(LAT_COMP_FP16ALT),
unsigned'(LAT_COMP_FP8ALT)
}, // ADDMUL
'{default: unsigned'(LAT_DIVSQRT)}, // DIVSQRT
'{default: unsigned'(LAT_NONCOMP)}, // NONCOMP
'{default: unsigned'(LAT_CONV)}
}, // CONV
'{default: unsigned'(LAT_CONV)}, // CONV
'{default: unsigned'(LAT_SDOTP)}
}, // DOTP
UnitTypes: '{
'{default: fpnew_pkg::PARALLEL}, // ADDMUL
'{default: fpnew_pkg::MERGED}, // DIVSQRT
'{default: fpnew_pkg::PARALLEL}, // NONCOMP
'{default: fpnew_pkg::MERGED}
}, // CONV
'{default: fpnew_pkg::MERGED}, // CONV
'{default: fpnew_pkg::DISABLED}
}, // DOTP
PipeConfig: fpnew_pkg::DISTRIBUTED
};

Expand Down Expand Up @@ -535,6 +540,7 @@ module fpu_wrap
) i_fpnew_bulk (
.clk_i,
.rst_ni,
.hart_id_i ('0),
.operands_i (fpu_operands),
.rnd_mode_i (fpnew_pkg::roundmode_e'(fpu_rm)),
.op_i (fpnew_pkg::operation_e'(fpu_op)),
Expand All @@ -544,7 +550,7 @@ module fpu_wrap
.int_fmt_i (fpnew_pkg::int_format_e'(fpu_ifmt)),
.vectorial_op_i(fpu_vec_op),
.tag_i (fpu_tag),
.simd_mask_i (1'b1),
.simd_mask_i ('1),
.in_valid_i (fpu_in_valid),
.in_ready_o (fpu_in_ready),
.flush_i,
Expand Down
2 changes: 2 additions & 0 deletions core/include/ariane_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,11 @@ package ariane_pkg;
localparam int unsigned LAT_COMP_FP16 = 'd1;
localparam int unsigned LAT_COMP_FP16ALT = 'd1;
localparam int unsigned LAT_COMP_FP8 = 'd1;
localparam int unsigned LAT_COMP_FP8ALT = 'd1;
localparam int unsigned LAT_DIVSQRT = 'd2;
localparam int unsigned LAT_NONCOMP = 'd1;
localparam int unsigned LAT_CONV = 'd2;
localparam int unsigned LAT_SDOTP = 'd2;

localparam logic [31:0] OPENHWGROUP_MVENDORID = 32'h0602;
localparam logic [31:0] ARIANE_MARCHID = 32'd3;
Expand Down
4 changes: 4 additions & 0 deletions core/include/config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ package config_pkg;
bit XF16ALT;
// Non standard 8bits Floating Point extension
bit XF8;
// TO_BE_COMPLETED
bit XF8ALT;
// Non standard Vector Floating Point extension
bit XFVec;
// Perf counters
Expand Down Expand Up @@ -237,6 +239,7 @@ package config_pkg;
bit XF16;
bit XF16ALT;
bit XF8;
bit XF8ALT;
bit RVA;
bit RVB;
bit RVV;
Expand All @@ -261,6 +264,7 @@ package config_pkg;
bit XF16Vec;
bit XF16ALTVec;
bit XF8Vec;
bit XF8ALTVec;
int unsigned NrRgprPorts;
int unsigned NrWbPorts;
bit EnableAccelerator;
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a60x_config_pkg_deprecated.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -91,6 +92,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_embedded_config_pkg_deprecated.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_ima_sv32_fpga_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_imac_sv0_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_imac_sv32_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv32a6_imafc_sv32_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imadfcv_sv39_polara_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 1;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdc_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdc_sv39_hpdcache_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -97,6 +98,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdc_sv39_openpiton_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdc_sv39_wb_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdch_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdch_sv39_wb_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 1;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down
1 change: 1 addition & 0 deletions core/include/cv64a6_imafdchsclic_sv39_wb_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down
2 changes: 2 additions & 0 deletions core/include/cv64a6_imafdcv_sv39_config_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package cva6_config_pkg;
localparam CVA6ConfigF16En = 0;
localparam CVA6ConfigF16AltEn = 0;
localparam CVA6ConfigF8En = 0;
localparam CVA6ConfigF8AltEn = 0;
localparam CVA6ConfigFVecEn = 0;

localparam CVA6ConfigCvxifEn = 0;
Expand Down Expand Up @@ -90,6 +91,7 @@ package cva6_config_pkg;
XF16: bit'(CVA6ConfigF16En),
XF16ALT: bit'(CVA6ConfigF16AltEn),
XF8: bit'(CVA6ConfigF8En),
XF8ALT: bit'(CVA6ConfigF8AltEn),
RVA: bit'(CVA6ConfigAExtEn),
RVB: bit'(CVA6ConfigBExtEn),
RVV: bit'(CVA6ConfigVExtEn),
Expand Down

0 comments on commit c19c321

Please sign in to comment.