mciepluc / cocotb-coverage

Functional Coverage and Constrained Randomization Extensions for Cocotb
BSD 2-Clause "Simplified" License
100 stars 15 forks source link

Ignore bins: dictionary changed size during iteration #1

Closed pwiecha closed 5 years ago

pwiecha commented 5 years ago

Adding ignore bins to CoverCross instance gives a runtime error mentioned in the topic. The culprit is coverage.py, line 342, for x_bins in self._hits.keys():. According to SO https://stackoverflow.com/a/11941855/2922946 in Python 3 keys returns an iterator instead of a list. Encapsulating with list solved this problem for me list(self._hits.keys()).

mciepluc commented 5 years ago

fixed