Home > Community > Forums > Functional Verification > list generation

## Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

 Send yourself a copy

## Subscribe

• RSS
Cadence RSS Feeds

Intro copy of the newsletter section here, some intro copy of the newsletter. Instruction of how to subscribe to this newsletter.

## Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Send Yourself A Copy

# list generation

Last post Mon, Oct 8 2012 3:13 AM by hannes. 1 replies.
 Started by guyl 20 Mar 2012 03:19 AM. Topic has 1 replies and 2237 views
• #### Tue, Mar 20 2012 3:19 AM

• guyl
• Joined on Sun, Sep 18 2011
• Raanana, Israel
• Posts 1
• Points 20
list generation
 Hi,I use the following code:        var list : list of uint (bits:14);         gen list keeping {             it.size() == list_size_parameter;             it.all_different(it);         }; to gen a list of indices, the size of a given parameter.list size can be up to 20K, and I get a WARN_GEN_BIG_LACE as a consequence. what may be the preferrabe way to do this in regards to memory and cpu resources?Thanks
• Post Points: 20
• #### Mon, Oct 8 2012 3:13 AM

• hannes
• Joined on Fri, Nov 14 2008
• Bracknell, Berkshire
• Posts 42
• Points 765
Re: list generation
 Hello Guy,you can ignore this warning if you do get a result that is ok for you. We continue to improve the algorithms in the generator and this should work. We are making things like this more efficient in new releases.Alternatively, you could do something like this:var all_vals := all_values(uint(bits:14));var ordered_list:list of uint(bits:14);var prev_ind:int = -1;for i from 1 to list_size_parameter {                gen tmp_ind keeping {it > prev_ind;it < 1<<14}; // need to add some constraints for better distribution                prev_ind = tmp_ind;                ordered_list.add(all_vals[tmp_ind]);};gen list keeping {it.is_a_permutation(ordered_list)};But with this you need to make sure the distribution of tmp_ind is good enough to give you the amount of values you need.Regards,-hannes
• Post Points: 5
###### Sort Posts: Oldest to newest Newest to oldest
 Started by guyl at 20 Mar 2012 03:19 AM. Topic has 1 replies.
 About Cadence| Investor Relations| Careers| Terms of Use| Privacy Policy| US Trademarks © Cadence Design Systems, Inc. All Rights Reserved.