Skip to content

Commit

Permalink
Merge pull request #44 from pulp-platform/mc/sec_isl_reset
Browse files Browse the repository at this point in the history
Update security island reset interface
  • Loading branch information
alex96295 authored May 19, 2023
2 parents c2eafa9 + 44a8415 commit 4d244d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ packages:
- common_cells
- common_verification
opentitan:
revision: 567ae56d23633e2d9738f68ddfdd9b529c87d859
revision: ed1e7f1d53e28de556a3b02bc1bd1b855f51af15
version: null
source:
Git: https://github.com/alsaqr-platform/opentitan.git
Expand Down
2 changes: 1 addition & 1 deletion Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ dependencies:
car_l2: { git: git@iis-git.ee.ethz.ch:carfield/carfield_l2_mem.git, rev: 505c35a8df7f042fc8fc07c5dc40bc6412f7b27d } # branch: main
safety_island: { git: git@iis-git.ee.ethz.ch:carfield/safety-island.git, rev: c03f1d0b7aad5725010f247130e5d13b36c89c04 } # branch: master
pulp_cluster: { git: https://github.com/pulp-platform/pulp_cluster.git, rev: 43bb73f5f239b6d9bade79ef4b5c62756bd58dc4 } # branch: yt/carfield-integration
opentitan: { git: https://github.com/alsaqr-platform/opentitan.git, rev: 567ae56d23633e2d9738f68ddfdd9b529c87d859 } # branch: lowRISC-rebase
opentitan: { git: https://github.com/alsaqr-platform/opentitan.git, rev: ed1e7f1d53e28de556a3b02bc1bd1b855f51af15 } # branch: lowRISC-rebase
mailbox_unit: { git: git@github.com:pulp-platform/mailbox_unit.git, rev: ce0cb2e7fe48a00fd2ee8b39f675e6c33a5a31d2 } # branch: aottaviano/mailbox-old
apb: { git: https://github.com/pulp-platform/apb.git, version: 0.2.3 }
timer_unit: { git: https://github.com/pulp-platform/timer_unit.git, version: 1.0.2 }
Expand Down
13 changes: 10 additions & 3 deletions hw/carfield.sv
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ assign hyper_isolate_req = '0;
//
// Isolate and Isolate status
//
// TODO: Add registers to control missing isolate signals
assign slave_isolate_req[SafetyIslandSlvIdx] = car_regs_reg2hw.safety_island_isolate.q;
assign slave_isolate_req[IntClusterSlvIdx] = car_regs_reg2hw.pulp_cluster_isolate.q;
assign slave_isolate_req[FPClusterSlvIdx] = car_regs_reg2hw.spatz_cluster_isolate.q;
Expand All @@ -462,6 +463,7 @@ assign slave_isolate_req[L2Port2SlvIdx] = 'd0;
assign slave_isolate_req[OTMailboxSlvIdx] = 'd0;
assign slave_isolate_req[EthernetSlvIdx] = 'd0;
assign slave_isolate_req[PeriphsSlvIdx] = 'd0;
assign secd_isolate_req = 'd0;

always_comb begin: assign_isolated_responses
slave_isolated = '0;
Expand All @@ -470,6 +472,8 @@ always_comb begin: assign_isolated_responses
slave_isolated [i] = slave_isolated_rsp [i] & master_isolated_rsp [SafetyIslandMstIdx];
else if (i == IntClusterSlvIdx)
slave_isolated [i] = slave_isolated_rsp [i] & master_isolated_rsp [IntClusterMstIdx];
else if (i == FPClusterSlvIdx)
slave_isolated [i] = slave_isolated_rsp [i] & master_isolated_rsp [FPClusterMstIdx];
else
slave_isolated [i] = slave_isolated_rsp [i];
end
Expand All @@ -484,6 +488,8 @@ assign car_regs_hw2reg.pulp_cluster_isolate_status.de = 1'b1;
assign car_regs_hw2reg.spatz_cluster_isolate_status.d = slave_isolated[FPClusterSlvIdx];
assign car_regs_hw2reg.spatz_cluster_isolate_status.de = 1'b1;

// TODO: propagate isolated signal from security island to register

// hyperbus reg req/rsp
carfield_reg_req_t reg_hyper_req;
carfield_reg_rsp_t reg_hyper_rsp;
Expand Down Expand Up @@ -1112,10 +1118,9 @@ secure_subsystem_synth_wrap #(
.axi_ot_out_resp_t ( carfield_axi_mst_rsp_t )
) i_security_island (
.clk_i ( alt_clk_i ),
.clk_ref_i ( alt_clk_i ), // TODO: proper ref clock(?)
.clk_ref_i ( rt_clk_i ),
.rst_ni ( security_rst_n ),
// TODO: add pwr_on_rst (!)
// TODO: add synth wrapper and isolate stuff like safety island
.pwr_on_rst_ni ( security_pwr_on_rst_n ),
.fetch_en_i ( car_regs_reg2hw.security_island_fetch_enable ),
.bootmode_i ( '0 ),
.test_enable_i ( '0 ),
Expand Down Expand Up @@ -1143,6 +1148,8 @@ secure_subsystem_synth_wrap #(
.async_axi_out_r_data_i ( axi_mst_ext_r_data [SecurityIslandMstIdx] ),
.async_axi_out_r_wptr_i ( axi_mst_ext_r_wptr [SecurityIslandMstIdx] ),
.async_axi_out_r_rptr_o ( axi_mst_ext_r_rptr [SecurityIslandMstIdx] ),
.axi_isolate_i ( secd_isolate_req ),
.axi_isolated_o ( master_isolated_rsp [SecurityIslandMstIdx] ),
// Uart
.ibex_uart_rx_i ( uart_ot_tx_o ),
.ibex_uart_tx_o ( uart_ot_rx_i ),
Expand Down

0 comments on commit 4d244d3

Please sign in to comment.