Skip to content

Commit 6110ffc

Browse files
committed
Add 'firrtl/' from commit '94d425f0f48e84bbae1be9d44d64615a37d960d8'
git-subtree-dir: firrtl git-subtree-mainline: 15fb7cc git-subtree-split: 94d425f
2 parents 15fb7cc + 94d425f commit 6110ffc

File tree

523 files changed

+114023
-0
lines changed

Some content is hidden

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

523 files changed

+114023
-0
lines changed

firrtl/.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @freechipsproject/firrtl-reviewers
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report
3+
about: Report a problem you experienced with FIRRTL
4+
labels: improvement=BugFix
5+
---
6+
7+
### Checklist
8+
9+
- [ ] Did you specify the current behavior?
10+
- [ ] Did you specify the expected behavior?
11+
- [ ] Did you provide a code example showing the problem?
12+
- [ ] Did you describe your environment?
13+
- [ ] Did you specify relevant external information?
14+
15+
### What is the current behavior?
16+
17+
### What is the expected behavior?
18+
19+
### Steps to Reproduce
20+
21+
<!-- How can someone else reproduce the problem you're seeing? -->
22+
<!-- It's very helpful to include a full example of a failing Chisel or FIRRTL program! -->
23+
<!-- Include a stack trace if you have it! -->
24+
25+
### Your environment
26+
27+
<!-- Please tell us a little about your environment -->
28+
29+
- Chisel Verions: <!-- e.g., 3.2.0 -->
30+
- OS: <!-- e.g., Linux knight 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux -->
31+
- Verilator version: <!-- e.g., 4.008 -->
32+
33+
### External Information
34+
35+
<!-- Was this discussed anywhere else, e.g., Twitter, Gitter, StackOverflow? Provide direct links if available! -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Feature Request
3+
about: Request a new feature to be added to FIRRTL
4+
---
5+
6+
### Checklist
7+
8+
- [ ] Did you write out a description of the feature you want to see?
9+
- [ ] Did you look around for any related features?
10+
- [ ] Did you specify relevant external information?
11+
12+
### Feature Description
13+
14+
<!-- What type of behavior, API, or feature would you like FIRRTL to have? -->
15+
16+
### Type of Feature
17+
18+
<!-- Choose one or more from the following: -->
19+
<!-- - performance improvement -->
20+
<!-- - documentation -->
21+
<!-- - code refactoring -->
22+
<!-- - code cleanup -->
23+
<!-- - backend code generation -->
24+
<!-- - new feature/API -->
25+
26+
### Related Features
27+
28+
<!-- Is there anything in the codebase that can do this right now or is substantially related? -->
29+
30+
### External Information
31+
32+
<!-- Was this discussed anywhere else, e.g., Twitter, Gitter, StackOverflow? Provide direct links if available! -->
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
### Contributor Checklist
2+
3+
- [ ] Did you add Scaladoc to every public function/method?
4+
- [ ] Did you update the FIRRTL spec to include every new feature/behavior?
5+
- [ ] Did you add at least one test demonstrating the PR?
6+
- [ ] Did you delete any extraneous printlns/debugging code?
7+
- [ ] Did you specify the type of improvement?
8+
- [ ] Did you state the API impact?
9+
- [ ] Did you specify the code generation impact?
10+
- [ ] Did you request a desired merge strategy?
11+
- [ ] Did you add text to be included in the Release Notes for this change?
12+
13+
#### Type of Improvement
14+
15+
<!-- Choose one or more from the following: -->
16+
<!-- - bug fix -->
17+
<!-- - performance improvement -->
18+
<!-- - documentation -->
19+
<!-- - code refactoring -->
20+
<!-- - code cleanup -->
21+
<!-- - backend code generation -->
22+
<!-- - new feature/API -->
23+
24+
#### API Impact
25+
26+
<!-- How would this affect the current API? Does this add, extend, deprecate, remove, or break any existing API? -->
27+
28+
#### Backend Code Generation Impact
29+
30+
<!-- Does this change any generated Verilog? -->
31+
<!-- How does it change it or in what circumstances would it? -->
32+
33+
#### Desired Merge Strategy
34+
35+
<!-- If approved, how should this PR be merged? -->
36+
<!-- Options are: -->
37+
<!-- - Squash: The PR will be squashed and merged (choose this if you have no preference. -->
38+
<!-- - Rebase: You will rebase the PR onto master and it will be merged with a merge commit. -->
39+
40+
#### Release Notes
41+
<!--
42+
Text from here to the end of the body will be considered for inclusion in the release notes for the version containing this pull request.
43+
-->
44+
45+
### Reviewer Checklist (only modified by reviewer)
46+
- [ ] Did you add the appropriate labels?
47+
- [ ] Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
48+
- [ ] Did you review?
49+
- [ ] Did you check whether all relevant Contributor checkboxes have been checked?
50+
- [ ] Did you mark as `Please Merge`?
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Configuration for generating .mergify.yml
2+
conditions:
3+
- status-success=all tests passed
4+
branches:
5+
- 1.3.x
6+
- 1.4.x
7+
- 1.5.x
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Setup OSS CAD Suite
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Install Tabby OSS Cad Suite
7+
shell: bash
8+
env:
9+
VERSION: 2021-11-09
10+
run: |
11+
ARTIFACT=oss-cad-suite-linux-x64-$(echo $VERSION | tr -d '-')
12+
wget -q -O - https://github.com/YosysHQ/oss-cad-suite-build/releases/download/${VERSION}/${ARTIFACT}.tgz | tar -zx
13+
echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH

firrtl/.github/workflows/test.yml

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Continuous Integration
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- 1.5.x
9+
- 1.4.x
10+
- 1.3.x
11+
- 1.2.x
12+
13+
jobs:
14+
test:
15+
name: sbt test
16+
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
scala: [2.13.10, 2.12.17]
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v2
24+
- name: Install Tabby OSS Cad Suite
25+
uses: ./.github/workflows/setup-oss-cad-suite
26+
- name: Setup Scala
27+
uses: olafurpg/setup-scala@v10
28+
with:
29+
java-version: [email protected]
30+
- name: Cache Scala
31+
uses: coursier/cache-action@v6
32+
- name: Check Formatting (Scala 2.12 only)
33+
if: startsWith(matrix.scala, '2.12')
34+
run: sbt ++${{ matrix.scala }} scalafmtCheckAll
35+
- name: Unidoc
36+
run: sbt ++${{ matrix.scala }} unidoc
37+
- name: Sanity check benchmarking scripts (Scala 2.13 only)
38+
if: startsWith(matrix.scala, '2.13')
39+
run: |
40+
benchmark/scripts/benchmark_cold_compile.py -N 2 --designs regress/ICache.fir --versions HEAD
41+
benchmark/scripts/find_heap_bound.py -- -cp firrtl*jar firrtl.stage.FirrtlMain -i regress/ICache.fir -o out -X verilog
42+
- name: Test
43+
run: sbt ++${{ matrix.scala }} test
44+
- name: Binary compatibility
45+
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues
46+
47+
mill:
48+
name: Mill Sanity Check
49+
runs-on: ubuntu-latest
50+
strategy:
51+
matrix:
52+
scala: [2.13.10, 2.12.17]
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v2
56+
- name: Setup Scala
57+
uses: olafurpg/setup-scala@v10
58+
- name: Cache
59+
uses: coursier/cache-action@v5
60+
- name: Setup Mill
61+
uses: jodersky/[email protected]
62+
- name: Mill sanity check
63+
run: mill _[${{ matrix.scala }}].compile
64+
65+
# TODO find better way to express Ops and AddNot as single test
66+
equiv:
67+
name: formal equivalence
68+
runs-on: ubuntu-latest
69+
strategy:
70+
matrix:
71+
design: [RocketCore, FPU, ICache, Ops, AddNot]
72+
73+
steps:
74+
- name: Checkout
75+
uses: actions/checkout@v2
76+
- name: Install Tabby OSS Cad Suite
77+
uses: ./.github/workflows/setup-oss-cad-suite
78+
- name: Setup Scala
79+
uses: olafurpg/setup-scala@v10
80+
with:
81+
java-version: [email protected]
82+
- name: Cache Scala
83+
uses: coursier/cache-action@v5
84+
- name: Run Formal Equivalence
85+
# This is here instead of on the whole job because if a job is skipped, so are dependent jobs
86+
# If this job were skipped, all_tests_passed would be skipped to
87+
# By having this "if" here, this job returns success so that all_tests_passed will succeed too
88+
if: github.event_name == 'pull_request' &&
89+
! contains(github.event.pull_request.labels.*.name, 'Skip Formal CI')
90+
run: |
91+
echo ${{ github.event_name }}
92+
echo ${{ github.event.pull_request.labels }}
93+
./.run_formal_checks.sh ${{ matrix.design }}
94+
95+
# Sentinel job to simplify how we specify which checks need to pass in branch
96+
# protection and in Mergify
97+
#
98+
# When adding new jobs, please add them to `needs` below
99+
all_tests_passed:
100+
name: "all tests passed"
101+
needs: [test, mill, equiv]
102+
runs-on: ubuntu-latest
103+
steps:
104+
- run: echo Success!
105+
106+
# sbt ci-release publishes all cross versions so this job needs to be
107+
# separate from a Scala versions build matrix to avoid duplicate publishing
108+
publish:
109+
needs: [all_tests_passed]
110+
runs-on: ubuntu-latest
111+
if: github.event_name == 'push'
112+
113+
steps:
114+
- name: Checkout
115+
uses: actions/checkout@v2
116+
- name: Setup Scala
117+
uses: olafurpg/setup-scala@v10
118+
with:
119+
java-version: [email protected]
120+
- name: Cache Scala
121+
uses: coursier/cache-action@v5
122+
- name: Setup GPG (for Publish)
123+
uses: olafurpg/setup-gpg@v3
124+
- name: Publish
125+
run: sbt ci-release
126+
env:
127+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
128+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
129+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
130+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
131+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Update .mergify.yml
2+
on:
3+
schedule:
4+
# Runs once an hour
5+
- cron: "0 * * * *"
6+
7+
jobs:
8+
update-mergify:
9+
name: Update .mergify.yml
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
ref: master
16+
- name: Checkout Chisel Repo Tools
17+
uses: actions/checkout@v2
18+
with:
19+
repository: ucb-bar/chisel-repo-tools
20+
path: tools
21+
- name: Setup Scala
22+
uses: olafurpg/setup-scala@v10
23+
- name: Install Ammonite
24+
run: sudo sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/2.3.8/2.13-2.3.8) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm'
25+
- name: Cache Scala
26+
uses: coursier/cache-action@v6
27+
- name: Generate .mergify.yml
28+
run: |
29+
./tools/scripts/mergify.sc .github/configs/mergify_config.yml > .mergify.yml
30+
# Delete tools so they don't get included in commit
31+
rm -rf tools/
32+
- name: Create Pull Request
33+
uses: peter-evans/[email protected]
34+
with:
35+
# TODO Default GITHUB_TOKEN cannot trigger PR CI
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
commit-message: Update .mergify.yml
38+
branch: actions/workflows/update-mergify
39+
delete-branch: true
40+
title: Update .mergify.yml
41+
body: |
42+
This is an automated pull request by "Update .mergify.yml" workflow created with [create-pull-request][1].
43+
44+
[1]: https://github.com/peter-evans/create-pull-request
45+

