Jump to content

SystemVerilog connecting a channel


Recommended Posts

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?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...