Hany Salah Posted January 27, 2014 Report Share Posted January 27, 2014 Why the one need to set rand variables in configuration classes ,,, my knowledge is that Virtual Sequencer is the only component whose responsibility to generate random variables, isn't it ? Quote Link to comment Share on other sites More sharing options...
apfitch Posted January 27, 2014 Report Share Posted January 27, 2014 I assume when you say "set rand variables" you mean "declare rand variables"? You put rand variables in a configuration class so you can randomize the configuration, regards Alan Hany Salah 1 Quote Link to comment Share on other sites More sharing options...
Hany Salah Posted January 27, 2014 Author Report Share Posted January 27, 2014 yes ,, you are right ,, that's what I mean ,, but why I need to have a random configuration ,,, it has to be fixed configuration, doesn't it ? Quote Link to comment Share on other sites More sharing options...
apfitch Posted January 27, 2014 Report Share Posted January 27, 2014 (edited) 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 January 27, 2014 by apfitch Hany Salah 1 Quote Link to comment Share on other sites More sharing options...
meena Posted March 7, 2021 Report Share Posted March 7, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.