nmoseley Posted July 20, 2011 Report Share Posted July 20, 2011 Attempted to use the uvm_reg function get("fieldname") to return the value of specific register field within a register class. Found that get() returns the value of all the fields of the register regardless of the value provided to input argument fname. The feature does not appear to be fully implemented. // From uvm_reg.svh function uvm_reg_data_t uvm_reg::get(string fname = "", int lineno = 0); // Concatenate the value of the individual fields // to form the register value m_fname = fname; m_lineno = lineno; get = 0; foreach (m_fields) get |= m_fields.get() << m_fields.get_lsb_pos(); endfunction: get Quote Link to comment Share on other sites More sharing options...
janick Posted July 21, 2011 Report Share Posted July 21, 2011 "fname" means "filename", not fieldname. It's intent is to have any error messages report where the user call was, not where the code is in the UVM library itself: data = blk.rg.get(`__FILE__, `__LINE__); Use uvm_reg_field::get() to get the field value. data = blk.rg.field.get(`__FILE__, `__LINE__); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.