Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export DMI signals #259

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions design/dmi/dmi_mux.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

module dmi_mux (

// Core access enable
input wire core_enable,
// Uncore access enable
input wire uncore_enable,

Expand Down Expand Up @@ -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;

Expand Down
7 changes: 6 additions & 1 deletion design/el2_veer_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@
output logic dma_hreadyout,
output logic dma_hresp,
`endif
// clk ratio signals

Check warning on line 378 in design/el2_veer_wrapper.sv

View workflow job for this annotation

GitHub Actions / format-review

[verible-verilog-format] reported by reviewdog 🐶 Raw Output: design/el2_veer_wrapper.sv:378:- // clk ratio signals design/el2_veer_wrapper.sv:379:- input logic lsu_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface design/el2_veer_wrapper.sv:380:- input logic ifu_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface design/el2_veer_wrapper.sv:381:- input logic dbg_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface design/el2_veer_wrapper.sv:382:- input logic dma_bus_clk_en, // Clock ratio b/w cpu core clk & AHB slave interface design/el2_veer_wrapper.sv:383:- design/el2_veer_wrapper.sv:384:- // ICCM/DCCM ECC status design/el2_veer_wrapper.sv:385:- output logic iccm_ecc_single_error, design/el2_veer_wrapper.sv:386:- output logic iccm_ecc_double_error, design/el2_veer_wrapper.sv:387:- output logic dccm_ecc_single_error, design/el2_veer_wrapper.sv:388:- output logic dccm_ecc_double_error, design/el2_veer_wrapper.sv:389:- design/el2_veer_wrapper.sv:390:- // all of these test inputs are brought to top-level; must be tied off based on usage by physical design (ie. icache or not, iccm or not, dccm or not) design/el2_veer_wrapper.sv:391:- design/el2_veer_wrapper.sv:392:- input el2_ic_data_ext_in_pkt_t [pt.ICACHE_NUM_WAYS-1:0][pt.ICACHE_BANKS_WAY-1:0] ic_data_ext_in_pkt, design/el2_veer_wrapper.sv:393:- input el2_ic_tag_ext_in_pkt_t [pt.ICACHE_NUM_WAYS-1:0] ic_tag_ext_in_pkt, design/el2_veer_wrapper.sv:394:- design/el2_veer_wrapper.sv:395:- input logic timer_int, design/el2_veer_wrapper.sv:396:- input logic soft_int, design/el2_veer_wrapper.sv:397:- input logic [pt.PIC_TOTAL_INT:1] extintsrc_req, design/el2_veer_wrapper.sv:398:- design/el2_veer_wrapper.sv:399:- output logic dec_tlu_perfcnt0, // toggles when slot0 perf counter 0 has an event inc design/el2_veer_wrapper.sv:400:- output logic dec_tlu_perfcnt1, design/el2_veer_wrapper.sv:401:- output logic dec_tlu_perfcnt2, design/el2_veer_wrapper.sv:402:- output logic dec_tlu_perfcnt3, design/el2_veer_wrapper.sv:403:- design/el2_veer_wrapper.sv:404:- // ports added by the soc team design/el2_veer_wrapper.sv:405:- input logic jtag_tck, // JTAG clk design/el2_veer_wrapper.sv:406:- input logic jtag_tms, // JTAG TMS design/el2_veer_wrapper.sv:407:- input logic jtag_tdi, // JTAG tdi design/el2_veer_wrapper.sv:408:- input logic jtag_trst_n, // JTAG Reset design/el2_veer_wrapper.sv:409:- output logic jtag_tdo, // JTAG TDO design/el2_veer_wrapper.sv:410:- output logic jtag_tdoEn, // JTAG Test Data Output enable design/el2_veer_wrapper.sv:411:- design/el2_veer_wrapper.sv:412:- input logic [31:4] core_id, design/el2_veer_wrapper.sv:413:- design/el2_veer_wrapper.sv:414:- // Memory Export Interface design/el2_veer_wrapper.sv:415:- el2_mem_if.veer_sram_src el2_mem_export, design/el2_veer_wrapper.sv:416:- design/el2_veer_wrapper.sv:417:- // external MPC halt/run interface design/el2_veer_wrapper.sv:418:- input logic mpc_debug_halt_req, // Async halt request design/el2_veer_wrapper.sv:419:- input logic mpc_debug_run_req, // Async run request design/el2_veer_wrapper.sv:420:- input logic mpc_reset_run_req, // Run/halt after reset design/el2_veer_wrapper.sv:421:- output logic mpc_debug_halt_ack, // Halt ack design/el2_veer_wrapper.sv
input logic lsu_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface
input logic ifu_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface
input logic dbg_bus_clk_en, // Clock ratio b/w cpu core clk & AHB master interface
Expand Down Expand Up @@ -435,12 +435,14 @@
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,
output logic [ 6:0] dmi_uncore_addr,
output logic [31:0] dmi_uncore_wdata,
input logic [31:0] dmi_uncore_rdata
input logic [31:0] dmi_uncore_rdata,
output logic dmi_active
/* verilator coverage_on */
);

Expand Down Expand Up @@ -604,7 +606,7 @@


`ifdef RV_BUILD_AHB_LITE
// Since all the signals in this block are tied to constant, we exclude this from coverage analysis

Check warning on line 609 in design/el2_veer_wrapper.sv

View workflow job for this annotation

GitHub Actions / format-review

[verible-verilog-format] reported by reviewdog 🐶 Raw Output: design/el2_veer_wrapper.sv:609:- // Since all the signals in this block are tied to constant, we exclude this from coverage analysis design/el2_veer_wrapper.sv:610:- /*verilator coverage_off*/ design/el2_veer_wrapper.sv:611:- wire lsu_axi_awvalid; design/el2_veer_wrapper.sv:612:- wire lsu_axi_awready; design/el2_veer_wrapper.sv:613:- wire [pt.LSU_BUS_TAG-1:0] lsu_axi_awid; design/el2_veer_wrapper.sv:614:- wire [31:0] lsu_axi_awaddr; design/el2_veer_wrapper.sv:615:- wire [3:0] lsu_axi_awregion; design/el2_veer_wrapper.sv:616:- wire [7:0] lsu_axi_awlen; design/el2_veer_wrapper.sv:617:- wire [2:0] lsu_axi_awsize; design/el2_veer_wrapper.sv:618:- wire [1:0] lsu_axi_awburst; design/el2_veer_wrapper.sv:619:- wire lsu_axi_awlock; design/el2_veer_wrapper.sv:620:- wire [3:0] lsu_axi_awcache; design/el2_veer_wrapper.sv:621:- wire [2:0] lsu_axi_awprot; design/el2_veer_wrapper.sv:622:- wire [3:0] lsu_axi_awqos; design/el2_veer_wrapper.sv:623:- design/el2_veer_wrapper.sv:624:- design/el2_veer_wrapper.sv:625:- wire lsu_axi_wvalid; design/el2_veer_wrapper.sv:626:- wire lsu_axi_wready; design/el2_veer_wrapper.sv:627:- wire [63:0] lsu_axi_wdata; design/el2_veer_wrapper.sv:628:- wire [7:0] lsu_axi_wstrb; design/el2_veer_wrapper.sv:629:- wire lsu_axi_wlast; design/el2_veer_wrapper.sv:630:- design/el2_veer_wrapper.sv:631:- wire lsu_axi_bvalid; design/el2_veer_wrapper.sv:632:- wire lsu_axi_bready; design/el2_veer_wrapper.sv:633:- wire [1:0] lsu_axi_bresp; design/el2_veer_wrapper.sv:634:- wire [pt.LSU_BUS_TAG-1:0] lsu_axi_bid; design/el2_veer_wrapper.sv:635:- design/el2_veer_wrapper.sv:636:- // AXI Read Channels design/el2_veer_wrapper.sv:637:- wire lsu_axi_arvalid; design/el2_veer_wrapper.sv:638:- wire lsu_axi_arready; design/el2_veer_wrapper.sv:639:- wire [pt.LSU_BUS_TAG-1:0] lsu_axi_arid; design/el2_veer_wrapper.sv:640:- wire [31:0] lsu_axi_araddr; design/el2_veer_wrapper.sv:641:- wire [3:0] lsu_axi_arregion; design/el2_veer_wrapper.sv:642:- wire [7:0] lsu_axi_arlen; design/el2_veer_wrapper.sv:643:- wire [2:0] lsu_axi_arsize; design/el2_veer_wrapper.sv:644:- wire [1:0] lsu_axi_arburst; design/el2_veer_wrapper.sv:645:- wire lsu_axi_arlock; design/el2_veer_wrapper.sv:646:- wire [3:0] lsu_axi_arcache; design/el2_veer_wrapper.sv:647:- wire [2:0] lsu_axi_arprot; design/el2_veer_wrapper.sv:648:- wire [3:0] lsu_axi_arqos; design/el2_veer_wrapper.sv:649:- design/el2_veer_wrapper.sv:650:- wire lsu_axi_rvalid; design/el2_veer_wrapper.sv:651:- wire lsu_axi_rready; design/el2_veer_wrapper.sv:652:- wire [pt.LSU_BUS_TAG-1:0] lsu_axi_rid; design/el2_veer_wrapper.sv:653:- wire [63:0] lsu_axi_rdata; design/el2_veer_wrapper.sv:654:- wire [1:0] lsu_axi_rresp; design/el2_veer_wrapper.sv:655:- wire lsu_axi_rlast; design/el2_veer_wrapper.sv:656:- design/el2_veer_wrapper.sv:657:- assign lsu_axi_awready = '0; design/el2_veer_wrapper.sv:658:- assign lsu_axi_wready = '0; design/el2_veer_wrapper.sv:659:- assign lsu_axi_bvalid = '0; design/el2_veer_wrapper.sv:660:- assign lsu_axi_bresp = '0; d
/*verilator coverage_off*/
wire lsu_axi_awvalid;
wire lsu_axi_awready;
Expand Down Expand Up @@ -907,6 +909,7 @@

// DMI core/uncore mux
dmi_mux dmi_mux (
.core_enable (dmi_core_enable),
.uncore_enable (dmi_uncore_enable),

.dmi_en (dmi_en),
Expand All @@ -928,6 +931,8 @@
.dmi_uncore_rdata (dmi_uncore_rdata)
);

always_comb dmi_active = dmi_en;

`ifdef RV_ASSERT_ON
// to avoid internal assertions failure at time 0
initial begin
Expand Down
8 changes: 7 additions & 1 deletion testbench/tb_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ module tb_top
logic [11:0] wb_csr_dest;
logic [31:0] wb_csr_data;

logic dmi_core_enable;

always_comb dmi_core_enable = ~(o_cpu_halt_status);

`ifdef RV_OPENOCD_TEST
// SB and LSU AHB master mux
ahb_lite_2to1_mux #(
Expand Down Expand Up @@ -1302,12 +1306,14 @@ veer_wrapper rvtop_wrapper (
.scan_mode ( 1'b0 ), // To enable scan mode
.mbist_mode ( 1'b0 ), // to enable mbist

.dmi_core_enable (dmi_core_enable),
.dmi_uncore_enable (),
.dmi_uncore_en (),
.dmi_uncore_wr_en (),
.dmi_uncore_addr (),
.dmi_uncore_wdata (),
.dmi_uncore_rdata ()
.dmi_uncore_rdata (),
.dmi_active ()

);

Expand Down
7 changes: 6 additions & 1 deletion testbench/veer_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,16 @@ 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,
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
input logic [31:0] dmi_uncore_rdata,

output logic dmi_active
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[verible-verilog-format] reported by reviewdog 🐶

Suggested change
output logic dmi_active
output logic dmi_active

);

el2_mem_if mem_export ();
Expand All @@ -378,6 +381,8 @@ module veer_wrapper

el2_veer_wrapper rvtop (
.el2_mem_export(mem_export.veer_sram_src),
.dmi_core_enable(dmi_core_enable),
.dmi_active(dmi_active),
.*
);

Expand Down
3 changes: 3 additions & 0 deletions verification/block/dmi/dmi_test_wrapper.sv
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ module dmi_test_wrapper
logic [ 6:0] dmi_addr;
logic [31:0] dmi_wdata;
logic [31:0] dmi_rdata;
logic core_enable;

assign core_enable = '1;

assign dmi_en = reg_en;
assign dmi_wr_en = reg_wr_en;
Expand Down
Loading