enjoy-digital / litedram

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

Add litedram.core.multiplexer tests #173

Closed jedrzejboczar closed 4 years ago

jedrzejboczar commented 4 years ago

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

This is still WIP, but I wanted to consult something.

I've started by adding _CommandChooser tests, but some of them fail and I wonder if I understand correctly what _CommandChooser is supposed to do. The current logic https://github.com/enjoy-digital/litedram/blob/b06e946d09807f3ab9b2e72f9c599851ab8221b4/litedram/core/multiplexer.py#L43-L47 seems to be wrong in some cases, e.g.

The following tests fail:

I'll continue now with the tests for _Steerer and Multiplexer.

enjoy-digital commented 4 years ago

Thanks, i won't probably be able to review it today, but will try to do it early next week. You can indeed continue on things that are not blocking your for now.

jedrzejboczar commented 4 years ago

I've finished adding tests for _Steerer and Multiplexer.

This is a lot of code, but I tried to add a short description to each test, so that it is easier for you to check what functionality is being tested and tell me if I missed something important.

I also moved _CommandChooser and _Steerer tests to separate files, as the file has grown to 1068 lines.

The 4 tests mentioned in the PR description still fail, so the CI is red, but all other tests are ok. If you want I can skip these tests and create an issue for that.

enjoy-digital commented 4 years ago

Thanks, sorry i haven't been able to review the previous code yet. You can indeed skip the failing tests and create an issue for that. I could look and help you getting this working or fix myself while reviewing.

I'm a bit lagging on the reviews, so if you think the Multiplexer if well covered you can move to another module and i'll add eventual comments on the Multiplexer tests later here or will merge and do the changes while doing the review.

jedrzejboczar commented 4 years ago

Ok, I'll create an issue in a moment and will continue with other modules.

enjoy-digital commented 4 years ago

@jedrzejboczar: thanks for the very good work, i did a first review and we can merge it.