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

Feature request: Add nmos3 / pmos3 symbols #389

Open
smunaut opened this issue Mar 8, 2025 · 6 comments
Open

Feature request: Add nmos3 / pmos3 symbols #389

smunaut opened this issue Mar 8, 2025 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@smunaut
Copy link
Contributor

smunaut commented Mar 8, 2025

Those variant were in sky130 where the bulk connection is set by a property rather than a wire/port. It was so convenient to keep schematics clean, I'd love to see them for SG13G2 too.

@KrzysztofHerman KrzysztofHerman self-assigned this Mar 10, 2025
@KrzysztofHerman KrzysztofHerman added the enhancement New feature or request label Mar 10, 2025
@KrzysztofHerman
Copy link
Contributor

@smunaut thank you for this observation. Indeed we could provide this having two options GND/sub! for the bulk pin. Right now we are focused on bug fixing so we will take some time to do so. If you are willing to provide such symbols we will be happy to accept your PR.

@hpretl
Copy link
Contributor

hpretl commented Mar 10, 2025

@KrzysztofHerman If this is implemented (and I think this would be good to have) then please make the bulk node user-specific, like adding an additional property like $W$ and $L$ (for sure Xschem has a way to nicely set this @StefanSchippers). As a circuit designer I do not want to be forced to name a VDD/VSS net for bulks a specific way.

@KrzysztofHerman
Copy link
Contributor

@hpretl
We could provide something like this:

lvs_format="@spiceprefix@name @pinlist @body @model l=@l w=@w ng=@ng m=@m"
format="@spiceprefix@name @pinlist @body @model w=@w l=@l ng=@ng m=@m"
template="name=M1
l=0.45u
w=1.0u
ng=1
m=1
body=GND
model=sg13_lv_nmos
spiceprefix=X
"

This way you could specify either is a GND, VSS, VDD, sub! or any other net you wish to use.

@smunaut
Copy link
Contributor Author

smunaut commented Mar 11, 2025

Yeah, that's exactly what I had in mind.
I was waiting for the nmos direction pr to be merged and then try and make the various nmos3/pmos3 symbols following that scheme.
(I'll just need to move some of the annotations to make room to show the body net)

@StefanSchippers
Copy link

StefanSchippers commented Mar 11, 2025

These devices are done in sky130 with the names of nfet3_*.sym and pfet3_*.sym.

The body terminal is specified ( as written by @hpretl ) with a body attribute (like body=GND or body=VCCA).
Within the symbol add @body after @pinlist (@pinlist only shows drain, gate, source terminals)
format="@spiceprefix@name @pinlist @body sky130_fd_pr__@model L=@L W=@W
Also add a @body text element (and set it to layer 1, wire) in the symbol to show visually what the body node is. This is important to avoid fatal mistakes. The template string should have some body=GND default value for n-channel devices and body=VCC (or body=VDD or similar) for pmos devices.

Image

@hpretl
Copy link
Contributor

hpretl commented Mar 11, 2025

Yes, using a property and showing the value on the symbol is precisely how I think it should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants