Skip to content

Commit

Permalink
Merge pull request openhwgroup#59 from pulp-platform/yt/pulp-hmr
Browse files Browse the repository at this point in the history
Integration of PULP cluster with HMR + RedMulE
  • Loading branch information
yvantor authored Jun 2, 2023
2 parents 6fae2eb + 7054514 commit 5feab3c
Show file tree
Hide file tree
Showing 12 changed files with 333 additions and 137 deletions.
22 changes: 11 additions & 11 deletions Bender.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
# SPDX-License-Identifier: SHL-0.51

overrides:
axi: { git: https://github.com/pulp-platform/axi.git , rev: 5e85c7e5ee38a797b9ef6bbed0cf0d4fde473c67 } # branch: axi_rt-tbenz
apb: { git: "https://github.com/pulp-platform/apb.git" , version: =0.2.3 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", rev: 2bb08879bc2ceabe2b6a0dc283753048a739e27b } # branch main until new version tag newer than v0.4.0
redundancy_cells: { git: "https://github.com/pulp-platform/redundancy_cells.git" , rev: "6e10650b50c7b40f7f81602acf61526330c4d69d" } # branch: michaero/hmr-alt
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: =0.2.11 }
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git" , version: =0.8.0 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git" , rev: e2486afcca71b685188f4fc8998b2f08f41bd961 } # branch carfield until PR #189, #183 are merged
idma: { git: "https://github.com/pulp-platform/idma.git" , rev: 437ffa9 }
hier-icache: { git: "https://github.com/pulp-platform/hier-icache.git" , rev: a7e3f4e4c7fe607bcd6b9d94db77f612fd6ef6be }
scm: { git: "https://github.com/pulp-platform/scm.git" , rev: f7b51416f3c407e4c31e9c016616d57aae2687bd }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: 89e1019d64a86425211be6200770576cbdf3e8b3 } # branch: assertion-fix
axi: { git: https://github.com/pulp-platform/axi.git , rev: 5e85c7e5ee38a797b9ef6bbed0cf0d4fde473c67 } # branch: axi_rt-tbenz
apb: { git: "https://github.com/pulp-platform/apb.git" , version: =0.2.3 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git" , rev: 2bb08879bc2ceabe2b6a0dc283753048a739e27b } # branch main until new version tag newer than v0.4.0
redundancy_cells: { git: "https://github.com/pulp-platform/redundancy_cells.git" , rev: "6e10650b50c7b40f7f81602acf61526330c4d69d" } # branch: michaero/hmr-alt
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git" , version: =0.2.11 }
riscv-dbg: { git: "https://github.com/pulp-platform/riscv-dbg.git" , version: =0.8.0 }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git" , rev: e2486afcca71b685188f4fc8998b2f08f41bd961 } # branch carfield until PR #189, #183 are merged
idma: { git: "https://github.com/pulp-platform/idma.git" , rev: 437ffa9 }
hier-icache: { git: "https://github.com/pulp-platform/hier-icache.git" , rev: a7e3f4e4c7fe607bcd6b9d94db77f612fd6ef6be }
scm: { git: "https://github.com/pulp-platform/scm.git" , rev: f7b51416f3c407e4c31e9c016616d57aae2687bd }
cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: 89e1019d64a86425211be6200770576cbdf3e8b3 } # branch: assertion-fix
44 changes: 29 additions & 15 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ packages:
dependencies:
- common_cells
cluster_peripherals:
revision: d388a790d9e1129e3ec57b2e0075ee21e454c3b1
version: 2.1.0
revision: a596f17fc77713909bceb7eecf3ea2c3cdfe707c
version: null
source:
Git: https://github.com/pulp-platform/cluster_peripherals.git
dependencies:
Expand Down Expand Up @@ -230,8 +230,8 @@ packages:
- cv32e40p
- fpnew
hci:
revision: 8fb848e8f6722c1c21b44533535f430960c31b0b
version: 1.0.8
revision: b2e6f391aa6c10c03f45b693d80a0aaddecf169b
version: null
source:
Git: https://github.com/pulp-platform/hci.git
dependencies:
Expand All @@ -257,15 +257,6 @@ packages:
Git: https://github.com/pulp-platform/hwpe-ctrl.git
dependencies:
- tech_cells_generic
hwpe-datamover-example:
revision: 47e7fe8a38331b123d763ecab11be4058d425021
version: 1.0.1
source:
Git: https://github.com/pulp-platform/hwpe-datamover-example.git
dependencies:
- hci
- hwpe-ctrl
- hwpe-stream
hwpe-stream:
revision: ddc154424187dff42a8fcec946c768ceb13f13de
version: 1.6.4
Expand Down Expand Up @@ -360,7 +351,7 @@ packages:
dependencies:
- axi_slice
pulp_cluster:
revision: 43bb73f5f239b6d9bade79ef4b5c62756bd58dc4
revision: bd8182aaa33f2b0ac7bf924621f094a382d8ab17
version: null
source:
Git: https://github.com/pulp-platform/pulp_cluster.git
Expand All @@ -377,15 +368,30 @@ packages:
- fpu_interco
- hci
- hier-icache
- hwpe-datamover-example
- ibex
- idma
- mchan
- per2axi
- redmule
- redundancy_cells
- register_interface
- riscv
- scm
- tech_cells_generic
- timer_unit
redmule:
revision: 3797413e5f190c2a86185ab6d8b12af365051b1e
version: null
source:
Git: https://github.com/pulp-platform/redmule.git
dependencies:
- common_cells
- cv32e40p
- fpnew
- hci
- hwpe-ctrl
- hwpe-stream
- tech_cells_generic
redundancy_cells:
revision: 6e10650b50c7b40f7f81602acf61526330c4d69d
version: null
Expand All @@ -406,6 +412,14 @@ packages:
- axi
- common_cells
- common_verification
riscv:
revision: 4ceb402db8619718a9170058bb31f75fcdf7ed1c
version: null
source:
Git: [email protected]:AlSaqr-platform/riscv_nn.git
dependencies:
- fpnew
- tech_cells_generic
riscv-dbg:
revision: 138d74bcaa90c70180c12215db3776813d2a95f2
version: 0.8.0
Expand Down
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
hyperbus: { git: https://github.com/pulp-platform/hyperbus.git, rev: be110d111f555af5de629f6315834c050b8b5148 } # branch: main
car_l2: { git: [email protected]:carfield/carfield_l2_mem.git, rev: 08503a05307ef556ed5439619c70c039ff93d77a } # branch: main
safety_island: { git: [email protected]:carfield/safety-island.git, rev: 67f0b4ef4c3b08fcd423bc5e70db144b196cd2d1 } # branch: master
pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: 43bb73f5f239b6d9bade79ef4b5c62756bd58dc4 } # branch: yt/carfield-integration
pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: bd8182aaa33f2b0ac7bf924621f094a382d8ab17 } # branch: yt/carfield-integration
opentitan: { git: https://github.com/alsaqr-platform/opentitan.git, rev: ed1e7f1d53e28de556a3b02bc1bd1b855f51af15 } # branch: lowRISC-rebase
mailbox_unit: { git: [email protected]:pulp-platform/mailbox_unit.git, version: 1.1.0 }
apb: { git: https://github.com/pulp-platform/apb.git, version: 0.2.3 }
Expand Down
2 changes: 2 additions & 0 deletions bender-common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
common_targs += -t cva6
common_targs += -t mchan
common_targs += -t spatz
common_targs += -t integer_cluster
common_targs += -t cv32e40p_use_ff_regfile
common_targs += -t cv64a6_imafdcsclic_sv39

# bender defines
common_defs += -D FEATURE_ICACHE_STAT
common_defs += -D PRIVATE_ICACHE
common_defs += -D HIERARCHY_ICACHE_32BIT
common_degs += -D CLUSTER_ALIAS
4 changes: 1 addition & 3 deletions carfield.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ SPATZ_MAKEDIR := $(SPATZ_ROOT)/hw/system/spatz_cluster

TESTNAME ?= helloworld
MEMTYPE ?= spm
CHS_BINARY ?= $(CHS_ROOT)/sw/tests/hostd/$(TESTNAME).car.$(MEMTYPE).elf
CHS_BINARY ?= $(CAR_ROOT)/sw/tests/hostd/$(TESTNAME).car.$(MEMTYPE).elf
SECD_BINARY ?= # TODO: secd sw root
SAFED_BINARY ?= # TODo: safed sw root
CHS_IMAGE ?=
Expand All @@ -46,8 +46,6 @@ include $(CAR_ROOT)/utils/venv.mk
TARGETS += -t sim
TARGETS += -t test
TARGETS += -t rtl
TARGETS += -t integer_cluster
TARGETS += -t cv64a6_imafdcsclic_sv39
TARGETS += -t simulation
TARGETS += $(common_targs)

Expand Down
52 changes: 27 additions & 25 deletions hw/carfield.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,8 @@ safety_island_synth_wrapper #(
// PULP integer cluster

logic pulpcl_mbox_intr;
assign car_regs_hw2reg.pulp_cluster_eoc.de = 1'b1;
assign car_regs_hw2reg.pulp_cluster_busy.de = 1'b1;

pulp_cluster #(
.NB_CORES ( IntClusterNumCores ),
Expand Down Expand Up @@ -1204,31 +1206,31 @@ pulp_cluster #(
.LOG_DEPTH ( LogDepth ),
.BaseAddr ( IntClusterBase )
) i_integer_cluster (
.clk_i ( pulp_clk ),
.rst_ni ( pulp_rst_n ),
.pwr_on_rst_ni ( pulp_pwr_on_rst_n ),
.ref_clk_i ( rt_clk_i ),
.pmu_mem_pwdn_i ( '0 ),
.base_addr_i ( '0 ),
.test_mode_i ( test_mode_i ),
.cluster_id_i ( IntClusterIndex ),
.en_sa_boot_i ( '0 ), // To Soc Control
.fetch_en_i ( car_regs_reg2hw.pulp_cluster_fetch_enable ), // To Soc Control
.eoc_o ( ), // To Soc Control
.busy_o ( ), // To Soc Control
.axi_isolate_i ( slave_isolate_req [IntClusterSlvIdx] ), // To SoC Control
.axi_isolated_o ( master_isolated_rsp [IntClusterMstIdx] ), // To SoC Control
.dma_pe_evt_ack_i ( '0 ), // To edge propagator
.dma_pe_evt_valid_o ( ), // To edge propagator
.dma_pe_irq_ack_i ( '1 ), // To edge propagator (?)
.dma_pe_irq_valid_o ( ), // To edge propagator (?)
.dbg_irq_valid_i ( '0 ), // To edge propagator (?)
.mbox_irq_i ( pulpcl_mbox_intr ), // from hostd or safed
.pf_evt_ack_i ( '1 ), // To edge propagator (?)
.pf_evt_valid_o ( ), // To edge propagator (?)
.async_cluster_events_wptr_i ( '0 ), // To edge propagator (?)
.async_cluster_events_rptr_o ( ), // To edge propagator (?)
.async_cluster_events_data_i ( '0 ), // To edge propagator (?)
.clk_i ( pulp_clk ),
.rst_ni ( pulp_rst_n ),
.pwr_on_rst_ni ( pulp_pwr_on_rst_n ),
.ref_clk_i ( rt_clk_i ),
.pmu_mem_pwdn_i ( '0 ),
.base_addr_i ( '0 ),
.test_mode_i ( test_mode_i ),
.cluster_id_i ( IntClusterIndex ),
.en_sa_boot_i ( car_regs_reg2hw.pulp_cluster_boot_enable ),
.fetch_en_i ( car_regs_reg2hw.pulp_cluster_fetch_enable ),
.eoc_o ( car_regs_hw2reg.pulp_cluster_eoc.d ),
.busy_o ( car_regs_hw2reg.pulp_cluster_busy.d ),
.axi_isolate_i ( slave_isolate_req [IntClusterSlvIdx] ),
.axi_isolated_o ( master_isolated_rsp [IntClusterMstIdx] ),
.dma_pe_evt_ack_i ( '0 ),
.dma_pe_evt_valid_o ( ),
.dma_pe_irq_ack_i ( '1 ),
.dma_pe_irq_valid_o ( ),
.dbg_irq_valid_i ( '0 ),
.mbox_irq_i ( pulpcl_mbox_intr ),
.pf_evt_ack_i ( '1 ),
.pf_evt_valid_o ( ),
.async_cluster_events_wptr_i ( '0 ),
.async_cluster_events_rptr_o ( ),
.async_cluster_events_data_i ( '0 ),
// AXI4 Slave port
.async_data_slave_aw_data_i ( axi_slv_intcluster_aw_data ),
.async_data_slave_aw_wptr_i ( axi_slv_intcluster_aw_wptr ),
Expand Down
10 changes: 5 additions & 5 deletions hw/carfield_pkg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ typedef enum byte_bt {
EthernetSlvIdx = 'd3,
PeriphsSlvIdx = 'd4,
FPClusterSlvIdx = 'd5,
IntClusterSlvIdx = 'd6,
MailboxSlvIdx = 'd7
MailboxSlvIdx = 'd6,
IntClusterSlvIdx = 'd7
} axi_slv_idx_t;

typedef enum byte_bt {
Expand Down Expand Up @@ -310,16 +310,16 @@ localparam int unsigned SafetyIslandPerSize = 'h0010_0000;
/******************************/
/* Integer Cluster Parameters */
/******************************/
localparam int unsigned IntClusterNumCores = 8;
localparam int unsigned IntClusterNumHwpePorts = 0;
localparam int unsigned IntClusterNumCores = 12;
localparam int unsigned IntClusterNumHwpePorts = 9;
localparam int unsigned IntClusterNumDmas = 4;
localparam int unsigned IntClusterNumMstPer = 1;
localparam int unsigned IntClusterNumSlvPer = 10;
localparam int unsigned IntClusterAlias = 1;
localparam int unsigned IntClusterAliasBase = 12'h000;
localparam int unsigned IntClusterTcdmSize = 256*1024;
localparam int unsigned IntClusterTcdmBanks = 16;
localparam int unsigned IntClusterHwpePresent = 0;
localparam int unsigned IntClusterHwpePresent = 1;
localparam int unsigned IntClusterUseHci = 1;
localparam int unsigned IntClusterSetAssociative = 4;
localparam int unsigned IntClusterNumCacheBanks = 2;
Expand Down
7 changes: 5 additions & 2 deletions hw/cheshire_wrap.sv
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,11 @@ module cheshire_wrap
);

// All AXI slave buses
cheshire_axi_ext_slv_req_t [iomsb(Cfg.AxiExtNumSlv):0] axi_ext_slv_req, axi_ext_slv_isolated_req;
cheshire_axi_ext_slv_rsp_t [iomsb(Cfg.AxiExtNumSlv):0] axi_ext_slv_rsp, axi_ext_slv_isolated_rsp;
cheshire_axi_ext_slv_req_t [iomsb(Cfg.AxiExtNumSlv):0] axi_ext_slv_req;
cheshire_axi_ext_slv_rsp_t [iomsb(Cfg.AxiExtNumSlv):0] axi_ext_slv_rsp;

cheshire_axi_ext_slv_req_t [iomsb(Cfg.AxiExtNumSlv-2):0] axi_ext_slv_isolated_req;
cheshire_axi_ext_slv_rsp_t [iomsb(Cfg.AxiExtNumSlv-2):0] axi_ext_slv_isolated_rsp;

// All AXI master buses
cheshire_axi_ext_mst_req_t [iomsb(Cfg.AxiExtNumMst):0] axi_ext_mst_req;
Expand Down
Loading

0 comments on commit 5feab3c

Please sign in to comment.