Hello all, I've been trying to figure out what is ...
# analog-design
j
Hello all, I've been trying to figure out what is currently known about how to design inductors in SKY130. We found a reference in the PDK where inductor elements are mentioned (https://skywater-pdk.readthedocs.io/en/main/rules/layers.html), but apparently the PDK doesn't contain any models for it. Then some comments from @Tim Edwards in Slack say that there are no characterized devices. I also read that @Amro Tork taped out some test structures in MPW1, I couldn't find more info on this. Did anyone study this topic in SKY130 and can provide some help/guidance?
βœ… 1
🌍 1
l
All I can say about this is this: it's complicated... No, there's no PDK inductor model (as far as I know), and no "official" inductor Pcell (again, as far as I know). I've been using @Amro Tork’s Pcell generator (google mabrains pcell generator) and running EM simulations on the layouts.
j
I see, thanks @Leonardo Gomes for sharing this what software do you use for EM simulation? do you need accurate parameters for the material structures and stuff like this? I guess you just make some assumptions and estimations...
πŸ‘ 3
l
I'm also using ASITIC to speed up inductor design. It has an equivalent pi model extractor that's quite accurate. But, the model is narrow band, and a more complete model would require some parametric fitting of the S parameters. A bit of work, indeed πŸ˜…
For now I'm using commercial tools for "benchmarking", but my team is working on a human-friendly way to use openEMS to design passive structures in the sky130 back-end. The data from the open DRM is quite complete, aside from a misplaced via resistance in the parasitic extraction rules (they traded MCON for LICON). I've been able to build the BEOL stack within the simulators (commercial and openEMS) and run the simulations I needed. And, yes, I kind of need precise data, as I'm working at 60 GHz. Mm-waves can (and will) trick the designer :)
j
@Leonardo Gomes it'd be great to use this openEMS flow you guys are implementing, so don't hesitate to let us know if you need beta testers, we are really looking forward to learn these kind of things (even if we are woking on DCDC and our operating frequencies are much more modest)
πŸ‘ 1
l
As soon as we have it running we're going to post a tutorial πŸ™‚
πŸ‘ 4
y
@Leonardo Gomes I spent some time with openems but I could never get satisfactory results. The reported impedances didn't make sense based on simple comparisons. I would be very interested to see your method once you are in a position to publish it. Due to the lack of reliable results I moved to ASITIC to design the two inductors on MPW2. I'm looking forward to testing their performance if the samples ever arrive
πŸ‘ 1
g
Hi all! Very interesting to see some progress on that front. I strongly agree, that openEMS is suitable for mmWave passives, as the frequencies are so high / broadband. This is where FDTD becomes more efficient. But it will take quite some time if you only simulate close to DC / up to a few GHz. Have you also used other EM-tools for rough calculations? For a widely useful EM setup, a fast FEM/MoM/FMM (maybe like PumaEM or even FastHenry) combined with OpenEMS would be quite useful.
πŸ‘ 1
a
@Leonardo Gomes I'm really thrilled to hear that and waiting for the outcome of your work
πŸ‘ 1
Also please try to use meep if you can
l
@yrrapt I remember you told me so once. We decided to use openEMS because it's the EM solver that has the most, and better-available, interfaces. Both for the user and the input file. We're using a freecad-based export script to generate the openEMS input, and it has a GUI that helps visualizing the mesh. There's also an effort to use that freecad fastHenry workbench to run parasitic extraction from an imported layout file.
βœ… 1
πŸ‘ 1
@Georg Zachl yes, there are other solvers, and someone used elmerFEM to simulate a custom capacitor for an ADC for mpw-6 (https://github.com/chrische-xx/mpw6#dac). But I confess I didn't have enough time to check their files/code. Seems interesting to try too.
@Amro Tork first things first hehehe Thank you for your support :)
a
@Leonardo Gomes One of the main advantages of Meep that you don't need to create the 3D reconstruction from GDS. You have to do that if you gonna use OpenEMS. Meep should read GDS files directly given the stack definition like the commercial tool
@Leonardo Gomes basically it lowers your barrier of entry
It should save you time
Anyhow if you used OpenEMS, will you make the the GDS to 3D format that is readable by OpenEMS generic to work with any layout?
If you made this script, please share with us.
g
@Amro Tork But, AFAIK, meep only supports meshes with constant distance, which probably forces you to discretize a huge, unpopulated area with the same resolution like the metal structures. This is can greatly increase the complexity of your calculation and memory requirements.
y
@Leonardo Gomes yeah I'm all for that, if you can get it to work it's a good choice. Especially if you have access to industry standard tools to cross reference
a
@Georg Zachl I have to admit at the time I was researching this, I was looking for the ease of usage not the speed and performance. I didn't check that with Meep. Meep had a much lower barrier for entry because it can read GDS automatically.
I know OpenEMS is better solver, if we can take the GDS reading part from Meep and combine it to OpenEMS for simulation that would be the best.
@yrrapt I remember you worked on this. Were you able to make GDS reading generic?
g
Oh, but I see, I was not looking for GDS import, but this makes perfectly sense to use meep then.
❀️ 1
πŸ‘ 1
y
@Amro Tork I didn't make a gds importer. I made a python script that generates the geometry and mesh for openems. Then the idea was the script would also create an output gds but I never got that far
a
Thanks @yrrapt. You went the other direction. From 3D to GDS. Is it constant or parameteric?
🌍 1
@yrrapt Could you please share?
y
@Amro Tork here's the file https://github.com/yrrapt/inductor-generator/blob/main/openems/test.py This uses the pyems package that I extended to create an inductor generator (my fork is here: https://github.com/yrrapt/pyems) But I had to just drop it and move on to other methods in order to make the MPW deadline so I code as published on GitHub probably doesn't work "out of the box" and is quite messy as I was still in the proof of concept phase
πŸ‘ 2
l
@yrrapt I'd like to start learning some python scripting to (try to fiddle with) convert(ing) a gds layout to a fastHenry / fastCap friendly file. Do you know where could I start, or what libraries would I need to get started? I'm a complete noob in python πŸ˜…
y
@Leonardo Gomes I used gdspy a couple of years ago for a project and it was pretty good although the data structure was a bit confusing at first. I know @proppy has been doing some interesting stuff with gdsfactory more recently so that is probably a good place to start
p
I'm still fighting into figuring out how to map gdsfactory port to the spice's one
it does the "drawing" with gdsfactory+sky130 pdk and attempt the extract the spice model with magic
but it seems that I'm missing the
magic
-fu necessary to instanciate the "port" on top on the corresponding gdsfactory rectangle
I also wasn't clear if
port
where actually saved as such in the gds, or if those were just basically label than
ext2spice
used to map actual subcircuit element of the spice model
t
@proppy: To get a port read into magic from GDS you need an overlaid combination of a GDS metal layer plus the corresponding GDS pin purpose layer. If you don't have that combination, it's not a port.
p
yep, I figured gdsfactory was missing some things (since it has been more much used for photonics than for silicon)
I did try to find the right incantation of magic command, to select one of the rectangle and create a label + port for it but without much success
t
Not necessarily. I would assume that there is are layers
diffpin
and
polypin
corresponding to the pin purpose. There is also presumably a command to write text in GDS in gdsfactory.
p
things like
Copy code
read somelabel
edit
port make 1
t
I would suppose that doing the label in gdsfactory is more straightforward than trying to post-annotate the GDS layout in magic. But the commands (after appropriately positioning the cursor box) would be something like
label GATE ; select area label ; port make
p
@Tim Edwards that makes sense, I'll dig more. Looks like it's using a module called https://github.com/amccaugh/phidl under the hood
ah maybe the
select area label
is the thing I was missing!
t
Either that or just create all the labels you want and then do
port makeall
to turn all labels into ports. But you probably want more control over the ordering of the ports.
p
port make 1
to control the ordering in the subcircuit
the goal is the basically have another version of that notebook that also python for the drawing part.
t
Yes. For that, you do want to select the label after you create it, and that should be the only thing you're missing.
From the link to
phidl
, it does look like it only handles pure mask geometry, not text other than drawing text in physical metal layers.
Copy code
Moving label "source" from space to pwell in cell source.
Moving label "drain" from space to pwell in cell drain.
Moving label "gate" from space to poly in cell gate.
Extracting gate into gate.ext:
Extracting drain into drain.ext:
Extracting source into source.ext:
Extracting mosfet_gdsfactory into mosfet_gdsfactory.ext:
mosfet_gdsfactory: 2 errors
exttospice finished.
CIF file read warning: CIF style sky130(vendor): units rescaled by factor of 5 / 1
CIF file read warning: Input off lambda grid by 3/5; snapped to grid.
freeMagic called with NULL argument.
Total of 2 errors (check feedback entries).
some promising messages about moving label between layers πŸ˜›
but not to the right ones!
(i.e: I think it should be ndiff, not pwell)
t
If the label is not going to the right layer, then you may have put the box over the wrong spot; make sure you use physical dimensions to place the box (e.g.,
box position 1um 2um
) so you don't have to convert to magic's internal units.
Otherwise, if you have the box over the right spot but it wants to connect to the wrong layer, then specify the layer in the label command:
label GATE c ndiff
(the argument before the layer is the text alignment;
c
for "center").
p
oh, thanks for the tip
for positioning the box, I was assuming that doing
load cellname; select
would position the box to the right place (i.e: above the cell)
t
Almost. For that, you want
load <cellname>; select top cell
.
However, that positions the box to match the bounding box of the entire cell, whereas for a label you want to position a box, preferably zero size, directly on top of the piece of geometry you want to label.
p
oh I see, I create those cell so that they serve as port so maybe I should just make them smaller
t
A cell cannot serve as a port, though. If you have a label in the cell then that label is a port of the cell it's in.
p
oh that make sense, so I could do something like
load <fakecell; select top cell; load <realcell>; edit; label <portname>; select area label; port make
?
t
Are you placing the fake cell where you want the label to go? In that case what you want is
load <realcell>; select cell <fakecell_instance_name>; label <portname>; select area label; port make <number>
p
yep, it doesn't seems that
select cell <fakecell_instance_name>
work (it fails w/
Couldn't find a cell use named "source"
) while I do see it in the list of cell read from the gds
Reading "source".
I suspect that's because the cell is defined, but not instanciated?
t
If it says
reading "source"
, then that's the name of the cell, not the name of the instance. If the instance name hasn't been defined in the GDS, then in magic it would default to
source_0
.
select top cell ;  select area subcell ; what
will tell you what all the subcells are in a layout, and their instance names.
p
I'm running w/
-dnull -noconsole
so I suspect some of the output get sent to /dev/null
is there a way to redirect all output to stdout?
t
-dnull
merely means no graphics, and
-noconsole
means don't use the Tk console, so output is, in fact, directed to the terminal stdout/stderr.
p
oh ok, then there must be some other reason I don't see any output with
what
oh I see something now!
Copy code
Selected subcell(s):
    Instance "Topmost cell in the window" of cell "mosfet_gdsfactory"
bingo! thanks πŸ™‚
Copy code
Selected subcell(s):
    Instance "ndiff_cell_0" of cell "ndiff_cell"
    Instance "poly_cell_0" of cell "poly_cell"
    Instance "source_0" of cell "source"
    Instance "drain_0" of cell "drain"
    Instance "gate_0" of cell "gate"
Looks like I may need to delete the dummy cells
Exactly one label may be present under the cursor box.
Copy code
Use "port <name> ..." to specify a unique port.
j
@Vicente Andrade take a look to the first few messages in this thread for context on inductance modeling
a
I have installed meep at ubuntu virtual machine but I didn't know how to run it can anyone help me ?
j
@Vicente Ramirez fyi