hvgbl Posted August 14, 2014 Report Share Posted August 14, 2014 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. Quote Link to comment Share on other sites More sharing options...
tudor.timi Posted August 14, 2014 Report Share Posted August 14, 2014 Seems like you're not setting block_obj to point to your register block. You have to somehow assign it, for example using the resource DB. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.