Jump to content

Nesting of frames in UVM?


Recommended Posts

Hello all,

 

I want to create nested frames/packets. My packet structure is shown below. I want to have nested frames(one or more frames within another frame) starting from 2nd byte of header and before the EOF/EOT. Please give me some guidance of how to include nested frames into another frames in UVM? What are the methods/macros in UVM which will be usefull in this regard. 

 

[/code] 

       rand bit [7:0] sync;      

       rand bit [7:0] sof;  

       rand bit [15:0] header; 

       rand bit [7:0] payload[];       

       rand bit [15:0] crc;

       rand bit [7:0] eof; //Or EOT(end of transmission)

[/code]

 

Any help/suggestion is appreciated.

Thanks,

Link to comment
Share on other sites

If you're talking about different encapsulations, then you can go about it in one of two possible ways:

  1. Define a single packet model that is flat, and includes knobs (random and non-random) to determine if a particular header is present or not.
  2. Define a class hierarchy/family of packet types.

I think #1 is simpler and less unwieldy to deal with.

 

Does that sort of address your question?

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...