I have a 16 bit register out of which i am trying to access 8 bits ,, but i am getting following warning :
UVM_WARNING verilog_src/uvm-1.1d/src/reg/uvm_reg_field.svh(1804) @ 16666400: reporter [RegModel] Target bus does not support byte enabling, and the field ‘reg_block_h.RX_REG.ONE’ is not the only field within the entire bus width. Individual field access will not be available. Accessing complete register instead.
I have written 'h1234 to register then i want to change only least significant byte via register write with 'hFF and am expecting to get 'h12FF when i read it but i am getting 'hff …
Does anybody know what is the fix for this issue ?
this is the build function of that registers it has two fields
function void RX__REG::build();
ONE = uvm_reg_field::type_id::create(“ONE”);
TWO = uvm_reg_field::type_id::create(“TWO”);
ONE.configure(this,8,0,“RW”,0,'d59,1,1,1);
TWO.configure(this,8,8,“RW”,0,'d68,1,1,1);
endfunction
OK. Thanks. You want to access one of your 2 data fields, right?
You have to perform for instance first a set on the corresponding filed and afterwards performing a get.
What are your commands you are executing?
Hi
Following are the commands used for writing and reading
reg_block_h.RX_REG.read(status,value);
reg_block_h.RX_REG.write(status,data);// data = 'h1234
reg_block_h.RX_REG.read(status,value);// value = 'h1234
reg_block_h.RX_REG.ONE.write(status,'hFF);//
reg_block_h.RX_REG.read(status,value);// value = 'hff ..
Have you configured your register adapter class to support byte enables (supports_byte_enable = 1)?
If not, see “Implementing An Adapter” in the UVM Cookbook.
I used set and update methods , now its working as expected.
first I updated m_desired value using set method for the required field in the register
then I used update method for the register only that field got updated .
Please show the UVM code (register commands in the sequence) for the entire test case. Please indicate if there is more than one test case. Your code earlier in the post does not match later in the post, it’s not clear what you are trying to do or what the results are.
reg_block_h.RX_REG.read(status,value); // 1234
reg_block_h.RX_REG.ONE.set(.value('h55)); //
reg_block_h.RX_REG.update(status); // 1255
reg_block_h.RX_REG.ONE.set(.value('h55)); // default value is 1234
reg_block_h.RX_REG.update(status); // 0055
Is there a way to update only the field ONE ?