| // Copyright lowRISC contributors. |
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. |
| // SPDX-License-Identifier: Apache-2.0 |
| class gpio_env_cfg extends cip_base_env_cfg #(.RAL_T(gpio_reg_block)); |
| // flag to indicate if weak pullup has been introduced on gpio |
| // By default, weak pull up is always present |
| // flag to indicate if weak pulldown has been introduced on gpio |
| // gpio virtual interface |
| constraint pullup_pulldown_en_c { |
| `uvm_object_utils(gpio_env_cfg) |
| virtual function void initialize(bit [TL_AW-1:0] csr_base_addr = '1, |
| bit [TL_AW-1:0] csr_addr_map_size = ADDR_MAP_SIZE); |
| super.initialize(csr_base_addr, csr_addr_map_size); |
| // set num_interrupts & num_alerts which will be used to create coverage and more |
| num_interrupts = ral.intr_state.get_n_used_bits(); |