Jump to content

Randomization in Configuration Classes


Recommended Posts

No, configuration could be used to set up a sequence, for instance, and then by randomizing the configuration you could get different sequences.

 

A simple example would be a sequence to read and write from a start address to an end address. You could put the start address and the end address in a configuration object as rand variables with constraints; and then randomize the configuration to get different ranges of addresses.

 

Of course in that example, it would probably be easier to make the rand variables members of the sequence, but for more complex configurations it could well make sense to have a configuration object.

 

regards

Alan

Edited by apfitch
Link to comment
Share on other sites

  • 7 years later...
On 1/28/2014 at 3:53 AM, apfitch said:

No, configuration could be used to set up a sequence, for instance, and then by randomizing the configuration you could get different sequences.

 

A simple example would be a sequence to read and write from a start address to an end address. You could put the start address and the end address in a configuration object as rand variables with constraints; and then randomize the configuration to get different ranges of addresses.

 

Of course in that example, it would probably be easier to make the rand variables members of the sequence, but for more complex configurations it could well make sense to have a configuration object.

 

regards

Alan

Hiii.... 

im declaring the variable like rand bit [1:0] char_len in config class

creating object and cfg.randomize() and handle assigning  in test build phase and after that i am getting the cfg handle in lower level components 

but i am not getting random data why what is the problem can u please explain me where i did the mistake 

regards

meenakshi

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