Skip to content

Commit 23e75f9

Browse files
committed
Use vendor script to vendor lowrisc_ip
Signed-off-by: Gary Guo <[email protected]>
1 parent b4f5fce commit 23e75f9

File tree

402 files changed

+30545
-700
lines changed

Some content is hidden

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

402 files changed

+30545
-700
lines changed

vendor/lowrisc_ip.lock.hjson

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright lowRISC contributors.
2+
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
// SPDX-License-Identifier: Apache-2.0
4+
5+
// This file is generated by the util/vendor script. Please do not modify it
6+
// manually.
7+
8+
{
9+
upstream:
10+
{
11+
url: https://github.com/lowRISC/opentitan
12+
rev: 82b3f0486041881f29a71ad8f8f81e0f081ef307
13+
}
14+
}
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Linting
2+
13
# RTL Linting
24

35
Linting is a productivity tool for designers to quickly find typos and bugs at the time when the RTL is written.
@@ -11,9 +13,9 @@ The lint flow run scripts and waiver files are available in the GitHub repositor
1113
However, the _"lowRISC Lint Rules"_ are available as part of the default policies in AscentLint release 2019.A.p3 or newer (as `LRLR-v1.0.policy`).
1214
This enables designers that have access to this tool to run the lint flow provided locally on their premises.
1315

14-
Our linting flow leverages FuseSoC to resolve dependencies, build file lists and call the linting tools. See [here](https://github.com/olofk/fusesoc) for an introduction to this opensource package manager and [here](https://docs.opentitan.org/doc/ug/install_instructions/) for installation instructions.
16+
Our linting flow leverages FuseSoC to resolve dependencies, build file lists and call the linting tools. See [here](https://github.com/olofk/fusesoc) for an introduction to this open source package manager and [here](../../doc/getting_started/README.md) for installation instructions.
1517

16-
In order to run lint on a [comportable IP](https://docs.opentitan.org/doc/rm/comportability_specification/) block, the corresponding FuseSoC core file must have a lint target and include (optional) waiver files as shown in the following example taken from the FuseSoC core of the AES comportable IP:
18+
In order to run lint on a [comportable IP](../../doc/contributing/hw/comportability/README.md) block, the corresponding FuseSoC core file must have a lint target and include (optional) waiver files as shown in the following example taken from the FuseSoC core of the AES comportable IP:
1719
```
1820
filesets:
1921
@@ -75,14 +77,14 @@ All three linting tools mentioned above have been integrated with the `dvsim` re
7577
In order to manually invoke any of the linting tools on a specific block, make sure that the corresponding linting tool is properly installed, step into the project root and call
7678
```console
7779
$ cd $REPO_TOP
78-
$ util/dvsim/dvsim.py hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --tool (ascentlint|verilator|veriblelint) --purge --select-cfgs <lint-config-name>
80+
$ util/dvsim/dvsim.py hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --tool (ascentlint|verilator|veriblelint) --local --purge --select-cfgs <lint-config-name>
7981
```
8082
where `<lint-config-name>` is the name of the linting configuration as defined in the `top_earlgrey_lint_cfgs.hjson` regression list (currently that file contains a lint configuration for all available comportable IPs and the top-level).
8183

8284
In order to run all defined configs in `top_earlgrey_lint_cfgs.hjson` as a batch regression, just omit the `--select-cfgs` switch as follows:
8385
```console
8486
$ cd $REPO_TOP
85-
$ util/dvsim/dvsim.py hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --tool (ascentlint|verilator|veriblelint) --purge
87+
$ util/dvsim/dvsim.py hw/top_earlgrey/lint/top_earlgrey_lint_cfgs.hjson --tool (ascentlint|verilator|veriblelint) --local --purge
8688
```
8789
The `purge` option ensures that the scratch directory is fully erased before starting the build.
8890
Depending on the number of AscentLint licenses that can be checked out at a time, you may also want to set the number of parallel workers to one using `--max-parallel <number>`.

vendor/lowrisc_ip/lint/common.core

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:lint:common:0.1"
@@ -17,7 +17,7 @@ filesets:
1717

1818
files_veriblelint:
1919
files:
20-
- tools/veriblelint/rules.vbl: {file_type: veribleLintRules}
20+
- tools/veriblelint/lowrisc-styleguide.rules.verible_lint: {file_type: veribleLintRules}
2121

2222
files_check_tool_requirements:
2323
depend:
@@ -30,3 +30,8 @@ targets:
3030
- tool_ascentlint ? (files_ascentlint)
3131
- tool_veriblelint ? (files_veriblelint)
3232
- files_check_tool_requirements
33+
tools:
34+
ascentlint:
35+
ascentlint_options:
36+
- "-wait_license"
37+
- "-stop_on_error"

vendor/lowrisc_ip/lint/comportable.core

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CAPI=2:
2-
# Copyright lowRISC contributors.
2+
# Copyright lowRISC contributors (OpenTitan project).
33
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
44
# SPDX-License-Identifier: Apache-2.0
55
name: "lowrisc:lint:comportable:0.1"
@@ -20,5 +20,3 @@ targets:
2020
filesets:
2121
- tool_verilator ? (files_verilator_waiver)
2222
- tool_ascentlint ? (files_ascentlint_waiver)
23-
24-

vendor/lowrisc_ip/lint/data/ascentlint.hjson

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

vendor/lowrisc_ip/lint/data/common_lint_cfg.hjson

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

vendor/lowrisc_ip/lint/data/lint.mk

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

vendor/lowrisc_ip/lint/data/veriblelint.hjson

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

vendor/lowrisc_ip/lint/data/verilator.hjson

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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+
"$schema": "https://json-schema.org/draft/2019-09/schema",
6+
"properties": {
7+
"name": {
8+
"type": "string"
9+
},
10+
"additionalProperties": false,
11+
"testpoints": {
12+
"type": "array",
13+
"items": {
14+
"additionalProperties": false,
15+
"type": "object",
16+
"properties": {
17+
"name": {
18+
"type": "string"
19+
},
20+
"desc": {
21+
"type": "string"
22+
},
23+
"stage": {
24+
"enum": ["V1", "V2", "V2S", "V3"]
25+
},
26+
"si_stage": {
27+
"enum": ["SV1", "SV2", "SV3", "SV4", "SV5", "NA", "None"]
28+
},
29+
"bazel": {
30+
"type": "array"
31+
},
32+
"boot_stages": {
33+
"type": "array",
34+
"items": {
35+
"enum": ["rom_ext", "silicon_owner"]
36+
}
37+
},
38+
"lc_states": {
39+
"type": "array",
40+
"items": {
41+
"enum": ["PROD", "TEST_UNLOCKED", "RAW", "SCRAP", "TEST_LOCKED",
42+
"TEST_LOCKED0", "DEV", "RMA", "TEST_UNLOCKED0", "PROD_END"]
43+
}
44+
},
45+
"features": {
46+
"type": "array"
47+
},
48+
"tests": {
49+
"type": "array"
50+
},
51+
"otp_mutate": {
52+
"type": "boolean"
53+
},
54+
"host_support": {
55+
"type": "boolean"
56+
},
57+
"tags": {
58+
"type": "array"
59+
}
60+
},
61+
// If the si_stage is not tagged NA, then require the bazel property be present.
62+
"if": {
63+
"properties": {
64+
"si_stage": {
65+
"not": {
66+
"const": "NA"
67+
}
68+
}
69+
}
70+
},
71+
"then": {
72+
"required": ["bazel"]
73+
},
74+
"required": ["name", "desc", "stage", "si_stage", "tests"]
75+
}
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)