Skip to content

Commit

Permalink
Fixed address issue. Data/Periph demux did not consider the cluster
Browse files Browse the repository at this point in the history
base address input for routing requests. Propagated cluster index only
to cores.
  • Loading branch information
Yvan Tortorella committed Aug 11, 2023
1 parent 201453d commit 70ce347
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions rtl/data_periph_demux.sv
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ module data_periph_demux

always_comb
begin
TCDM_RW = 12'h100 + (CLUSTER_ID << 2) + 0;
TCDM_TS = 12'h100 + (CLUSTER_ID << 2) + 1;
DEM_PER = 12'h100 + (CLUSTER_ID << 2) + 2;
TCDM_RW = {base_addr_i, 8'h00} + (CLUSTER_ID << 2) + 0;
TCDM_TS = {base_addr_i, 8'h00} + (CLUSTER_ID << 2) + 1;
DEM_PER = {base_addr_i, 8'h00} + (CLUSTER_ID << 2) + 2;
end


Expand Down
6 changes: 3 additions & 3 deletions rtl/pulp_cluster.sv
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ cluster_bus_wrap #(
.clk_i ( clk_i ),
.rst_ni ( rst_ni ),
.test_en_i ( test_mode_i ),
.cluster_id_i ( cluster_id_i ),
.cluster_id_i ( '0 ),
.instr_slave ( s_core_instr_bus ),
.data_slave ( s_core_ext_bus ),
.dma_slave ( s_dma_ext_bus ),
Expand Down Expand Up @@ -657,7 +657,7 @@ cluster_interconnect_wrap #(
) cluster_interconnect_wrap_i (
.clk_i ( clk_i ),
.rst_ni ( rst_ni ),
.cluster_id_i ( cluster_id_i ),
.cluster_id_i ( '0 ),

.core_tcdm_slave ( s_hci_core ),
.hwpe_tcdm_slave ( s_hci_hwpe ),
Expand Down Expand Up @@ -1018,7 +1018,7 @@ generate
.test_en_i ( test_mode_i ),
.clk_en_i ( clk_core_en[i] ),
.base_addr_i ( base_addr_i ),
.cluster_id_i ( cluster_id_i ),
.cluster_id_i ( '0 ),
.ext_perf_o ( ext_perf[i] ),
.core_data_req_i ( demux_data_req[i] ),
.core_data_rsp_o ( demux_data_rsp[i] ),
Expand Down
6 changes: 3 additions & 3 deletions tb/pulp_cluster_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module pulp_cluster_tb;
localparam bit[AxiAw-1:0] ClustPeriphOffs = 'h00200000;
localparam bit[AxiAw-1:0] ClustExtOffs = 'h00400000;
localparam bit[ 5:0] ClustIdx = 'h1;
localparam bit[AxiAw-1:0] ClustBaseAddr = ClustBase - ClustIdx*ClustExtOffs;
localparam bit[AxiAw-1:0] ClustBaseAddr = ClustBase;
localparam bit[AxiAw-1:0] L2BaseAddr = 'h78000000;
localparam bit[AxiAw-1:0] L2Size = 'h00100000;
localparam bit[AxiAw-1:0] BootAddr = L2BaseAddr + 'h8080;
Expand Down Expand Up @@ -311,7 +311,7 @@ module pulp_cluster_tb;

.pmu_mem_pwdn_i ( 1'b0 ),

.base_addr_i ( '0 ),
.base_addr_i ( 4'd5 ),

.dma_pe_evt_ack_i ( '1 ),
.dma_pe_evt_valid_o ( ),
Expand All @@ -334,7 +334,7 @@ module pulp_cluster_tb;
.fetch_en_i ( s_cluster_fetch_en ),
.eoc_o ( s_cluster_eoc ),
.busy_o ( s_cluster_busy ),
.cluster_id_i ( 6'b000001 ),
.cluster_id_i ( ClustIdx ),

.async_data_master_aw_wptr_o ( async_cluster_to_soc_axi_bus.aw_wptr ),
.async_data_master_aw_rptr_i ( async_cluster_to_soc_axi_bus.aw_rptr ),
Expand Down

0 comments on commit 70ce347

Please sign in to comment.