Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ff01cbc
Swapped to memory-mapped RedMulE
Oct 1, 2025
f5cfa85
redmule and idma mm with tests
LucaBalboni24 Oct 6, 2025
046ba63
Add memory mapped interface support also for FSYNCH and tests (interr…
LucaBalboni24 Oct 9, 2025
9dfa2fb
event_unit introduced with tests and api file
LucaBalboni24 Oct 20, 2025
374ae5e
Introduce flex-v changes with core data demux and event unit updates
LucaBalboni24 Oct 27, 2025
2be6ea4
Update Flex-V bender and makefile and new utils
LucaBalboni24 Oct 28, 2025
626ca3a
Integrate cv32e40p core (PULPissimo 3.4.0) with Event Unit and p.elw …
LucaBalboni24 Nov 4, 2025
1cc4e7c
fix: Update CV32E40P core and simplify Event Unit API
LucaBalboni24 Nov 6, 2025
71f352c
Update comments and add mesh test event unit new
LucaBalboni24 Nov 10, 2025
52afc9c
Swapped to memory-mapped RedMulE
Oct 1, 2025
b0ff0fa
redmule and idma mm with tests
LucaBalboni24 Oct 6, 2025
d152bb5
Add memory mapped interface support also for FSYNCH and tests (interr…
LucaBalboni24 Oct 9, 2025
90dd422
event_unit introduced with tests and api file
LucaBalboni24 Oct 20, 2025
4f77209
Introduce flex-v changes with core data demux and event unit updates
LucaBalboni24 Oct 27, 2025
8697f88
Update Flex-V bender and makefile and new utils
LucaBalboni24 Oct 28, 2025
da5bce7
Integrate cv32e40p core (PULPissimo 3.4.0) with Event Unit and p.elw …
LucaBalboni24 Nov 4, 2025
8756a4b
fix: Update CV32E40P core and simplify Event Unit API
LucaBalboni24 Nov 6, 2025
ebcb7eb
Update comments and add mesh test event unit new
LucaBalboni24 Nov 10, 2025
ef2d8e4
Fixed obi-cut rsp_o.gnt
LucaBalboni24 Nov 10, 2025
710531d
Aligned to new exit routine
LucaBalboni24 Nov 10, 2025
9103436
Update .gitignore to exclude generated simulation files
LucaBalboni24 Nov 11, 2025
f4031b6
Add work/ and improve .gitignore for test artifacts
LucaBalboni24 Nov 11, 2025
30deba6
Ignore all test directories and modelsim.ini in root
LucaBalboni24 Nov 11, 2025
0be94cc
Remove redundant sw/.gitignore
LucaBalboni24 Nov 11, 2025
62f0cf7
Update dependencies for cv32e40p and obi
LucaBalboni24 Nov 11, 2025
05aba60
LucaBalboni24 Nov 11, 2025
515d90c
Updated memory mapping (shifted up by 0100) to prevent errors in comp…
LucaBalboni24 Nov 11, 2025
6e54c67
Clean-up the repo from old functions
LucaBalboni24 Nov 11, 2025
e91de98
Update comments
LucaBalboni24 Nov 11, 2025
e7e993e
Removed CLK gating monitor
LucaBalboni24 Nov 11, 2025
489a3e7
Update tile_test_mm.c
luca24balboni Nov 11, 2025
3269ff2
Fixed vip typo with older version core
luca24balboni Nov 12, 2025
bfb6d59
Fixed obi in Bender.yml and Bender.local SHA
luca24balboni Nov 17, 2025
7885457
Removed OBI cut from CV32 port to avoid protocol violations and updat…
luca24balboni Nov 26, 2025
6dd54e3
magia_tile: remove unused signals and fix unassigned signals
luca24balboni Nov 27, 2025
3e57227
Add floo_id signal declaration and assignment for FlooNoC router conf…
luca24balboni Nov 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ synth-ips.log
build-hw.log
profile-ips.log
magia_venv/
modelsim.ini
sw/tests/*/
7 changes: 4 additions & 3 deletions Bender.local
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
overrides:
fpnew : { git: "https://github.com/pulp-platform/cvfpu.git" , rev: a8e0cba6dd50f357ece73c2c955d96efc3c6c315 }
hci : { git: "https://github.com/pulp-platform/hci.git" , rev: 5a48a854573fca5bbabc1cfd4110fa4530a50ed7 }
cv32e40p : { git: "https://github.com/pulp-platform/cv32e40p.git" , rev: 1a93f340e9dadb9f7c8c471f27a40932c8b1c62e }
cv32e40x : { git: "https://github.com/pulp-platform/cv32e40x.git" , rev: a90101211048ba1a16cedbe4db963ab6e12569d7 }
axi : { git: "https://github.com/pulp-platform/axi.git" , version: 0.39.5 }
cv32e40p : { git: "https://github.com/pulp-platform/cv32e40p.git" , rev: 37a82d337ba60129c333d104c29e816d0698b53b }
cv32e40x : { git: "https://github.com/pulp-platform/cv32e40x.git" , rev: e51af131252027374d083a745ab6727fb9959daa }
axi : { git: "https://github.com/pulp-platform/axi.git" , version: 0.39.5 }
obi : { git: "https://github.com/pulp-platform/obi.git" , rev: 6a724da5c8d6412b88b6948746e04c1adf39d017 }
register_interface : { git: "https://github.com/pulp-platform/register_interface.git", rev: e25b36670ff7aab3402f40efcc2b11ee0f31cf19 }
idma : { git: "https://github.com/pulp-platform/iDMA.git" , rev: c12caf59bb482fe44b27361f6924ad346b2d22fe }
tech_cells_generic : { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.13 }
50 changes: 29 additions & 21 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,25 @@ package:
name: magia
authors:
- "Victor Isachi ([email protected])"
- "Luca Balboni ([email protected])"

dependencies:
redmule : { git: "https://github.com/pulp-platform/redmule.git" , rev: 9a1aa14be0b23f0ade84bab57e7e434397ac9876 } # branch: vi/scale_up
cv32e40x : { git: "https://github.com/pulp-platform/cv32e40x.git" , rev: a90101211048ba1a16cedbe4db963ab6e12569d7 } # branch: vi/redmule_scaleup
cv32e40p : { git: "https://github.com/pulp-platform/cv32e40p.git" , rev: 37a82d337ba60129c333d104c29e816d0698b53b }
idma : { git: "https://github.com/pulp-platform/iDMA.git" , rev: a6b190c7991331432afa9a2899d032bc1b176830 } # branch: vi/redmule_scaleup
hwpe-stream : { git: "https://github.com/pulp-platform/hwpe-stream.git" , version: 1.6 }
hwpe-ctrl : { git: "https://github.com/pulp-platform/hwpe-ctrl.git" , rev: c35d5b0886ab549fb9144c3c14a4682112330e21 } # branch: yt/reqrsp
hci : { git: "https://github.com/pulp-platform/hci.git" , rev: 5a48a854573fca5bbabc1cfd4110fa4530a50ed7 } # branch: vi/redmule_scaleup
cluster_icache : { git: "https://github.com/pulp-platform/cluster_icache.git" , rev: 917ecbf908bdaa22c5713bbcff277d142506bb16 } # branch: michaero/astral
fpnew : { git: "https://github.com/pulp-platform/cvfpu.git" , rev: "pulp-v0.1.3" }
fpu_ss : { git: "https://github.com/pulp-platform/fpu_ss.git" , rev: 8e2eff774d9d38a1e17a46bd56a0936dac9522f0 } # branch: vi/bender_manifest
obi : { git: "https://github.com/pulp-platform/obi.git" , version: 0.1.6 }
obi : { git: "https://github.com/pulp-platform/obi.git" , rev: 6a724da5c8d6412b88b6948746e04c1adf39d017 }
axi : { git: "https://github.com/pulp-platform/axi.git" , version: 0.39.5 }
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.4.4 }
safety_island : { git: "https://github.com/pulp-platform/safety_island.git" , rev: 2273db6c780ab7c582feaf0c9645ad644c35aa11 } # branch: vi/redmule_scaleup
axi_obi : { git: "https://github.com/pulp-platform/axi_obi.git" , rev: 84f21a6524bedcf17a569a62ac01b8a5610819c8 }
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.11 }
fractal_sync : { git: "https://github.com/VictorIsachi/fractal_sync" , rev: fdb619f40f99d769cfceb20ac2117ff8d99e98a3 } # branch: main
floo_noc : { git: "https://github.com/pulp-platform/FlooNoC.git" , rev: f4a36265cda8b56faee45692afb20ddfffba6dee } # branch: main
event_unit_flex : { git: "https://github.com/pulp-platform/event_unit_flex.git" , rev: 763c3b9977970f656326c70a96debfb2ac0f85b2 }

export_include_dirs:
- hw/include
Expand All @@ -55,6 +55,9 @@ sources:
- hw/mesh/magia_pkg.sv
- hw/tile/magia_tile_pkg.sv
# MAGIA Tile
- hw/include/xbar_periph_bus_if.sv
- hw/tile/cluster_event_map.sv
- hw/tile/magia_event_unit.sv
- hw/tile/converters/data2obi.sv
- hw/tile/converters/obi2data.sv
- hw/tile/converters/instr2obi.sv
Expand All @@ -63,14 +66,14 @@ sources:
- hw/tile/converters/cache2instr.sv
- hw/tile/converters/obi2hci.sv
- hw/tile/converters/hci2obi.sv
- hw/tile/converters/xif_if2struct.sv
- hw/tile/converters/obi2hwpe_ctrl.sv
- hw/tile/obi_demux_addr.sv
- hw/tile/l1_spm.sv
- hw/tile/idma_xif_inst_decoder.sv
- hw/tile/xif_inst_dispatcher.sv
- hw/tile/idma_axi_obi_transfer_ch.sv
- hw/tile/idma_ctrl.sv
- hw/tile/fractal_sync_xif_inst_decoder.sv
- hw/tile/idma_obi_ctrl_decoder.sv
- hw/tile/idma_ctrl_mm.sv
- hw/tile/obi_slave_fsync.sv
- hw/tile/core_data_demux_eu_direct.sv
- hw/tile/magia_tile.sv
# MAGIA DV
- target/sim/src/tile/magia_tile_tb_pkg.sv
Expand All @@ -95,6 +98,9 @@ sources:
- hw/tile/magia_tile_pkg.sv
- hw/mesh/noc/magia_noc_pkg.sv
# MAGIA Tile
- hw/include/xbar_periph_bus_if.sv
- hw/tile/cluster_event_map.sv
- hw/tile/magia_event_unit.sv
- hw/tile/converters/data2obi.sv
- hw/tile/converters/obi2data.sv
- hw/tile/converters/instr2obi.sv
Expand All @@ -103,14 +109,14 @@ sources:
- hw/tile/converters/cache2instr.sv
- hw/tile/converters/obi2hci.sv
- hw/tile/converters/hci2obi.sv
- hw/tile/converters/xif_if2struct.sv
- hw/tile/converters/obi2hwpe_ctrl.sv
- hw/tile/obi_demux_addr.sv
- hw/tile/l1_spm.sv
- hw/tile/idma_xif_inst_decoder.sv
- hw/tile/xif_inst_dispatcher.sv
- hw/tile/idma_axi_obi_transfer_ch.sv
- hw/tile/idma_ctrl.sv
- hw/tile/fractal_sync_xif_inst_decoder.sv
- hw/tile/idma_obi_ctrl_decoder.sv
- hw/tile/idma_ctrl_mm.sv
- hw/tile/obi_slave_fsync.sv
- hw/tile/core_data_demux_eu_direct.sv
- hw/tile/magia_tile.sv
# MAGIA
- hw/mesh/magia.sv
Expand All @@ -121,7 +127,6 @@ sources:
- target/sim/src/mesh/magia_vip.sv
- target/sim/src/mesh/magia_fixture.sv
- target/sim/src/mesh/magia_tb.sv

- target: all(not(magia_dv), asic)
files:
# NoC
Expand All @@ -135,6 +140,9 @@ sources:
- hw/tile/magia_tile_pkg.sv
- hw/mesh/noc/magia_noc_pkg.sv
# MAGIA Tile
- hw/include/xbar_periph_bus_if.sv
- hw/tile/cluster_event_map.sv
- hw/tile/magia_event_unit.sv
- hw/tile/converters/data2obi.sv
- hw/tile/converters/obi2data.sv
- hw/tile/converters/instr2obi.sv
Expand All @@ -143,14 +151,14 @@ sources:
- hw/tile/converters/cache2instr.sv
- hw/tile/converters/obi2hci.sv
- hw/tile/converters/hci2obi.sv
- hw/tile/converters/xif_if2struct.sv
- hw/tile/converters/obi2hwpe_ctrl.sv
- hw/tile/obi_demux_addr.sv
- hw/tile/l1_spm.sv
- hw/tile/idma_xif_inst_decoder.sv
- hw/tile/xif_inst_dispatcher.sv
- hw/tile/idma_axi_obi_transfer_ch.sv
- hw/tile/idma_ctrl.sv
- hw/tile/fractal_sync_xif_inst_decoder.sv
- hw/tile/idma_obi_ctrl_decoder.sv
- hw/tile/idma_ctrl_mm.sv
- hw/tile/obi_slave_fsync.sv
- hw/tile/core_data_demux_eu_direct.sv
- hw/tile/magia_tile.sv
# MAGIA
- hw/mesh/noc/floo_axi_mesh_2x2_noc.sv
Expand Down
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BENDER_DIR ?= .
ISA ?= riscv
ARCH ?= rv
XLEN ?= 32
XTEN ?= imafc
XTEN ?= imfcxpulpv2
ABI ?= ilp
XABI ?= f

Expand Down Expand Up @@ -202,11 +202,12 @@ include bender_sim.mk
include bender_synth.mk
include bender_profile.mk

bender_defs += -D COREV_ASSERT_OFF

bender_targs += -t rtl
bender_targs += -t test
bender_targs += -t cv32e40p_exclude_tracer
bender_targs += -t cv32e40p_include_tracer


# Targets needed to avoid error even though the module is not used
bender_targs += -t snitch_cluster
bender_targs += -t idma_test
Expand All @@ -226,9 +227,9 @@ ifeq ($(mesh_dv),1)
else
tb := magia_tile_tb
endif
WAVES := ./wave.do
bender_targs += -t redmule_complex
bender_targs += -t cv32e40x_bhv
WAVES := $(mkfile_path)/wave.do
bender_targs += -t redmule_hwpe


update-ips:
$(BENDER) update
Expand Down
40 changes: 40 additions & 0 deletions hw/include/xbar_periph_bus_if.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright 2018 ETH Zurich and University of Bologna.
// Copyright and related rights are licensed under the Solderpad Hardware
// License, Version 0.51 (the "License"); you may not use this file except in
// compliance with the License. You may obtain a copy of the License at
// http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law
// or agreed to in writing, software, hardware and materials distributed under
// this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

interface XBAR_PERIPH_BUS #(
parameter int ID_WIDTH = 2 // typically number of cores plus one
);

// Request Channel
logic req;
logic [31:0] add;
logic wen;
logic [31:0] wdata;
logic [3:0] be;
logic gnt;
logic [ID_WIDTH-1:0] id;

// Response Channel
logic r_valid;
logic r_opc;
logic [ID_WIDTH-1:0] r_id;
logic [31:0] r_rdata;

modport Master (
output req, add, wen, wdata, be, id,
input gnt, r_rdata, r_opc, r_id, r_valid
);

modport Slave (
input req, add, wen, wdata, be, id,
output gnt, r_rdata, r_opc, r_id, r_valid
);

endinterface
5 changes: 1 addition & 4 deletions hw/mesh/magia.sv
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,7 @@ module magia
.core_sleep_o ( core_sleep_o[i*N_TILES_X+j] ),
.wu_wfe_i
);
`ifdef CORE_TRACES
localparam string core_trace_file_name = $sformatf("%s%0d", "log_file_", i*N_TILES_X+j);
defparam i_magia_tile.i_cv32e40x_core.rvfi_i.tracer_i.LOGFILE_PATH_PLUSARG = core_trace_file_name;
`endif
// Note: cv32e40p tracer generates its own filename: trace_core_{cluster_id}_{core_id}.log

if (i == 0) begin
if (j == 0) begin // T-L corner
Expand Down
55 changes: 55 additions & 0 deletions hw/tile/cluster_event_map.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (C) 2023-2024 ETH Zurich and University of Bologna
*
* Licensed under the Solderpad Hardware License, Version 0.51
* (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: SHL-0.51
*
* Simple cluster event mapping module for MAGIA project
* This module maps various event types to the final cluster event outputs
*/

module cluster_event_map #(
parameter int unsigned NB_CORES = 1
)(
// Input events from various sources
input logic [NB_CORES-1:0] [7:0] sw_events_i, // Software events
input logic [NB_CORES-1:0] barrier_events_i, // Barrier events (reduced)
input logic [NB_CORES-1:0] mutex_events_i, // Mutex events (reduced)
input logic [NB_CORES-1:0] dispatch_events_i, // Dispatch events
input logic periph_fifo_event_i, // Peripheral FIFO event

// Hardware events from accelerators, DMA, timers, etc.
input logic [NB_CORES-1:0] [3:0] acc_events_i, // Accelerator events (4 bits per core)
input logic [NB_CORES-1:0] [1:0] dma_events_i, // DMA events (2 bits per core)
input logic [NB_CORES-1:0] [1:0] timer_events_i, // Timer events (2 bits per core)
input logic [NB_CORES-1:0][31:0] cluster_events_i, // Custom cluster events (32 bits per core)

// Output: mapped events for each core
output logic [NB_CORES-1:0][31:0] events_mapped_o
);

// Simple event mapping for each core
for (genvar i = 0; i < NB_CORES; i++) begin : gen_event_mapping
assign events_mapped_o[i] = {
cluster_events_i[i][31:16], // [31:16] Custom cluster events (upper 16 bits)
4'b0, // [15:12] Reserved
acc_events_i[i], // [11:8] Accelerator events
2'b0, // [7:6] Reserved
timer_events_i[i], // [5:4] Timer events
dma_events_i[i], // [3:2] DMA events
dispatch_events_i[i], // [1] Dispatch event
barrier_events_i[i] | mutex_events_i[i] | periph_fifo_event_i // [0] Combined sync/periph events
};
end

endmodule : cluster_event_map
8 changes: 4 additions & 4 deletions hw/tile/converters/data2obi.sv
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ module data2obi_req
assign obi_req_o.a.aid = 'b0;
assign obi_req_o.a.a_optional.auser = 'b0;
assign obi_req_o.a.a_optional.wuser = 'b0;
assign obi_req_o.a.a_optional.atop = data_req_i.atop;
assign obi_req_o.a.a_optional.memtype = data_req_i.memtype;
assign obi_req_o.a.a_optional.atop = 6'b0;
assign obi_req_o.a.a_optional.memtype = 2'b0;
assign obi_req_o.a.a_optional.mid = 'b0;
assign obi_req_o.a.a_optional.prot = data_req_i.prot;
assign obi_req_o.a.a_optional.dbg = data_req_i.dbg;
assign obi_req_o.a.a_optional.prot = 3'b0;
assign obi_req_o.a.a_optional.dbg = 1'b0;
assign obi_req_o.a.a_optional.achk = 'b0;

endmodule: data2obi_req
2 changes: 1 addition & 1 deletion hw/tile/converters/obi2data.sv
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ module obi2data_rsp
assign data_rsp_o.rvalid = obi_rsp_i.rvalid;
assign data_rsp_o.rdata = obi_rsp_i.r.rdata;
assign data_rsp_o.err = obi_rsp_i.r.err;
assign data_rsp_o.exokay = obi_rsp_i.r.r_optional.exokay;
// cv32e40p doesn't support exclusive access - exokay field removed

endmodule: obi2data_rsp
58 changes: 58 additions & 0 deletions hw/tile/converters/obi2hwpe_ctrl.sv
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* Copyright (C) 2023-2024 ETH Zurich and University of Bologna
*
* Licensed under the Solderpad Hardware License, Version 0.51
* (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* SPDX-License-Identifier: SHL-0.51
*
* Authors: Luca Balboni <[email protected]>
*
*
* OBI to iDMA Bridge - Memory-mapped control interface for iDMA
*
*/

module obi2hwpe_ctrl
import magia_tile_pkg::*;
(
//OBI side
input core_obi_data_req_t obi_req_i,
output core_obi_data_rsp_t obi_rsp_o,

//HWPE-ctrl (RedMulE) side
output redmule_ctrl_req_t ctrl_req_o,
input redmule_ctrl_rsp_t ctrl_rsp_i
);

// ------------------------
// Address channel mapping
// ------------------------
assign ctrl_req_o.req = obi_req_i.req;
assign obi_rsp_o.gnt = ctrl_rsp_i.gnt; // handshake 1:1

assign ctrl_req_o.add = obi_req_i.a.addr;
assign ctrl_req_o.data = obi_req_i.a.wdata;
assign ctrl_req_o.be = obi_req_i.a.be;
assign ctrl_req_o.wen = ~obi_req_i.a.we; // inversione semantica
assign ctrl_req_o.id = '0; // OBI doesn't have ID in this config

// ------------------------
// Response channel mapping
// ------------------------
assign obi_rsp_o.rvalid = ctrl_rsp_i.r_valid;

assign obi_rsp_o.r.rdata = ctrl_rsp_i.r_data;
assign obi_rsp_o.r.err = 1'b0; // RedMulE ctrl no errors


endmodule

Loading
Loading