Skip to content

build: io: add multibit/bus variants of SDR and DDR#2105

Merged
enjoy-digital merged 4 commits into
enjoy-digital:masterfrom
VOGL-electronic:add_io_bus
Jan 14, 2025
Merged

build: io: add multibit/bus variants of SDR and DDR#2105
enjoy-digital merged 4 commits into
enjoy-digital:masterfrom
VOGL-electronic:add_io_bus

Conversation

@maass-hamburg

Copy link
Copy Markdown
Contributor

add bus variants of SDR and DDR, which
support more than one pin.

@enjoy-digital

Copy link
Copy Markdown
Owner

Thanks @maass-hamburg for the different PRs! Would you mind explaining the use-cases in the PR to be able to review the PR having the use-cases in mind?

@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital
for example in the sdr phy in litespi this:

            for i in range(len(pads.dq)):
                self.specials += SDRTristate(
                    io = pads.dq[i],
                    o  = dq_o[i],
                    oe = dq_oe[i],
                    i  = dq_i[i],
                )

could be replaced with:

            self.specials += SDRTristateBus(
                    io = pads.dq,
                    o  = dq_o,
                    oe = dq_oe,
                    i  = dq_i,
                )

@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital IMO the prefered way to go instead of this would be to have the regular SDR/DDR variants support longer lengths than 1, just like the migen Tristate, but that would need changes to all vendor-specific implementations. But I also don't know, if that's the way litex should go.

@enjoy-digital

Copy link
Copy Markdown
Owner

@maass-hamburg: That's indeed what I also tought when having a first look at the PR. If it's too much work to do it for all vendor initially, we could also just have assert in implementations to only build for the supported cases.

@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital I implemented this now also for all of the other vendors, but in a generic way, which should function, but might not be the most efficient way for that platform.

expand variants of SDR and DDR to
support more than one pin.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
implement bus variants of SDR/DDR IO for
efinix.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital rebased it, due to conflicts

@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital please take a look, would be nice to get this merged soon.

@enjoy-digital

Copy link
Copy Markdown
Owner

@maass-hamburg: Thanks, I try to do this soon.

@enjoy-digital

Copy link
Copy Markdown
Owner

Thanks @maass-hamburg, this looks fine. I think we should be able to simplify things and just use for the following constructs: i[j] instead of i[j] if len(i) > 1 else i and same for all Input/Output/InOut?

extend SDR/DDR variants to support
Signals longer than 1.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
check len after wrap, because len won't work on int and bool.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital I changed it.

@enjoy-digital

Copy link
Copy Markdown
Owner

@maass-hamburg: Great, thanks. This looks fine. I'll just try to build some design with it and if OK, will merge.

@enjoy-digital enjoy-digital merged commit 4933bcb into enjoy-digital:master Jan 14, 2025
@enjoy-digital

Copy link
Copy Markdown
Owner

@maass-hamburg, this is merged. I had to do a few changes on top to avoid verilog slicing issues: 0bfaf39, e71e404 and 279b758.

@maass-hamburg

Copy link
Copy Markdown
Contributor Author

@enjoy-digital Thanks, I also started a PR regarding slicing in migen, that might help and reduce useless slices: m-labs/migen#299

maass-hamburg added a commit to VOGL-electronic/gw__liteeth that referenced this pull request Jan 15, 2025
now that enjoy-digital/litex#2105 is merged,
we can simplify the SDR IO in the rmii phy.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
maass-hamburg added a commit to maass-hamburg/litesdcard that referenced this pull request Jan 15, 2025
now that enjoy-digital/litex#2105 is merged,
we can simplify the SDR IO in the phy.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
maass-hamburg added a commit to VOGL-electronic/gw__liteeth that referenced this pull request Jan 16, 2025
use multibit io, that was introduced in enjoy-digital/litex#2105

improve and simplify rx and tx

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
@maass-hamburg maass-hamburg deleted the add_io_bus branch May 21, 2025 12:38
maass-hamburg added a commit to VOGL-electronic/gw__liteeth that referenced this pull request Aug 21, 2025
use multibit io, that was introduced in enjoy-digital/litex#2105

improve and simplify rx and tx

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
maass-hamburg added a commit to VOGL-electronic/gw__liteeth that referenced this pull request Sep 2, 2025
use multibit io, that was introduced in enjoy-digital/litex#2105

improve and simplify rx and tx

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants