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

rtlil: Fix handling of connections on wire deletion #4118

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

povik
Copy link
Member

@povik povik commented Jan 8, 2024

Ought to fix #4082

The issue here is we replace removed wires in assignments with x-bits on both the LHS and RHS of the assignment. This triggers an assertion later on because we cannot assign to a constant.

@povik povik force-pushed the fix-conn-on-wire-delete branch from 9bc72b1 to f2404d3 Compare January 8, 2024 13:14
@povik
Copy link
Member Author

povik commented Jan 8, 2024

Removed assertion that's duplicated in SigSpec::remove2

@povik
Copy link
Member Author

povik commented Jan 8, 2024

This change makes opt_clean get stuck on some input, e.g.

module \top
  wire $d
  wire width 2 $m$6

  wire output 1 \dout

  attribute \keep 1'1
  cell \some_cell \sc1
    connect \DATA { $m$6 [1] }
  end

  connect $m$6 [0] $d
end

@povik
Copy link
Member Author

povik commented Jan 9, 2024

To address opt_clean getting stuck, I had to change what we do with the connection when a wire gets deleted: Now we don't create dummy wires, we remove the part of the assignment involving a deleted wire no matter if the deleted wire was on the LHS or the RHS.

@povik povik force-pushed the fix-conn-on-wire-delete branch from a46451d to deb69b8 Compare January 9, 2024 17:31
@povik povik force-pushed the fix-conn-on-wire-delete branch from fb55e3f to ea3dc7c Compare January 29, 2024 10:26
@povik
Copy link
Member Author

povik commented Jan 29, 2024

Rebased

@nakengelhardt nakengelhardt merged commit 2282351 into YosysHQ:master Jan 29, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

crash in select and delete
2 participants