Skip to content

Commit

Permalink
Add 'firrtl/' from commit '94d425f0f48e84bbae1be9d44d64615a37d960d8'
Browse files Browse the repository at this point in the history
git-subtree-dir: firrtl
git-subtree-mainline: ec93615
git-subtree-split: 94d425f
  • Loading branch information
seldridge committed Feb 9, 2023
2 parents ec93615 + 94d425f commit 63d02ac
Show file tree
Hide file tree
Showing 523 changed files with 114,023 additions and 0 deletions.
1 change: 1 addition & 0 deletions firrtl/.github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @freechipsproject/firrtl-reviewers
35 changes: 35 additions & 0 deletions firrtl/.github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug Report
about: Report a problem you experienced with FIRRTL
labels: improvement=BugFix
---

### Checklist

- [ ] Did you specify the current behavior?
- [ ] Did you specify the expected behavior?
- [ ] Did you provide a code example showing the problem?
- [ ] Did you describe your environment?
- [ ] Did you specify relevant external information?

### What is the current behavior?

### What is the expected behavior?

### Steps to Reproduce

<!-- How can someone else reproduce the problem you're seeing? -->
<!-- It's very helpful to include a full example of a failing Chisel or FIRRTL program! -->
<!-- Include a stack trace if you have it! -->

### Your environment

<!-- Please tell us a little about your environment -->

- Chisel Verions: <!-- e.g., 3.2.0 -->
- 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 -->
- Verilator version: <!-- e.g., 4.008 -->

### External Information

<!-- Was this discussed anywhere else, e.g., Twitter, Gitter, StackOverflow? Provide direct links if available! -->
32 changes: 32 additions & 0 deletions firrtl/.github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Feature Request
about: Request a new feature to be added to FIRRTL
---

### Checklist

- [ ] Did you write out a description of the feature you want to see?
- [ ] Did you look around for any related features?
- [ ] Did you specify relevant external information?

### Feature Description

<!-- What type of behavior, API, or feature would you like FIRRTL to have? -->

### Type of Feature

<!-- Choose one or more from the following: -->
<!-- - performance improvement -->
<!-- - documentation -->
<!-- - code refactoring -->
<!-- - code cleanup -->
<!-- - backend code generation -->
<!-- - new feature/API -->

### Related Features

<!-- Is there anything in the codebase that can do this right now or is substantially related? -->

### External Information

<!-- Was this discussed anywhere else, e.g., Twitter, Gitter, StackOverflow? Provide direct links if available! -->
50 changes: 50 additions & 0 deletions firrtl/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
### Contributor Checklist

- [ ] Did you add Scaladoc to every public function/method?
- [ ] Did you update the FIRRTL spec to include every new feature/behavior?
- [ ] Did you add at least one test demonstrating the PR?
- [ ] Did you delete any extraneous printlns/debugging code?
- [ ] Did you specify the type of improvement?
- [ ] Did you state the API impact?
- [ ] Did you specify the code generation impact?
- [ ] Did you request a desired merge strategy?
- [ ] Did you add text to be included in the Release Notes for this change?

#### Type of Improvement

<!-- Choose one or more from the following: -->
<!-- - bug fix -->
<!-- - performance improvement -->
<!-- - documentation -->
<!-- - code refactoring -->
<!-- - code cleanup -->
<!-- - backend code generation -->
<!-- - new feature/API -->

#### API Impact

<!-- How would this affect the current API? Does this add, extend, deprecate, remove, or break any existing API? -->

#### Backend Code Generation Impact

<!-- Does this change any generated Verilog? -->
<!-- How does it change it or in what circumstances would it? -->

#### Desired Merge Strategy

