I am using RAL Model auto generated by Questasim by using .csv file.
So after that I am writing a register using below task:
task write_reg(input string register_name, input bit [31:0] value);
rg = axi_lite_reg.get_reg_by_name(register_name);
if(rg == null) begin
`uvm_error("AXI REGISTER WRITE",$sformatf("Undefined register name %0s",register_name))
`uvm_info("AXI REGISTER WRITE",$sformatf("Register name : %s(0x%h) Written Value = 0x%h",rg.get_name(),rg.get_address(),value),UVM_LOW)
rg.write(.status(status), .value(value), .map(axi_lite_reg.Ethernet_block_map));
endtask : write_reg
But now if I want to write particular field of a register then I don't know how to do it.
So can anyone guide me about it.
I had tried using 1 solution that is that let say if I want to write 3rd field of a register then first I read that register then I do bitwise OR to that read data with this 'b0100 but here the case is my register is write 1 to clear so now if in read data 4th bit is 1 then it would get clear on write operation.
I hope I find some other solution to this.
Thanks in advance.