forked from chipsalliance/sv-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'chipsalliance:master' into master
- Loading branch information
Showing
25 changed files
with
175 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,29 +19,10 @@ jobs: | |
run: | | ||
apt-get update -qq | ||
apt install -y unzip | ||
- name: Download artifacts | ||
id: get-artifacts | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{ github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "tests_summary" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
console.log("::set-output name=artifact_id::" + matchArtifact.id); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/tests_summary.zip', Buffer.from(download.data)); | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: tests_summary | ||
|
||
- name: Unpack artifacts | ||
run: | | ||
|
@@ -50,9 +31,8 @@ jobs: | |
- name: Generate and append artifacts link | ||
run: | | ||
ARTIFACT_ID=${{ steps.get-artifacts.outputs.artifact_id}} | ||
SUITE_ID=$(cat ./suite_id) | ||
ARTIFACT_URL="https://github.com/chipsalliance/sv-tests/suites/$SUITE_ID/artifacts/$ARTIFACT_ID" | ||
ARTIFACT_URL="https://github.com/chipsalliance/sv-tests/suites/$SUITE_ID" | ||
MD_URL="[Download an archive containing all the details]($ARTIFACT_URL)" | ||
echo -e "\n\n$MD_URL" >> tests_summary.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,16 @@ | ||
name: lint-review | ||
on: | ||
workflow_run: | ||
workflows: ["trigger-lint"] | ||
types: | ||
- completed | ||
pull_request: | ||
|
||
jobs: | ||
lint_review: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: 'Download artifact' | ||
id: get-artifacts | ||
uses: actions/[email protected] | ||
with: | ||
script: | | ||
var artifacts = await github.actions.listWorkflowRunArtifacts({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
run_id: ${{github.event.workflow_run.id }}, | ||
}); | ||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => { | ||
return artifact.name == "event.json" | ||
})[0]; | ||
var download = await github.actions.downloadArtifact({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
artifact_id: matchArtifact.id, | ||
archive_format: 'zip', | ||
}); | ||
var fs = require('fs'); | ||
fs.writeFileSync('${{github.workspace}}/event.json.zip', Buffer.from(download.data)); | ||
- run: | | ||
unzip event.json.zip | ||
- name: Run Verible action | ||
uses: chipsalliance/verible-linter-action@main | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ | |
"p188_3.sv", | ||
"p191.sv", | ||
"p196_2.sv", | ||
"p197.sv", | ||
"p201.sv", | ||
"p220.sv", | ||
"p221.sv", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2019-2021 The SymbiFlow Authors. | ||
// | ||
// Use of this source code is governed by a ISC-style | ||
// license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/ISC | ||
// | ||
// SPDX-License-Identifier: ISC | ||
|
||
|
||
/* | ||
:name: concat_op-bit_select | ||
:description: concatenation operator w/ bit selection test | ||
:tags: 11.4.12 | ||
*/ | ||
module top(); | ||
|
||
bit [3:0] a; | ||
|
||
bit [7:0] b = 8'b10101100; | ||
bit [7:0] c = 8'b01010011; | ||
|
||
initial begin | ||
a = {b, c}[9:6]; | ||
end | ||
|
||
endmodule |
Submodule ariane
updated
from 668829 to 967fc5
Submodule basejump_stl
updated
166 files
Submodule black-parrot
updated
28 files
Submodule veer-el2
updated
52 files
Submodule circt-verilog
updated
218 files
Submodule icarus
updated
17 files
+2 −2 | elab_expr.cc | |
+34 −0 | ivtest/ivltests/br_gh1155.v | |
+24 −0 | ivtest/ivltests/br_gh1163.v | |
+51 −0 | ivtest/ivltests/shift6.v | |
+54 −0 | ivtest/ivltests/vardly_undefined_vec.v | |
+5 −2 | ivtest/regress-vlog95.list | |
+4 −0 | ivtest/regress-vvp.list | |
+4 −0 | ivtest/vvp_tests/br_gh1155.json | |
+4 −0 | ivtest/vvp_tests/br_gh1163.json | |
+5 −0 | ivtest/vvp_tests/shift6.json | |
+4 −0 | ivtest/vvp_tests/vardly_undefined_vec.json | |
+1 −2 | tgt-vvp/eval_expr.c | |
+5 −10 | tgt-vvp/eval_vec4.c | |
+1 −2 | tgt-vvp/stmt_assign.c | |
+2 −4 | tgt-vvp/vvp_proc_loops.c | |
+2 −2 | tgt-vvp/vvp_process.c | |
+13 −12 | tgt-vvp/vvp_scope.c |
Submodule slang
updated
16 files
Submodule tree-sitter-systemverilog
added at
e3c0d4
Submodule verible
updated
29 files
Submodule verilator
updated
5446 files
Submodule yosys-slang
updated
39 files
Submodule zachjs-sv2v
updated
20 files
+1 −1 | .github/workflows/main.yaml | |
+5 −0 | CHANGELOG.md | |
+1 −1 | README.md | |
+2 −0 | src/Convert.hs | |
+1 −1 | src/Convert/Enum.hs | |
+21 −4 | src/Convert/Scoper.hs | |
+64 −0 | src/Convert/SeverityTask.hs | |
+1 −1 | src/Convert/TypeOf.hs | |
+1 −1 | src/Convert/Typedef.hs | |
+2 −1 | src/Job.hs | |
+1 −0 | sv2v.cabal | |
+2 −1 | test/core/elab_task.sv | |
+5 −0 | test/core/elab_task.sv.pat | |
+20 −0 | test/core/elab_task.v | |
+13 −0 | test/core/severity_task.sv | |
+5 −0 | test/core/severity_task.sv.pat | |
+16 −0 | test/core/severity_task.v | |
+12 −0 | test/core/typename_lhs_nest.sv | |
+5 −0 | test/core/typename_lhs_nest.v | |
+12 −0 | test/lib/functions.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
# | ||
# Copyright (C) 2020 The SymbiFlow Authors. | ||
# | ||
# Use of this source code is governed by a ISC-style | ||
# license that can be found in the LICENSE file or at | ||
# https://opensource.org/licenses/ISC | ||
# | ||
# SPDX-License-Identifier: ISC | ||
|
||
import os | ||
import sys | ||
import resource | ||
|
||
from tree_sitter import Language, Parser | ||
from BaseRunner import BaseRunner | ||
|
||
|
||
class tree_sitter_systemverilog(BaseRunner): | ||
libname = 'tree-sitter-systemverilog.so' | ||
locpath = ['runners', 'lib', libname] | ||
conpath = ['lib', libname] | ||
|
||
def __init__(self): | ||
super().__init__("tree-sitter-systemverilog", None, {"parsing"}) | ||
|
||
self.submodule = "third_party/tools/tree-sitter-systemverilog" | ||
self.url = f"https://github.com/gmlarumbe/tree-sitter-systemverilog/tree/{self.get_commit()}" | ||
|
||
def find_lib(self): | ||
local_lib = '' | ||
conda_lib = '' | ||
try: | ||
out = os.environ['OUT_DIR'] | ||
local_lib = os.path.abspath(os.path.join(out, *self.locpath)) | ||
except KeyError: | ||
pass | ||
|
||
try: | ||
prefix = os.environ['CONDA_PREFIX'] | ||
conda_lib = os.path.abspath(os.path.join(prefix, *self.conpath)) | ||
except KeyError: | ||
pass | ||
|
||
return local_lib if os.path.isfile(local_lib) else conda_lib | ||
|
||
def log_error(self, fname, row, col, err): | ||
self.log += '{}:{}:{}: error: {}\n'.format(fname, row, col, err) | ||
|
||
def walk(self, node, fname): | ||
if not node.has_error: | ||
return False | ||
|
||
last_err = True | ||
|
||
for child in node.children: | ||
if self.walk(child, fname): | ||
last_err = False | ||
|
||
if last_err: | ||
self.log_error(fname, *node.start_point, 'node type: ' + node.type) | ||
|
||
return True | ||
|
||
def run(self, tmp_dir, params): | ||
self.ret = 0 | ||
self.log = '' | ||
|
||
try: | ||
lib = self.find_lib() | ||
|
||
lang = Language(lib, 'verilog') | ||
|
||
parser = Parser() | ||
parser.set_language(lang) | ||
except Exception as e: | ||
self.log += f'{e}\n' | ||
self.ret = 1 | ||
|
||
for src in params['files']: | ||
f = None | ||
try: | ||
f = open(src, 'rb') | ||
except IOError: | ||
self.ret = 1 | ||
self.log_error(src, '', '', 'failed to open file') | ||
continue | ||
|
||
try: | ||
tree = parser.parse(f.read()) | ||
if self.walk(tree.root_node, src): | ||
self.ret = 1 | ||
except Exception as e: | ||
self.log_error(src, '', '', 'unknown error: ' + str(e)) | ||
self.ret = 1 | ||
usage = resource.getrusage(resource.RUSAGE_SELF) | ||
profiling_data = (usage.ru_utime, usage.ru_stime, usage.ru_maxrss) | ||
|
||
return (self.log, self.ret) + profiling_data | ||
|
||
def can_run(self): | ||
return os.path.isfile(self.find_lib()) |