blob: 43867a08ac7180381e3da78395bc7c022c74564b [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 csrng_env_cfg extends cip_base_env_cfg #(.RAL_T(csrng_reg_block));
`uvm_object_utils_begin(csrng_env_cfg)
`uvm_object_utils_end
`uvm_object_new
// ext component cfgs
rand push_pull_agent_cfg#(.HostDataWidth(entropy_src_pkg::FIPS_CSRNG_BUS_WIDTH))
m_entropy_src_agent_cfg;
rand csrng_agent_cfg m_csrng_agent_cfg;
virtual pins_if efuse_sw_app_enable_vif;
virtual function void initialize(bit [31:0] csr_base_addr = '1);
super.initialize(csr_base_addr);
// create agent configs
m_entropy_src_agent_cfg = push_pull_agent_cfg#(.HostDataWidth(entropy_src_pkg::
FIPS_CSRNG_BUS_WIDTH))::type_id::create("m_entropy_src_agent_cfg");
m_csrng_agent_cfg = csrng_agent_cfg::type_id::create("m_csrng_agent_cfg");
// set num_interrupts & num_alerts
begin
uvm_reg rg = ral.get_reg_by_name("intr_state");
if (rg != null) begin
num_interrupts = ral.intr_state.get_n_used_bits();
end
end
endfunction
endclass