Skip to content

Commit

Permalink
[i2c/flash_ctrl/rv_plic] Add KNOWN assertions to all outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
msfschaffner committed Nov 1, 2019
1 parent 5546c5a commit dd8bb93
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
9 changes: 9 additions & 0 deletions hw/ip/flash_ctrl/rtl/flash_ctrl.sv
Original file line number Diff line number Diff line change
Expand Up @@ -475,5 +475,14 @@ module flash_ctrl (
assign unused_scratch = reg2hw.scratch;


// Assertions
`ASSERT_KNOWN(TlKnownO_A, tl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(FlashKnownO_A, flash_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrProgEmptyKnownO_A, intr_prog_empty_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrProgLvlKnownO_A, intr_prog_lvl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrProgRdFullKnownO_A, intr_rd_full_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrRdLvlKnownO_A, intr_rd_lvl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrOpDoneKnownO_A, intr_op_done_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrOpErrorKnownO_A, intr_op_error_o, clk_i, !rst_ni)

endmodule
16 changes: 15 additions & 1 deletion hw/ip/i2c/rtl/i2c.sv
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ module i2c (
assign cio_scl_en_o = ~scl_int;
assign cio_sda_en_o = ~sda_int;

`ASSERT_KNOWN(scanmodeKnown, scanmode_i, clk_i, 0)
`ASSERT_KNOWN(scanmodeKnown_A, scanmode_i, clk_i, 0)
`ASSERT_KNOWN(TlKnownO_A, tl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(CioSclKnownO_A, cio_scl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(CioSclEnKnownO_A, cio_scl_en_o, clk_i, !rst_ni)
`ASSERT_KNOWN(CioSdaKnownO_A, cio_sda_o, clk_i, !rst_ni)
`ASSERT_KNOWN(CioSdaEnKnownO_A, cio_sda_en_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrFmtWtmkKnownO_A, intr_fmt_watermark_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrRxWtmkKnownO_A, intr_rx_watermark_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrFmtOflwKnownO_A, intr_fmt_overflow_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrRxOflwKnownO_A, intr_rx_overflow_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrNakKnownO_A, intr_nak_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrSclInterfKnownO_A, intr_scl_interference_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrSdaInterfKnownO_A, intr_sda_interference_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrStretchTimeoutKnownO_A, intr_stretch_timeout_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IntrSdaUnstableKnownO_A, intr_sda_unstable_o, clk_i, !rst_ni)

endmodule
6 changes: 6 additions & 0 deletions hw/ip/rv_plic/data/rv_plic.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,10 @@ module rv_plic #(
.devmode_i (1'b1)
);

// Assertions
`ASSERT_KNOWN(TlKnownO_A, tl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqKnownO_A, irq_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqIdKnownO_A, irq_id_o, clk_i, !rst_ni)
`ASSERT_KNOWN(MsipKnownO_A, msip_o, clk_i, !rst_ni)

endmodule
6 changes: 6 additions & 0 deletions hw/ip/rv_plic/rtl/rv_plic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -227,5 +227,11 @@ module rv_plic #(
.devmode_i (1'b1)
);

// Assertions
`ASSERT_KNOWN(TlKnownO_A, tl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqKnownO_A, irq_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqIdKnownO_A, irq_id_o, clk_i, !rst_ni)
`ASSERT_KNOWN(MsipKnownO_A, msip_o, clk_i, !rst_ni)

endmodule

6 changes: 6 additions & 0 deletions hw/top_earlgrey/ip/rv_plic/rtl/autogen/rv_plic.sv
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,10 @@ module rv_plic #(
.devmode_i (1'b1)
);

// Assertions
`ASSERT_KNOWN(TlKnownO_A, tl_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqKnownO_A, irq_o, clk_i, !rst_ni)
`ASSERT_KNOWN(IrqIdKnownO_A, irq_id_o, clk_i, !rst_ni)
`ASSERT_KNOWN(MsipKnownO_A, msip_o, clk_i, !rst_ni)

endmodule

0 comments on commit dd8bb93

Please sign in to comment.