Dear Readers,
Do not rely on illegal_bins for checking perpose. If you rely on covergroup where you have written illegal_bins, what happens when you turn off the coverage??
That is where Assertions coming in picture...! If you really want to ignore values then use ignore_bins. If you really want to throw errors then use an assertions checkers.
While illegal_bins removes values from coverage calculations, it also throws errors.
Philosophically, you need to ask yourself the questions,
(1) “Should a passive component like a covergroup be actively throwing errors?” and
(2) “If you rely on the covergroup for checking, then what happens when you turn coverage off?”
From the example given above, you can see 3'b100 is an illegal opcode and as per protocol if that value occurs then its an error.So here instead of writting and illegal_bins you can have a assert property with coverage to check specifically this scenarion.
So usually I would prefer to have an assertions (with cover property) where strong protocol check requires instead of writting illegal_bins.
Happy Reading,
ASIC with Ankit
Do not rely on illegal_bins for checking perpose. If you rely on covergroup where you have written illegal_bins, what happens when you turn off the coverage??
That is where Assertions coming in picture...! If you really want to ignore values then use ignore_bins. If you really want to throw errors then use an assertions checkers.
While illegal_bins removes values from coverage calculations, it also throws errors.
Philosophically, you need to ask yourself the questions,
(1) “Should a passive component like a covergroup be actively throwing errors?” and
(2) “If you rely on the covergroup for checking, then what happens when you turn coverage off?”
From the example given above, you can see 3'b100 is an illegal opcode and as per protocol if that value occurs then its an error.So here instead of writting and illegal_bins you can have a assert property with coverage to check specifically this scenarion.
So usually I would prefer to have an assertions (with cover property) where strong protocol check requires instead of writting illegal_bins.
Happy Reading,
ASIC with Ankit