Jump to content
swapnilm

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,

Share this post


Link to post
Share on other sites

To swapnilm,

 

Maybe the Virtual Sequences mechanism will fit your requirement. Refer to Universal Verification Methodology (UVM) 1.1 User’s Guide Chapter 4.8.

 

Best regards

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Hi mea1201,

 

I actually want to insert one(or more) packets into another packet.This encapsualtion of pkts will start from the second byte of the header. I didnt really get what you said. Could you please elaborate a little more.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×