// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
  testpoints: [
    {
      name: prim_count_check
      desc: ''' Verify that violating prim_count counter properties generate a fatal alert.

            Stimulus:
            - At the falling edge (non-active edge), force the counter to a different value than
              expected.
            - Randomly force the counter back to a normal value to ensure the error is latched and
              won't go away until reset.
            - Within the next few cycles, the violation of hardened counter property should
              generate a fatal alert.
            - Repeat for ALL prim_count instances in the DUT.

            Checks:
            - Check that fatal alert is triggered.
            - Check that err_code/fault_status is updated correctly and preserved until reset.
            - Verify any operations that follow fail (as applicable).
            '''
      stage: V2S
      tests: ["{name}_sec_cm"]
    }
  ]
}
