Skip to content

Commit

Permalink
Rmove shared FPU and bump core.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Jan 26, 2024
1 parent 3931d03 commit b373cb0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 111 deletions.
10 changes: 1 addition & 9 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ 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: 3cb3d99b2cebfeed55cb6ab9d98fce7b99e97cb9
version: null
Expand Down Expand Up @@ -224,7 +216,7 @@ packages:
- common_cells
- common_verification
riscv:
revision: a1dcae35edae6092ddbf92c424690cb903b678d5
revision: c760db14dbd6cc3ec3b8ae8274df2eac7225bcac
version: null
source:
Git: git@github.com:AlSaqr-platform/riscv_nn.git
Expand Down
3 changes: 1 addition & 2 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@ 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: "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 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.21.0 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.3 }
riscv: { git: "git@github.com:AlSaqr-platform/riscv_nn.git", rev: a1dcae35edae6092ddbf92c424690cb903b678d5 } # branch: yt/hmr
riscv: { git: "git@github.com:AlSaqr-platform/riscv_nn.git", rev: astral-v1.0 }
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
Expand Down
2 changes: 1 addition & 1 deletion rtl/core_region.sv
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ import rapid_recovery_pkg::*;
.PULP_CLUSTER ( 1 ),
.FPU ( FPU ),
.N_EXT_PERF_COUNTERS ( N_EXT_PERF_COUNTERS_ACTUAL ),
.Zfinx ( 0 ),
.Zfinx ( FPU ),
.WAPUTYPE ( WAPUTYPE ),
.DM_HaltAddress ( DEBUG_START_ADDR + 16'h0800 )
) RI5CY_CORE (
Expand Down
109 changes: 10 additions & 99 deletions rtl/pulp_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -424,21 +424,6 @@ hci_core_intf #(
// cores -> event unit ctrl
XBAR_PERIPH_BUS s_core_euctrl_bus[NB_CORES-1:0]();

// apu-interconnect
// handshake signals
logic [NB_CORES-1:0] fpu_master_req;
logic [NB_CORES-1:0] fpu_master_gnt;
// request channel
logic [NB_CORES-1:0][APU_NARGS_CPU-1:0][31:0] fpu_master_operands;
logic [NB_CORES-1:0][APU_WOP_CPU-1:0] fpu_master_op;
logic [NB_CORES-1:0][WAPUTYPE-1:0] fpu_master_type;
logic [NB_CORES-1:0][APU_NDSFLAGS_CPU-1:0] fpu_master_in_flags;
// response channel
logic [NB_CORES-1:0] fpu_master_rready;
logic [NB_CORES-1:0] fpu_master_valid;
logic [NB_CORES-1:0][31:0] fpu_master_result;
logic [NB_CORES-1:0][APU_NUSFLAGS_CPU-1:0] fpu_master_out_flags;

//----------------------------------------------------------------------//
// Interfaces between ICache - L0 - Icache_Interco and Icache_ctrl_unit //
// //
Expand Down Expand Up @@ -956,16 +941,16 @@ generate
.pc_backup_o ( backup_bus[i].pc_backup ),
.csr_backup_o ( backup_bus[i].csr_backup ),
//apu interface
.apu_master_req_o ( fpu_master_req [i] ),
.apu_master_gnt_i ( fpu_master_gnt [i] ),
.apu_master_type_o ( fpu_master_type [i] ),
.apu_master_operands_o ( fpu_master_operands [i] ),
.apu_master_op_o ( fpu_master_op [i] ),
.apu_master_flags_o ( fpu_master_in_flags [i] ),
.apu_master_valid_i ( fpu_master_valid [i] ),
.apu_master_ready_o ( fpu_master_rready [i] ),
.apu_master_result_i ( fpu_master_result [i] ),
.apu_master_flags_i ( fpu_master_out_flags[i] )
.apu_master_req_o ( ),
.apu_master_gnt_i ( '0 ),
.apu_master_type_o ( ),
.apu_master_operands_o ( ),
.apu_master_op_o ( ),
.apu_master_flags_o ( ),
.apu_master_valid_i ( '0 ),
.apu_master_ready_o ( ),
.apu_master_result_i ( '0 ),
.apu_master_flags_i ( '0 )
);

assign dbg_core_halted[i] = core2hmr[i].debug_halted;
Expand Down Expand Up @@ -1113,80 +1098,6 @@ hmr_unit #(
.core_bus_outputs_i ( '0 )
);

//****************************************************
//**** Shared FPU cluster - Shared execution units ***
//****************************************************
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;
logic [NB_CORES-1:0][2:0] s_apu__type;
logic [NB_CORES-1:0][14:0] s_apu__flags;
// response channel
logic [NB_CORES-1:0][4:0] s_apu__rflags;

for(genvar k=0; k< NB_CORES; k++) begin
assign s_apu__operands[k][2:0] = fpu_master_operands[k][2:0];
assign s_apu__op[k][5:0] = fpu_master_op[k][5:0];
assign s_apu__type[k][2:0] = fpu_master_type[k][2:0];
assign s_apu__flags[k][14:0] = fpu_master_in_flags[k][14:0];
assign fpu_master_out_flags[k][4:0] = s_apu__rflags[k][4:0];
end

shared_fpu_cluster #(
.NB_CORES ( NB_CORES ),
.NB_APUS ( 1 ),
.NB_FPNEW ( NumFpus ),
.FP_TYPE_WIDTH ( 3 ),

.NB_CORE_ARGS ( 3 ),
.CORE_DATA_WIDTH ( 32 ),
.CORE_OPCODE_WIDTH ( 6 ),
.CORE_DSFLAGS_CPU ( 15 ),
.CORE_USFLAGS_CPU ( 5 ),

.NB_APU_ARGS ( 2 ),
.APU_OPCODE_WIDTH ( 6 ),
.APU_DSFLAGS_CPU ( 15 ),
.APU_USFLAGS_CPU ( 5 ),

.NB_FPNEW_ARGS ( 3 ), //= 3,
.FPNEW_OPCODE_WIDTH ( 6 ), //= 6,
.FPNEW_DSFLAGS_CPU ( 15 ), //= 15,
.FPNEW_USFLAGS_CPU ( 5 ), //= 5,

.APUTYPE_ID ( 1 ),
.FPNEWTYPE_ID ( 0 ),

.C_FPNEW_FMTBITS (fpnew_pkg::FP_FORMAT_BITS ),
.C_FPNEW_IFMTBITS (fpnew_pkg::INT_FORMAT_BITS ),
.C_ROUND_BITS (3 ),
.C_FPNEW_OPBITS (fpnew_pkg::OP_BITS ),
.USE_FPU_OPT_ALLOC ("FALSE"),
.USE_FPNEW_OPT_ALLOC ("TRUE"),
.FPNEW_INTECO_TYPE ("SINGLE_INTERCO")
) i_shared_fpu_cluster (
.clk ( clk_i ),
.rst_n ( rst_ni ),
.test_mode_i ( test_mode_i ),
.core_slave_req_i ( fpu_master_req ),
.core_slave_gnt_o ( fpu_master_gnt ),
.core_slave_type_i ( s_apu__type ),
.core_slave_operands_i ( s_apu__operands ),
.core_slave_op_i ( s_apu__op ),
.core_slave_flags_i ( s_apu__flags ),
.core_slave_rready_i ( fpu_master_rready ),
.core_slave_rvalid_o ( fpu_master_valid ),
.core_slave_rdata_o ( fpu_master_result ),
.core_slave_rflags_o ( s_apu__rflags )
);
end else begin: gen_no_shared_fpu
assign fpu_master_gnt = '0;
assign fpu_master_valid = '0;
assign fpu_master_result = '0;
assign fpu_master_out_flags = '0;
end

//**************************************************************
//**** HW Processing Engines / Cluster-Coupled Accelerators ****
//**************************************************************
Expand Down

0 comments on commit b373cb0

Please sign in to comment.