Forum Discussion
6 Replies
- Altera_Forum
Honored Contributor
If you're using the altera_avalon_pio_regs.h header you can use the ALTERA_AVALON_PIO_DATA(base) to read and ALTERA_AVALON_PIO_DATA(base, value) to write.
Alternatively, you could use the <io.h> header and use the IORD(base, offset) and IOWR(base, offset, value) directly if you wanted. Altera has a pdf on their PIO core somewhere on their website as well if you need more info. Hope that helps. - Altera_Forum
Honored Contributor
Refer to the PIO datasheet.
This in included in sopc builder embedded peripherals guide http://www.altera.com/literature/ug/ug_embedded_ip.pdf The functions/macros available in altera_avalon_pio_regs.h are quite straightforward. They are mainly used to directly read/write the PIO registers, so you can understand everything if you read the above datasheet. - Altera_Forum
Honored Contributor
tnxxx for ur helppppp :)
- Altera_Forum
Honored Contributor
I have another question, has Altera provided any documentations about the software use of its IP cores ? for example how to use the functions included in the altera_avalon_uart.h ? Ive studied the ug_embedded_ip.pdf, but i couldnt find much software help in this documentation. tnx in advance
- Altera_Forum
Honored Contributor
I don't know if "official" information from Altera exists about all of functions included in HAL drivers. Usually you can find the basic function to access IP cores if you browse .h files.
You can also find a lot of information if you search the forum: I usually find all I need in older posts. If the search is ineffective you can possibly start a new thread and often you get the right answer in short time. The core user guides are useful if you need to access the module at the hw level, I mean directly reading and writing hw register, thus bypassing HAL driver. Sometimes, knowledge of the underlying hardware is also useful to pull out maximum performance from the core. - Altera_Forum
Honored Contributor
tnx!anyway im new to this forum,but so far Ive found it extremely useful!!!!!