enjoy-digital / litedram

Small footprint and configurable DRAM core
Other
365 stars 115 forks source link

Add core.bandwidth tests #175

Closed jedrzejboczar closed 4 years ago

jedrzejboczar commented 4 years ago

Requires https://github.com/enjoy-digital/litedram/pull/173 Part of https://github.com/enjoy-digital/litedram/issues/155

This PR adds tests of Bandwidth. It requires some changes from https://github.com/enjoy-digital/litedram/pull/173 but since that PR is ready to be merged, you can just review this new one after the merge, would it be ok?

Regarding this PR, I noticed that Bandwidth misses a command if it appears on period boundary (i.e. in the If(period, ...) condition in bandwidth.py). I added a check for that and increased command counters width by 1 (as during N-cycle period we can have from 0 to N inclusive commands).

enjoy-digital commented 4 years ago

@jedrzejboczar: thanks for the tests, great if you found a corner case and have been able to fix it with these.