Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FIRRTL language #6848

Merged
merged 4 commits into from
Jun 7, 2024
Merged

Conversation

seldridge
Copy link
Contributor

@seldridge seldridge commented May 20, 2024

Add FIRRTL [1], a language/IR that is produced by Chisel [2] and compiled to Verilog using the CIRCT [3] project.

Description

This adds the FIRRTL language.

Checklist:

I think this is over the bar for a new language. GitHub is showing 2.8k files and there appear to be a sufficiently large number of individual repositories. I've tried filtering out projects which have large numbers of these files, e.g., llvm/circt, and things still look good. The following query removes all llvm, chipsalliance, or ucb-bar users and is still showing 2k+ samples:

https://github.com/search?type=code&q=NOT+is%3Afork+path%3A*.fir+circuit+NOT+user%3Allvm+NOT+user%3Achipsalliance+NOT+user%3Aucb-bar

This pre-emptively adds a heuristic to avoid a collision with .fir which is also used by Fortran IR. Fortran IR is not presently in Linguist. Fortunately, the heuristic to avoid collision is trivial. Let me know if the PR should not pre-emptively include this heuristic. Heuristics should be unnecessary if there is no other language using the extension. This may need to revisited if Fortran IR wants to add syntax highlighting.

Metadata

Fixes chipsalliance/firrtl-spec#54.

Add FIRRTL [1], a language/IR that is produced by Chisel [2] and compiled
to Verilog using the CIRCT [3] project.

[1]: https://github.com/chipsalliance/firrtl-spec
[2]: https://github.com/chipsalliance/chisel
[3]: https://github.com/llvm/circt

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge requested a review from a team as a code owner May 20, 2024 16:46
Drop heuristics as they should be unnecessary if there are no other
extension collision.
Copy link
Member

@lildude lildude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

Note: this PR will not be merged until close to when the next release is made. See here for more details.

@lildude lildude added this pull request to the merge queue Jun 7, 2024
Merged via the queue into github-linguist:master with commit c344f7e Jun 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Linguist Support, TextMate Grammar Support
2 participants
-