Skip to content

uvm_vreg_rdl methods

Scott Nellenbach edited this page Aug 9, 2017 · 4 revisions

uvm_vreg_rdl class methods

uvm_vreg_rdl extends the uvm_vreg class to add functionality for controlling test as well as adding a default reset value for each vreg and a data staging array that allows a lightweight mirroring scheme to be implemented.

Methods:


function void set_reg_test_info()

Parameters:

  • input bit dont_test
  • input bit dont_compare
  • input int js_category

Set test related info for this register (donttest, dontcompare, js category).


function bit is_dont_test()

Parameters:

Return 1 if register is marked don't test.


function bit is_dont_compare()

Parameters:

Return 1 if register is marked don't compare.


function bit has_a_js_category()

Parameters:

Return 1 if register has a jspec category.


function bit has_js_category()

Parameters:

  • input js_category_e cat

Return 1 if register has the specified jspec category.


function void add_js_category()

Parameters:

  • input js_category_e cat

Add the specified jspec category to this register.


function void remove_js_category()

Parameters:

  • input js_category_e cat

Remove the specified jspec category from this register.


function bit has_reset_value()

Parameters:

Return 1 if a reset value exists for this vreg set.


function uvm_reg_data_t get_reset_value()

Parameters:

Return the reset value for this vreg set.


function void set_reset_value()

Parameters:

  • input uvm_reg_data_t reset_value

Set the reset value for each register in this vreg set.


function uvm_reg_data_t get_staged()

Parameters:

  • input longint unsigned stage_idx

Return the value at the specified stage array idx. If no valid data exists at specified index, the reset value associated with this vreg will be returned. If no reset value exists, a uvm_error will be thrown.


function uvm_reg_data_t get_staged_field()

Parameters:

  • input longint unsigned stage_idx
  • input string name

Return the value of the field with specified name at a given stage array idx.


function void set_staged()

Parameters:

  • input longint unsigned stage_idx
  • input uvm_reg_data_t staged

Set the value stored at the specified stage array idx.


function void stage_field()

Parameters:

  • input longint unsigned stage_idx
  • input string name
  • input uvm_reg_data_t value

Set the value of the field with specified name stored at a given stage array idx. Other bit locations in the target stage array location are not modified.


virtual task write_staged()

Parameters:

  • input longint unsigned stage_idx
  • input longint unsigned vreg_idx
  • output uvm_status_e status
  • input uvm_path_e path, (default value = UVM_DEFAULT_PATH)
  • input uvm_reg_map map, (default value = null)
  • input uvm_sequence_base parent, (default value = null)
  • input uvm_object extension, (default value = null)
  • input string fname, (default value = "")
  • input int lineno, (default value = 0)

Write the stage array value stored at stage_idx to dut memory at offset vreg_idx


virtual task write_same_staged()

Parameters:

  • input longint unsigned idx
  • output uvm_status_e status
  • input uvm_path_e path, (default value = UVM_DEFAULT_PATH)
  • input uvm_reg_map map, (default value = null)
  • input uvm_sequence_base parent, (default value = null)
  • input uvm_object extension, (default value = null)
  • input string fname, (default value = "")
  • input int lineno, (default value = 0)

Write the stage array value stored at idx to dut memory at same idx offset


function void add_def_property()

Parameters:

  • input string name
  • input string value

Add a user-defined property to this rdl class instance


function bit has_def_property()

Parameters:

  • input string name

Returns 1 if a user-defined property of specified name exists for this rdl class instance


function string get_def_property()

Parameters:

  • input string name

Returns a user-defined property of specified name for this rdl class instance


function string remove_def_property()

Parameters:

  • input string name

Removes the user-defined property of specified name for this rdl class instance