{"id":1569,"date":"2025-08-30T17:36:25","date_gmt":"2025-08-30T15:36:25","guid":{"rendered":"https:\/\/blog.the-leviathan.ch\/?p=1569"},"modified":"2025-08-30T17:45:31","modified_gmt":"2025-08-30T15:45:31","slug":"librepdk-ihp-sg13g2-support","status":"publish","type":"post","link":"https:\/\/blog.the-leviathan.ch\/?p=1569","title":{"rendered":"LibrePDK: IHP SG13G2 support"},"content":{"rendered":"\n<p>During the past couple of weeks, I&#8217;ve been fighting not only with a constantly changing API of GDS Factory, and its decrease in performance due to it now spinning up a frigging KLayout instance in the backend, because who needs simple geometry libs when you can load an entire Qt toolchain into the RAM in the background, right?<\/p>\n\n\n\n<p>After lots of cursing and questioning my life choices which led to me being confronted with such a mess, I finally managed the pipeline here, spit out GDS2 files with correctly rendered meander resistors, strip resistors, capacitors and single gate transistors, finally passing the design rule checks for the various processes once again, and actually looking OK: <a href=\"https:\/\/gitlab.libresilicon.com\/generator-tools\/danube-river\/-\/pipelines\/155\">https:\/\/gitlab.libresilicon.com\/generator-tools\/danube-river\/-\/pipelines\/155<\/a><\/p>\n\n\n\n<p>Now LibrePDK properly takes the enclosure design rules into account again, when it comes to active areas within deep oxide regions, respectively the wells.<\/p>\n\n\n\n<p>The technology files can be found in our repository here, adding gate extension was needed for LibrePDK to generate FETs uniformly without DRC violations: <a href=\"https:\/\/gitlab.libresilicon.com\/generator-tools\/librepdk\/-\/tree\/master\/LibrePDK\/technologies?ref_type=heads\">https:\/\/gitlab.libresilicon.com\/generator-tools\/librepdk\/-\/tree\/master\/LibrePDK\/technologies?ref_type=heads<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"849\" height=\"801\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image.png\" alt=\"\" class=\"wp-image-1572\" srcset=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image.png 849w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-300x283.png 300w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-768x725.png 768w\" sizes=\"auto, (max-width: 849px) 100vw, 849px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>In addition we now also take into consideration the design rule for the gate length extension over the active area, which for SG13G2 is a hard rule.<\/p>\n\n\n\n<p>The resistors and via strip taps were out of whack after the very last GDS Factory changes. Keeping up with their API changes is like a game of whack a mole.<\/p>\n\n\n\n<p>You can download the most recent Danube River GDS2 files from the pipeline artifacts.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><a href=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"615\" height=\"367\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-1.png\" alt=\"\" class=\"wp-image-1573\" srcset=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-1.png 615w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-1-300x179.png 300w\" sizes=\"auto, (max-width: 615px) 100vw, 615px\" \/><\/a><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"414\" src=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2-1024x414.png\" alt=\"\" class=\"wp-image-1574\" srcset=\"https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2-1024x414.png 1024w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2-300x121.png 300w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2-768x311.png 768w, https:\/\/blog.the-leviathan.ch\/wp-content\/uploads\/2025\/08\/image-2.png 1521w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>After that you can run klayout from within our Docker image and open the GDS2 file (this command line is meant for Linux)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker pull leviathanch\/libresilicon-tools\ndocker run -it -e DISPLAY=$DISPLAY -v \/tmp\/.X11-unix:\/tmp\/.X11-unix -v `pwd`:\/work leviathanch\/libresilicon-tools -l -c \". \/root\/env\/bin\/activate &amp;&amp; \/usr\/bin\/klayout\"<\/code><\/pre>\n\n\n\n<p>After that you can run set the technology of the wafer in <em>File > Layout Settings<\/em> and run DRC checks and so.<\/p>\n\n\n\n<p>We already have integrated the newly supported SG13G2 node by IHP into our Standard Cell Generator (<a href=\"https:\/\/gitlab.libresilicon.com\/generator-tools\/standard-cell-generator\/-\/pipelines\/152\">https:\/\/gitlab.libresilicon.com\/generator-tools\/standard-cell-generator\/-\/pipelines\/152<\/a>) but are still encountering some short circuit issues with the antenna diodes, when trying to characterize the cells being generated.<\/p>\n\n\n\n<p>This will require some more tinkering, probably even within the LCLayout code itself.<\/p>\n\n\n\n<p>At this point I&#8217;m seriously starting to consider using a genetic algorithm with Gemma 3 270M as code generator, because what I&#8217;m doing here manually is basically would a genetic algorithm would be doing automatically and much faster: Generalizing code out of design rules in order to produce device structures which work for any given DRC set.<\/p>\n\n\n\n<p>That&#8217;s exactly for what Machine Learning has been invented.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During the past couple of weeks, I&#8217;ve been fighting not only with a constantly changing API of GDS Factory, and its decrease in performance due to it now spinning up a frigging KLayout instance in the backend, because who needs simple geometry libs when you can load an entire Qt toolchain into the RAM in &hellip; <a href=\"https:\/\/blog.the-leviathan.ch\/?p=1569\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">LibrePDK: IHP SG13G2 support<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1569","post","type-post","status-publish","format-standard","hentry","category-daily"],"_links":{"self":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1569"}],"version-history":[{"count":5,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1569\/revisions"}],"predecessor-version":[{"id":1578,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=\/wp\/v2\/posts\/1569\/revisions\/1578"}],"wp:attachment":[{"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.the-leviathan.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}