I have an error message from Eclipse when i build my project:"Undefined reference to 'IORD'" "Undefined reference to 'IOWR'" I used many times this functions to build the comunication between my component and software but this time something goes wrong I used the standard include entry of the Blank Project: # include <stdio.h># include "system.h"# include "my_component_regs.h" so where is the problem?
IORD and IOWR are declared in "io.h"Usually you don't have to specifically include it, because it's included by other Altera headers. For example, "altera_avalon_performance_counter.h" will include this for you. If you're using IOWR and IORD directly, then you should include the io.h header in your main function. Let the# ifdef pragmas take care of removing subsequent includes.
Hi,Anyone knows about the IOWR function declaration/definition? I need to know how the IDE drivers the data to pins of my component in SoPC. For example, if I have a LED_PIO with widht 8 bits, I just write IOWR (LED_PIO_BASE, 0, DATA) and I think the DATA will be sent to pins. But, if I have a component as DM9000A Ethernet controller, with 38 pins, where some are data and some are control, how I can set the correct pins to write a word?
I'm not familiar with that IP core, so you'll have to carefully read the documentation for specifics. The pins are mapped in your top level HDL or schematic file to your Ethernet hardware. I think what you are trying to ask, though, is "how do I write to the Ethernet controller?" IORD and IOWR are probably not what you want. These are very basic low level Nios instructions. You should instead use whatever driver comes with the controller. The documentation will tell you what header file to include and how to setup and control the ethernet controller.
I read all documentation that came with it and the controller has a set of steps to initialize, including access through index and data port registers. There is no problem with this, because I can access by using IORD and IOWR. The point is that I need to a hardware-reset, so I should write '0' to the reset pin and no data pins and I don't know how write in this pin especially. Indeed, I don't know how access a specific pin.
Please don't multipost your question, once is enough.If the IP core can let the user directly control the reset pin (it usually doesn't) then it should be written in the documentation. (the IP core's documentation, not the chip datasheet). If not another option could be to control that pin directly through a PIO component instead of connecting it to the core.