Author Topic: What... exactly is the PIO?  (Read 5991 times)

0 Members and 1 Guest are viewing this topic.

Offline OverlordCheeseTopic starter

  • Contributor
  • Posts: 10
  • Country: us
What... exactly is the PIO?
« on: September 06, 2022, 12:49:38 pm »
Hello! I think this is a very basic question that I am struggling with: what... exactly is the PIO on the rpi pico? I've heard its like an FPGA, but also... not even close to one? I don't really get it, and everything I read makes me more confused. can someone just give me the sparknotes?
PS: I mean this from a technical and funcional perspective, so like, in what ways can the PIO replace an FPGA?
 
The following users thanked this post: pcprogrammer

Offline pcprogrammer

  • Super Contributor
  • ***
  • Posts: 5960
  • Country: nl
Re: What... exactly is the PIO?
« Reply #1 on: September 06, 2022, 01:05:58 pm »
I have no experience with it yet, but you might get better answers when you ask this question in the microcontroller section.

You can easily move this thread to it with the button on the bottom of the screen. Also add in the title that it is about the Raspberry PI PICO.

Edit: See the attached picture for the move button.
« Last Edit: September 06, 2022, 01:09:27 pm by pcprogrammer »
 

Online Fred27

  • Supporter
  • ****
  • Posts: 735
  • Country: gb
    • Fred's blog
Re: What... exactly is the PIO?
« Reply #2 on: September 06, 2022, 01:40:27 pm »
They call it a state machine, but I feel the PIOs seem more like a small separate microcontrollers with a limited (and slightly odd) instruction set. It's ideal for doing something that you might previously have bit-banged. You can now do some similar bit-banging on the PIO but without interfering with the code running on the main ARM cores.
 

Offline SpacedCowboy

  • Frequent Contributor
  • **
  • Posts: 407
  • Country: gb
  • Aging physicist
Re: What... exactly is the PIO?
« Reply #3 on: September 06, 2022, 01:52:43 pm »
If you want to *do* it in an FPGA, there’s a GitHub project that does just that.

But in general it’s just a way of offloading the CPU from handling tight timing-dependent code typical with custom i/o. They’re pretty useful for a micro where everything happens serially, less so when you can write HDL where lots of things can happen in parallel.
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3958
  • Country: de
Re: What... exactly is the PIO?
« Reply #4 on: September 06, 2022, 03:18:07 pm »
Here is a short explanation of what it is and how it works:

https://blues.io/blog/raspberry-pi-pico-pio/

The datasheet for RP2040 contains pretty extensive documentation of it too.

Comparison to FPGAs is not quite useful because it is not arbitrarily reconfigurable logic. Fred27's description of it as small co-processors with a very tiny and specialized instruction set is about right. RP2040 is not even the first micro to have this - AFAIK, BeagleBone's PRUs are a very similar idea.
« Last Edit: September 06, 2022, 03:21:18 pm by janoc »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 12454
  • Country: us
    • Personal site
Re: What... exactly is the PIO?
« Reply #5 on: September 06, 2022, 03:52:10 pm »
It is just a programmable state machine. It is nothing like FPGA, the only way it is close to one is that in FPGA you can also make programmable state machines. But thinking of FPGAs when working with PIOs is counterproductive.
Alex
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 5638
  • Country: dk
Re: What... exactly is the PIO?
« Reply #6 on: September 06, 2022, 05:51:34 pm »
Here is a short explanation of what it is and how it works:

https://blues.io/blog/raspberry-pi-pico-pio/

The datasheet for RP2040 contains pretty extensive documentation of it too.

Comparison to FPGAs is not quite useful because it is not arbitrarily reconfigurable logic. Fred27's description of it as small co-processors with a very tiny and specialized instruction set is about right. RP2040 is not even the first micro to have this - AFAIK, BeagleBone's PRUs are a very similar idea.

the PRUs are much more advanced, they are full blown 32bit cpus with a c compiler, probably comparable in performance to the RP2040

 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17535
  • Country: fr
Re: What... exactly is the PIO?
« Reply #7 on: September 06, 2022, 06:40:54 pm »
It's close to the FlexIO thing on some NXP MCUs. I suggest reading the RP2040 datasheet as it's relatively clearly explained.
 

Offline JustMeHere

  • Frequent Contributor
  • **
  • Posts: 900
  • Country: us
Re: What... exactly is the PIO?
« Reply #8 on: September 08, 2022, 12:16:12 am »
Looks like it let's you "reassign" IO pins.  Need 6 SPI, then "reassign" 6 sets of pins. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf