Dynamic cast failed when passing multiple data for the sequence

Hi i got the question that i want to create a sequence which including 2 child sequence and these children can drive a specific data. Now the using “parameter” to do that but i got the error during run time:
Error-[DCF] Dynamic cast failed
…/…/uvm/wdt_sequence.sv, 160
Casting of source class type '\w_r_ctrl_seq#(32,1,32’hffffffff) ’ to
destination class type '\w_r_ctrl_seq#(32,0,32’ha5000007) ’ failed due to
type mismatch.
Please ensure matching types for dynamic cast

Here is my a part of my code:


``` verilog

class w_r_ctrl_seq
#(
   parameter   pWIDTH = 32
  ,random = 1
  ,pdata = 32'hffff_ffff
)
extends uvm_sequence#(wdt_seq_item);

  `uvm_object_utils(w_r_ctrl_seq);
  write_ctrl_seq #(.pWIDTH(pWIDTH),.random(random),.pdata(pdata)) wrt_seq;
  read_ctrl_seq  rd_seq;
  //--------------------------------------- 
  //Constructor
  //---------------------------------------
  function new(string name = "w_r_ctrl_seq");
    super.new(name);
  endfunction

  virtual task body();
    `uvm_do(wrt_seq)
    `uvm_do(rd_seq)
  endtask
endclass


//---- Top Sequence ----//

class top_sequence extends uvm_sequence #(wdt_seq_item);
  //Declare sequences 
  w_r_cnt_seq    conf_cnt_seq;
  w_r_ctrl_seq   #(32,0,32'ha500_0007) conf_ctrl_seq;
  write_ctrl_seq #(32,0,32'ha500_0010) pause_seq;
  write_ctrl_seq #(32,0,32'ha500_0007) resume_seq;
  //Register to UVM Factory
  `uvm_object_utils(top_sequence)

  //--------------------------------------- 
  //Constructor
  //---------------------------------------
  function new(string name = "top_seq");
    super.new(name);
  endfunction



Is there anyway i can fix that issue. I dont know what is the best way to supply specific data for a sequence? Thank You

In reply to phucn:

Your problem is here:
Casting of source class type '\w_r_ctrl_seq#(32,1,32’hffffffff) ’ to
destination class type '\w_r_ctrl_seq#(32,0,32’hffffffff) ’ failed due to
type mismatch.
The parameters do not meet in both sequences (the random parameter is different).

In reply to chr_sue:

i still don’t get your point,I want the sequence “w_r_ctrl_seq” data can be fixed value that is assigned by me. the random parameter is created to if random = 0 data of subsequent will be assigned the to 32’h5000_0007 and if random value = 1 mean the subsequent will be randomized their data.

Actually,i copied wrong error this is the right one:
Error-[DCF] Dynamic cast failed
…/…/uvm/wdt_sequence.sv, 160
Casting of source class type '\w_r_ctrl_seq#(32,1,32’hffffffff) ’ to
destination class type '\w_r_ctrl_seq#(32,0,32’ha5000007) ’ failed due to
type mismatch.