Skip to content

Commit

Permalink
Add private FPUs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Jan 26, 2024
1 parent d7617de commit 9bfeba9
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 39 deletions.
1 change: 1 addition & 0 deletions Bender.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
overrides:
hci : { git: "https://github.com/pulp-platform/hci.git" , rev: 3cb3d99b2cebfeed55cb6ab9d98fce7b99e97cb9 } # branch: master
axi : { git: "https://github.com/pulp-platform/axi.git" , version: =0.39.1-beta }
register_interface : { git: "https://github.com/pulp-platform/register_interface.git" , rev: 19163bb5191d2669a8cbc267cdd4ce8e60f20746 } # branch: master
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: 89e1019d64a86425211be6200770576cbdf3e8b3 } # branch: assertion-fix
14 changes: 11 additions & 3 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,16 @@ packages:
Git: https://github.com/pulp-platform/fpu_div_sqrt_mvp.git
dependencies:
- common_cells
fpu_interco:
revision: b5f7a315929308823cacd81e1e4898f1eeecfc64
version: null
source:
Git: https://github.com/pulp-platform/fpu_interco.git
dependencies:
- fpnew
- riscv
hci:
revision: 78fb8fc8a6f2c376554562c47755b4d0febaba25
revision: 3cb3d99b2cebfeed55cb6ab9d98fce7b99e97cb9
version: null
source:
Git: https://github.com/pulp-platform/hci.git
Expand Down Expand Up @@ -133,8 +141,8 @@ packages:
dependencies:
- tech_cells_generic
hwpe-stream:
revision: ddc154424187dff42a8fcec946c768ceb13f13de
version: 1.6.4
revision: 389bd7fb1975d2df1546910c5f220c668122e646
version: 1.6.5
source:
Git: https://github.com/pulp-platform/hwpe-stream.git
dependencies:
Expand Down
4 changes: 2 additions & 2 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
idma: { git: "https://github.com/pulp-platform/iDMA.git", rev: 437ffa9dac5dea0daccfd3e8ae604d4f6ae2cdf1 } # branch: master
hier-icache: { git: "https://github.com/pulp-platform/hier-icache.git", rev: "a971e364bf8090cf77fafad995b480c1ac7ea4e0" } # branch: yt/carfield
cluster_peripherals: { git: "https://github.com/pulp-platform/cluster_peripherals.git", rev: c015839816938a790c8da5fd5829cfc536f1ca9c } # branch: yt/return-reg
# fpu_interco: { git: "https://github.com/pulp-platform/fpu_interco.git", rev: "4aec4b68424947b0c4cf25fd7c4b907cb9ec3dfa" } # branch: yt/carfield
fpu_interco: { git: "https://github.com/pulp-platform/fpu_interco.git", rev: "b5f7a315929308823cacd81e1e4898f1eeecfc64" } # branch: astral
axi: { git: "https://github.com/pulp-platform/axi.git", version: =0.39.1-beta }
axi_slice: { git: "https://github.com/pulp-platform/axi_slice.git", version: 1.1.4 } # deprecated, replaced by axi_cut (in axi repo)
timer_unit: { git: "https://github.com/pulp-platform/timer_unit.git", version: 1.0.2 }
Expand All @@ -31,7 +31,7 @@ dependencies:
cv32e40p: { git: "https://github.com/pulp-platform/cv32e40p.git", rev: e863f576699815b38cc9d80dbdede8ed5efd5991 } # `michaero/safety-island-clic` branch
ibex: { git: "https://github.com/pulp-platform/ibex.git", rev: "pulpissimo-v6.1.2" }
scm: { git: "https://github.com/pulp-platform/scm.git", rev: 74426dee36f28ae1c02f7635cf844a0156145320 } # branch: yt/bump-clkgating
hci: { git: "https://github.com/pulp-platform/hci.git", rev: b2e6f391aa6c10c03f45b693d80a0aaddecf169b } # branch: master
hci: { git: "https://github.com/pulp-platform/hci.git", rev: 3cb3d99b2cebfeed55cb6ab9d98fce7b99e97cb9 } # branch: test_mode_fix
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", rev: 19163bb5191d2669a8cbc267cdd4ce8e60f20746 } # branch: master
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.29.0 }
redundancy_cells: { git: "https://github.com/pulp-platform/redundancy_cells.git", rev: 32023555679cfdb8a0a073ad4c17fc3a5d1ddea5 } # branch: yt/rapidrecovery
Expand Down
38 changes: 4 additions & 34 deletions rtl/pulp_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module pulp_cluster
import pulp_cluster_package::*;
import hci_package::*;
import rapid_recovery_pkg::*;
import fpnew_pkg::*;
#(
// cluster parameters
parameter CORE_TYPE_CL = 1, // 0 for CV32, 1 for RI5CY, 2 for IBEX RV32IMC
Expand Down Expand Up @@ -70,7 +71,7 @@ module pulp_cluster
parameter INSTR_RDATA_WIDTH = 32,

