Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

RAL Multiple Sequence

$
0
0

I want to achieve following logic.

 

Start_Seq -----> Parent Seq -----> Child Seq1

                                             -----> Child Seq2

                                             -----> Child Seq3

 

i tried following two sequences.

MY_REG_SEQ --> Parent Seq

TRY_SEQ --> Child Seq

 

But when i execute the below sequences, i get error for bad handle/reference.

`include "my_reg_block.sv"

class try_seq extends uvm_sequence;
`uvm_object_utils(try_seq)

my_block block_obj;

integer count = 0;
                function new (string name = "TRY_SEQ");
				super.new(name);
		endfunction: new

virtual task body();

uvm_status_e status;
uvm_reg_data_t data;
uvm_reg_data_t des_data;
uvm_reg my_reg[$];

block_obj.get_registers(my_reg);    // Getting ERROR FOR BAD HANDLE/ REFERENCE

foreach(my_reg[i])
begin
	        des_data[7:0] = $random();
		count = count +1;
		$display($time,"%0d,Hello",count);
		my_reg[i].write(status, des_data, UVM_BACKDOOR,.parent(this));
end
# 25;
$display("Transaction Finished");

endtask: body
endclass: try_seq


`include "my_reg_block.sv"
`include "my_adapter.sv"
//`include "ram_top.sv"
`include "try_seq.sv"

class my_reg_seq extends uvm_sequence;
`uvm_object_utils(my_reg_seq)

try_seq t_seq;
my_block block_obj;   // Need to take block instance, as we are mapping sequence reg_block with environment reg_block

function new (string name = "SEQ");
super.new(name);
t_seq = try_seq::type_id::create(.name("t_seq"));
endfunction

virtual task body();

$display("TRY_SEQ Starting");
`uvm_do(t_seq)
#10;

endtask: body
endclass: my_reg_seq

Any other way to achieve this, or please guide me, if i am wrong at some point.

 

 

Thank you.


Viewing all articles
Browse latest Browse all 756

Trending Articles