blob: 91c80ed03bf0fa17137f284df595da1833bdc75a [file] [log] [blame]
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
class i2c_env_cfg extends cip_base_env_cfg #(.RAL_T(i2c_reg_block));
// ext component cfgs
rand i2c_agent_cfg m_i2c_agent_cfg;
`uvm_object_utils_begin(i2c_env_cfg)
`uvm_field_object(m_i2c_agent_cfg, UVM_DEFAULT)
`uvm_object_utils_end
`uvm_object_new
virtual function void initialize(bit [TL_AW-1:0] csr_base_addr = '1,
bit [TL_AW-1:0] csr_addr_map_size = 2048);
super.initialize(csr_base_addr, csr_addr_map_size);
// create i2c agent config obj
m_i2c_agent_cfg = i2c_agent_cfg::type_id::create("m_i2c_agent_cfg");
// set num_interrupts & num_alerts which will be used to create coverage and more
num_interrupts = ral.intr_state.get_n_used_bits();
num_alerts = 0;
endfunction
endclass