<!-- If approved, how should this PR be merged? -->
<!-- Options are: -->
<!-- - Squash: The PR will be squashed and merged (choose this if you have no preference. -->
<!-- - Rebase: You will rebase the PR onto master and it will be merged with a merge commit. -->

#### Release Notes
<!--
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.
-->

### Reviewer Checklist (only modified by reviewer)
- [ ] Did you add the appropriate labels?
- [ ] Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
- [ ] Did you review?
- [ ] Did you check whether all relevant Contributor checkboxes have been checked?
- [ ] Did you mark as `Please Merge`?
7 changes: 7 additions & 0 deletions firrtl/.github/configs/mergify_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Configuration for generating .mergify.yml
conditions:
- status-success=all tests passed
branches:
- 1.3.x
- 1.4.x
- 1.5.x
13 changes: 13 additions & 0 deletions firrtl/.github/workflows/setup-oss-cad-suite/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Setup OSS CAD Suite

runs:
using: composite
steps:
- name: Install Tabby OSS Cad Suite
shell: bash
env:
VERSION: 2021-11-09
run: |
ARTIFACT=oss-cad-suite-linux-x64-$(echo $VERSION | tr -d '-')
wget -q -O - https://github.com/YosysHQ/oss-cad-suite-build/releases/download/${VERSION}/${ARTIFACT}.tgz | tar -zx
echo "$(pwd)/oss-cad-suite/bin" >> $GITHUB_PATH
131 changes: 131 additions & 0 deletions firrtl/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
name: Continuous Integration

on:
pull_request:
push:
branches:
- master
- 1.5.x
- 1.4.x
- 1.3.x
- 1.2.x

jobs:
test:
name: sbt test
runs-on: ubuntu-latest
strategy:
matrix:
scala: [2.13.10, 2.12.17]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Tabby OSS Cad Suite
uses: ./.github/workflows/setup-oss-cad-suite
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Check Formatting (Scala 2.12 only)
if: startsWith(matrix.scala, '2.12')
run: sbt ++${{ matrix.scala }} scalafmtCheckAll
- name: Unidoc
run: sbt ++${{ matrix.scala }} unidoc
- name: Sanity check benchmarking scripts (Scala 2.13 only)
if: startsWith(matrix.scala, '2.13')
run: |
benchmark/scripts/benchmark_cold_compile.py -N 2 --designs regress/ICache.fir --versions HEAD
benchmark/scripts/find_heap_bound.py -- -cp firrtl*jar firrtl.stage.FirrtlMain -i regress/ICache.fir -o out -X verilog
- name: Test
run: sbt ++${{ matrix.scala }} test
- name: Binary compatibility
run: sbt ++${{ matrix.scala }} mimaReportBinaryIssues

mill:
name: Mill Sanity Check
runs-on: ubuntu-latest
strategy:
matrix:
scala: [2.13.10, 2.12.17]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
- name: Cache
uses: coursier/cache-action@v5
- name: Setup Mill
uses: jodersky/[email protected]
- name: Mill sanity check
run: mill _[${{ matrix.scala }}].compile

# TODO find better way to express Ops and AddNot as single test
equiv:
name: formal equivalence
runs-on: ubuntu-latest
strategy:
matrix:
design: [RocketCore, FPU, ICache, Ops, AddNot]

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Tabby OSS Cad Suite
uses: ./.github/workflows/setup-oss-cad-suite
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache Scala
uses: coursier/cache-action@v5
- name: Run Formal Equivalence
# This is here instead of on the whole job because if a job is skipped, so are dependent jobs
# If this job were skipped, all_tests_passed would be skipped to
# By having this "if" here, this job returns success so that all_tests_passed will succeed too
if: github.event_name == 'pull_request' &&
! contains(github.event.pull_request.labels.*.name, 'Skip Formal CI')
run: |
echo ${{ github.event_name }}
echo ${{ github.event.pull_request.labels }}
./.run_formal_checks.sh ${{ matrix.design }}
# Sentinel job to simplify how we specify which checks need to pass in branch
# protection and in Mergify
#
# When adding new jobs, please add them to `needs` below
all_tests_passed:
name: "all tests passed"
needs: [test, mill, equiv]
runs-on: ubuntu-latest
steps:
- run: echo Success!

# sbt ci-release publishes all cross versions so this job needs to be
# separate from a Scala versions build matrix to avoid duplicate publishing
publish:
needs: [all_tests_passed]
runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Scala
uses: olafurpg/setup-scala@v10
with:
java-version: [email protected]
- name: Cache Scala
uses: coursier/cache-action@v5
- name: Setup GPG (for Publish)
uses: olafurpg/setup-gpg@v3
- name: Publish
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}

45 changes: 45 additions & 0 deletions firrtl/.github/workflows/update_mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Update .mergify.yml
on:
schedule:
# Runs once an hour
- cron: "0 * * * *"

jobs:
update-mergify:
name: Update .mergify.yml
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
- name: Checkout Chisel Repo Tools
uses: actions/checkout@v2
with:
repository: ucb-bar/chisel-repo-tools
path: tools
- name: Setup Scala
uses: olafurpg/setup-scala@v10
- name: Install Ammonite
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'
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Generate .mergify.yml
run: |
./tools/scripts/mergify.sc .github/configs/mergify_config.yml > .mergify.yml
# Delete tools so they don't get included in commit
rm -rf tools/
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
# TODO Default GITHUB_TOKEN cannot trigger PR CI
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update .mergify.yml
branch: actions/workflows/update-mergify
delete-branch: true
title: Update .mergify.yml
body: |
This is an automated pull request by "Update .mergify.yml" workflow created with [create-pull-request][1].
[1]: https://github.com/peter-evans/create-pull-request
70 changes: 70 additions & 0 deletions firrtl/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
.DS_STORE
*/*.DS_STORE
*/*/*.DS_STORE
*/*/*/*.DS_STORE
*/*/*/*/*.DS_STORE
*.tmp
*/*.temp
*/*/*.temp
*/*/*/*.temp
*.swp
*/*.swp
*/*/*.swp
*/*/*/*.swp
*/*.flo
*/*.v
*/*.out
*/*/*.flo
*/*/*.v
*/*/*.out
*/*/Output
*/*/*/*.flo
*/*/*/*.v
*/*/*/*.out
*/*/*/Output
src/lib/stanzam
src/lib/stanza
src/*/__MACOSX
src/main/stanza/firrtl-main
utils/bin/firrtl
utils/bin/stanza
utils/bin/firrtl-scala
utils/bin/firrtl-stanza
utils/bin/firrtl.jar
utils/bin/firrtl-test.jar
utils/bin/FileCheck
spec/spec.aux
spec/spec.log
spec/spec.toc
spec/spec.out
spec/spec.synctex.gz
notes/*.docx
test_run_dir
__pycache__

.project

# sbt specific
.cache
.history
.lib/
dist/*
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.idea/
.idea_modules/
gen/
project/project/
/bin/
out/
.bloop
.metals
.bsp
project/metals.sbt

*~
*#*#
.vscode
Loading

0 comments on commit 63d02ac

Please sign in to comment.