| // 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/stress_all_with_reset_testplan.hjson", |
| "hw/dv/tools/dvsim/testplans/tl_device_access_types_testplan.hjson", |
| "aon_timer_sec_cm_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`. |
| ''' |
| stage: V1 |
| tests: ["aon_timer_smoke"] |
| } |
| { |
| name: prescaler |
| desc: ''' |
| Switch prescaler value at random times without locking configuration registers |
| of watchdog timer. |
| |
| **Stimulus**: |
| - Register writes to WKUP_CTRL while running. |
| |
| **Checks**: |
| - WKUP_COUNT should reflect expected -and changed- passing of real time |
| regardless of its changing prescaler value. |
| ''' |
| stage: V2 |
| tests: ["aon_timer_prescaler"] |
| } |
| { |
| name: jump |
| 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. |
| ''' |
| stage: V2 |
| tests: ["aon_timer_jump"] |
| } |
| { |
| name: stress_all |
| desc: ''' |
| This runs random sequences in succession. |
| |
| Randomly chooses from the following sequences: |
| - aon_timer_intr_test |
| - aon_timer_jump |
| - aon_timer_prescaler |
| - aon_timer_smoke |
| ''' |
| stage: V2 |
| tests: ["aon_timer_stress_all"] |
| } |
| ] |
| |
| covergroups: [ |
| { |
| name: timer_cfg_cg |
| desc: ''' |
| Includes possible values of all registers of AON timer. For 32b registers, bins are |
| introduced in order to simplfy coverage. Maximum and minimum values are collected in |
| a separate bin to guarantee that they are checked. 32 separate bins are auto-generated |
| in order to distrubute values evenly. |
| ''' |
| } |
| ] |
| } |