From 5f3491113cbcbd3b9f151362c9795f9a6ac679e7 Mon Sep 17 00:00:00 2001 From: Wojciech Sipak Date: Thu, 7 Nov 2024 12:07:52 +0100 Subject: [PATCH] Route a core_enable signal to conditionally disable internal core TAP access This integrates changes from caliptra-rtl: https://github.com/chipsalliance/caliptra-rtl/commit/22c08e12334afa5a408393155ec97c5141f3d2a7 Signed-off-by: Wojciech Sipak --- design/dmi/dmi_mux.v | 6 ++++-- design/el2_veer_wrapper.sv | 2 ++ testbench/tb_top.sv | 1 + testbench/veer_wrapper.sv | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/design/dmi/dmi_mux.v b/design/dmi/dmi_mux.v index b428d6442cd..1d3b1e86673 100644 --- a/design/dmi/dmi_mux.v +++ b/design/dmi/dmi_mux.v @@ -3,6 +3,8 @@ module dmi_mux ( + // Core access enable + input wire core_enable, // Uncore access enable input wire uncore_enable, @@ -33,8 +35,8 @@ module dmi_mux ( assign is_uncore_aperture = (dmi_addr[6] & (dmi_addr[5] | dmi_addr[4])); // Core signals - assign dmi_core_en = dmi_en & ~is_uncore_aperture; - assign dmi_core_wr_en = dmi_wr_en & ~is_uncore_aperture; + assign dmi_core_en = dmi_en & ~is_uncore_aperture & core_enable; + assign dmi_core_wr_en = dmi_wr_en & ~is_uncore_aperture & core_enable; assign dmi_core_addr = dmi_addr; assign dmi_core_wdata = dmi_wdata; diff --git a/design/el2_veer_wrapper.sv b/design/el2_veer_wrapper.sv index d331503d685..22c9bc165c1 100644 --- a/design/el2_veer_wrapper.sv +++ b/design/el2_veer_wrapper.sv @@ -435,6 +435,7 @@ import el2_pkg::*; input logic mbist_mode, // to enable mbist // DMI port for uncore + input logic dmi_core_enable, input logic dmi_uncore_enable, output logic dmi_uncore_en, output logic dmi_uncore_wr_en, @@ -907,6 +908,7 @@ import el2_pkg::*; // DMI core/uncore mux dmi_mux dmi_mux ( + .core_enable (dmi_core_enable), .uncore_enable (dmi_uncore_enable), .dmi_en (dmi_en), diff --git a/testbench/tb_top.sv b/testbench/tb_top.sv index 70d0877b585..6e9a81c1d92 100644 --- a/testbench/tb_top.sv +++ b/testbench/tb_top.sv @@ -1302,6 +1302,7 @@ veer_wrapper rvtop_wrapper ( .scan_mode ( 1'b0 ), // To enable scan mode .mbist_mode ( 1'b0 ), // to enable mbist + .dmi_core_enable ('1), .dmi_uncore_enable (), .dmi_uncore_en (), .dmi_uncore_wr_en (), diff --git a/testbench/veer_wrapper.sv b/testbench/veer_wrapper.sv index ff9a956f0e8..967ddc29928 100644 --- a/testbench/veer_wrapper.sv +++ b/testbench/veer_wrapper.sv @@ -350,6 +350,7 @@ module veer_wrapper input logic scan_mode, // To enable scan mode input logic mbist_mode, // to enable mbist + input logic dmi_core_enable, // DMI port for uncore input logic dmi_uncore_enable, output logic dmi_uncore_en, @@ -378,6 +379,7 @@ module veer_wrapper el2_veer_wrapper rvtop ( .el2_mem_export(mem_export.veer_sram_src), + .dmi_core_enable(dmi_core_enable), .* );