opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[gpio dv] gpio_csr_hw_reset test failure due to 'x' DATA_IN register read data

Open gaurangchitroda opened this issue 7 years ago • 5 comments

Hi DV-Folks,

I debugged a failure for gpio_csr_hw_reset test, wherein following assertion failure is seen due to 32'hzzzz_zzzz register read data: UVM_ERROR @ 1508453 ps: (prim_assert.sv:21) [ASSERT FAILED] [tb.dut.tlul_assert_host.unnamed$$_3.dDataKnown] dDataKnown: !$isunknown(d2h.d_data[8*ii +: 8]) (../../../../../../../../tlul/rtl/tlul_assert.sv:125)

This is happening while reading DATA_IN register after reset. As per GPIO spec, this is expected as default value of DATA_IN register after reset is 'x' (Strictly speaking, it should be specified as 32'hzzzz_zzzz).

As this is register test, I have not introduced weak pull up on GPIO. Do you suggest adding this? Or should we disable tlul assertion for this?

Please find the waveform for this scenario below, the point of failure is marker M3. image

Or you can refer to waves in following path: /edascratch/gaurangg-opentitan/issue944/waves.fsdb

Best Regadrs, Gaurang

gaurangchitroda avatar Aug 19 '19 01:08 gaurangchitroda

IMO, we can exclude checking this register in csr test since we verify it in other tests csr_excl.add_excl({scope, ".", "gpio"}, CsrExclCheck);

or adding a pull-up for this reg is also Okay, since we should have this pull-up logic in SOC.

weicaiyang avatar Aug 19 '19 18:08 weicaiyang

Weak pullup is preferred over exclusion. I think in tb.sv, 'active_high_pullup' variable should be default set to 1 and allow users to override it (to 0) if required.

sriyerg avatar Aug 19 '19 18:08 sriyerg

Agree, active_high_pullup=1 should be the default.

weicaiyang avatar Aug 19 '19 19:08 weicaiyang

I have committed #95 with required changes. All gpio csr tests are passing now.

gaurangchitroda avatar Sep 04 '19 17:09 gaurangchitroda

Hi Gaurang, please close this bug if addressed.

sriyerg avatar Sep 19 '19 16:09 sriyerg