import uvm_pkg::*;
`include "uvm_macros.svh"
`include "lab2.svh"
class test_base extends uvm_test;
`uvm_component_utils(test_base)
function new(string name, uvm_component parent = null);
super.new(name,parent);
endfunction:new
function void build_phase(uvm_phase phase);
super.build_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from build_phase"),UVM_NONE);
my_subscriber subscriber;
subscriber = my_subscriber::type_id::create("subscriber");
endfunction:build_phase
function void connect_phase(uvm_phase phase);
super.connect_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from connect_phase"),UVM_NONE);
endfunction:connect_phase
function void start_of_simulation_phase(uvm_phase phase);
super.start_of_simulation_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from start_of_simulation_phase"),UVM_NONE);
endfunction:start_of_simulation_phase
task run_phase(uvm_phase phase);
#10;
uvm_report_info(get_type_name(),$sformatf("message from run_phase"),UVM_NONE);
endtask:run_phase
function void extract_phase(uvm_phase phase);
super.extract_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from extract_phase"),UVM_NONE);
endfunction:extract_phase
function void check_phase(uvm_phase phase);
super.check_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from check_phase"),UVM_NONE);
endfunction: check_phase
function void report_phase(uvm_phase phase);
super.report_phase(phase);
uvm_report_info(get_type_name(),$sformatf("message from report_phase"),UVM_NONE);
endfunction:report_phase
endclass:test_base
I’m getting a Illegal declaration after the statement near line ‘14’. Declarations must precede statements. Look for stray semicolons error. Could someone please help me with regards to what is happening here?