llvm / llvm/circt

[FIRRTL] Annotations Targeting Aggregates of Probes Not Found

Open
#6,433 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

FIRRTL
Dominant language
C++
Stars
2.2k
Forks
524
Avg merge
3d 2h
Merged PRs (30d)
46

Description

Annotation resolution of aggregates of probes should produce a better error message. Currently, this fails to find the "name". The actual issue is that it is an annotation targeting a probe.

Consider:

```
FIRRTL version 3.3.0
circuit Foo: %[[
{"class":"firrtl.transforms.DontTouchAnnotation","target":"~Foo|Foo>a"},
{"class":"firrtl.transforms.DontTouchAnnotation","target":"~Foo|Foo>b"}
]]
module Foo:
output a: Probe>[1]
output b: {a: Probe>}
```

This produces:

```
firrtl-snippets/ProbeAnnotations.fir:2:1: error: cannot find name 'a' in Foo
circuit Foo: %[[
^
firrtl-snippets/ProbeAnnotations.fir:2:1: error: Unable to resolve target of annotation: {class = "firrtl.transforms.DontTouchAnnotation", target = "~Foo|Foo>a"}
circuit Foo: %[[
^
firrtl-snippets/ProbeAnnotations.fir:2:1: error: cannot find name 'b' in Foo
circuit Foo: %[[
^
firrtl-snippets/ProbeAnnotations.fir:2:1: error: Unable to resolve target of annotation: {class = "firrtl.transforms.DontTouchAnnotation", target = "~Foo|Foo>b"}
circuit Foo: %[[
^
```

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the reproducer in firrtl-snippets/ProbeAnnotations.fir and trace annotation resolution for the two Probe targets. Compare the current diagnostics with the issue's example; done means aggregate Probe annotations no longer produce the misleading cannot-find-name error and report the target-resolution failure accurately.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.