Forum Discussion
Altera_Forum
Honored Contributor
19 years agoPIO communication between software and hardware
I have a system I'm attempting to build that needs to transfer data between the C software and the verilog HDL. I was attempting this using bidirectional PIOs. Now if I understand these correctly...
Altera_Forum
Honored Contributor
19 years agoCommunicating from software to hardware using PIOs should work.
But, I believe that there is a better way to communicate between hardware and software, but it could take some time to learn how to do it. This is to create an avalon bus connection in your verilog. Then create an SOPC Builder Core out of your verilog, using the Component Editor in SOPC Builder. If this is the path you wish to take I can provide you with more information. Back to the PIO: I have used the PIO to communicate over the GPIO on a DE2 board, and it worked. Here is my code.#include <system.h>
void main (void)
{
int * gpio = (int *) PIO_0_BASE;
(*gpio) = 0x26;
return;
} If you post your code I could look at it. Otherwise, I don't really have any suggestions. - Blair