Skip to content

OpenSTA verilog compatibility #5197

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

widlarizer
Copy link
Collaborator

OpenSTA's read_verilog command supports a limited subset of Verilog. With this PR, yosys should be able to consistently present a design including derived blackboxes of internal cells made public with. The usefulness of these code changes is yet to be determined so it's a draft for now

I'm adding to box_derive a mode named -apply which actually remaps instances of parametric modules to be instances of the new derived ones. I'm also adding a publish pass that escapes internal cell types to become valid identifiers. @povik does the -apply mode seem sensible?

  • add tests
  • discard cell parameters in box_derive -apply

@widlarizer widlarizer changed the title Emil/opensta verilog export OpenSTA verilog compatibility Jun 26, 2025
Copy link
Member

@povik povik left a comment

Choose a reason for hiding this comment

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

I'd rename the new option otherwise the box_derive changes look good to me

}
}
public:
PublishPass() : Pass("publish", "publish private cell types") { }
Copy link
Member

Choose a reason for hiding this comment

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

I'd say this is a general name for a niche application. What about chtype -publish_icells?

@@ -51,6 +51,9 @@ struct BoxDerivePass : Pass {
log(" replaces the internal Yosys naming scheme in which the names of derived\n");
log(" modules start with '$paramod$')\n");
log("\n");
log(" -apply\n");
log(" use the derived modules\n");
Copy link
Member

Choose a reason for hiding this comment

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

What about -apply_derived_type?

@widlarizer widlarizer mentioned this pull request Jul 18, 2025
2 tasks
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.

2 participants