firrtl/.gitignore

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
.DS_STORE
2+
*/*.DS_STORE
3+
*/*/*.DS_STORE
4+
*/*/*/*.DS_STORE
5+
*/*/*/*/*.DS_STORE
6+
*.tmp
7+
*/*.temp
8+
*/*/*.temp
9+
*/*/*/*.temp
10+
*.swp
11+
*/*.swp
12+
*/*/*.swp
13+
*/*/*/*.swp
14+
*/*.flo
15+
*/*.v
16+
*/*.out
17+
*/*/*.flo
18+
*/*/*.v
19+
*/*/*.out
20+
*/*/Output
21+
*/*/*/*.flo
22+
*/*/*/*.v
23+
*/*/*/*.out
24+
*/*/*/Output
25+
src/lib/stanzam
26+
src/lib/stanza
27+
src/*/__MACOSX
28+
src/main/stanza/firrtl-main
29+
utils/bin/firrtl
30+
utils/bin/stanza
31+
utils/bin/firrtl-scala
32+
utils/bin/firrtl-stanza
33+
utils/bin/firrtl.jar
34+
utils/bin/firrtl-test.jar
35+
utils/bin/FileCheck
36+
spec/spec.aux
37+
spec/spec.log
38+
spec/spec.toc
39+
spec/spec.out
40+
spec/spec.synctex.gz
41+
notes/*.docx
42+
test_run_dir
43+
__pycache__
44+
45+
.project
46+
47+
# sbt specific
48+
.cache
49+
.history
50+
.lib/
51+
dist/*
52+
target/
53+
lib_managed/
54+
src_managed/
55+
project/boot/
56+
project/plugins/project/
57+
.idea/
58+
.idea_modules/
59+
gen/
60+
project/project/
61+
/bin/
62+
out/
63+
.bloop
64+
.metals
65+
.bsp
66+
project/metals.sbt
67+
68+
*~
69+
*#*#
70+
.vscode

0 commit comments

Comments
 (0)