Forum Discussion
Altera_Forum
Honored Contributor
13 years agoQuestion 1:
This is correct; you can connect pins that way. Anyway I don't know your design, so I can't say this will perform what you need. Question 2: In your code there are 2 errors: - GPIO_0[32:30] are declared twice, for different ports, as the error message states. - Moreover a GPIO port can't mix both output and inout pins. AFAIK PIO with Bidir configuration must be connected directly to fpga pins, since the physical tristate hardware is available only in i/o pads. Other internal tristate behavior is actually emulated through logic synthesis. If you need a few PIO pins to behave always as output and other as i/o you have these choices: - generate separate PIOs: one for outputs an one for bidirectional signals - declare inout all PIO pins, even if they have a fixed direction. - declare the PIO direction setting as "Both input and output ports" instead of "Bidirectional" and add the tristate logic external to the Nios sopc system, this is useful only when you need to globally change the direction of the whole PIO or a group of PIO pins; you need additional signals to control tristate gates, so this solution is not convenient if you need to change individual PIO pin directions.