Skip to content

Commit 2a6b3cc

Browse files
Razer6a-will
authored andcommitted
[hw,gpio,rtl] Render ipgen'ed GPIO
Signed-off-by: Robert Schilling <[email protected]>
1 parent 06bcaf0 commit 2a6b3cc

File tree

168 files changed

+21003
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+21003
-3
lines changed

hw/top_darjeeling/data/autogen/defs.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ load("//hw/top_darjeeling/ip_autogen/clkmgr:defs.bzl", "CLKMGR")
1717
load("//hw/ip/csrng:defs.bzl", "CSRNG")
1818
load("//hw/ip/dma:defs.bzl", "DMA")
1919
load("//hw/ip/edn:defs.bzl", "EDN")
20-
load("//hw/ip/gpio:defs.bzl", "GPIO")
20+
load("//hw/top_darjeeling/ip_autogen/gpio:defs.bzl", "GPIO")
2121
load("//hw/ip/hmac:defs.bzl", "HMAC")
2222
load("//hw/ip/i2c:defs.bzl", "I2C")
2323
load("//hw/ip/keymgr_dpe:defs.bzl", "KEYMGR_DPE")

hw/top_darjeeling/data/autogen/top_darjeeling.gen.hjson

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@
660660
{
661661
name: gpio
662662
type: gpio
663+
template_type: gpio
663664
clock_srcs:
664665
{
665666
clk_i: io_div4
@@ -678,6 +679,7 @@
678679
GpioAsHwStrapsEn: "1"
679680
GpioAsyncOn: "1"
680681
}
682+
attr: ipgen
681683
clock_connections:
682684
{
683685
clk_i: clkmgr_aon_clocks.clk_io_div4_peri
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright lowRISC contributors (OpenTitan project).
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
package(default_visibility = ["//visibility:public"])
6+
7+
filegroup(
8+
name = "rtl_files",
9+
srcs = glob(
10+
["**"],
11+
exclude = [
12+
"dv/**",
13+
"doc/**",
14+
"README.md",
15+
],
16+
),
17+
)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# GPIO HWIP Technical Specification
2+
3+
[`gpio`](https://reports.opentitan.org/hw/ip/gpio/dv/latest/report.html):
4+
![](https://dashboards.lowrisc.org/badges/dv/gpio/test.svg)
5+
![](https://dashboards.lowrisc.org/badges/dv/gpio/passing.svg)
6+
![](https://dashboards.lowrisc.org/badges/dv/gpio/functional.svg)
7+
![](https://dashboards.lowrisc.org/badges/dv/gpio/code.svg)
8+
9+
# Overview
10+
11+
This document specifies GPIO hardware IP functionality. This
12+
module conforms to the [Comportable guideline for peripheral device
13+
functionality](../../../../doc/contributing/hw/comportability/README.md)
14+
See that document for integration overview within the broader top
15+
level system.
16+
17+
## Features
18+
19+
- 32 GPIO ports
20+
- Configurable interrupt per GPIO for detecting rising edge, falling edge,
21+
or active low/high input
22+
- Two ways to update GPIO output: direct-write and masked (thread-safe) update
23+
24+
## Description
25+
26+
The GPIO block allows software to communicate through general purpose I/O
27+
pins in a flexible manner. Each of 32 independent bits can be written
28+
as peripheral outputs in two modes. Each of the 32 bits can be read
29+
by software as peripheral inputs. How these peripheral inputs and
30+
outputs are connected to the chip IO is not within the scope of this
31+
document. See the Comportability Specification for peripheral IO options
32+
at the top chip level.
33+
34+
In the output direction, this module provides direct 32b access to each
35+
GPIO value using direct write. This mode allows software to control all
36+
GPIO bits simultaneously. Alternately, this module provides masked writes
37+
to half of the bits at a time, allowing software to affect the output
38+
value of a subset of the bits without requiring a read-modify-write.
39+
In this mode the user provides a mask of which of the 16 bits are to be
40+
modified, along with their new value. The details of this mode are given
41+
in the [Programmers Guide](#programmers-guide) below.
42+
43+
In the input direction, software can read the contents of any of the GPIO
44+
peripheral inputs. In addition, software can request the detection of an
45+
interrupt event for any of the 32 bits in a configurable manner. The choices
46+
are positive edge, negative edge or level detection events. A noise
47+
filter is available through configuration for any of the 32 GPIO inputs.
48+
This requires the input to be stable for 16 cycles of the
49+
module clock before the input register reflects the change and interrupt
50+
generation is evaluated. Note that if the filter is enabled and the pin
51+
is set to output then there will be a corresponding delay in a change
52+
in output value being reflected in the input register.
53+
54+
See the Design Details section for more details on output, input, and
55+
interrupt control.

0 commit comments

Comments
 (0)