Skip to content

Commit

Permalink
Matching polarity of disable port on assertion macros (#431)
Browse files Browse the repository at this point in the history
* fixing assert macros to match code from caliptra_prim
difference in disable polarity caused all caliptra_prim macros that were using caliptra_sva macros to have the wrong disable polarity

* disabling internal trng by default again, accidental commit after testing

---------

Co-authored-by: Michael Norris <[email protected]>
  • Loading branch information
Nitsirks and Michael Norris authored Feb 26, 2024
1 parent 74e427e commit 8c11e46
Show file tree
Hide file tree
Showing 18 changed files with 66 additions and 66 deletions.
6 changes: 3 additions & 3 deletions src/ahb_lite_bus/rtl/ahb_lite_2to1_mux.sv
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ generate

//optimized path doesn't look at stall
//only time this stalls is on error condition
`CALIPTRA_ASSERT_NEVER(ERR_2TO1MUX_STALL, ~hreadyout_i & (hresp_i == 1'b0), hclk, hreset_n)
`CALIPTRA_ASSERT_NEVER(ERR_2TO1MUX_STALL, ~hreadyout_i & (hresp_i == 1'b0), hclk, !hreset_n)
end
endgenerate

Expand All @@ -199,8 +199,8 @@ always_comb hrdata_o_1 = initiator1_data_ph ? hrdata_i: '0;
always_comb hready_o_1 = initiator1_data_ph ? hreadyout_i :
initiator1_pend_addr_ph ? '0 : '1;

`CALIPTRA_ASSERT_MUTEX(ERR_2TO1MUX_MUTEX_DATA_PH, {initiator0_data_ph,initiator1_data_ph}, hclk, hreset_n)
`CALIPTRA_ASSERT_NEVER(ERR_2TO1MUX_BAD_HTRANS, (htrans_o == 2'b01), hclk, hreset_n)
`CALIPTRA_ASSERT_MUTEX(ERR_2TO1MUX_MUTEX_DATA_PH, {initiator0_data_ph,initiator1_data_ph}, hclk, !hreset_n)
`CALIPTRA_ASSERT_NEVER(ERR_2TO1MUX_BAD_HTRANS, (htrans_o == 2'b01), hclk, !hreset_n)

//Coverage
`ifndef VERILATOR
Expand Down
2 changes: 1 addition & 1 deletion src/datavault/rtl/dv_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,6 @@ module dv_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.hard_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.hard_reset_b)

endmodule
2 changes: 1 addition & 1 deletion src/doe/rtl/doe_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,6 @@ module doe_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.cptra_pwrgood)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.cptra_pwrgood)

endmodule
2 changes: 1 addition & 1 deletion src/ecc/rtl/ecc_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1814,6 +1814,6 @@ module ecc_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.hard_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.hard_reset_b)

endmodule
2 changes: 1 addition & 1 deletion src/hmac/rtl/hmac_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2054,6 +2054,6 @@ module hmac_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.error_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.error_reset_b)

endmodule
64 changes: 32 additions & 32 deletions src/integration/rtl/caliptra_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1289,40 +1289,40 @@ genvar sva_i;
generate
for(sva_i= 0; sva_i<`CALIPTRA_AHB_SLAVES_NUM; sva_i=sva_i+1)
begin: gen_caliptra_asserts
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HADDR_X, responder_inst[sva_i].haddr, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HWDATA_X, responder_inst[sva_i].hwdata, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HSEL_X, responder_inst[sva_i].hsel, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HWRITE_X, responder_inst[sva_i].hwrite, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HREADY_X, responder_inst[sva_i].hready, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HTRANS_X, responder_inst[sva_i].htrans, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HSIZE_X, responder_inst[sva_i].hsize, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HRESP_X, responder_inst[sva_i].hresp, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HREADYOUT_X, responder_inst[sva_i].hreadyout, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HRDATA_X, responder_inst[sva_i].hreadyout ? responder_inst[sva_i].hrdata : '0, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HADDR_X, responder_inst[sva_i].haddr, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HWDATA_X, responder_inst[sva_i].hwdata, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HSEL_X, responder_inst[sva_i].hsel, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HWRITE_X, responder_inst[sva_i].hwrite, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HREADY_X, responder_inst[sva_i].hready, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HTRANS_X, responder_inst[sva_i].htrans, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HSIZE_X, responder_inst[sva_i].hsize, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HRESP_X, responder_inst[sva_i].hresp, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HREADYOUT_X, responder_inst[sva_i].hreadyout, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_SLAVE_HRDATA_X, responder_inst[sva_i].hreadyout ? responder_inst[sva_i].hrdata : '0, clk, !cptra_noncore_rst_b)
end
endgenerate

`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HADDR_X, initiator_inst.haddr, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HWDATA_X, initiator_inst.hwdata, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HWRITE_X, initiator_inst.hwrite, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HREADY_X, initiator_inst.hready, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HTRANS_X, initiator_inst.htrans, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HSIZE_X, initiator_inst.hsize, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HRESP_X, initiator_inst.hresp, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HRDATA_X, initiator_inst.hready ? initiator_inst.hrdata : '0, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_NEVER(AHB_MASTER_HTRANS_BUSY, initiator_inst.htrans == 2'b01, clk, cptra_noncore_rst_b)

`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PADDR_X, PADDR, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PWDATA_X, PWDATA, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PWRITE_X, PWRITE, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PREADY_X, PREADY, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PENABLE_X, PENABLE, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PSEL_X, PSEL, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PPROT_X, PPROT, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PAUSER_X, PAUSER, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PSLVERR_X, PSLVERR, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PRDATA_X, PREADY ? PRDATA : '0, clk, cptra_rst_b)

`CALIPTRA_ASSERT_NEVER(APB_MASTER_PPROT_ACTIVE, PPROT !== 3'b000, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HADDR_X, initiator_inst.haddr, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HWDATA_X, initiator_inst.hwdata, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HWRITE_X, initiator_inst.hwrite, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HREADY_X, initiator_inst.hready, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HTRANS_X, initiator_inst.htrans, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HSIZE_X, initiator_inst.hsize, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HRESP_X, initiator_inst.hresp, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(AHB_MASTER_HRDATA_X, initiator_inst.hready ? initiator_inst.hrdata : '0, clk, !cptra_noncore_rst_b)
`CALIPTRA_ASSERT_NEVER(AHB_MASTER_HTRANS_BUSY, initiator_inst.htrans == 2'b01, clk, !cptra_noncore_rst_b)

`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PADDR_X, PADDR, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PWDATA_X, PWDATA, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PWRITE_X, PWRITE, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PREADY_X, PREADY, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PENABLE_X, PENABLE, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PSEL_X, PSEL, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PPROT_X, PPROT, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PAUSER_X, PAUSER, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PSLVERR_X, PSLVERR, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(APB_MASTER_PRDATA_X, PREADY ? PRDATA : '0, clk, !cptra_rst_b)

`CALIPTRA_ASSERT_NEVER(APB_MASTER_PPROT_ACTIVE, PPROT !== 3'b000, clk, !cptra_rst_b)

endmodule
2 changes: 1 addition & 1 deletion src/keyvault/rtl/kv_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,6 @@ module kv_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.hard_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.hard_reset_b)

endmodule
16 changes: 8 additions & 8 deletions src/libs/rtl/caliptra_sva.svh
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,29 @@
`endif

// Assert a concurrent property directly.
`define CALIPTRA_ASSERT(assert_name, prop, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst_b = `CALIPTRA_ASSERT_DEFAULT_RST) \
`define CALIPTRA_ASSERT(assert_name, prop, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst = `CALIPTRA_ASSERT_DEFAULT_RST) \
`ifdef CLP_ASSERT_ON \
assert_name: assert property (@(posedge clk) disable iff (~rst_b) (prop)) \
assert_name: assert property (@(posedge clk) disable iff (rst !== 0) (prop)) \
else begin \
`CALIPTRA_ASSERT_RPT(`STRINGIFY(assert_name)) \
end \
`endif

// Assert a concurrent property NEVER happens
`define CALIPTRA_ASSERT_NEVER(assert_name, prop, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst_b = `CALIPTRA_ASSERT_DEFAULT_RST) \
`define CALIPTRA_ASSERT_NEVER(assert_name, prop, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst = `CALIPTRA_ASSERT_DEFAULT_RST) \
`ifdef CLP_ASSERT_ON \
assert_name: assert property (@(posedge clk) disable iff (~rst_b) not (prop)) \
assert_name: assert property (@(posedge clk) disable iff (rst !== 0) not (prop)) \
else begin \
`CALIPTRA_ASSERT_RPT(`STRINGIFY(assert_name)) \
end \
`endif

// Assert that signal is not x
`define CALIPTRA_ASSERT_KNOWN(assert_name, sig, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst_b = `CALIPTRA_ASSERT_DEFAULT_RST) \
`CALIPTRA_ASSERT(assert_name, !$isunknown(sig), clk, rst_b)
`define CALIPTRA_ASSERT_KNOWN(assert_name, sig, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst = `CALIPTRA_ASSERT_DEFAULT_RST) \
`CALIPTRA_ASSERT(assert_name, !$isunknown(sig), clk, rst)

// Assert that a vector of signals is mutually exclusive
`define CALIPTRA_ASSERT_MUTEX(assert_name, sig, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst_b = `CALIPTRA_ASSERT_DEFAULT_RST) \
`CALIPTRA_ASSERT(assert_name, $onehot0(sig), clk, rst_b)
`define CALIPTRA_ASSERT_MUTEX(assert_name, sig, clk = `CALIPTRA_ASSERT_DEFAULT_CLK, rst = `CALIPTRA_ASSERT_DEFAULT_RST) \
`CALIPTRA_ASSERT(assert_name, $onehot0(sig), clk, rst)

`endif
2 changes: 1 addition & 1 deletion src/pcrvault/rtl/pv_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,6 @@ module pv_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.hard_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.hard_reset_b)

endmodule
2 changes: 1 addition & 1 deletion src/sha256/rtl/sha256_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,6 @@ module sha256_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.error_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.error_reset_b)

endmodule
2 changes: 1 addition & 1 deletion src/sha512/rtl/sha512_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -2025,6 +2025,6 @@ module sha512_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.error_reset_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.error_reset_b)

endmodule
6 changes: 3 additions & 3 deletions src/soc_ifc/rtl/mbox.sv
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ mbox_csr1(
.hwif_out(hwif_out)
);

`CALIPTRA_ASSERT_MUTEX(ERR_MBOX_ACCESS_MUTEX, {dir_req_dv_q , mbox_protocol_sram_we , mbox_protocol_sram_rd }, clk, rst_b)
//`CALIPTRA_ASSERT_MUTEX(ERR_MBOX_DIR_SHA_COLLISION, {dir_req_dv, sha_sram_req_dv}, clk, rst_b)
`CALIPTRA_ASSERT_NEVER(ERR_MBOX_DIR_REQ_FROM_SOC, (dir_req_dv & req_data.soc_req), clk, rst_b)
`CALIPTRA_ASSERT_MUTEX(ERR_MBOX_ACCESS_MUTEX, {dir_req_dv_q , mbox_protocol_sram_we , mbox_protocol_sram_rd }, clk, !rst_b)
//`CALIPTRA_ASSERT_MUTEX(ERR_MBOX_DIR_SHA_COLLISION, {dir_req_dv, sha_sram_req_dv}, clk, !rst_b)
`CALIPTRA_ASSERT_NEVER(ERR_MBOX_DIR_REQ_FROM_SOC, (dir_req_dv & req_data.soc_req), clk, !rst_b)

endmodule
2 changes: 1 addition & 1 deletion src/soc_ifc/rtl/mbox_csr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,6 @@ module mbox_csr (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.cptra_rst_b)

endmodule
2 changes: 1 addition & 1 deletion src/soc_ifc/rtl/sha512_acc_csr.sv
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,6 @@ module sha512_acc_csr (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.cptra_pwrgood)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.cptra_pwrgood)

endmodule
12 changes: 6 additions & 6 deletions src/soc_ifc/rtl/soc_ifc_boot_fsm.sv
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ end
caliptra_2ff_sync #(.WIDTH(1), .RST_VAL('d1)) i_rst_window_sync (.clk(clk), .rst_b(cptra_pwrgood), .din(cptra_rst_window), .dout(cptra_rst_window_sync));

//Check for x prop
`CALIPTRA_ASSERT_KNOWN(ERR_FSM_ARC_X, {arc_BOOT_FUSE_BOOT_DONE, arc_BOOT_DONE_BOOT_FWRST, arc_BOOT_WAIT_BOOT_DONE}, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_FSM_STATE_X, boot_fsm_ps, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_UC_RST_X, cptra_noncore_rst_b, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_UC_FWRST_X, cptra_uc_rst_b, clk, cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_FSM_ARC_X, {arc_BOOT_FUSE_BOOT_DONE, arc_BOOT_DONE_BOOT_FWRST, arc_BOOT_WAIT_BOOT_DONE}, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_FSM_STATE_X, boot_fsm_ps, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_UC_RST_X, cptra_noncore_rst_b, clk, !cptra_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_UC_FWRST_X, cptra_uc_rst_b, clk, !cptra_rst_b)

//Reset got asserted, but cptra rst window wasn't asserted to protect RDC
`CALIPTRA_ASSERT_NEVER(ERR_RST_ASSERT_NO_WINDOW, $fell(cptra_noncore_rst_b) && ~rdc_clk_dis, clk, (cptra_pwrgood && ~scan_mode))
`CALIPTRA_ASSERT_NEVER(ERR_UC_RST_ASSERT_NO_WINDOW, $fell(cptra_uc_rst_b) && ~(fw_update_rst_window || rdc_clk_dis), clk, (cptra_pwrgood && ~scan_mode))
`CALIPTRA_ASSERT_NEVER(ERR_RST_ASSERT_NO_WINDOW, $fell(cptra_noncore_rst_b) && ~rdc_clk_dis, clk, !(cptra_pwrgood && ~scan_mode))
`CALIPTRA_ASSERT_NEVER(ERR_UC_RST_ASSERT_NO_WINDOW, $fell(cptra_uc_rst_b) && ~(fw_update_rst_window || rdc_clk_dis), clk, !(cptra_pwrgood && ~scan_mode))

endmodule
2 changes: 1 addition & 1 deletion src/soc_ifc/rtl/soc_ifc_reg.sv
Original file line number Diff line number Diff line change
Expand Up @@ -5684,6 +5684,6 @@ module soc_ifc_reg (
assign cpuif_rd_data = readback_data;
assign cpuif_rd_err = readback_err;

`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, hwif_in.cptra_pwrgood)
`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !hwif_in.cptra_pwrgood)

endmodule
4 changes: 2 additions & 2 deletions src/soc_ifc/rtl/soc_ifc_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ always_ff @(posedge rdc_clk_cg or negedge cptra_pwrgood) begin
end
end

`CALIPTRA_ASSERT_KNOWN(ERR_AHB_INF_X, {hreadyout_o,hresp_o}, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_KNOWN(ERR_AHB_INF_X, {hreadyout_o,hresp_o}, clk, !cptra_noncore_rst_b)
//this generates an NMI in the core, but we don't have a handler so it just hangs
`CALIPTRA_ASSERT_NEVER(ERR_SOC_IFC_AHB_ERR, hresp_o, clk, cptra_noncore_rst_b)
`CALIPTRA_ASSERT_NEVER(ERR_SOC_IFC_AHB_ERR, hresp_o, clk, !cptra_noncore_rst_b)
endmodule
2 changes: 1 addition & 1 deletion tools/scripts/rdl_post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def scrub_line_by_line(fname):
mod_cnt+=1
elif (is_endmodule is not None):
mod_lines+="\n"
mod_lines+="`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, " + reset_name + ")\n"
mod_lines+="`CALIPTRA_ASSERT_KNOWN(ERR_HWIF_IN, hwif_in, clk, !" + reset_name + ")\n"
mod_lines+="\n"
mod_lines+=line
else:
Expand Down

0 comments on commit 8c11e46

Please sign in to comment.