// A register may be mapped to one or more address maps,// each with different access rights and policy.//-----------------------------------------------------------------virtualclassuvm_regextendsuvm_object;localbitm_locked;localuvm_reg_blockm_parent;localuvm_reg_filem_regfile_parent;localintunsignedm_n_bits;localintunsignedm_n_used_bits;protectedbitm_maps[uvm_reg_map];protecteduvm_reg_fieldm_fields[$];// Fields in LSB to MSB orderlocalintm_has_cover;localintm_cover_on;localsemaphorem_atomic;localprocessm_process;localstringm_fname;localintm_lineno;localbitm_read_in_progress;
// interface on the block.////------------------------------------------------------------------------virtualclassuvm_reg_blockextendsuvm_object;localuvm_reg_blockparent;localstaticbitm_roots[uvm_reg_block];localintunsignedblks[uvm_reg_block];localintunsignedregs[uvm_reg];`ifdefUVM_SPARSE_ARRAYlocalintunsignedregarrays[uvm_reg_file];`endiflocalintunsignedvregs[uvm_vreg];localintunsignedmems[uvm_mem];localbitmaps[uvm_reg_map];// Variable: default_path// Default access path for the registers and memories in this block.
//// Register files are usually instantiated as arrays.//virtualclassuvm_reg_fileextendsuvm_object;localuvm_reg_blockparent;localuvm_reg_filem_rf;localstringdefault_hdl_path="RTL";localuvm_object_string_pool#(uvm_queue#(string))hdl_paths_pool;//----------------------// Group: Initialization//----------------------//// Function: new//// Create a new instance
// access callback methods. //------------------------------------------------------------------------------virtualclassuvm_reg_cbsextendsuvm_callback;functionnew(stringname="uvm_reg_cbs");super.new(name);endfunction// Task: pre_write//// Called before a write operation.//// All registered ~pre_write~ callback methods are invoked after the// invocation of the ~pre_write~ method of associated object (<uvm_reg>,// <uvm_reg_field>, <uvm_mem>, or <uvm_reg_backdoor>). If the element being// written is a <uvm_reg>, all ~pre_write~ callback methods are invoked// before the contained <uvm_reg_fields>.
////------------------------------------------------------------------------------classuvm_vreg_cbsextendsuvm_callback;stringfname;intlineno;functionnew(stringname="uvm_reg_cbs");super.new(name);endfunction//// Task: pre_write// Callback called before a write operation.//// The registered callback methods are invoked after the invocation// of the <uvm_vreg::pre_write()> method.
////------------------------------------------------------------------------------classuvm_vreg_field_cbsextendsuvm_callback;stringfname;intlineno;functionnew(stringname="uvm_vreg_field_cbs");super.new(name);endfunction//// Task: pre_write// Callback called before a write operation.//// The registered callback methods are invoked before the invocation// of the virtual register pre-write callbacks and// after the invocation of the <uvm_vreg_field::pre_write()> method.
// the addition of API described below.// @uvm-ieee 1800.2-2020 auto 18.4.1classuvm_regextendsuvm_object;localbitm_locked;localuvm_reg_blockm_parent;localuvm_reg_filem_regfile_parent;localintunsignedm_n_bits;localintunsignedm_n_used_bits;protectedbitm_maps[uvm_reg_map];protecteduvm_reg_fieldm_fields[$];// Fields in LSB to MSB orderlocalintm_has_cover;localintm_cover_on;localsemaphorem_atomic;localprocessm_process;localstringm_fname;localintm_lineno;localbitm_read_in_progress;
// @uvm-ieee 1800.2-2020 auto 18.1.1classuvm_reg_blockextendsuvm_object;`uvm_object_utils(uvm_reg_block)localuvm_reg_blockparent;localstaticbitm_roots[uvm_reg_block];localstaticintunsignedm_root_names[string];localstringm_name;localstaticbitm_enable_reg_lookup_cache;localstaticuvm_reg_blockm_reg_block_registry[string];localuvm_reg_blockblks[intunsigned];
// @uvm-ieee 1800.2-2020 auto 18.3.1classuvm_reg_fileextendsuvm_object;localuvm_reg_blockparent;localuvm_reg_filem_rf;localstringdefault_hdl_path="RTL";localuvm_object_string_pool#(uvm_queue#(string))hdl_paths_pool;`uvm_object_utils(uvm_reg_file)//----------------------// Group -- NODOCS -- Initialization//----------------------
//------------------------------------------------------------------------------// @uvm-ieee 1800.2-2020 auto 18.11.1classuvm_reg_cbsextendsuvm_callback;`uvm_object_utils(uvm_reg_cbs)// @uvm-ieee 1800.2-2020 auto 18.11.2.1functionnew(stringname="uvm_reg_cbs");super.new(name);endfunction// @uvm-ieee 1800.2-2020 auto 18.11.2.2virtualtaskpre_write(uvm_reg_itemrw);endtask
//------------------------------------------------------------------------------// @uvm-ieee 1800.2-2020 auto 18.9.2.1virtualclassuvm_vreg_cbsextendsuvm_callback;`uvm_object_abstract_utils(uvm_vreg_cbs)stringfname;intlineno;functionnew(stringname="uvm_reg_cbs");super.new(name);endfunction// @uvm-ieee 1800.2-2020 auto 18.9.2.2.1virtualtaskpre_write(uvm_vregrg,longintunsignedidx,
//------------------------------------------------------------------------------// @uvm-ieee 1800.2-2020 auto 18.10.6.1virtualclassuvm_vreg_field_cbsextendsuvm_callback;stringfname;intlineno;`uvm_object_abstract_utils(uvm_vreg_field_cbs)functionnew(stringname="uvm_vreg_field_cbs");super.new(name);endfunction// @uvm-ieee 1800.2-2020 auto 18.10.6.2.1virtualtaskpre_write(uvm_vreg_fieldfield,longintunsignedidx,
// The frontdoor allows access using a non-linear and/or non-mapped mechanism.// Users can extend this class to provide the physical access to these registers.//virtualclassuvm_reg_frontdoorextendsuvm_reg_sequence#(uvm_sequence#(uvm_sequence_item));// Variable: rw_info//// Holds information about the register being read or written//uvm_reg_itemrw_info;// Variable: sequencer//// Sequencer executing the operation//uvm_sequencer_basesequencer;// Function: new//
// @uvm-ieee 1800.2-2020 auto 19.4.2.1virtualclassuvm_reg_frontdoorextendsuvm_reg_sequence#(uvm_sequence#(uvm_sequence_item));`uvm_object_abstract_utils(uvm_reg_frontdoor)// Variable -- NODOCS -- rw_info//// Holds information about the register being read or written//uvm_reg_itemrw_info;// Variable -- NODOCS -- sequencer//// Sequencer executing the operation//uvm_sequencer_basesequencer;