Skip to content

Keep distinct FIRRTL references apart in the visualizer graph #18

Closed

Description

@jserv

firrtlToDot in source/load-ivy.sc turns every FIRRTL reference into a DOT node name with sanitize, which replaces . and [n] with _. Two different references can therefore end up as the same graph node, and the diagram then shows connections that do not exist and hides real ones. This was reported by the cubic review of #17 and by a Codex review; it is a limitation of the naming scheme, so it was left out of that PR.

Reproduce with a circuit that has an instance a of a module with an input in, and also a top-level input a_in (inst a of Child, connect a.in, data, connect result, a_in). The output contains data -> a_in, a_in -> a_out and a_in -> result: the instance port a.in and the top-level input a_in are drawn as one node, so data appears to drive result. The same happens for v[0] and a signal named v_0, and for io.a_b and io.a.b.

A fix needs a naming scheme that keeps the hierarchy and the indices apart, for example using the original scoped reference (a.in, v[0]) as the node label and a generated unique id as the DOT identifier, quoted so that signals named node, edge or graph are valid too. tests/test_visualizer.py pins the current a_in -> b_in style names, so it has to be updated together with the change.

Activity

  1. added 4 commits that reference this issue on Nov 14, 2026
    fc5be89
    adc0f13
    7a0ea0a
    07f687c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions