-
Notifications
You must be signed in to change notification settings - Fork 120
Complete set of device generation scripts for magic #724
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
Conversation
Added scripts to magic for generated devices, as well as an overhaul of the tech file to split it into multiple files. The generated devices have also been split into multiple files with one file per device class. Certain devices that have fixed layout are kept as a Tcl script of magic commands which build the cell. The magicrc startup file now sources the generated devices.
|
This pull request comprises the work I have done over the past three months. All devices have generation scripts in magic and are done to my ability to make them complete. There are some questions remaining about what the syntax of CDL format is supposed to be. The Schottky diode may be incomplete as I only noticed today the pull request that adds the Schottky model. But I still have a week to finish things up, according to plan. I will put this in draft mode while I prepare some tests and documentation. An initial review would be helpful. There were about a dozen commits to this repo, but I had difficulty in attempting to rebase and ended up just cloning a fresh version of dev and copying all my work into it, and committing that. Notice that the original branch was called "gencell_devel" but is now "magic_gencells". I will add my original commit notes to my release notes. |
|
Hi @RTimothyEdwards, thank you for your valuable contribution to this project! |
The DRC rule fixes correct issues found with the Sealring QA layout, including unrelated false positive errors for latch-up and tap geometry. The main issue with the seal ring was having the seal passivation placed on the metal7 plane, which didn't make sense in the first place. It has been moved to the "glass" plane where it belongs. Implemented missing seal.b rule. Added connectivity rules to contact across butted tap junctions (previously done by Sylvain Munaut, but doesn't appear to be in a pull request anywhere that I can find). Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
arriving at a solution that is DRC clean when viewed in magic. Also: Corrected some rules around the substrate contacts, guard rings, and well structures available from the device menu. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
the DRC on a full-chip design. Moved the fill poly to its own plane so that it can overlap fill active without issues. Added a missing copy-up method for tap devices that does the same thing as for non-device taps. Corrected a few other minor errors. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
false-positive errors. The issue in magic that caused the false- positive errors has been fixed (in magic version 8.3.571), so the rule is being reinstated. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
that allows the maxwidth rule for top metal to be excluded on pads, pillars, and solder bumps. This tech file now requires the most recent version of magic to be parsed correctly (version 8.3.571). Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
incorrectly changed to output emitter width and length (matching the NPNs) but should have kept outputting emitter area and perimeter. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
additional notes in the README and RELEASE_NOTES files. Changed version numbers on the technology files to 1.0.0 for official release. There is some remaining work to be done to update to changes from IHP that are currently in pull requests but have not yet been merged into the dev branch. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
|
@sergeiandreyev @KrzysztofHerman : I have taken the pull request out of draft mode; it is ready for review and merge. |
|
@RTimothyEdwards We've been working on testing the lvs extraction mode of the tech file and have come across some issues. These issues are not just with the magic tech file, but the CDL definitions, klayout, and xschem models also. We're working on test cases based on previously taped out designs. Here's a sample of bipolar devices that don't extract. testcase_IHP-Open-PDK-PR724.tar.gz CC: @H-Ojiro |
|
@sergeiandreyev @KrzysztofHerman @H-Ojiro and I have been reviewing, testing and comparing the magic tech file, klayout LVS rules, Laker CDL documentation, ngspice models, xschem primitive devices, and the online LVS documentation for sg13g2 here. We'd like to help verify and clarify the interoperability of these systems. We could start a new issue, a discussion, or somewhere else. Where would be the best place to do that? Maybe we could start a discussion where the main topic would be a continually updated section that contains the status of each device with explanations of discrepancies and links to individual issues and pull requests. Here's a sample #738. |
|
@RTimothyEdwards the klayout lvs rules have data for a unit test suite here. Would you like us to attempt to use this data to implement a regression test for the magic/netgen flow also? There's also a test suite for the standard cells. |
|
@d-m-bailey : Yes, definitely. |
|
I have been testing this with my LDO design from https://github.com/rjordans/TO_Sep2025/tree/main/FLDO/design_data/mag In Klayout I get a bunch of TGO.a DRC errors on the thick oxide expansion. It needs to be at least 0.27 um, magic now has a bloat-or to extend it to 0.185 um. The below change fixes the problem: |
Corrected the thick gate oxide (THKOX) layer amount surrounding diffusion in the magic cifoutput tech file ihp-sg13g2-cifout.tech, following the fix provided by Roel Jordans in the comments to pull request IHP-GmbH#724.
|
@rjordans : Fixed, thanks for the diff. |
|
@RTimothyEdwards
The README in the attached file has more details. testcase-ihp-magic-netgen-cells.tgz I think the tech file is missing DigiSub 60/0. This layer is like the SUBCUT layer, except for digital circuits. See the discussion here. #648 There is a modified tech file that passes the tests included. However, it doesn't handle cifout for DigiSub, so shouldn't be used as is. @sergeiandreyev @KrzysztofHerman
|
|
@RTimothyEdwards @sergeiandreyev @KrzysztofHerman Starting a discussion about the differences between the klayout and magic extraction of klayout In this update of the magic technology file, with or without text, all ntaps in deep nwell I believe there have been discussions of the necessity of One solution to the difference in extraction would be to use a new recognition layer instead of text. Any taps inside the recognition layer would be extracted as @H-Ojiro Thanks again for the analysis on this. |
|
It is difficult to impossible to specify an R value for the ptap anyway. Is that supposed to include just the R value of the tap? The contact as well? The diffusion around it? The entire well or substrate network? That's a job for parasitic extraction. Certainly the designer drawing a schematic will have no idea what the R value is, making it useless for LVS purposes. And yes, magic does not have an extraction method based on text stamping. Probably it could be added without much effort. It should only require searching all labels and then including all the material the label is attached to. Currently, magic is identifying ptaps as devices only during "lvs"-style extraction, and only when the "substrate" layer is present. Likewise for ntaps, if deep nwell is present. I do not know how valid that is. The PDK documentation does not say how to identify a ptap or ntap device. The libraries are inconsistent---The I/O library CDL has ptaps but not ntaps. |
|
@RTimothyEdwards I agree with you on not being able to specify an The "official" definitions of the For example, |
|
@d-m-bailey : "However, setting W and L values should be pretty straightforward, don't you think?"---Not at all! What is the W and L of a tap ring? Unless you make the tap a simple rectangle, only area and perimeter make sense and are measurable. Even in the I/O cell, there's a single tap in the CDL netlist which corresponds to multiple shapes in the layout. It does not pass LVS, because the L and W given for the device seem to be pulled out of thin air. |
I guess I didn't think that through. For resistor and capacitors, there's a new derive function that allows the calculation of area and perimeter from length and width, right? Using the quadratic formula where a=2, b=-P, and c=2A Doesn't quite work for closed loops though. For width=2 length=40 (10x10 square loop) the formula gives L=37.9 and W=2.1 which is within 10%. More error for shorted length and wider width. |
|
There are plenty of non-real solutions to the quadratic equation. But have you looked at the subcircuit model for the taps? That is, the simulation model doesn't even use W and L. |
Yes, for an arbitrary quadratic equation, there may be non-real solutions.
Yes, I did see the ngspice subcircuit model for the taps. I may be wrong, but I don't think the intention was to have an accurate resistance for simulation. I think the intention was to have an LVS verifiable tap shape ( I apologize if I'm assuming or suggesting too much. |
|
Just checking in on what's the status of merging this PR? |
|
Hi @KrzysztofHerman, could you please take care? |
Corrected the thick gate oxide (THKOX) layer amount surrounding diffusion in the magic cifoutput tech file ihp-sg13g2-cifout.tech, following the fix provided by Roel Jordans in the comments to pull request IHP-GmbH#724.
3a36b5b to
bfa5c8f
Compare
"ngspice(lvs)" extraction to output the wrong number of resistance classes to the .ext file. This has no impact other than magic printing lots of warning messages when doing a layout extraction. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
revision 572 to revision 573, since revision 572 introduced an error in the DRC checker that can produce false positive errors, and which was fixed in version 573. Signed-off-by: R. Timothy Edwards <tim@opencircuitdesign.com>
Corrected the thick gate oxide (THKOX) layer amount surrounding diffusion in the magic cifoutput tech file ihp-sg13g2-cifout.tech, following the fix provided by Roel Jordans in the comments to pull request IHP-GmbH#724.
Made a correction to pSD mask generation which avoids a problem with pSD being merged across a narrow n-tap strip.
bfa5c8f to
9e66732
Compare
|
Hi @KrzysztofHerman, it would be great if this could be merged. It's blocking librelane/librelane#832 and librelane/librelane#837. |
Added scripts to magic for generated devices, as well as an overhaul of the tech file to split it into
multiple files. The generated devices have also been split into multiple files with one file per device class. Certain devices that have fixed layout are kept as a Tcl script of magic commands which build the cell. The magicrc startup file now sources the generated devices.
Fixes #<issue_number_goes_here>