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

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [docs/] [datasheet/] [soc_gpio.adoc] - Blame information for rev 70

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 61 zero_gravi
| Top entity port:         | `gpio_o` | 64-bit parallel output port
12
|                          | `gpio_i` | 64-bit parallel input port
13 60 zero_gravi
| Configuration generics:  | _IO_GPIO_EN_ | implement GPIO port when _true_
14 61 zero_gravi
| CPU interrupts:          | none |
15 60 zero_gravi
|=======================
16
 
17 61 zero_gravi
The general purpose parallel IO port unit provides a simple 64-bit parallel input port and a 64-bit parallel
18 60 zero_gravi
output port. These ports can be used chip-externally (for example to drive status LEDs, connect buttons, etc.)
19 70 zero_gravi
or chip-internally to provide control signals for other IP modules. The component is disabled for
20
implementation when the _IO_GPIO_EN_ generic is set _false_. In this case the GPIO output port `gpio_o` is tied to all-zero.
21 60 zero_gravi
 
22 70 zero_gravi
.Access Atomicity
23 61 zero_gravi
[NOTE]
24
The GPIO modules uses two memory-mapped registers (each 32-bit) each for accessing the input and
25
output signals. Since the CPU can only process 32-bit "at once" updating the entire output cannot
26
be performed within a single clock cycle.
27 60 zero_gravi
 
28 70 zero_gravi
.INPUT is read-only
29
[NOTE]
30
Write accesses to the `NEORV32_GPIO.INPUT_LO` and `NEORV32_GPIO.INPUT_HI` registers will raise a store bus
31
error exception. The BUSKEEPER will indicate a "DEVICE_ERR" in this case.
32
 
33
 
34 64 zero_gravi
.GPIO unit register map (`struct NEORV32_GPIO`)
35 60 zero_gravi
[cols="<2,<2,^1,^1,<6"]
36
[options="header",grid="rows"]
37
|=======================
38 70 zero_gravi
| Address      | Name [C]                 | Bit(s) | R/W | Function
39
| `0xffffffc0` | `NEORV32_GPIO.INPUT_LO`  | 31:0   | r/- | parallel input port pins 31:0
40
| `0xffffffc4` | `NEORV32_GPIO.INPUT_HI`  | 31:0   | r/- | parallel input port pins 63:32
41 64 zero_gravi
| `0xffffffc8` | `NEORV32_GPIO.OUTPUT_LO` | 31:0   | r/w | parallel output port pins 31:0
42
| `0xffffffcc` | `NEORV32_GPIO.OUTPUT_HI` | 31:0   | r/w | parallel output port pins 63:32
43 60 zero_gravi
|=======================

powered by: WebSVN 2.1.0

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