URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [docs/] [datasheet/] [soc_gpio.adoc] - Blame information for rev 60
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
60 |
zero_gravi |
<<<
|
2 |
|
|
:sectnums:
|
3 |
|
|
==== General Purpose Input and Output Port (GPIO)
|
4 |
|
|
|
5 |
|
|
[cols="<3,<3,<4"]
|
6 |
|
|
[frame="topbot",grid="none"]
|
7 |
|
|
|=======================
|
8 |
|
|
| Hardware source file(s): | neorv32_gpio.vhd |
|
9 |
|
|
| Software driver file(s): | neorv32_gpio.c |
|
10 |
|
|
| | neorv32_gpio.h |
|
11 |
|
|
| Top entity port: | `gpio_o` | 32-bit parallel output port
|
12 |
|
|
| | `gpio_i` | 32-bit parallel input port
|
13 |
|
|
| Configuration generics: | _IO_GPIO_EN_ | implement GPIO port when _true_
|
14 |
|
|
| CPU interrupts: | FIRQ channel 8 | pin-change interrupt (see <<_processor_interrupts>>)
|
15 |
|
|
|=======================
|
16 |
|
|
|
17 |
|
|
**Theory of Operation**
|
18 |
|
|
|
19 |
|
|
The general purpose parallel IO port unit provides a simple 32-bit parallel input port and a 32-bit parallel
|
20 |
|
|
output port. These ports can be used chip-externally (for example to drive status LEDs, connect buttons, etc.)
|
21 |
|
|
or system-internally to provide control signals for other IP modules. When the modules is disabled for
|
22 |
|
|
implementation the GPIO output port is tied to zero.
|
23 |
|
|
|
24 |
|
|
**Pin-Change Interrupt**
|
25 |
|
|
|
26 |
|
|
The parallel input port `gpio_i` features a single pin-change interrupt. Whenever an input pin has a low-to-high
|
27 |
|
|
or high-to-low transition, the interrupt is triggered. By default, the pin-change interrupt is disabled and
|
28 |
|
|
can be enabled using a bit mask that has to be written to the _GPIO_INPUT_ register. Each set bit in this mask
|
29 |
|
|
enables the pin-change interrupt for the corresponding input pin. If more than one input pin is enabled for
|
30 |
|
|
triggering the pin-change interrupt, any transition on one of the enabled input pins will trigger the CPU's pinchange
|
31 |
|
|
interrupt. If the modules is disabled for implementation, the pin-change interrupt is also permanently
|
32 |
|
|
disabled.
|
33 |
|
|
|
34 |
|
|
.GPIO unit register map
|
35 |
|
|
[cols="<2,<2,^1,^1,<6"]
|
36 |
|
|
[options="header",grid="rows"]
|
37 |
|
|
|=======================
|
38 |
|
|
| Address | Name [C] | Bit(s) | R/W | Function
|
39 |
|
|
.2+<| `0xffffff80` .2+<| _GPIO_INPUT_ ^| 31:0 ^| r/- <| parallel input port
|
40 |
|
|
^| 31:0 ^| -/w <| parallel input pin-change IRQ enable mask
|
41 |
|
|
| `0xffffff84` | _GPIO_OUTPUT_ | 31:0 | r/w | parallel output port
|
42 |
|
|
|=======================
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.