Quantcast
Channel: UVM SystemVerilog Discussions Forum RSS Feed
Viewing all articles
Browse latest Browse all 410

SystemVerilog connecting a channel

$
0
0

I'm trying to hook up a new channel (channel 2) to an existing one (channel1) like so:

channel channel1;
channel channel2;

extern function new(
channel_type channel2
);

function subenv1::new(
channel channel2
);

this.channel1 = new();

xactor1(
this.channel1
);

xactor2(
this.channel1
);

//channel1 is a connection between both xactors

//hook new channel2 up to channel1
channel2 = this.channel1

This seems to work fine at this level, ie if I do this check, it doesn't cause a fatal:
if (channel2 ==null) `cvm_fatal


However when I go up to the subenv above this 
if (channel2 ==null) `cvm_fatal

Then I get a fatal. What else do I need to ensure that the channel is not fatal at the next level up?


Viewing all articles
Browse latest Browse all 410

Trending Articles