blob: cb1ec682029611b43b611675342ed249ca817e93 [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
name: "aon_timer"
// TODO: remove the common testplans if not applicable
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
"hw/dv/tools/dvsim/testplans/mem_testplan.hjson",
"hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson",
"hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson"]
testpoints: [
{
name: smoke
desc: '''
Smoke test initializes and starts AON Timer according to
the programmers guide.
**Stimulus**:
- Register writes to Watchdog/Wakeup COUNT, CTRL and THOLD registers
**Checks**:
- If we are changing WDOG_BARK_THOLD to be lower than the current WDOG_COUNT
watchdog timer should raise the interrupt `wdog_timer_bark`.
- If we are changing WDOG_BITE_THOLD to be lower than the current WDOG_COUNT
watchdog timer should trigger a reset request.
- If we are changing WKUP_THOLD to be lower than the current WKUP_COUNT
wakeup timer should raise the interrupt `wkup_timer_expired`.
'''
milestone: V1
tests: ["aon_timer_smoke"]
}
{
name: wdog_lock
desc: '''
Change threshold value and set counter value randomly while running with the
configuration lock for watchdog timer enabled
**Stimulus**:
- Register writes to WDOG_CTRL, WDOG_REGWEN, WDOG_BARK_THOLD, WDOG_BITE_THOLD
**Checks**:
- There should be no change in the behaviour of AON Timer since configurations
are locked.
'''
milestone: V1
tests: ["aon_timer_lock"]
}
{
name: stress
desc: '''
Change threshold values and prescaler value on random times without locking
configuration registers of watchdog timer.
**Stimulus**:
- Register writes to WDOG_BARK_THOLD, WDOG_BITE_THOLD, WKUP_THOLD, WKUP_CTRL
**Checks**:
- If we are changing WDOG_BARK_THOLD to be lower than the current WDOG_COUNT
watchdog timer should raise the interrupt `wdog_timer_bark`.
- If we are changing WDOG_BITE_THOLD to be lower than the current WDOG_COUNT
watchdog timer should trigger a reset request.
- If we are changing WKUP_THOLD to be lower than the current WKUP_COUNT
wakeup timer should raise the interrupt `wkup_timer_expired`.
- WKUP_COUNT should reflect expected passing of real time regardless of
prescaler value.
'''
milestone: V2
tests: ["aon_timer_stress"]
}
]
}