Jump to content

[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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...