Adding custom information to Chisel for CIRCT Passes

Open
#5,078 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
scala
Domain
compilers

Research direction

Start by reviewing firrtl.annotations.SingleTargetAnnotation and the proposed LowerAnnotations path, then inspect how custom optimization information is represented in CIRCT IR. Done means identifying a supported replacement or a direct attribute path that a custom pass can consume.

Written by the indexing model from the issue text.

Description

Hi, I'm trying to add some optimization information in Chisel, which will eventually become the attr-dict for operators in CIRCT IR. This way, a custom pass can use this information to transform the circuit.

I found that firrtl.annotations.SingleTargetAnnotation can achieve this if I add a LowerAnnotations function in CIRCT. However, it seems that SingleTargetAnnotation is deprecated, with the message: "All APIs in the firrtl package are deprecated."

Is there a replacement for firrtl.annotations? Or a way to directly add the attribute into the CIRCT IR?

Dominant language
Scala
Stars
4.8k
Forks
669
Avg merge
1d 12h
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chipsalliance/chisel

All issues in chipsalliance/chisel

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.