opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[i2c, dv] Add excl for intr_state

Open tunghoang290780 opened this issue 6 years ago • 4 comments

Previously, excl of intr_state register is added via add_csr_exclusions function. With the proposal of #1635, the function add_csr_exclusions was removed by adding excl tags in .hjson file. However, the intr_state (and other intr regs) are not defined by hjson file thus all i2c_csr_* tests failed (add_csr_exclusions).

Should add_csr_exclusions function are used in combination with excl tags defined in .hjson file? Another solution is to expose all register via .hjson file to give the designer full controllability.

tunghoang290780 avatar Mar 07 '20 04:03 tunghoang290780

PR #1635 does a blanket exlcusion of INTR_TEST with CsrExclWrite (dont write to it) and INTR_STATE with CsrExclWriteCheck (dont read-check it) in the script itself. See here. This should get applied to all IPs. Considering this, its a little surprising that your tests are failing. Would you please share logs / waves to debug further?

Also, note that the new solution is backward-compatible with the old methodology (with add_csr_exclusions), so you still have the full controllability from the verification side.

sriyerg avatar Mar 07 '20 04:03 sriyerg

@sriyerg I add excl tags into i2c.hjson and remove add_csr_exclusions function. Currently, the only csr_hw_reset failed. I will check with @igk8 as the RTL designer. If I keep add_csr_exclusions with the only excl for intr_state register, all csr_* tests pass.

image

tunghoang290780 avatar Mar 07 '20 07:03 tunghoang290780

As described in the testplan, csr_hw_reset checks the reset value of the registers. Looks like some interrupt is getting asserted right out of reset (which means SW will get interrupted the moment it is enabled). Please check if this is intentional.

sriyerg avatar Mar 09 '20 07:03 sriyerg

@tunghoang290780 can this be closed?

rasmus-madsen avatar Jun 30 '20 09:06 rasmus-madsen