mciepluc / cocotb-coverage

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

Typos in documentation #42

Closed pwiecha closed 4 years ago

pwiecha commented 4 years ago

Documentation reference.html https://cocotb-coverage.readthedocs.io/en/latest/reference.html CoverPoint example:

>>> @coverage.CoverPoint( # cover (arg/2) < 1...5 (5 bins)
...
bins = list(range(1, 5))

should be 4 bins

CoverCross example: 4 bins total, 4x4 - 2 = 14 bins total

https://cocotb-coverage.readthedocs.io/en/latest/examples.html Testbench section

bins = list(range(3,32)) #may be 3 ... 32 bytes Should be 31 bytes, range() is not inclusive

And below that in the TB code:

    low_limit = random.randint(3,31)
    up_limit = random.randint(low_limit,32)

Here I would suggest using randrange(3, 32) and randrange(low_limit, 33) because it is consistent with range() and how indexing works in python and the rest of documentation.

pwiecha commented 4 years ago

I can do that if you approve of these changes.

mciepluc commented 4 years ago

fixed