fvutils / pyvsc

Python packages providing a library for Verification Stimulus and Coverage
https://fvutils.github.io/pyvsc
Apache License 2.0
113 stars 26 forks source link

Remove high-priority, soft weight constraint from distributions #194

Closed alwilson closed 1 year ago

alwilson commented 1 year ago

This removes the soft constraint created after building the hard constraints for a distribution. It also reverses the unittest meant for testing that distribution non-zero weights can override soft constraints.

This saves off the weight list and a function to calculate them into ConstraintDistScopeModel, in the hopes that at some point recalling the randomization model and swizzler would re-randomize the distribution weight targeted.

This also adds enough type hints to make it easier to track down target_range and distribution weight list usage.

alwilson commented 1 year ago

@mballance I was curious what all was done in the swizzler with dists so I made some changes. Thought I'd throw my changes up to see what you think. Full context here: https://github.com/fvutils/pyvsc/issues/191

mballance commented 1 year ago

Hi @alwilson, sorry for the delay in looking at this in-depth. Good catch on the difference between SV expected behavior and what was implemented in PyVSC. Changes look good to me, and appreciate the addition of a test!