parameter bit CLUST_FPU = 1,
parameter int unsigned NumFpu = NB_CORES,
parameter int unsigned NumFpus = NB_CORES,
parameter CLUST_FP_DIVSQRT = 0,
parameter CLUST_SHARED_FP = 0,
parameter CLUST_SHARED_FP_DIVSQRT = 0,
Expand Down Expand Up @@ -967,37 +968,6 @@ generate
.apu_master_flags_i ( fpu_master_out_flags[i] )
);

if (CLUST_FPU) begin: gen_fpu
fpu_wrap #(
.DataWidth ( 32 ),
.FpuNumOperands ( APU_NARGS_CPU ),
.FpuOpcodeWidth ( APU_WOP_CPU ),
.FpuInFlagsWidth ( APU_NDSFLAGS_CPU ),
.FpuOutFlagsWidth ( APU_NUSFLAGS_CPU ),
.FpuFmtBits ( fpnew_pkg::FP_FORMAT_BITS ),
.FpuIntFmtBits ( fpnew_pkg::INT_FORMAT_BITS ),
.FpuRoundBits ( 3 ),
.FpuOpBits ( fpnew_pkg::OP_BITS ),
.FpuDivSqrt ( CLUST_FP_DIVSQRT )
) i_fpu_wrap (
.clk_i ( clk_core[i] ),
.rst_ni ( rst_ni ),
.hart_id_i ( i ),
.fpu_req_i ( fpu_master_req[i] ),
.fpu_gnt_o ( fpu_master_gnt[i] ),
.fpu_operands_i ( fpu_master_operands[i] ),
.fpu_op_i ( fpu_master_op[i] ),
.fpu_flags_i ( fpu_master_in_flags[i] ),
.fpu_valid_o ( fpu_master_valid[i] ),
.fpu_result_o ( fpu_master_result[i] ),
.fpu_flags_o ( fpu_master_out_flags[i] )
);
end else begin: gen_no_fpu
assign fpu_master_gnt[i] = '0;
assign fpu_master_valid[i] = '0;
assign fpu_master_result[i] = '0;
assign fpu_master_out_flags[i] = '0;
end
assign dbg_core_halted[i] = core2hmr[i].debug_halted;

// Binding inputs/outputs from HMR to the system and vice versa
Expand Down Expand Up @@ -1146,7 +1116,7 @@ hmr_unit #(
//****************************************************
//**** Shared FPU cluster - Shared execution units ***
//****************************************************
if (CLUST_SHARED_FP) begin: gen_shared_fpu
if (CLUST_FPU) begin: gen_fpu_subsystem
// request channel
logic [NB_CORES-1:0][2:0][31:0] s_apu__operands;
logic [NB_CORES-1:0][5:0] s_apu__op;
Expand All @@ -1166,7 +1136,7 @@ if (CLUST_SHARED_FP) begin: gen_shared_fpu
shared_fpu_cluster #(
.NB_CORES ( NB_CORES ),
.NB_APUS ( 1 ),
.NB_FPNEW ( 4 ),
.NB_FPNEW ( NumFpus ),
.FP_TYPE_WIDTH ( 3 ),

.NB_CORE_ARGS ( 3 ),
Expand Down

0 comments on commit 9bfeba9

Please sign in to comment.