Menu

#33 score asserts for parameter sized arguments

open
None
5
2012-09-15
2010-02-15
Cary R.
No

If the argument to a module is sized based on a parameter passed to the module then covered appears to be incorrectly using the default argument not the passed value. If you only have a single module this can be worked around by changing the default value. If you are using multiple instantiations with different sizes then you're out of luck. The attached code shows this defect in the latest code from CVS. I only have single instances and I do set the default correctly so I only encountered this while doing some experimentation.

Discussion

  • Cary R.

    Cary R. - 2010-02-15

    Patch file

     
  • Trevor Williams

    Trevor Williams - 2010-02-16

    Cary,

    The score command has a -P option that will allow you to manually "override" the default parameter values, so you should not be completely out of luck. Covered does properly handle parameter overrides, but only if the instantiating module (parent module) is included for coverage. Using the -t and -i options tells Covered that it can ignore looking for any modules above the one specified with these options. Since parent modules are ignored, their parameter overrides are also ignored. That is the current usage model of Covered. To cause Covered to work the way that you would like, I would need to change the usage model to basically have Covered parse all modules of the design, using only the parameter information in the unneeded modules (and any static functions that are required for calculating these values) -- a pretty significant change to the way Covered behaves today and certainly not something that will be in a minor revision release to the stable branch.

    As a user, you can work around this by either using the -P option for each parameter that differs from its default in the top-most module being instantiated OR by simply including the testbench (or parent modules) as part of what Covered scores.

     
  • Cary R.

    Cary R. - 2010-02-25

    OK I understand how it's supposed to work now. It would be nice to have it figure out the parameters that were used to instantiate it. It sounds like -P is an adequate alternative for now. You can close this is you don't want to add something like this. Since other things are much higher priority.

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB