Uvm_callback : Error-[SE] Syntax error : can't figure out what's going wrong here

Here is the link to entire code: UVM : In progress - EDA Playground

I think this is something to do about : where to include callback class file when compiling or when to call callback constructor. I have checked syntax multiple time, don’t see anything wrong there.
Right now I have included callback class file name it in my extended test file

NOTE: I also tried
1)

cb_h = dr_callback::type_id::create("cb_h", this);      // doing this in constructor of extended test
uvm_callbacks#(base_drv, dr_callback_abs)::add(env.agent.dr, cb_h); // doing this in build_phase of extended test
cb_h = dr_callback::type_id::create("cb_h", this);      // doing this in build_phase of extended test
uvm_callbacks#(base_drv, dr_callback_abs)::add(env.agent.dr, cb_h); // doing this in build_phase of extended test

made sure there is no typo in any callback class and object names
But it’s still failing. Here is how I am dealing with callback with reference of example from : UVM Callback - Verification Guide

class base_drv extends uvm_driver#(base_tr);
  `uvm_component_utils(base_drv)
  `uvm_register_cb(base_drv, dr_callback_abs)                      // *************** UVM Callback registration
 ...
  virtual task run_phase (uvm_phase phase);
    super.run_phase(phase);
    tr = base_tr::type_id::create("tr");
    forever begin 
      seq_item_port.get_next_item(tr);
      `uvm_do_callbacks(base_drv, dr_callback_abs, dr_cb_t1());     // *************** placeholders for UVM Callback
      @(vif.cb) vif.in <= tr.in;
      `uvm_do_callbacks(base_drv, dr_callback_abs, dr_cb_t2());     // *************** placeholders for UVM Callback
      seq_item_port.item_done();
    end 
  endtask 
endclass
 
class dr_callback_abs extends uvm_callback;                         // *************** UVM Callback abstract class
  `uvm_object_utils(dr_callback_abs)
 
  function new(string name = "dr_callback_abs");
    super.new(name);
  endfunction 
 
  virtual task dr_cb_t1;
  endtask
 
  virtual task dr_cb_t2;
  endtask
 
endclass
 
class dr_callback extends dr_callback_abs;                         // *************** UVM Callback implementation class
  `uvm_object_utils(dr_callback)
 
  function new(string name = "dr_callback");
    super.new(name);
  endfunction 
 
  virtual task dr_cb_t1();//base_tr cb_t);
    `uvm_info(get_type_name(),$sformatf(" YOU ARE Inside dr_cb_t1 method"), UVM_LOW);
  endtask
 
  virtual task dr_cb_t2();//base_tr cb_t);
    `uvm_info(get_type_name(),$sformatf(" YOU ARE Inside dr_cb_t2 method"), UVM_LOW);
  endtask
endclass
 
// test file
`include "seq_1.sv"
`include "dr_callback.sv"                           // *************** UVM Callback:   included callback class file (which has callback abstract class and implementation class) in test file
 
class all_8_test extends base_test;
  dr_callback cb_h;                                   // *************** UVM Callback:  create handle of implementation class
  `uvm_component_utils(all_8_test)
 
 
  function new(string name = "all_8_test", uvm_component parent = null);
    super.new(name, parent);
    set_type_override_by_type(base_test::get_type(), all_8_test::get_type());
    set_type_override_by_type(base_seq::get_type(), seq_1::get_type());
    cb_h = dr_callback::type_id::create("cb_h", this);                             // *************** UVM Callback:  create callback object
    uvm_callbacks#(base_drv, dr_callback_abs)::add(env.agent.dr, cb_h);          // *************** UVM Callback:  add callback to driver
  endfunction
 
  task run_phase(uvm_phase phase);
    super.run_phase(phase);    
    phase.phase_done.set_drain_time(this,3);
  endtask
 
endclass

Error-[SE] Syntax error
Following verilog source has syntax error :
Token ‘dr_callback_abs’ not recognized as a type. Please check
whether it is misspelled, not visible/valid in the current context, or not
properly imported/exported. This is occurring in a context where a variable
declaration, a statement, or a sequence expression is expected. Either the
declaration type is not known or this is incorrect syntax.
“base_drv.sv”, 25 (expanding macro): token is ‘=’
`uvm_do_callbacks(base_drv,dr_callback_abs, dr_cb_t1()); //
*************** UVM Callback
^

#0, uvm_do_obj_callbacks(T=base_drv, CB=dr_callback_abs, OBJ=this, METHOD=dr_cb_t1()) : “/apps/vcsmx/vcs/Q-2020.03-SP1-1//etc/uvm-1.2/src/macros/uvm_callback_defines.svh”:165
#1, uvm_do_callbacks(T=base_drv, CB=dr_callback_abs, METHOD=dr_cb_t1()) : “/apps/vcsmx/vcs/Q-2020.03-SP1-1//etc/uvm-1.2/src/macros/uvm_callback_defines.svh”:140
full expansion of macro (uvm_do_callbacks), error at line 3
(* native_uvm *)begin
uvm_callback_iter#(base_drv,dr_callback_abs) iter = new(this);
=> dr_callback_abs cb = iter.first();
while(cb != null) begin
`uvm_cb_trace_noobj(cb,$sformatf(“Executing callback method ‘dr_cb_t1()’ for callback %s (dr_callback_abs) from %s (base_drv)”,cb.get_name(), this.get_full_name()))

1 warning
1 error

In reply to vickydhudashia:

Update: I thought because my clocking block name is cb and callback object name is also cb, that would the issue. But changed my callback object handle name from cb to cb_h. Still have same issue

In reply to vickydhudashia:

I recommend using packages to better organize your code. It will help you ensure that the compilation order of your code is correct.

In reply to cgales:

Hi cgales, thanks for the suggestion. Yes I should start using pkgs even in my practice codes for better visibility.
For now I was able to understand the order in which it require to have all files passed to the tool. And included it in my top tb.
I will keep that code there (it’s a very simple skeleton) for now. May be it will help others if anyone faces this issue and can’t understand why.

Thank You

In reply to vickydhudashia:

Hi Vicky, can you tell what was the issue here. And what was the hierarchy, which solved your issue.
I am also facing the similar issue.