Problem with layered sequences

The issue is wrt the example code for Layered Sequences, in the section Translator Sequences.

I get a null pointer dereference error at

uvm_sequencer #(B_item) up_sequencer;

I cannot figure it out. Any ideas?

Mark

In reply to msankey:

Maybe try assigning an object to your handle?

In reply to warnerrs:

Actually I get the null pointer deref error at
up.sequencer.get_next_item(b);

I think you are saying that I have created a handle, up_sequencer, but I haven’t constructed an object.

However, when I add …
up_sequencer = uvm_sequencer::type_id::create(“up_sequencer”, this); or
up_sequencer = new();

after the line
uvm_sequencer #(B_item) up_sequencer;

I get the error …
Expecting the keyword ‘endclass’

??

In reply to msankey:

First, you are not supplying nearly enough information to diagnose that error.

But more importantly, and it’s hard to tell from this limited information, it sounds like you might be trying to construct your up_sequencer inside your translator sequence. Which you can’t do. Look at the example again. The layered component ( which contains the translator sequence ) also builds a sequencer, and pushes that down into the translator sequence’s up_sequencer handle.

In reply to warnerrs:

I looked at the example again and again. I made some changes. I didn’t have an ABC layering component, but I do now.

I still get null pointer deref at the first execution of
up_sequencer.get_next_item(b);
in the translation sequence.

Is there a way where I can see this code base?

Alternatively, I can send you some of my files.

In reply to msankey:

Can you put your example on https://www.edaplayground.com?

In reply to warnerrs:

I have around 20 files. I would like to put up 3 or 4 in the area we are talking about, but I can’t figure out how to do that. I have an edaplayground account.