endclass// Extends virtual class uvm_sequence_base so that it can be constructed:classuvm_reg_seq_baseextendsuvm_sequence_base;`uvm_object_utils(uvm_reg_seq_base)functionnew(stringname="uvm_reg_seq_base");super.new(name);endfunctionendclass//------------------------------------------------------------------------------//// Class -- NODOCS -- uvm_reg_map//
**thisimplementationassumesapackeddataaccess*/externvirtualfunctionintget_physical_addresses_to_map(uvm_reg_addr_tbase_addr,uvm_reg_addr_tmem_offset,intunsignedn_bytes,// number of bytesrefuvm_reg_addr_taddr[],// array of addresses inputuvm_reg_mapparent_map,// translate till parent_map is the parent of the actual map or NULL if this is a root_maprefintunsignedbyte_offset,inputuvm_memmem=null);// performs all bus operations ~accesses~ generated from ~rw~ via adapter ~adapter~ on sequencer ~sequencer~externtaskperform_accesses(refuvm_reg_bus_opaccesses[$],inputuvm_reg_itemrw,inputuvm_reg_adapteradapter,inputuvm_sequencer_basesequencer);// performs all necessary bus accesses defined by ~rw~ on the sequencer ~sequencer~ utilizing the adapter ~adapter~externtaskdo_bus_access(uvm_reg_itemrw,uvm_sequencer_basesequencer,uvm_reg_adapteradapter);// unregisters all content from this map recursively// it is NOT expected that this leads to a fresh new map // it rather removes all knowledge of this map from other objects // so that they can be reused with a fresh map instance// @uvm-ieee 1800.2-2020 auto 18.2.3.11virtualfunctionvoidunregister();uvm_reg_blockq[$];uvm_reg_block::get_root_blocks(q);foreach(q[idx])q[idx].set_lock(0);foreach(q[idx])q[idx].unregister(this);foreach(m_submaps[map_])map_.unregister();m_submaps.delete();m_submap_rights.delete();
m_parent_map=null;endfunctionvirtualfunctionuvm_reg_mapclone_and_update(stringrights);if(m_parent_map!=null)`uvm_error("UVM/REG/CLONEMAPWITHPARENT","cannot clone a map which already has a parent")if(m_submaps.size()!=0)`uvm_error("UVM/REG/CLONEMAPWITHCHILDREN","cannot clone a map which already has children")beginuvm_reg_mapm;uvm_reg_blockb=get_parent();uvm_regqr[$];uvm_memqm[$];m=b.create_map(get_name(),0,m_n_bytes,m_endian,m_byte_addressing);foreach(m_regs_by_offset[i])beginuvm_regrg=m_regs_by_offset[i];uvm_reg_map_infoinfo=get_reg_map_info(rg);m.add_reg(rg,info.offset,rights,info.unmapped,info.frontdoor);