Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slang-netlist: Assertion 'it != nodes.end() && "Could not find node"' failed #1007

Closed
udif opened this issue May 23, 2024 · 1 comment · Fixed by #1016
Closed

slang-netlist: Assertion 'it != nodes.end() && "Could not find node"' failed #1007

udif opened this issue May 23, 2024 · 1 comment · Fixed by #1016

Comments

@udif
Copy link
Contributor

udif commented May 23, 2024

Describe the bug
slang-netlist fails with an internal assertion when the following code is run:
@jameshanlon

To Reproduce

module t34;
  reg  [3:0] x;
  reg   [15:0] v;

  always @(v)
  begin
    integer i;
    x = '0;
    for (i = 0; i <= 15; i = i + 1)
      if (v[i] == 1'b0)
        x = i;
  end
endmodule

Result:

% slang-netlist udif_tests/t34.v
Top level design units:
    t34

Build succeeded: 0 errors, 0 warnings
Assertion 'it != nodes.end() && "Could not find node"' failed
  in file /home/udif/git/slang/tools/netlist/include/DirectedGraph.h, line 188
  function: netlist::DirectedGraph<NodeType, EdgeType>::node_descriptor netlist::DirectedGraph<NodeType, EdgeType>::findNode(const NodeType&) const [with NodeType = netlist::NetlistNode; EdgeType = netlist::NetlistEdge; netlist::DirectedGraph<NodeType, EdgeType>::node_descriptor = long unsigned int]

While I suspected this was introduced as part of the comb-loops change, I still see it with an older copy of slang-netlist that predates this change:

% slang-netlist --version
slang-netlist version 5.0.196+28783e82

Additional context
This is the bug I was referring to in #1005 (comment) . I originally thought this was related to my changes, but apparently not.
Also, it might be related to #993 as both issues involve blocking assignments, even though the bugs symptoms are different.

@udif
Copy link
Contributor Author

udif commented May 23, 2024

Also verified with the last commit before the comb-loops commit:

% slang-netlist --version
slang-netlist version 6.0.50+56a10c53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants