// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
  testpoints: [
    {
      name: prim_one_hot_check
      desc: ''' Verify that violating one-hot property generates a fatal alert.

            One-hot encoded signals are captured in `prim_one_hot` module.
            Stimulus:
            - Backdoor force the one-hot coding signals with multiple bits set.
            - Randomly force the value to one-hot to ensure the error is latched and won't go away
              until reset.
            - Within the next few cycles, the violation of one-hot property should generate a fatal
              alert.
            - Repeat for ALL prim_one_hot 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"]
    }
  ]
}
