OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [docs/] [datasheet/] [soc_gpio.adoc] - Diff between revs 60 and 61

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 60 Rev 61
Line 6... Line 6...
[frame="topbot",grid="none"]
[frame="topbot",grid="none"]
|=======================
|=======================
| Hardware source file(s): | neorv32_gpio.vhd |
| Hardware source file(s): | neorv32_gpio.vhd |
| Software driver file(s): | neorv32_gpio.c |
| Software driver file(s): | neorv32_gpio.c |
|                          | neorv32_gpio.h |
|                          | neorv32_gpio.h |
| Top entity port:         | `gpio_o` | 32-bit parallel output port
| Top entity port:         | `gpio_o` | 64-bit parallel output port
|                          | `gpio_i` | 32-bit parallel input port
|                          | `gpio_i` | 64-bit parallel input port
| Configuration generics:  | _IO_GPIO_EN_ | implement GPIO port when _true_
| Configuration generics:  | _IO_GPIO_EN_ | implement GPIO port when _true_
| CPU interrupts:          | FIRQ channel 8 | pin-change interrupt (see <<_processor_interrupts>>)
| CPU interrupts:          | none |
|=======================
|=======================
 
 
**Theory of Operation**
**Theory of Operation**
 
 
The general purpose parallel IO port unit provides a simple 32-bit parallel input port and a 32-bit parallel
The general purpose parallel IO port unit provides a simple 64-bit parallel input port and a 64-bit parallel
output port. These ports can be used chip-externally (for example to drive status LEDs, connect buttons, etc.)
output port. These ports can be used chip-externally (for example to drive status LEDs, connect buttons, etc.)
or system-internally to provide control signals for other IP modules. When the modules is disabled for
or system-internally to provide control signals for other IP modules. The component is disabled for
implementation the GPIO output port is tied to zero.
implementation when the _IO_GPIO_EN_ generic is set _false_. In this case GPIO output port is tied to all-zero.
 
 
**Pin-Change Interrupt**
.Access atomicity
 
[NOTE]
The parallel input port `gpio_i` features a single pin-change interrupt. Whenever an input pin has a low-to-high
The GPIO modules uses two memory-mapped registers (each 32-bit) each for accessing the input and
or high-to-low transition, the interrupt is triggered. By default, the pin-change interrupt is disabled and
output signals. Since the CPU can only process 32-bit "at once" updating the entire output cannot
can be enabled using a bit mask that has to be written to the _GPIO_INPUT_ register. Each set bit in this mask
be performed within a single clock cycle.
enables the pin-change interrupt for the corresponding input pin. If more than one input pin is enabled for
 
triggering the pin-change interrupt, any transition on one of the enabled input pins will trigger the CPU's pinchange
 
interrupt. If the modules is disabled for implementation, the pin-change interrupt is also permanently
 
disabled.
 
 
 
.GPIO unit register map
.GPIO unit register map
[cols="<2,<2,^1,^1,<6"]
[cols="<2,<2,^1,^1,<6"]
[options="header",grid="rows"]
[options="header",grid="rows"]
|=======================
|=======================
| Address      | Name [C]      | Bit(s) | R/W | Function
| Address      | Name [C]      | Bit(s) | R/W | Function
.2+<| `0xffffff80` .2+<| _GPIO_INPUT_  ^| 31:0   ^| r/- <| parallel input port
| `0xffffffc0` | _GPIO_INPUT_LO_  | 31:0   | r/- | parallel input port pins 31:0 (write accesses are ignored)
                                       ^| 31:0   ^| -/w <| parallel input pin-change IRQ enable mask
| `0xffffffc4` | _GPIO_INPUT_HI_  | 31:0   | r/- | parallel input port pins 63:32 (write accesses are ignored)
| `0xffffff84` | _GPIO_OUTPUT_ | 31:0   | r/w | parallel output port
| `0xffffffc8` | _GPIO_OUTPUT_LO_ | 31:0   | r/w | parallel output port pins 31:0
 
| `0xffffffcc` | _GPIO_OUTPUT_HI_ | 31:0   | r/w | parallel output port pins 63:32
|=======================
|=======================

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.