No Default value for formal 'parent' in task/function create


import uvm_pkg::*;
`include "uvm_macros.svh"
`include "lab2.svh"

class test_base extends uvm_test;
  `uvm_component_utils(test_base)
  my_subscriber subscriber;
  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);
	
    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

import uvm_pkg::*;
`include "uvm_macros.svh"

class my_transaction extends uvm_sequence_item;

  `uvm_object_utils(my_transaction)
  // These declarations implement the create() and get_type_name() as well as enable automation of the
  // transfer fields   
//  `uvm_object_utils_begin(my_transaction)
//  `uvm_object_utils_end

     
  // This requires for registration of the ptp_tx_frame   
  function new(string name = "something");
	  super.new(name);
  endfunction 
   

endclass : my_transaction



class my_subscriber extends uvm_subscriber #(my_transaction);
  `uvm_component_utils(my_subscriber)
  
  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);
  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
  
  
  
  function void write(my_transaction t);
    uvm_report_info(get_type_name(),$sformatf("this is the write function"),UVM_NONE);
  endfunction:write
endclass:my_subscriber

I have attached above the code of my 2 files. I’m getting a No default value for formal ‘parent’ in task/function create error

** Error: (vsim-8268) No Default value for formal ‘parent’ in task/function create.

Time: 0 ns Iteration: 0 Region: /testbench_sv_unit File: my_test.svh Line: 16

Error loading design

Please do tell me what am I missing?

In reply to yr:

Please use code tags. I have added them for you.

The create() function for components requires two arguments, name and parent. You are specifying only the name.

In reply to cgales:

Thank you cgales!