# How do we use the built in uvm register sequences when using the get\_item() parent call in the adapter:reg2bus() task

**URL:** <https://verificationacademy.com/forums/t/how-do-we-use-the-built-in-uvm-register-sequences-when-using-the-get-item-parent-call-in-the-adapter-reg2bus-task/29206>\
**Category:** UVM\
**Tags:** UVM, UVM-Register-Built-in-sequence, adapterget\_item, uvm-cookbook-registers-guide, uvm\_reg\_adapter\
**Created:** [February 27, 2014, 8:06pm UTC](https://verificationacademy.com/forums/t/how-do-we-use-the-built-in-uvm-register-sequences-when-using-the-get-item-parent-call-in-the-adapter-reg2bus-task/29206 "2014-02-27T20:06:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![trpaige001](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/trpaige001/32/4013_2.png) [@trpaige001](https://verificationacademy.com/forums/u/trpaige001)\
**Post date:** [February 27, 2014, 8:06pm UTC](https://verificationacademy.com/forums/t/how-do-we-use-the-built-in-uvm-register-sequences-when-using-the-get-item-parent-call-in-the-adapter-reg2bus-task/29206/1 "2014-02-27T20:06:16Z")

</div>

Using the Register/adapter Context of the verification academy uvm-cookbook-registers-guide-verification-academy.pdf pg 14.  
This document talks about using the code:  
virtual function uvm\_sequence\_item reg2bus(const ref uvm\_reg\_bus\_op rw);  
uvm\_reg\_item item;  
item = get\_item;  
if (!$cast(baseRegSeq, item.parent))  
`uvm\_error(“reg2bus\_adapter::reg2bus”, “Parent casting failed”)  
// then you can use variables from the parent to control the reg2bus process.

* * *

To call a UVM Register Built-in sequence the following is run.

uvm\_reg\_hw\_reset\_seq rst\_seq;  
rst\_seq = uvm\_reg\_hw\_reset\_seq::type\_id::create(“rst\_seq”);  
rst\_seq.model = rm;  
rst\_seq.start(m\_sequencer);

The problem is we get the following error:  
reporter [reg2bus\_adapter::reg2bus] Parent casting failed.

So, the built in sequences do not provide a method to pass in the .parent(this) which is needed for the above casing to work.

Can you provide a method to bypass this error when using the uvm built-in sequences?
