Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
17 years ago

PIO core on SOPC builder?

Hi

Did anyone used parallel I/O (PIO) core with Avalon on SOPC builder?

Is it possible to write custom driver for this core inside NIOS?

I am checking possibility to use this core to replace my custom component on SOPC builder. I have different data ports (1-bit to 20-bit) in my custom component, configuring and communicating with off-chip devices. I find PIO as the alternative solution and its inbuild component in SOPC builder, which makes life easier!

Thanks!

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    What do you mean by custom driver? When you add a PIO core to the SOPC system, you can then just write to the registers to access the ports.

    Include the altera_avalon_pio_regs.h file and use the IOWR_ALTERA_AVALON_PIO_* and IORD_ALTERA_AVALON_PIO_* macros.

    EDIT: I think I understood what you meant after having sent the reply... If you want to have a specific device with read, write and ioctl calls, you should be able to do that by copying the folder C:\altera\8*\ip\sopc_builder_ip\altera_avalon_pio in your project ip folder and change the driver from there. You may have to change the class name in the ptf and tcl files to avoid a conflict with the actual PIO core.