Jump to content
Sign in to follow this  
SeanChou

[uvm_reg] why not clear(set) the prediction field value after read "WCRC/WCRS"?

Recommended Posts

Hi UVM Reg Exports,

In the uvm_reg_field::do_predict() function as following:

• why not clear field_val when (acc == “WSRCâ€) after read?

• why not set field_val when (acc == “WCRSâ€) after read?

is there some reason or simply missing this type?

function void uvm_reg_field::do_predict(….)
    //……………………

     UVM_PREDICT_READ: // line 1136 in uvm_reg_field.svh of uvm-1.1b
       begin
         uvm_reg_field_cb_iter cbs = new(this);

         if (rw.path == UVM_FRONTDOOR || rw.path == UVM_PREDICT) begin

            string acc = get_access(rw.map);

            if (acc == "RC" ||
                acc == "WRC" ||
                acc == "W1SRC" ||
                acc == "W0SRC")
              field_val = 0;  // (clear)

            else if (acc == "RS" ||
                     acc == "WRS" ||
                     acc == "W1CRS" ||
                     acc == "W0CRS")
              field_val = ('b1 << m_size)-1; // all 1's (set)

            else if (acc == "WO" ||
                     acc == "WOC" ||
                     acc == "WOS" ||
                     acc == "WO1")
              return;
         end

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×