Hi <@U016EM8L91B> Can you please help me to extrac...
# magic
a
Hi @Tim Edwards Can you please help me to extract the PEX (R+C) correctly for this gds!
s
@Ahmed Reda please check if this helps: https://openroad.readthedocs.io/_/downloads/en/latest/pdf/
t
Do the following:
Copy code
gds read otam
select top cell
expand
flatten otam_flat
load otam_flat
select top cell
cellname delete otam
cellname rename otam_flat otam
extract all
ext2sim labels on
ext2sim
extresist tolerance 10
extresist
ext2spice lvs
ext2spice cthresh 0
ext2spice extresist on
ext2spice
a
@Tim Edwards Excuse me. I have one question, sometimes I have to use
Copy code
cellname delete otam
cellname rename otam_flat otam
and sometime not. When I should use
cellname delete...
and
cellname rename...
?
t
It's just a convenience. Because when you use "flatten" you end up having to create a new cell with a different name, and when you extract that, you get a subcircuit with the new name, not the original name. You then either have to simulate or run LVS with the new name, or manually change it in the netlist. The commands in magic just remove the original cell and rename the flattened cell to the same name that the original one had, so that when it extracts, the subcircuit has the original cell name.
a
@Tim Edwards Also, should i use those steps for this gds !. I just have a little bit of conflict. Thank you for your patient.
@Tim Edwards Also, Does it normal to get this result ( warning , missing, error) after executing
extresist
?
t
This should work for any layout:
Copy code
!#/usr/bin/env bash
magic -dnull -noconsole << EOF
gds read $1
select top cell
expand
flatten $1_flat
load $1_flat
select top cell
cellname delete $1
cellname rename $1_flat $1
extract all
ext2sim labels on
ext2sim
extresist tolerance 10
extresist
ext2spice lvs
ext2spice cthresh 0
ext2spice extresist on
ext2spice
quit
EOF
The contact area error is something that needs to be fixed, and I haven't gotten around to fixing it, although it's a very minor error---it could potentially cause magic to miss the resistance through a contact. The missing substrate connection means that it is probably going to miss part of the substrate resistive network. I think I have a solution for this but I haven't coded it up. One workaround is to draw "pwell" in all areas that aren't covered in nwell. The missing gate connection, I will need to look at.
2
a
@Tim Edwards Thank you for your explanation.
👍 1
t
This is a good layout for hitting all the known issues in extresist. Extraction around the bipolar transistor is particularly a problem, because it is causing extresist not to handle the nets connected to the bipolar base and emitter, which are important ones for simulating parasitics. I will need to delve into the bipolar extraction a bit and see what's going on. The other problems are minor; the contact issue, as I said, may produce a small error in resistance, but that's all. The "missing connection" errors (except maybe for the bipolars) are on source-drain tied dummy devices, so while they are not connected to the right points in the power and ground nets, it won't make any noticeable difference to the simulation.
1
I think the bottom line here is: extresist will give you an answer that is better than you would get without running it, but which will be missing some net resistances and so will not be as good as it could be. But it's not going to be any better until I fix a number of known issues.
1
a
@Tim Edwards Thanks. I got it.
t
@Ahmed Reda: Please compile magic version 8.3.372 (which I just pushed) when you get the chance, and test it on this bandgap. I worked through a list of problems, including (1) handling bipolars and similar devices where one or more terminals are in different planes from the device identifier type; (2) handling MOSFETs with source and drain tied together, and (3) properly handling the entire substrate as a resistor network. (1) and (2) were pretty clean fixes. (3) produces an ugly mess of the substrate which I assume is correct, but which may or may not give the SPICE simulator fits. Please give it a try in simulation. I am going to look into options for "extresist" that exclude or simplify the power rails, and check if there is a way to do more aggressive network simplification on the substrate network.