Regarding the biquad filter example

Hi,
Just want some clarifications.

I was looking at the biquad example, it is doing coverage on the RM (RAL register value) and seems to be violating the guideline of “Functional Coverage should be based on observation”: …the functional coverage should be based on what is observed to happen at the DUT outputs in the testbench.

It is rather difficult in this case to cover the input coefficients set using the DUT outputs, is it the reason of using RM directly?

Thanks,
Sam

In reply to samlee:

Not sure what example you’re talking about exactly, but here are some thoughts:

  • The register model gets updated based on what can be observed. You try to write a register and because you’re write was successful and you have checks in place to say that the DUT really processes writes properly then you can infer that the registers contain the written value. By checks in place I mean, for example, some test where you write registers and read them back.
  • If you sample your coverage after finishing an operation that you know relies on certain registers, then you also cover based on observation.

Don’t take the sentence to literally mean observation of external activity. The entire point is to not rely on any design implementation details that could easily change. In neither of the points above did we make any assumption about the structure of the DUT, more explicitly how the registers are implemented in HDL. Take it to mean observing and inferring state out of what you observer.