Skip to content

Use exact declared names to color nodes in the visualizer #19

Closed

Description

@jserv

firrtlToDot in source/load-ivy.sc decides whether a node is an input, an output or a register with declaredAs, which accepts a node when it equals a declared name or starts with that name followed by _. That prefix match exists so that the flattened fields of a bundle port (io_in for io.in) are recognised, but it also matches unrelated names. This was reported by the cubic review of #17 and was left out of that PR.

Reproduce with input foo : UInt<8>, node foo_tmp = not(foo) and connect o, foo_tmp: the node foo_tmp is drawn as an input (green circle) because the port foo is declared. The same happens for any wire, node or register whose name begins with the name of a port plus an underscore.

A fix is to record the exact flattened names while the ports and registers are parsed (addPort already walks the bundle fields) and to compare against that set instead of a prefix. It shares the naming problem of #18 (the sanitize collisions), so the two can be fixed together.

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