Remix.run Logo
Retr0id 3 hours ago

PIO is unsuitable for FPGA impls, that's what the article says.

> If you’re thinking about using it in an FPGA, you’d be better off skipping the PIO and just implementing whatever peripherals you want directly using RTL.

drob518 an hour ago | parent | next [-]

Yea, I think the point is that if you’re implementing in FPGA in any case, a dedicated state machine is going to be a lot smaller than PIO or BIO. But if you’re making a standard part with hardcoded functionality then BIO is going to be smaller than PIO.

dmitrygr 3 hours ago | parent | prev [-]

Yes, my point is that the article throws a lot of shade at PIO while the real issue is that the author is trying to shove a third-party FPGA reimpl of it into a place it never belonged. PIO itself is a perfectly good design for what it does and where it does it.

bunnie 3 hours ago | parent | next [-]

Actually, the PIO does what it does very well! There is no "worse" or "better" - just different.

Because it does what it does so well, I use the PIO as the design study comparison point. This requires taking a critical view of its architecture. Such a review doesn't mean its design is bad - but we try to take it apart and see what we can learn from it. In the end, there are many things the PIO can do that the BIO can't do, and vice-versa. For example, the BIO can't do the PIO's trick of bit-banging DVI video signals; but, the PIO isn't going to be able to protocol processing either.

In terms of area, the larger area numbers hold for both an ASIC flow as well as the FPGA flow. I ran the design through both sets of tools with the same settings, and the results are comparable. However, it's easier to share the FPGA results because the FPGA tools are NDA-free and everyone can replicate it.

That being said, I also acknowledge in the article that it's likely there are clever optimizations in the design of the actual PIO that I did not implement. Still, barrel shifters are a fairly expensive piece of hardware whether in FPGA or in ASIC, and the PIO requires several of them, whereas the BIO only has one. The upshot is that the PIO can do multiple bit-shifts in a single clock cycle, whereas the BIO requires several cycles to do the same amount of bit-shifting. Again, neither good or bad - just different trade-offs.

raphlinus 2 hours ago | parent [-]

Thanks btw for saying clearly that BIO is not suitable for DVI output. I was curious about this and was planning to ask on social media.

I've done some fun stuff in PIO, in particular the NRZI bit stuffing for USB (12Mbps max). That's stretching it to its limit. Clearly there will be things for which BIO is much better.

I suspect that a variant of BIO could probably do DVI by optimizing for that specific use case (in particular, configuring shifters on the output FIFO), but I'm not sure it's worth the lift.

Retr0id 3 hours ago | parent | prev [-]

It didn't read that way, to me.