| // Copyright lowRISC contributors. | 
 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. | 
 | // SPDX-License-Identifier: Apache-2.0 | 
 |  | 
 | // Security countermeasures testplan extracted from the IP Hjson using reggen. | 
 | // | 
 | // This testplan is auto-generated only the first time it is created. This is | 
 | // because this testplan needs to be hand-editable. It is possible that these | 
 | // testpoints can go out of date if the spec is updated with new | 
 | // countermeasures. When `reggen` is invoked when this testplan already exists, | 
 | // It checks if the list of testpoints is up-to-date and enforces the user to | 
 | // make further manual updates. | 
 | // | 
 | // These countermeasures and their descriptions can be found here: | 
 | // .../${block_name}/data/${block_name}.hjson | 
 | // | 
 | // It is possible that the testing of some of these countermeasures may already | 
 | // be covered as a testpoint in a different testplan. This duplication is ok - | 
 | // the test would have likely already been developed. We simply map those tests | 
 | // to the testpoints below using the `tests` key. | 
 | // | 
 | // Please ensure that this testplan is imported in: | 
 | // .../${block_name}/data/${block_name}_testplan.hjson | 
 | { | 
 | <% | 
 | def get_sec_cm_testpoint_name(cm): | 
 |     cm_name = str(cm).lower().replace(".", "_") | 
 |     return f"sec_cm_{cm_name}" | 
 | %>\ | 
 |   testpoints: [ | 
 | % for cm in block.countermeasures: | 
 |     { | 
 |       name: ${get_sec_cm_testpoint_name(cm)} | 
 |       desc: "Verify the countermeasure(s) ${str(cm)}." | 
 |       stage: V2S | 
 |       tests: [] | 
 |     } | 
 | % endfor | 
 |   ] | 
 | } |