Assertion-based coverage is a method of measuring the quality of functional verification of digital designs using formal verification techniques. It involves writing assertions, which are formal specifications of the expected behavior of the design, and then analyzing the coverage of those assertions over the design.

Assertion-based coverage can help to ensure that all possible corner cases and error conditions have been tested, and that the design behaves correctly under all expected conditions. It can also help to identify gaps in the verification plan and improve the overall quality of the design.


property prop_crc_valid;
  // Assertion checks if CRC is valid
  @(posedge clk) ($rose(crc_done)) |-> (crc_valid == 1);

cover crc_valid_coverage {
  // Coverage bins count how often the assertion is true
  // or false for different scenarios
  bins crc_valid_true = (prop_crc_valid == 1);
  bins crc_valid_false = (prop_crc_valid == 0);

assert property (prop_crc_valid);

In this example, we have a property prop_crc_valid that checks if the CRC (cyclic redundancy check) value is valid after a data transfer operation. The cover statement creates a coverage group crc_valid_coverage that contains two bins, one for when the property is true and one for when it's false. The assert statement then checks the property for every data transfer operation and updates the coverage bins accordingly. This way, we can measure how often the property is true or false and use this information to improve our verification process.