Skip to content

Conversation

jergk
Copy link
Contributor

@jergk jergk commented Sep 8, 2025

The compiler directive `default_nettype none is added at the top of generated (System) Verilog (see #2174).
To my understanding this directive is not scoped and remains effective for the rest of the synthesis.
This leads to issues when other Verilog files are synthesized after the clash generated Verilog and rely on the default nettype.
Inserting `default_nettype wire at the end of the generated file resets the nettype to the default.

Still TODO:

  • Write a changelog entry (see changelog/README.md)
  • Check copyright notices are up to date in edited files

@jergk jergk changed the title reset the default_nettype to wire at the end of the generated verilog… reset the default_nettype to wire at the end of the generated verilog Sep 8, 2025
@christiaanb
Copy link
Member

@kloonbot run_ci 7e10db3

@christiaanb
Copy link
Member

@jergk Thanks for the PR! It seems that there is some trailing white-space which triggered a rejection by CI: https://github.com/clash-lang/clash-compiler/pull/3005/files#diff-306920ec3c5523761ac880c48801874502e80ca894467b88b91d0fd58ee117c0R234

@christiaanb
Copy link
Member

@kloonbot run_ci 3d679ae

Copy link
Member

@martijnbastiaan martijnbastiaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To my understanding this directive is not scoped and remains effective for the rest of the synthesis.

That is also my understanding.

PR LGTM, thank you!

(I removed the backport label after adding it, this is of course a breaking change.)

@martijnbastiaan martijnbastiaan merged commit 12b4b27 into clash-lang:master Sep 20, 2025
16 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.

3 participants