-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
soc/interconnect/wishbone: Add incrementing address burst mode to SRAM #1267
soc/interconnect/wishbone: Add incrementing address burst mode to SRAM #1267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @koluckirafal. I just did a quick first review:
- Burst support should probably be enabled at the bus level (through
bus_bursting
parameter that would then be propagated to memories). - To be able to maintain this feature we'll need a unit-tests that cover the different burst mode/corner cases and would be run in LiteX-CI. Would it be possible to add it?
e8ce171
to
3c5fad5
Compare
Done, burst cycles support can be now enabled with
I couldn't find any tests in LiteX for Wishbone modules other than |
Thanks for the update. The unit-tests are indeed minimal on Wishbone and that's clearly something we should improve in the future. I'm of course not asking you to write unit-tests for the other Wishbone modules but would like to have a unit-test for the SRAM that exercise the burst support (to be able to rework/maintain this code more easily in the future) Thanks! |
e578c42
to
d7b1aff
Compare
I added a basic unit test for SRAM write and read operations, should be enough for testing incrementing address burst cycle support - currently only linear and 4-beat wrap increments are tested. |
Thanks for the update. I added a few review comments in the code. We should really try to simplify it when possible (otherwise it's difficult to do maintenance/support). Can you also add a test for Constant bursts? After addressing this it will be fine and I'll do the other improvement I can see myself. Thanks! |
Test for constant address burst cycle added - it works despite the lack of constant address burst support in wishbone.SRAM, because unsupported cycle types are treated as classic cycle. |
Thanks for the additional test, sorry the comments were still pending. This should be good now. |
This commit adds support for incrementing burst cycles in SRAM peripheral. By default it's enabled, but can be disabled by passing `burst=False` to the class while initializing, if it won't be useful for created design (e.g. no Wishbone bus masters with burst support).
…Handler/SoC classes
This commit also replaces hardcoded CTI signal values with constants.
Tests incrementing address burst cycle with linear and wrapped increments. Only 4-beat wrap burst is tested in `test_sram_burst_wrap` test.
e153821
to
77ff57e
Compare
77ff57e
to
8c1bc13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @koluckirafal for the updates/changes. This now looks good and can be merged. I'll maybe do another review or some changes on the burst logic, now that this is integrated correctly and with tests, it will be be easy to do this.
Sorry, while reading the code it's not clear to me which exact type of bursts should be supported can you list them?. It seems that |
Differentation between linear and wrapped incrementing address bursts is done by
|
This commit adds support for incrementing address burst cycles in NXLRAM Wishbone interface. Ported from enjoy-digital/litex#1267
This commit adds support for incrementing address burst cycles in NXLRAM Wishbone interface. Ported from enjoy-digital/litex#1267 Signed-off-by: Rafal Kolucki <[email protected]>
This commit adds support for incrementing address burst cycles in NXLRAM Wishbone interface. Ported from enjoy-digital/litex#1267 Signed-off-by: Rafal Kolucki <[email protected]>
This commit adds support for incrementing address burst cycles in NXLRAM Wishbone interface. Ported from enjoy-digital/litex#1267 Signed-off-by: Rafal Kolucki <[email protected]>
This commit adds support for incrementing address burst cycles in NXLRAM Wishbone interface. Ported from enjoy-digital/litex#1267 Signed-off-by: Rafal Kolucki <[email protected]>
This pull request adds support for incrementing address burst cycles to SRAM module. Both linear and wrapped increments are supported.
Because for some designs burst might be unnecessary (e.g. no cache in CPU core), it is disabled by default. It can be turned on by passing parameter
burst=True
inSoCCore.add_ram()
function, with shortcut available for integrated *RAM/ROM modules in the form ofintegrated_{rom,sram,main_ram}_burst
parameters inSoCCore
class.Implementation was tested by writing a test suite and an example SoC for measuring speed difference: https://github.com/antmicro/wishbone-interconnect-burst-mode-benchmark (README contains results and instructions how to run tests).
Wishbone burst cycle documentation: https://wishbone-interconnect.readthedocs.io/en/latest/04_registered.html