Skip to content

Commit

Permalink
Fix coverage interface connections/parameters/coverpoints for AXI
Browse files Browse the repository at this point in the history
  • Loading branch information
calebofearth committed Sep 27, 2024
1 parent 805d320 commit b6ea426
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
22 changes: 16 additions & 6 deletions src/integration/coverage/caliptra_top_cov_if.sv
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ interface caliptra_top_cov_if
import soc_ifc_pkg::*;
(
input logic clk,
input logic PSEL,
//SoC AXI Interface
axi_if.w_sub s_axi_w_if,
axi_if.r_sub s_axi_r_if,
input logic [63:0] generic_input_wires,
input logic cptra_rst_b,
input logic cptra_pwrgood,
Expand Down Expand Up @@ -55,9 +57,17 @@ interface caliptra_top_cov_if
//-----------------------------------------
//CLK GATING coverpoints
//-----------------------------------------
apb_txn: coverpoint PSEL {
bins single_apb_txn = (0 => 1 => 0);
bins b2b_apb_txn = (1 [*5]); //5 txns in a row
axi_rd_txn: coverpoint s_axi_r_if.arvalid && s_axi_r_if.arready {
bins single_axi_rd_txn = (0 => 1 => 0);
bins b2b_axi_rd_txn = (1 [*5]); //5 rd txns in a row
}
axi_wr_txn: coverpoint s_axi_w_if.awvalid && s_axi_w_if.awready {
bins single_axi_wr_txn = (0 => 1 => 0);
bins b2b_axi_wr_txn = (1 [*5]); //5 wr txns in a row
}
axi_any_txn: coverpoint (s_axi_r_if.arvalid && s_axi_r_if.arready) || (s_axi_w_if.awvalid && s_axi_w_if.awready) {
bins single_axi_txn = (0 => 1 => 0);
bins b2b_axi_txn = (1 [*5]); //5 txns in a row
}
cg_en: coverpoint clk_gating_en;
core_asleep_value: coverpoint cpu_halt_status;
Expand Down Expand Up @@ -88,7 +98,7 @@ interface caliptra_top_cov_if
enXcore_asleepXdebug: cross enXcore_asleep, debug;
enXcore_asleepXfatalerr: cross enXcore_asleep, fatal_error;
enXcore_asleepXnmi: cross enXcore_asleep, nmi;
enXcore_asleepXapb: cross enXcore_asleep, apb_txn;
enXcore_asleepXaxi: cross enXcore_asleep, axi_any_txn;
enXcore_asleepXgeneric: cross enXcore_asleep, generic;
endgroup

Expand All @@ -115,4 +125,4 @@ interface caliptra_top_cov_if

endinterface

`endif
`endif
7 changes: 4 additions & 3 deletions src/soc_ifc/coverage/soc_ifc_cov_bind.sv
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

module soc_ifc_cov_bind;
`ifdef FCOV
import soc_ifc_pkg::*;
bind soc_ifc_top soc_ifc_cov_if #(
.AHB_ADDR_WIDTH(`CALIPTRA_SLAVE_ADDR_WIDTH(`CALIPTRA_SLAVE_SEL_SOC_IFC)),
.AHB_DATA_WIDTH(`CALIPTRA_AHB_HDATA_SIZE),
Expand All @@ -23,9 +24,9 @@ module soc_ifc_cov_bind;
.AXI_ID_WIDTH (`CALIPTRA_AXI_ID_WIDTH ),
.AXI_USER_WIDTH(`CALIPTRA_AXI_USER_WIDTH),
.AXIM_ADDR_WIDTH(`CALIPTRA_AXI_DMA_ADDR_WIDTH),
.AXIM_DATA_WIDTH(CPTRA_AXI_DMA_DATA_WIDTH),
.AXIM_ID_WIDTH (CPTRA_AXI_DMA_ID_WIDTH),
.AXIM_USER_WIDTH(CPTRA_AXI_DMA_USER_WIDTH)
.AXIM_DATA_WIDTH(soc_ifc_pkg::CPTRA_AXI_DMA_DATA_WIDTH),
.AXIM_ID_WIDTH (soc_ifc_pkg::CPTRA_AXI_DMA_ID_WIDTH),
.AXIM_USER_WIDTH(soc_ifc_pkg::CPTRA_AXI_DMA_USER_WIDTH)
)
i_soc_ifc_cov_if (.*);
`endif
Expand Down

0 comments on commit b6ea426

Please sign in to comment.