[Probe] Introduce probe dialect #1
@codex review
<sub><sub>!P2 Badge</sub></sub> Preserve zero-width resolves as removed values
When the resolved probe payload is zero width, this path still creates a probe.read and records its i0 result. Other FIRRTL expression lowerings return Value() for zero-bit results; otherwise debug builds hit the setLowering zero-width assertion, and release builds make downstream zero-width connects see a real i0 instead of taking the existing handleZeroBit path. A firrtl.ref.resolve of !firrtl.probe<uint<0>> should be handled before creating the read.
Useful? React with 👍 / 👎.
<sub><sub>!P2 Badge</sub></sub> Avoid routing choice probe outputs through SV wires
Lowering every unlayered FIRRTL RefType port to !probe.ref also affects valid output-probe ports on firrtl.instance_choice. The existing instance-choice lowering creates an sv.wire for each output using lowerType(port.type), so an output probe becomes !hw.inout<!probe.ref<...>>; hw.inout elements must be HW value types, not probe handles, and the choice output can no longer verify or be emitted. Please special-case probe outputs in the instance-choice path or reject them cleanly.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c4fdd7fb6
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Done.
Done.
@codex review
<sub><sub>!P2 Badge</sub></sub> Allow clock payloads for FIRRTL probes
When lower-to-core lowers a valid FIRRTL read-only probe of a clock, lowerType maps the payload to !seq.clock, but this verifier rejects it because seq.clock is not an hw::isHWValueType; the probe.send operand constraint has the same limitation. Designs with !firrtl.probe<clock> ports or firrtl.ref.send of clocks therefore fail verification instead of being represented in the new probe dialect. Please either admit seq::ClockType as a probe payload or explicitly lower clock probes through i1.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6cbb3767a0
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Done.
@codex review
<sub><sub>!P2 Badge</sub></sub> Allow clocks nested inside probe payloads
When a FIRRTL probe wraps an aggregate containing a clock, lowerType produces a !hw.struct/!hw.array whose leaf is !seq.clock. This verifier only special-cases a top-level seq.clock, while hw::isHWValueType returns false for aggregates with clock leaves, so otherwise legal read-only probes such as !firrtl.probe<bundle<clk: clock, data: uint<1>>> lower to probe.ref types/probe.send ops that fail verification. Please make the predicate/verifier recurse over aggregates and accept HW values or clocks at the leaves while still rejecting inouts.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c615e7933
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Done.
@codex review
@codex review
<sub><sub>!P2 Badge</sub></sub> Route non-elided probe outputs through a cast
When a probe output port has any use besides its firrtl.ref.define (for example the module also firrtl.ref.resolves that output), tryEliminatingConnectsToValue returns null and this path feeds the temporary FIRRTL firrtl.wire result directly to hw.output. The wire lowering only records a backedge, and the RefDefineOp lowering returns after updating that backedge, so the hw.output operand is never rewritten; the pass later sees the FIRRTL wire still has a use/illegal FIRRTL type and fails instead of lowering the valid module.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6f520b675
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Done.
@codex review
<sub><sub>!P2 Badge</sub></sub> Avoid failing on dead probe wires
When lower-to-core sees a firrtl.wire whose type is a probe, this always registers a tracked backedge. If that probe wire is dead or has no firrtl.ref.define, the final backedge-resolution loop reports the self-mapped backedge as sink does not have a driver even when no lowered op uses it, unlike ordinary unused FIRRTL wires. This makes lower-to-core reject modules that merely contain an unused probe wire; skip creating/tracking the backedge for unused probe wires or only diagnose unresolved backedges that still have uses.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2b69c6161
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
Done.
@codex review
<sub><sub>!P2 Badge</sub></sub> Drive subprobe definitions through the parent probe
When lower-to-core sees a firrtl.ref.define whose destination is a firrtl.ref.sub of a probe wire or output, dest is the lowered probe.subfield/probe.subindex result rather than the aggregate probe backedge, so updateIfBackedge(dest, src) does not drive the parent. Rewriting remaining FIRRTL uses of the subprobe cannot update the parent backedge or any reads already lowered before the define, leaving aggregate probe outputs or later parent uses undriven. Please either lower these partial defines into an aggregate probe value or reject them explicitly.
Useful? React with 👍 / 👎.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c549f067f9
<details> <summary>ℹ️ About Codex in GitHub</summary>
<br/>
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
</details>
nanjo712
No description provided by author.