• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. list generation

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 65
  • Views 13091
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

list generation

guyl
guyl over 13 years ago

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

 

 

  • Cancel
Parents
  • hannes
    hannes over 12 years ago
    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
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • hannes
    hannes over 12 years ago
    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
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information