I am an assertion based verification newbie trying to learn how it's supposed to be done properly. I have found a lot of information about the structure and technical details about the systemverilog + assertions but I still have not found somekind of a "cookbook" material of how things are really done in real world.
The question and constraints:
- Design has a data input bus with data, valid and id inputs
- One data "package" is 3 samples
- After channel n there will always be data from channel n+1
- channel IDs will wrap after the largest ID has been sent
- There can be any number of clk ticks between data bytes
Below is a simple and hopefully correct timing diagram with channel IDs:
So how do you do this with least ammount of code? Nice and clean. Previously I have build dummy verilog modules to drive the data. But surely one could just use some assume property to just constrain the channel IDs but otherwise leave free hands for the formal tool to try to brake my design?
Simple template for starters could be:
data_in : assume property (
<data with some ID>[=3]
|=>
<data with the next id after any clk tick>
);
I guess the problem is that assumes/assertions like above tend to trigger on every data sample and create parallel threads which overlap in time.
