Timothy Trippel | 101c9e5 | 2021-11-03 21:25:12 +0000 | [diff] [blame] | 1 | // Copyright lowRISC contributors. |
| 2 | // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
| 4 | |
| 5 | ${autogen_banner} |
| 6 | |
| 7 | #ifndef OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_ |
| 8 | #define OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_ |
| 9 | |
| 10 | % for ip in ips_with_difs: |
| 11 | % if ip.irqs: |
| 12 | /* |
| 13 | * Services an ${ip.name_snake} IRQ at the IP that raised it, and verifies this |
| 14 | * matches the IRQ that was raised at the PLIC. |
| 15 | * |
| 16 | * @param ${ip.name_snake} A(n) ${ip.name_snake} DIF handle. |
| 17 | * @param plic_irq_id The triggered PLIC IRQ ID. |
| 18 | * @param plic_${ip.name_snake}_start_irq_id The PLIC IRQ ID where ${ip.name_snake} starts. |
| 19 | * @param expected_${ip.name_snake}_irq The expected ${ip.name_snake} IRQ. |
| 20 | * @param is_only_irq This is the only IRQ expected to be raised. |
| 21 | */ |
| 22 | void isr_testutils_${ip.name_snake}(dif_${ip.name_snake}_t *${ip.name_snake}, |
| 23 | dif_rv_plic_irq_id_t plic_irq_id, |
| 24 | dif_rv_plic_irq_id_t plic_${ip.name_snake}_start_irq_id, |
| 25 | dif_${ip.name_snake}_irq_id_t expected_${ip.name_snake}_irq, |
| 26 | bool is_only_irq); |
| 27 | |
| 28 | % endif |
| 29 | % endfor |
| 30 | |
| 31 | #endif // OPENTITAN_SW_DEVICE_LIB_TESTING_AUTOGEN_ISR_TESTUTILS_H_ |