I want to write all ones to the fields of a register.
Eg:
space = uvm_reg_field::type_id::create("space");
sky = uvm_reg_field::type_id::create("sky");
gravity = uvm_reg_field::type_id::create("gravity");
mass = uvm_reg_field::type_id::create("mass");
space.configure(this,2,2,"RW",0,2'b11,1,1,0);
sky.configure(this,4,4,"RW",0,4'b0,1,1,0);
gravity.configure(this,4,8,"RW",0,4'b0,1,1,0);
mass.configure(this,4,12,"RW",0,4'b0,1,1,0);
Lets say we have the above fields, having different field width.
I use get_fields() method to get the field list. get_n_bits() to get the field width,once I get the field width I want to write all ones to the field width.
say the field width for SPACE is 2, I want to write 2'b11 to space field of the register, similarly sky being 4 bit wide I want to write 4'b1111 to that register field.
How should I proceed??