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

Add Verilog cell models + UDPs from OpenPDKs #20

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

ubfx
Copy link
Contributor

@ubfx ubfx commented Feb 17, 2024

This patch adds verilog cell models and UDPs unmodified from efabless/skywater-pdk-libs-sky130_fd_sc_hd@89492a0.
The source repository is also under Apache-2.0 license (https://github.com/efabless/skywater-pdk-libs-sky130_fd_sc_hd/blob/master/LICENSE) so an additional license notice should not be necessary.

Fix #15

@ubfx ubfx marked this pull request as draft February 19, 2024 08:24
@ubfx
Copy link
Contributor Author

ubfx commented Feb 19, 2024

Turning this into a draft while I experiment with how to best hand the files over to the simulator. I wanted to avoid merging all the cells into a single Verilog file (like it is also done for the LEFs) to keep the library close to the original. But it seems like keeping them all seperate will just make it more complicated for the simulation steps and also blow up the schema unnecessarily.
By the way, I noticed that the verilog views of the gf180 and asap7 PDKs are not listed in the schema, is there a reason for that? Could we put the Verilog file under the keypath 'output', 'verilog'?

@gadfort
Copy link
Contributor

gadfort commented Feb 20, 2024

@ubfx a couple of things:

  1. I don't think we need to include the blackbox models (I think that is legacy stuff and all those issues have been resolved to my knowledge).
  2. what are the symbol files, those seem to also be blackboxes, and the testbenches? I'm not sure these are needed
  3. there are a lot of files, it might be nice to find a way to collapse this into something more manageable. (3000+ files are not that easy to review).
  4. They should be added under ('output', 'rtl', 'verilog')

@ubfx ubfx marked this pull request as ready for review March 2, 2024 16:19
@ubfx
Copy link
Contributor Author

ubfx commented Mar 2, 2024

@gadfort Thank you for the pointers.
I removed all the unnecessary files. However, I think we still need two versions of every cell, the ones with power ports and the ones without. Having two different files and two different keypaths ('rtl', 'verilog' and 'rtlpower', 'verilog') seems a little cumbersome though; so I implemented it by means of a ifdef structure.

@ubfx
Copy link
Contributor Author

ubfx commented Mar 4, 2024

I realized that OpenPDKs already provides a merged version of the model files, using a similar ifdef structure, so I moved over to using theirs instead of using our own merge-script. While the OpenPDK version might be a little worse to read because the license is replicated N times within the file, I think it's still better than adding another slightly different merged version of these files. Also it keeps the names of the Verilog defines (USE_POWER_PINS and FUNCTIONAL) consistent between lambdapdk and OpenPDKs.

Copy link
Contributor

@gadfort gadfort left a comment

Choose a reason for hiding this comment

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

Look good, just needs the commit hash and it should be good to merge

lambdapdk/sky130/libs/sky130hd/verilog/primitives.v Outdated Show resolved Hide resolved
Copy link
Contributor

@gadfort gadfort left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

@gadfort gadfort merged commit c679eb1 into siliconcompiler:main Mar 5, 2024
3 checks passed
@ubfx ubfx deleted the add-sky130-vlog-models branch March 5, 2024 15:34
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.

Verilog models
2 participants