Skip to content

Commit 7fbcd5a

Browse files
Razer6a-will
authored andcommitted
[hw,gpio,rtl] Templatize GPIO
Signed-off-by: Robert Schilling <[email protected]>
1 parent fa8dc9f commit 7fbcd5a

Some content is hidden

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

50 files changed

+378
-815
lines changed

hw/ip_templates/gpio/BUILD renamed to hw/ip_templates/gpio/BUILD.tpl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,5 @@ filegroup(
1313
"doc/**",
1414
"README.md",
1515
],
16-
) + [
17-
"//hw/ip/gpio/data:all_files",
18-
],
16+
),
1917
)

hw/ip_templates/gpio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
This document specifies GPIO hardware IP functionality. This
1212
module conforms to the [Comportable guideline for peripheral device
13-
functionality](../../../doc/contributing/hw/comportability/README.md)
13+
functionality](../../../../doc/contributing/hw/comportability/README.md)
1414
See that document for integration overview within the broader top
1515
level system.
1616

hw/ip_templates/gpio/data/BUILD

Lines changed: 0 additions & 10 deletions
This file was deleted.

hw/ip_templates/gpio/data/gpio.hjson renamed to hw/ip_templates/gpio/data/gpio.hjson.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{
5-
name: "gpio",
5+
name: "${module_instance_name}",
66
human_name: "General-Purpose I/O Controller",
77
one_line_desc: "General-purpose I/O pin control interface for software",
88
one_paragraph_desc: '''
@@ -119,7 +119,7 @@
119119
type: "uni",
120120
name: "sampled_straps",
121121
act: "req",
122-
package: "gpio_pkg",
122+
package: "${module_instance_name}_pkg",
123123
desc: '''
124124
This vector contains the sampled strap values.
125125
''',

hw/ip_templates/gpio/data/gpio_testplan.hjson renamed to hw/ip_templates/gpio/data/gpio_testplan.hjson.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
33
// SPDX-License-Identifier: Apache-2.0
44
{
5-
name: "gpio"
5+
name: "${module_instance_name}"
66
import_testplans: ["hw/dv/tools/dvsim/testplans/csr_testplan.hjson",
77
"hw/dv/tools/dvsim/testplans/alert_test_testplan.hjson",
88
"hw/dv/tools/dvsim/testplans/intr_test_testplan.hjson",

hw/ip_templates/gpio/defs.bzl renamed to hw/ip_templates/gpio/defs.bzl.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44
load("//rules/opentitan:hw.bzl", "opentitan_ip")
55

6-
GPIO = opentitan_ip(
7-
name = "gpio",
8-
hjson = "//hw/ip/gpio/data:gpio.hjson",
6+
${module_instance_name.upper()} = opentitan_ip(
7+
name = "${module_instance_name}",
8+
hjson = "//hw/top_${topname}/ip_autogen/${module_instance_name}:data/${module_instance_name}.hjson",
99
)

hw/ip_templates/gpio/doc/checklist.md

Lines changed: 105 additions & 105 deletions
Large diffs are not rendered by default.

hw/ip_templates/gpio/doc/interfaces.md

Lines changed: 0 additions & 45 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Hardware Interfaces
2+
3+
<!-- BEGIN CMDGEN util/regtool.py --interfaces ./hw/top_${topname}/ip_autogen/${module_instance_name}/data/${module_instance_name}.hjson -->
4+
<!-- END CMDGEN -->

hw/ip_templates/gpio/doc/programmers_guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@ printf("0b%b", *GPIO_INTR_STATE); // 0b00001100
120120

121121
## Device Interface Functions (DIFs)
122122

123-
- [Device Interface Functions](../../../../sw/device/lib/dif/dif_gpio.h)
123+
- [Device Interface Functions](../../../../../sw/device/lib/dif/dif_gpio.h)

0 commit comments

Comments
 (0)