From cb75d78b5268f4c7e45b18b6d87ca2713dfde8fa Mon Sep 17 00:00:00 2001 From: Robert Szczepanski Date: Thu, 21 Dec 2023 11:21:24 +0100 Subject: [PATCH] Add missing DMI mux signals Internal-tag: [#52028] Signed-off-by: Robert Szczepanski --- design/dmi/dmi_mux.v | 3 ++- design/el2_veer_wrapper.sv | 24 ++++++++++-------------- testbench/tb_top.sv | 9 ++++++++- testbench/veer_wrapper.sv | 10 +++++++++- 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/design/dmi/dmi_mux.v b/design/dmi/dmi_mux.v index c9b0d77b651..b428d6442cd 100644 --- a/design/dmi/dmi_mux.v +++ b/design/dmi/dmi_mux.v @@ -4,7 +4,7 @@ module dmi_mux ( // Uncore access enable - input wire uncore_enable, + input wire uncore_enable, // DMI upstream input wire dmi_en, @@ -27,6 +27,7 @@ module dmi_mux ( output wire [31:0] dmi_uncore_wdata, input wire [31:0] dmi_uncore_rdata ); + logic is_uncore_aperture; // Uncore address decoder assign is_uncore_aperture = (dmi_addr[6] & (dmi_addr[5] | dmi_addr[4])); diff --git a/design/el2_veer_wrapper.sv b/design/el2_veer_wrapper.sv index 696f4fa36c5..1a9e20240b7 100644 --- a/design/el2_veer_wrapper.sv +++ b/design/el2_veer_wrapper.sv @@ -335,11 +335,12 @@ import el2_pkg::*; input logic mbist_mode, // to enable mbist // DMI port for uncore + input logic dmi_uncore_enable, output logic dmi_uncore_en, output logic dmi_uncore_wr_en, - output logic dmi_uncore_addr, - output logic dmi_uncore_wdata, - input logic dmi_uncore_rdata + output logic [ 6:0] dmi_uncore_addr, + output logic [31:0] dmi_uncore_wdata, + input logic [31:0] dmi_uncore_rdata ); logic active_l2clk; @@ -701,13 +702,6 @@ import el2_pkg::*; logic [31:0] dmi_reg_wdata; logic [31:0] dmi_reg_rdata; - // DMI (uncore) - logic dmi_uncore_en; - logic [6:0] dmi_uncore_addr; - logic dmi_uncore_wr_en; - logic [31:0] dmi_uncore_wdata; - logic [31:0] dmi_uncore_rdata; - // Instantiate the el2_veer core el2_veer #(.pt(pt)) veer ( .clk(clk), @@ -746,6 +740,8 @@ import el2_pkg::*; // DMI core/uncore mux dmi_mux dmi_mux ( + .uncore_enable (dmi_uncore_enable), + .dmi_en (dmi_en), .dmi_wr_en (dmi_wr_en), .dmi_addr (dmi_addr), @@ -766,11 +762,11 @@ import el2_pkg::*; ); `ifdef RV_ASSERT_ON -// to avoid internal assertions failure at time 0 -initial begin + // to avoid internal assertions failure at time 0 + initial begin $assertoff(0, veer); - @ (negedge clk) $asserton(0, veer); -end + @(negedge clk) $asserton(0, veer); + end `endif endmodule diff --git a/testbench/tb_top.sv b/testbench/tb_top.sv index eb01201bb5d..46321b76f59 100644 --- a/testbench/tb_top.sv +++ b/testbench/tb_top.sv @@ -802,7 +802,14 @@ veer_wrapper rvtop_wrapper ( .soft_int ('0), .core_id ('0), .scan_mode ( 1'b0 ), // To enable scan mode - .mbist_mode ( 1'b0 ) // to enable mbist + .mbist_mode ( 1'b0 ), // to enable mbist + + .dmi_uncore_enable (), + .dmi_uncore_en (), + .dmi_uncore_wr_en (), + .dmi_uncore_addr (), + .dmi_uncore_wdata (), + .dmi_uncore_rdata () ); diff --git a/testbench/veer_wrapper.sv b/testbench/veer_wrapper.sv index 62d7dc4f3f5..80c92f37b08 100644 --- a/testbench/veer_wrapper.sv +++ b/testbench/veer_wrapper.sv @@ -341,7 +341,15 @@ module veer_wrapper input logic i_cpu_run_req, // Async restart req to CPU output logic o_cpu_run_ack, // Core response to run req input logic scan_mode, // To enable scan mode - input logic mbist_mode // to enable mbist + input logic mbist_mode, // to enable mbist + + // DMI port for uncore + input logic dmi_uncore_enable, + output logic dmi_uncore_en, + output logic dmi_uncore_wr_en, + output logic [ 6:0] dmi_uncore_addr, + output logic [31:0] dmi_uncore_wdata, + input logic [31:0] dmi_uncore_rdata ); el2_mem_if mem_export ();