You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep distinct FIRRTL references apart in the visualizer graph #18
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
Draw the visualizer from exact FIRRTL references
Draw the visualizer from exact FIRRTL references
Draw the visualizer from exact FIRRTL references
Draw the visualizer from exact references