Skip to content
Merged
Changes from all commits
Commits
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
29 changes: 21 additions & 8 deletions cluster_control_unit/cluster_control_unit.sv
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ import hci_package::*;
output logic [HWPE_SEL_BITS-1:0] hwpe_sel_o,
output hci_interconnect_ctrl_t hci_ctrl_o,

output logic idma_en_o,

output logic fregfile_disable_o,

input logic [NB_CORES-1:0] core_halted_i, // cores are in halted mode (which means debugging)
Expand Down Expand Up @@ -116,6 +118,8 @@ import hci_package::*;
logic [HWPE_SEL_BITS-1:0] hwpe_sel_n;
logic [10:0] hci_ctrl_n, hci_ctrl_q;

logic idma_en_n;

logic fregfile_disable_n;

logic [NB_CORES-1:0][31:0] boot_addr_n;
Expand Down Expand Up @@ -207,17 +211,18 @@ import hci_package::*;
3'b011:
// +---------------------------------------------------------------------------------+
// ADDR | unused | hwpe_sel | fregfile_dis | hwpe_en | hci_ctrl |
// 0x18 | 31..13+HWPE_SEL_BITS | 12+HWPE_SEL_BITS..13 | 12 | 11 | 10..0 |
// 0x18 | 31..15+HWPE_SEL_BITS | 12+HWPE_SEL_BITS..13 | 12 | 11 | 10..0 |
// +---------------------------------------------------------------------------------+
begin
rdata_n[OFFSET_2+OFFSET_1+1] = 0;
rdata_n[OFFSET_2+OFFSET_1 ] = 0;
rdata_n[OFFSET_2+OFFSET_1-1:OFFSET_1] = 0;
rdata_n[OFFSET_1-1:0] = 0;
rdata_n[OFFSET_2+OFFSET_1+2:0] = hci_ctrl_q;
rdata_n[OFFSET_2+OFFSET_1+3] = hwpe_en_o;
rdata_n[OFFSET_2+OFFSET_1+4] = fregfile_disable_o;
rdata_n[OFFSET_2+OFFSET_1+1] = 0;
rdata_n[OFFSET_2+OFFSET_1 ] = 0;
rdata_n[OFFSET_2+OFFSET_1-1:OFFSET_1] = 0;
rdata_n[OFFSET_1-1:0] = 0;
rdata_n[OFFSET_2+OFFSET_1+2:0] = hci_ctrl_q;
rdata_n[OFFSET_2+OFFSET_1+3] = hwpe_en_o;
rdata_n[OFFSET_2+OFFSET_1+4] = fregfile_disable_o;
rdata_n[OFFSET_2+OFFSET_1+5+:HWPE_SEL_BITS] = hwpe_sel_o;
rdata_n[OFFSET_2+OFFSET_1+6+HWPE_SEL_BITS] = idma_en_o;
end

3'b100: rdata_n[0] = cluster_cg_en_o;
Expand Down Expand Up @@ -263,6 +268,8 @@ import hci_package::*;
hwpe_sel_n = hwpe_sel_o;
hci_ctrl_n = hci_ctrl_q;

idma_en_n = idma_en_o;

fregfile_disable_n = fregfile_disable_o;

fetch_en_n = fetch_en_q;
Expand Down Expand Up @@ -303,6 +310,7 @@ import hci_package::*;
hwpe_en_n = speriph_slave.wdata[OFFSET_2+OFFSET_1+3];
fregfile_disable_n = speriph_slave.wdata[OFFSET_2+OFFSET_1+4];
hwpe_sel_n = speriph_slave.wdata[OFFSET_2+OFFSET_1+5+:HWPE_SEL_BITS];
idma_en_n = speriph_slave.wdata[OFFSET_2+OFFSET_1+6+HWPE_SEL_BITS];
end
3'b100: begin
cluster_cg_en_n = speriph_slave.wdata[0];
Expand Down Expand Up @@ -347,6 +355,9 @@ import hci_package::*;

hwpe_en_o <= 1'b0;
hwpe_sel_o <= 1'b0;

idma_en_o <= 1'b1;

hci_ctrl_q <= '0;

fregfile_disable_o<= 1'b0;
Expand Down Expand Up @@ -379,6 +390,8 @@ import hci_package::*;
hwpe_sel_o <= hwpe_sel_n;
hci_ctrl_q <= hci_ctrl_n;

idma_en_o <= idma_en_n;

fregfile_disable_o<= fregfile_disable_n;

cluster_cg_en_o <= cluster_cg_en_n;
Expand Down