How to get Command line arguments inside a sequence in UVM

 class base_seq extends uvm_sequence#(RV_seq_item);
   
  `uvm_object_utils(base_seq)
    
  RV_seq_item req;
  //Constructor
  function new(string name = "base_seq");
    super.new(name);
  endfunction
   
  virtual task body();
    req = RV_seq_item::type_id::create("req");
    wait_for_grant();
    if(!req.randomize())     
      begin
       `uvm_error("body", "randomization failure for item")
      end
    send_request(req);
    wait_for_item_done();
  endtask
   
endclass


 class regression_seq extends base_seq;
   string rly_opt, rlyon, cmd_chprly;
   int i_rly_opt, i_rlyon, i_cmd_chprly;

   `uvm_object_utils_begin(regression_seq)
    `uvm_field_int(a_rly_opt,UVM_ALL_ON)
    `uvm_field_int(a_rlyon,UVM_ALL_ON)
    `uvm_field_int(a_cmd_chprly,UVM_ALL_ON)
    `uvm_field_string(rly_opt,UVM_ALL_ON)
    `uvm_field_string(rlyon,UVM_ALL_ON)
    `uvm_field_string(cmd_chprly,UVM_ALL_ON)
  `uvm_object_utils_end

  //`uvm_object_utils(regression_seq)
     uvm_cmdline_processor cmd_args;
    //Constructor
  function new(string name = "regression_seq");
    super.new(name);
    cmd_args = uvm_cmdline_processor::get_inst();
     endfunction
   
  virtual task body();
  cmd_args.get_arg_value("+RLY_OPT",rly_opt);
  //`uvm_info(get_type_name(),"CALLING -------------- command line arguments rly_opt", UVM_LOW)
  
   cmd_args.get_arg_value("+RLYON",rlyon);
     //  `uvm_info(get_type_name(),"CALLING -------------- command line arguments rlyon", UVM_LOW)
    //end
     cmd_args.get_arg_value("+CMD_CHPRLY",cmd_chprly);
     //  `uvm_info(get_type_name(),"CALLING -------------- command line arguments cmd_chprly", UVM_LOW)
    //end   

  		   a_rly_opt=rly_opt.atoi();
		   a_rlyon=rlyon.atoi();
		   a_cmd_chprly=cmd_chprly.atoi();
  	   	   `uvm_do_with(req,{FD_RLYON == a_rlyon; F_RLY_OPT == a_rly_opt; CMD_CHPRELAY == a_cmd_chprly;})
  endtask
   
endclass

+RLY_OPT=0 +RLYON=1 +CMD_CHPRLY=0
im getting these errors can you please help for that one
‘a_rly_opt’: undeclared identifier
a_rly_opt is not a class item.

In reply to ashokgupta466:

i Don’t see any declaration for integral “a_rly_opt” in your code. this can be the reason behind your errors. If it is declared then, kindly share entire code for the same.

In reply to mitesh.patel:
yaa its a_rly i kept i_rly

Thank you mitesh

In reply to ashokgupta466:
BTW, there is no need to be using the field automation macros here, they only add overhead to your simulation performance.

Actually it is not picking the values from command line it is taking some random values can you help for that one