Skip to content

Add generator for bin based plots for FETs - #237

Open
glatosinski wants to merge 22 commits into
google:mainfrom
antmicro:200-generate-bin-plots
Open

Add generator for bin based plots for FETs#237
glatosinski wants to merge 22 commits into
google:mainfrom
antmicro:200-generate-bin-plots

Conversation

@glatosinski

Copy link
Copy Markdown

Addresses #200

The scripts generate bin based plots for FETs available in the sky130_fd_pr library.

@google-cla

google-cla Bot commented Nov 12, 2020

Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@glatosinski

Copy link
Copy Markdown
Author

@googlebot I signed it!

@glatosinski

Copy link
Copy Markdown
Author

My question is - what should be done when there are lots of combinations of W and L parameters? Should I introduce some steps for those values, or limits? We could possibly make some custom legend so it would fit into the plot, but still the plot lines would overlap heavily in some places.

sim_pfet_01v8_lvt__fT

@mithro

mithro commented Nov 13, 2020

Copy link
Copy Markdown
Contributor

My question is - what should be done when there are lots of combinations of W and L parameters? Should I introduce some steps for those values, or limits? We could possibly make some custom legend so it would fit into the plot, but still the plot lines would overlap heavily in some places.

It seems like grouping the plots for different W values (1.0, 3.0, 5.0, 7.0) might work?

You should ask on the #analog-design channel on slack about what people would find most useful

@yrrapt

yrrapt commented Nov 14, 2020

Copy link
Copy Markdown

According to the gm/Id theory you only need to do the plot for one width because you're looking for the current density, drain current/width. So you would sweep the current density for each length to get the plots.

That's the theory anyway, it falls over at the extremes but for the central regions of Id/W it should hold true.

@glatosinski
glatosinski force-pushed the 200-generate-bin-plots branch from f33e589 to 5ea58cd Compare November 16, 2020 14:29
@glatosinski

Copy link
Copy Markdown
Author

I added grouping plots for the different W values. There is also a possibility to explicitly tell what W values should be considered for plots (in --only-w parameter in https://github.com/antmicro/skywater-pdk/blob/200-generate-bin-plots/scripts/python-skywater-pdk/skywater_pdk/fet_simulator/fet_simulator.py or in https://github.com/antmicro/skywater-pdk/blob/200-generate-bin-plots/scripts/python-skywater-pdk/skywater_pdk/fet_simulator/generate-docs-plots.py, where None values should be replaced by a list of desired W values).

I also moved legend outside the plot so it does not cover title or plots:

sim_nfet_01v8__fT_W3_0

During generation of FET plots it turned out that for some bins.csv files the content is invalid, e.g. for https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr/+/refs/heads/master/cells/nfet_20v0_nvt_iso/sky130_fd_pr__nfet_20v0_nvt_iso.bins.csv we have:

device,bin,W,L
model corner
,0,30.0,1.0

instead of

device,bin,W,L
sky130_fd_pr__nfet_20v0_nvt_iso,0,30.0,1.0

This occurs for:
https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr/+/refs/heads/master/cells/nfet_20v0_nvt_iso/sky130_fd_pr__nfet_20v0_nvt_iso.bins.csv
https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr/+/refs/heads/master/cells/nfet_20v0_nvt/sky130_fd_pr__nfet_20v0_nvt.bins.csv
https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr/+/refs/heads/master/cells/nfet_20v0_nvt_iso/sky130_fd_pr__nfet_20v0_nvt_iso.bins.csv
https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_fd_pr/+/refs/heads/master/cells/nfet_20v0_zvt/sky130_fd_pr__nfet_20v0_zvt.bins.csv

Later, the bins.csv files are missing for nfet_20v0 and nfet_g11v0d16v0 cells - should I use some default values of bin, W and L in such scenarios?

In the end, the PySpice ends successfully but does not provide values for gm_id, id_W, ft and gm_gds for the simulation of pfet_20v0 and pfet_g5v0d16v0 cells.

@mithro

mithro commented Nov 16, 2020

Copy link
Copy Markdown
Contributor

@glatosinski - Please log bugs for those other issues.

@mithro mithro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The plots don't seem to be included in the documentation anywhere?

Comment thread scripts/python-skywater-pdk/skywater_pdk/fet_simulator/fet_simulator.py Outdated
Comment thread scripts/python-skywater-pdk/skywater_pdk/fet_simulator/generate-docs-plots.py Outdated
Comment thread scripts/python-skywater-pdk/skywater_pdk/fet_simulator/generate-docs-plots.py Outdated
@glatosinski

Copy link
Copy Markdown
Author

The plots don't seem to be included in the documentation anywhere?

I am not sure what is the final destination for those generated files - should they end up in corresponding FET directories in docs/rules/device-details, or in some separate repository for intermediate results?

@tclarke

tclarke commented Nov 16, 2020

Copy link
Copy Markdown

Is this working with the rf_* fet models? When I wrote the original, it did not because these models are actually subcircuits with multiple FETs so you can't get a gm from an internal parameter and likely will have to calculate from the Vgg and Iout. Are gm values composable? (can we combine the individual gm values in the constituent fets?)

@glatosinski
glatosinski requested a review from mithro November 19, 2020 13:24
Comment thread requirements.txt Outdated
Comment thread scripts/python-skywater-pdk/skywater_pdk/fet_simulator/fet_simulator.py Outdated
Comment thread scripts/python-skywater-pdk/skywater_pdk/fet_simulator/fet_simulator.py Outdated
@glatosinski
glatosinski force-pushed the 200-generate-bin-plots branch 2 times, most recently from 9e9a501 to a5613c5 Compare November 25, 2020 09:58
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
@glatosinski
glatosinski force-pushed the 200-generate-bin-plots branch from 7ec0dca to 0a20798 Compare November 25, 2020 18:23
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
Signed-off-by: Grzegorz Latosinski <glatosinski@antmicro.com>
@glatosinski
glatosinski force-pushed the 200-generate-bin-plots branch from 0a20798 to a512ddf Compare November 25, 2020 18:29
@glatosinski
glatosinski requested a review from mithro November 25, 2020 18:30
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.

4 participants