From 947026ccedf844efc0de756de9cb846d0e60c27d Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 14 Jul 2023 12:33:03 +0200 Subject: [PATCH] Add technology description for the new LSxLib symbolic layout. --- .../python/technos/symbolic/lcmos/__init__.py | 42 ++ .../python/technos/symbolic/lcmos/alliance.py | 56 +++ .../python/technos/symbolic/lcmos/analog.py | 20 + .../python/technos/symbolic/lcmos/display.py | 474 ++++++++++++++++++ .../python/technos/symbolic/lcmos/etesian.py | 20 + crlcore/python/technos/symbolic/lcmos/kite.py | 194 +++++++ crlcore/python/technos/symbolic/lcmos/misc.py | 20 + .../python/technos/symbolic/lcmos/patterns.py | 20 + .../python/technos/symbolic/lcmos/plugins.py | 32 ++ .../python/technos/symbolic/lcmos/stratus1.py | 26 + .../technos/symbolic/lcmos/technology.py | 401 +++++++++++++++ cumulus/src/designflow/technos.py | 40 ++ 12 files changed, 1345 insertions(+) create mode 100644 crlcore/python/technos/symbolic/lcmos/__init__.py create mode 100644 crlcore/python/technos/symbolic/lcmos/alliance.py create mode 100644 crlcore/python/technos/symbolic/lcmos/analog.py create mode 100644 crlcore/python/technos/symbolic/lcmos/display.py create mode 100644 crlcore/python/technos/symbolic/lcmos/etesian.py create mode 100644 crlcore/python/technos/symbolic/lcmos/kite.py create mode 100644 crlcore/python/technos/symbolic/lcmos/misc.py create mode 100644 crlcore/python/technos/symbolic/lcmos/patterns.py create mode 100644 crlcore/python/technos/symbolic/lcmos/plugins.py create mode 100644 crlcore/python/technos/symbolic/lcmos/stratus1.py create mode 100644 crlcore/python/technos/symbolic/lcmos/technology.py diff --git a/crlcore/python/technos/symbolic/lcmos/__init__.py b/crlcore/python/technos/symbolic/lcmos/__init__.py new file mode 100644 index 00000000..2d93eb4f --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/__init__.py @@ -0,0 +1,42 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/__init__.py" | +# +-----------------------------------------------------------------+ + + +import coriolis.Cfg as Cfg +from coriolis.helpers import truncPath, tagConfModules +from coriolis.helpers.io import vprint +vprint( 1, ' o Loading "symbolic.lcmos" technology.' ) +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from coriolis.Hurricane import DataBase +from coriolis.CRL import System + +Cfg.Configuration.pushDefaultPriority( Cfg.Parameter.Priority.ConfigurationFile ) + +if not DataBase.getDB(): DataBase.create() +System.get() + +from . import misc +from . import technology +from . import display +from . import analog +from . import alliance +from . import etesian +from . import kite +from . import plugins +from . import stratus1 + +Cfg.Configuration.popDefaultPriority() + +tagConfModules() diff --git a/crlcore/python/technos/symbolic/lcmos/alliance.py b/crlcore/python/technos/symbolic/lcmos/alliance.py new file mode 100644 index 00000000..29c87707 --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/alliance.py @@ -0,0 +1,56 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/alliance.py" | +# +-----------------------------------------------------------------+ + + +import os +import os.path +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "{}".'.format(truncPath(__file__)) ) + +from coriolis.CRL import Environment, AllianceFramework + +allianceTop = None +if 'ALLIANCE_TOP' in os.environ: + allianceTop = os.environ['ALLIANCE_TOP'] + if not os.path.isdir(allianceTop): + allianceTop = None +if not allianceTop: allianceTop = '/soc/alliance' + +cellsTop = allianceTop+'/cells' +af = AllianceFramework.get() +env = af.getEnvironment() + +env.setSCALE_X ( 100 ) +env.setCATALOG ( 'CATAL' ) +env.setIN_LO ( 'vst' ) +env.setIN_PH ( 'ap' ) +env.setOUT_LO ( 'vst' ) +env.setOUT_PH ( 'ap' ) +env.setPOWER ( 'vdd' ) +env.setGROUND ( 'vss' ) +env.setCLOCK ( '.*ck.*|.*nck.*' ) +env.setBLOCKAGE ( 'blockage[Nn]et.*' ) +env.setPad ( '.*_px$' ) +env.setRegister ( 'sff.*' ) + +env.setWORKING_LIBRARY( '.' ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/sxlib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/dp_sxlib', mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/ramlib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/romlib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/rflib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/rf2lib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/pxlib' , mode=Environment.Append ) +env.addSYSTEM_LIBRARY ( library=cellsTop+'/padlib' , mode=Environment.Append ) diff --git a/crlcore/python/technos/symbolic/lcmos/analog.py b/crlcore/python/technos/symbolic/lcmos/analog.py new file mode 100644 index 00000000..a01f07fc --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/analog.py @@ -0,0 +1,20 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/analog.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import analog diff --git a/crlcore/python/technos/symbolic/lcmos/display.py b/crlcore/python/technos/symbolic/lcmos/display.py new file mode 100644 index 00000000..d8719195 --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/display.py @@ -0,0 +1,474 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/display.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +import coriolis.Cfg as Cfg +import coriolis.Viewer as Viewer +from coriolis.helpers import overlay, l, u, n +from coriolis.technos.common.colors import toRGB +from coriolis.technos.common.patterns import toHexa +vprint( 2, ' - "%s".' % truncPath(__file__) ) + + +def createStyles ( scale=1.0 ): + with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg: + cfg.viewer.minimumSize = 500 + cfg.viewer.pixelThreshold = 5 + + # ---------------------------------------------------------------------- + # Style: Alliance.Coriolis [black]. + + style = Viewer.DisplayStyle( 'Alliance.Coriolis [black]' ) + style.setDescription( 'Alliance Coriolis Look - black background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + style.addDrawingStyle( group='Viewer', name='fallback' , color=toRGB('Gray238' ), border=1, pattern='55AA55AA55AA55AA' ) + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('Gray50' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='foreground' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='rubber' , color=toRGB('192,0,192' ), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Viewer', name='phantom' , color=toRGB('Seashell4' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='boundaries' , color=toRGB('208,199,192'), border=1, pattern='0000000000000000', threshold=0 ) + style.addDrawingStyle( group='Viewer', name='marker' , color=toRGB('80,250,80' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionDraw' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionFill' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('White' ), border=1, threshold=2.0*scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('White' ), border=2, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='ghost' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('White' ), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('Black' ), border=1, threshold=4.0*scale ) + style.addDrawingStyle( group='Viewer', name='text.reference' , color=toRGB('White' ), border=1, threshold=20.0*scale ) + style.addDrawingStyle( group='Viewer', name='undef' , color=toRGB('Violet' ), border=0, pattern='2244118822441188' ) + style.addDrawingStyle( group='Viewer', name='mauka.container', color=toRGB('Magenta4' ), border=4, pattern='0000000000000000', goMatched=False ) + + # Group: Active Layer. + style.addDrawingStyle( group='Active Layer', name='nWell' , color=toRGB('Tan' ), pattern='55AA55AA55AA55AA' , threshold=1.5 *scale ) + style.addDrawingStyle( group='Active Layer', name='pWell' , color=toRGB('LightYellow'), pattern='55AA55AA55AA55AA' , threshold=1.50*scale ) + style.addDrawingStyle( group='Active Layer', name='nImplant', color=toRGB('LawnGreen' ), pattern='55AA55AA55AA55AA' , threshold=1.50*scale ) + style.addDrawingStyle( group='Active Layer', name='pImplant', color=toRGB('Yellow' ), pattern='55AA55AA55AA55AA' , threshold=1.50*scale ) + style.addDrawingStyle( group='Active Layer', name='active' , color=toRGB('White' ), pattern=toHexa('antihash1.8'), threshold=1.50*scale ) + style.addDrawingStyle( group='Active Layer', name='poly' , color=toRGB('Red' ), pattern='55AA55AA55AA55AA' , threshold=1.50*scale ) + + # Group: Routing Layer. + style.addDrawingStyle( group='Routing Layer', name='metal1' , color=toRGB('Blue' ), pattern=toHexa('poids2.8' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal2' , color=toRGB('Aqua' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal3' , color=toRGB('LightPink'), pattern=toHexa('light_antihash1.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal4' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal5' , color=toRGB('Yellow' ), pattern='1144114411441144' , threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal6' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal7' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal8' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal9' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal10', color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.02*scale ) + + # Group: Cuts (VIA holes). + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut0', color=toRGB('0,150,150'), threshold=1.50*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut1', color=toRGB('Aqua' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut2', color=toRGB('LightPink'), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut3', color=toRGB('Green' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut4', color=toRGB('Yellow' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut5', color=toRGB('Violet' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut6', color=toRGB('Violet' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut7', color=toRGB('Violet' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut8', color=toRGB('Violet' ), threshold=0.80*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut9', color=toRGB('Violet' ), threshold=0.80*scale ) + + # Group: MIM6. + style.addDrawingStyle( group='MIM6', name='metbot_r', color=toRGB('Aqua' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIM6', name='cut6' , color=toRGB('LightPink'), pattern=toHexa('light_antihash1.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIM6', name='metal7' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale ) + + # Group: Blockages. + style.addDrawingStyle( group='Blockages', name='blockage1' , color=toRGB('Blue' ), pattern='006070381c0e0703' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage2' , color=toRGB('Aqua' ), pattern='8103060c183060c0' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage3' , color=toRGB('LightPink'), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage4' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage5' , color=toRGB('Yellow' ), pattern='1144114411441144' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage6' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage7' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage8' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage9' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage10', color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + + # Group: Knik & Kite. + style.addDrawingStyle( group='Knik & Kite', name='SPL1' , color=toRGB('Red' ) ) + style.addDrawingStyle( group='Knik & Kite', name='AutoLayer' , color=toRGB('Magenta' ) ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalh' , color=toRGB('128,255,200'), pattern=toHexa('light_antihash0.8'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalv' , color=toRGB('200,200,255'), pattern=toHexa('light_antihash1.8'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gcut' , color=toRGB('255,255,190'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::Edge' , color=toRGB('255,255,190'), pattern='0000000000000000', threshold=0.02*scale, border=4 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::GCell', color=toRGB('255,0,0' ), pattern='0000000000000000', threshold=0.02*scale, border=4 ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: Alliance.Coriolis [white]. + + style = Viewer.DisplayStyle( 'Alliance.Coriolis [white]' ) + style.inheritFrom( 'Alliance.Coriolis [black]' ) + style.setDescription( 'Alliance Coriolis Look - white background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + style.addDrawingStyle( group='Viewer', name='fallback' , color=toRGB('Gray238' ), border=1, pattern='55AA55AA55AA55AA' ) + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('Gray50' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='foreground' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='rubber' , color=toRGB('192,0,192' ), border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Viewer', name='phantom' , color=toRGB('Seashell4' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='boundaries' , color=toRGB('208,199,192'), border=1, pattern='0000000000000000', threshold=0 ) + style.addDrawingStyle( group='Viewer', name='marker' , color=toRGB('80,250,80' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionDraw' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionFill' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('White' ), border=1, threshold=2.0*scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('White' ), border=2, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='ghost' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('White' ), border=1, threshold=0.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('White' ), border=1, threshold=400.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.reference', color=toRGB('White' ), border=1, threshold=200.0*scale ) + style.addDrawingStyle( group='Viewer', name='undef' , color=toRGB('Violet' ), border=0, pattern='2244118822441188' ) + + # Active Layers. + style.addDrawingStyle( group='Active Layer', name='nWell' , color=toRGB('Tan' ), pattern=toHexa('urgo.8' ), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='pWell' , color=toRGB('LightYellow'), pattern=toHexa('urgo.8' ), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='nImplant', color=toRGB('LawnGreen' ), pattern=toHexa('antihash0.8'), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='pImplant', color=toRGB('Yellow' ), pattern=toHexa('antihash0.8'), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='active' , color=toRGB('White' ), pattern=toHexa('antihash1.8'), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='poly' , color=toRGB('Red' ), pattern=toHexa('poids2.8' ), border=1, threshold=0*scale ) + style.addDrawingStyle( group='Active Layer', name='poly2' , color=toRGB('Orange' ), pattern=toHexa('poids2.8' ), border=1, threshold=0*scale ) + + # Routing Layers. + style.addDrawingStyle( group='Routing Layer', name='metal1' , color=toRGB('Blue' ), pattern=toHexa('slash.8' ), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal2' , color=toRGB('Aqua' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metcap' , color=toRGB('DarkTurquoise'), pattern=toHexa('poids2.8'), border=2, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal3' , color=toRGB('LightPink' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal4' , color=toRGB('Green' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal5' , color=toRGB('Yellow' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal6' , color=toRGB('Violet' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal7' , color=toRGB('Red' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal8' , color=toRGB('Blue' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal9' , color=toRGB('Blue' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + style.addDrawingStyle( group='Routing Layer', name='metal10', color=toRGB('Blue' ), pattern=toHexa('poids4.8'), border=1, threshold=0.0*scale ) + + + # Cuts (VIA holes). + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut0', color=toRGB('0,150,150'), threshold=0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut1', color=toRGB('Aqua' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut2', color=toRGB('LightPink'), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut3', color=toRGB('Green' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut4', color=toRGB('Yellow' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut5', color=toRGB('Violet' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut6', color=toRGB('Red' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut7', color=toRGB('Blue' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut8', color=toRGB('Blue' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut9', color=toRGB('Blue' ), threshold=0.0*scale ) + + # MIM6. + style.addDrawingStyle( group='MIM6', name='metbot_r', color=toRGB('Aqua' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIM6', name='metal7' , color=toRGB('Green'), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale ) + + # Blockages. + style.addDrawingStyle( group='Blockages', name='blockage1' , color=toRGB('Blue' ), pattern=toHexa('light_antislash0.8'), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage2' , color=toRGB('Aqua' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage3' , color=toRGB('LightPink'), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage4' , color=toRGB('Green' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage5' , color=toRGB('Yellow' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage6' , color=toRGB('Violet' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage7' , color=toRGB('Red' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage8' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage9' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage10', color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + + # Knick & Kite. + style.addDrawingStyle( group='Knik & Kite', name='SPL1' , color=toRGB('Red' ) ) + style.addDrawingStyle( group='Knik & Kite', name='AutoLayer' , color=toRGB('Magenta' ) ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalh' , color=toRGB('128,255,200'), pattern=toHexa('antislash2.32' ), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalv' , color=toRGB('200,200,255'), pattern=toHexa('light_antihash1.8'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gcut' , color=toRGB('255,255,190'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::Edge' , color=toRGB('255,255,190'), pattern='0000000000000000', border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::GCell', color=toRGB('255,255,190'), pattern='0000000000000000', border=2, threshold=0.10*scale ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: Alliance.Classic [black] + + style = Viewer.DisplayStyle( 'Alliance.Classic [black]' ) + style.setDescription( 'Alliance Classic Look - black background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + # Viewer. + style.addDrawingStyle( group='Viewer', name='fallback' , color=toRGB('Gray238' ), border=1, pattern='55AA55AA55AA55AA' ) + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('Gray50' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='foreground' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='rubber' , color=toRGB('192,0,192' ), border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Viewer', name='phantom' , color=toRGB('Seashell4' ), border=1 ) + #style.addDrawingStyle( group='Viewer', name='boundaries' , color=toRGB('208,199,192'), border=2, threshold=0 ) + style.addDrawingStyle( group='Viewer', name='boundaries' , color=toRGB('wheat1') , border=2, pattern='0000000000000000', threshold=0 ) + style.addDrawingStyle( group='Viewer', name='marker' , color=toRGB('80,250,80' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionDraw' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionFill' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('White' ), border=1, threshold=8.0*scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('White' ), border=2, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='ghost' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('White' ), border=1, threshold= 0.0*scale ) + style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('White' ), border=1, threshold=400.0*scale ) + style.addDrawingStyle( group='Viewer', name='text.reference', color=toRGB('White' ), border=1, threshold=200.0*scale ) + style.addDrawingStyle( group='Viewer', name='undef' , color=toRGB('Violet' ), border=0, pattern='2244118822441188' ) + + # Active Layers. + style.addDrawingStyle( group='Active Layers', name='nWell' , color=toRGB('Tan' ), pattern=toHexa('urgo.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='pWell' , color=toRGB('LightYellow'), pattern=toHexa('urgo.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='nImplant', color=toRGB('LawnGreen' ), pattern=toHexa('antihash0.8'), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='pImplant', color=toRGB('Yellow' ), pattern=toHexa('antihash0.8'), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='active' , color=toRGB('White' ), pattern='0000000000000000' , border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='poly' , color=toRGB('Red' ), pattern=toHexa('poids2.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Active Layers', name='poly2' , color=toRGB('Orange' ), pattern=toHexa('poids2.8' ), border=1, threshold=0.00*scale ) + + # Routing Layers. + style.addDrawingStyle( group='Routing Layers', name='metal1' , color=toRGB('Blue' ), pattern=toHexa('slash.8' ), border=1, threshold=0.80*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal2' , color=toRGB('Aqua' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metcap' , color=toRGB('DarkTurquoise'), pattern=toHexa('poids2.8' ), border=2, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal3' , color=toRGB('LightPink' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal4' , color=toRGB('Green' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal5' , color=toRGB('Yellow' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal6' , color=toRGB('Violet' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal7' , color=toRGB('Red' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal8' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal9' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal10', color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), border=1, threshold=0.00*scale ) + + # Cuts (VIA holes). + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut0', color=toRGB('0,150,150'), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut1', color=toRGB('Aqua' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut2', color=toRGB('LightPink'), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut3', color=toRGB('Green' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut4', color=toRGB('Yellow' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut5', color=toRGB('Violet' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut6', color=toRGB('Red' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut7', color=toRGB('Blue' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut8', color=toRGB('Blue' ), threshold=0.0*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut9', color=toRGB('Blue' ), threshold=0.0*scale ) + + # MIM6. + style.addDrawingStyle( group='MIMI6', name='metbot_r', color=toRGB('Aqua' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIMI6', name='metal7' , color=toRGB('Green'), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale ) + + # Blockages. + style.addDrawingStyle( group='Blockages', name='blockage1' , color=toRGB('Blue' ), pattern=toHexa('light_antislash0.8'), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage2' , color=toRGB('Aqua' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage3' , color=toRGB('LightPink'), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage4' , color=toRGB('Green' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage5' , color=toRGB('Yellow' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage6' , color=toRGB('Violet' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage7' , color=toRGB('Red' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage8' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage9' , color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + style.addDrawingStyle( group='Blockages', name='blockage10', color=toRGB('Blue' ), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=4 ) + + # Knick & Kite. + style.addDrawingStyle( group='Knik & Kite', name='SPL1' , color=toRGB('Red' ) ) + style.addDrawingStyle( group='Knik & Kite', name='AutoLayer' , color=toRGB('Magenta' ) ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalh' , color=toRGB('128,255,200'), pattern=toHexa('antislash2.32' ), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalv' , color=toRGB('200,200,255'), pattern=toHexa('light_antihash1.8'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gcut' , color=toRGB('255,255,190'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::Edge' , color=toRGB('255,255,190'), pattern='0000000000000000' , border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::GCell', color=toRGB('255,255,190'), pattern='0000000000000000' , border=2, threshold=0.10*scale ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: Alliance.Classic [white]. + + style = Viewer.DisplayStyle( 'Alliance.Classic [white]' ) + style.inheritFrom( 'Alliance.Classic [black]' ) + style.setDescription( 'Alliance Classic Look - white background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + # Group: Viewer. + style.addDrawingStyle( group='Viewer', name='fallback' , color=toRGB('Black'), border=1, pattern='55AA55AA55AA55AA' ) + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('White'), border=1 ) + style.addDrawingStyle( group='Viewer', name='foreground' , color=toRGB('Black'), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionDraw' , color=toRGB('Black'), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionFill' , color=toRGB('Black'), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('Black'), border=1, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('Black'), border=1, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='ghost' , color=toRGB('Black'), border=1 ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('Black'), border=1, threshold=0.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('Black'), border=1, threshold=4.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.reference', color=toRGB('Black'), border=1, threshold=20.0*scale ) + style.addDrawingStyle( group='Viewer', name='undef' , color=toRGB('Black'), border=0, pattern='2244118822441188' ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: Layout Design [black] + + style = Viewer.DisplayStyle( 'Layout Design [black]' ) + style.inheritFrom( 'Alliance.Classic [black]' ) + style.setDescription( 'Alliance Classic Look - white background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + # Active Layers. + style.addDrawingStyle( group='Active Layers', name='nWell' , color=toRGB('Tan' ), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + style.addDrawingStyle( group='Active Layers', name='pWell' , color=toRGB('LightYellow'), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + style.addDrawingStyle( group='Active Layers', name='nImplant', color=toRGB('LawnGreen' ), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + style.addDrawingStyle( group='Active Layers', name='pImplant', color=toRGB('Yellow' ), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + style.addDrawingStyle( group='Active Layers', name='active' , color=toRGB('White' ), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + style.addDrawingStyle( group='Active Layers', name='poly' , color=toRGB('Red' ), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + + # Routing Layers. + style.addDrawingStyle( group='Routing Layers', name='metal1' , color=toRGB('Blue' ), pattern='0000000000000000', threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal2' , color=toRGB('Aqua' ), pattern='0000000000000000', threshold=0.40*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal3' , color=toRGB('LightPink'), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal4' , color=toRGB('Green' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal5' , color=toRGB('Yellow' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal6' , color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal7' , color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal8' , color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal9' , color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + style.addDrawingStyle( group='Routing Layers', name='metal10', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.02*scale, border=2 ) + + # Cuts (VIA holes). + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut0', color=toRGB('0,150,150'), pattern=toHexa('poids4.8'), threshold=1.50*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut1', color=toRGB('Aqua' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut2', color=toRGB('LightPink'), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut3', color=toRGB('Green' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut4', color=toRGB('Yellow' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut5', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut6', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut7', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut8', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut9', color=toRGB('Violet' ), pattern='0000000000000000', threshold=0.80*scale, border=1 ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: Layout Design [white] + + style = Viewer.DisplayStyle( 'Layout Design [white]' ) + style.inheritFrom( 'Layout Design [black]' ) + style.setDescription( 'Layout Design Look - white background' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + + # Group: Viewer. + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('White'), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('Black'), border=1, threshold=2.0 *scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('Black'), border=1, threshold=2.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('Black'), border=1, threshold=0.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.reference', color=toRGB('Black'), border=1, threshold=20.0*scale ) + + # Group: Active Layers. + style.addDrawingStyle( group='Active Layers', name='active', color=toRGB('175,175,175'), pattern='0000000000000000', threshold=1.50*scale, border=2 ) + + Viewer.Graphics.addStyle( style ) + + + # ---------------------------------------------------------------------- + # Style: For Printers [white] + + style = Viewer.DisplayStyle( 'For Printers' ) + style.setDescription( 'For Printers' ) + style.setDarkening ( Viewer.DisplayStyle.HSVr(1.0, 3.0, 2.5) ) + + # Group: Viewer. + style.addDrawingStyle( group='Viewer', name='fallback' , color=toRGB('Gray238' ), border=1, pattern='55AA55AA55AA55AA' ) + style.addDrawingStyle( group='Viewer', name='background' , color=toRGB('White' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='foreground' , color=toRGB('Black' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='rubber' , color=toRGB('192,0,192'), border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Viewer', name='phantom' , color=toRGB('Seashell4'), border=1 ) + style.addDrawingStyle( group='Viewer', name='boundaries' , color=toRGB('Black' ), border=1, pattern='0000000000000000', threshold=0 ) + style.addDrawingStyle( group='Viewer', name='marker' , color=toRGB('80,250,80'), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionDraw' , color=toRGB('Black' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='selectionFill' , color=toRGB('Black' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='grid' , color=toRGB('Black' ), border=1, threshold=2.0*scale ) + style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('Black' ), border=2, threshold=6.0*scale ) + style.addDrawingStyle( group='Viewer', name='ghost' , color=toRGB('Black' ), border=1 ) + style.addDrawingStyle( group='Viewer', name='text.ruler' , color=toRGB('Black' ), border=1, threshold=0.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('Black' ), border=1, threshold=4.0 *scale ) + style.addDrawingStyle( group='Viewer', name='text.reference' , color=toRGB('Black' ), border=1, threshold=20.0*scale ) + style.addDrawingStyle( group='Viewer', name='undef' , color=toRGB('Violet' ), border=0, pattern='2244118822441188' ) + style.addDrawingStyle( group='Viewer', name='mauka.container', color=toRGB('Magenta4' ), border=4, pattern='0000000000000000', goMatched=False ) + + # Group: Active Layers. + style.addDrawingStyle( group='Active Layers', name='nWell' , color=toRGB('Tan' ), pattern=toHexa('urgo.32' ), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='pWell' , color=toRGB('LightYellow'), pattern=toHexa('antipoids2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='nImplant', color=toRGB('LawnGreen' ), pattern=toHexa('diffusion.32' ), border=0, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='pImplant', color=toRGB('Yellow' ), pattern=toHexa('diffusion.32' ), border=0, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='active' , color=toRGB('White' ), pattern=toHexa('active.32' ), border=0, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='poly' , color=toRGB('Red' ), pattern=toHexa('antipoids2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Active Layers', name='poly2' , color=toRGB('Orange' ), pattern=toHexa('antipoids2.32'), border=1, threshold=0.02*scale ) + + # Group: Routing Layers. + style.addDrawingStyle( group='Routing Layers', name='metal1' , color=toRGB('Blue' ), pattern=toHexa('slash.32' ), border=4, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal2' , color=toRGB('Aqua' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metcap' , color=toRGB('DarkTurquoise'), pattern=toHexa('poids2.32' ), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal3' , color=toRGB('LightPink' ), pattern=toHexa('antislash3.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal4' , color=toRGB('Green' ), pattern=toHexa('antislash4.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal5' , color=toRGB('Yellow' ), pattern=toHexa('antislash5.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal6' , color=toRGB('Violet' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal7' , color=toRGB('Violet' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal8' , color=toRGB('Violet' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal9' , color=toRGB('Violet' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + style.addDrawingStyle( group='Routing Layers', name='metal10', color=toRGB('Violet' ), pattern=toHexa('antislash2.32'), border=1, threshold=0.02*scale ) + + # Group: Cuts (VIA holes) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut0', color=toRGB('Blue' ), pattern=toHexa('poids2.8' ), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut1', color=toRGB('Aqua' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut2', color=toRGB('LightPink'), pattern=toHexa('poids2.8' ), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut3', color=toRGB('Green' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut4', color=toRGB('Yellow' ), pattern=toHexa('poids2.8' ), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut5', color=toRGB('Violet' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut6', color=toRGB('Violet' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut7', color=toRGB('Violet' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut8', color=toRGB('Violet' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + style.addDrawingStyle( group='Cuts (VIA holes)', name='cut9', color=toRGB('Violet' ), pattern=toHexa('antipoids2.8'), border=2, threshold=0.02*scale ) + + # Group: MIM6. + style.addDrawingStyle( group='MIM6', name='metbot_r', color=toRGB('Aqua' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIM6', name='cut6' , color=toRGB('LightPink'), pattern=toHexa('light_antihash1.8'), threshold=0.80*scale ) + style.addDrawingStyle( group='MIM6', name='metal7' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale ) + + # Group: Blockages. + style.addDrawingStyle( group='Blockages', name='blockage1' , color=toRGB('Blue' ), pattern='006070381c0e0703' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage2' , color=toRGB('Aqua' ), pattern='8103060c183060c0' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage3' , color=toRGB('LightPink'), pattern=toHexa('poids4.8' ), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage4' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage5' , color=toRGB('Yellow' ), pattern='1144114411441144' , threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage6' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage7' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage8' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage9' , color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + style.addDrawingStyle( group='Blockages', name='blockage10', color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80*scale, border=2 ) + + # Group: Knik & Kite. + style.addDrawingStyle( group='Knik & Kite', name='SPL1' , color=toRGB('Red' ) ) + style.addDrawingStyle( group='Knik & Kite', name='AutoLayer' , color=toRGB('Magenta' ) ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalh' , color=toRGB('128,255,200'), pattern=toHexa('light_antihash0.8') , border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gmetalv' , color=toRGB('200,200,255'), pattern=toHexa('light_antihash1.8') , border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='gcut' , color=toRGB('255,255,190'), border=1 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::Edge' , color=toRGB('255,255,190'), pattern='0000000000000000', border=2 ) + style.addDrawingStyle( group='Knik & Kite', name='Anabatic::GCell', color=toRGB('Black' ), pattern='0000000000000000', border=2, threshold=0.80*scale ) + + Viewer.Graphics.addStyle( style ) + + + Viewer.Graphics.setStyle( 'Alliance.Classic [black]' ) + +createStyles( scale=1.0 ) diff --git a/crlcore/python/technos/symbolic/lcmos/etesian.py b/crlcore/python/technos/symbolic/lcmos/etesian.py new file mode 100644 index 00000000..55a1e9d9 --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/etesian.py @@ -0,0 +1,20 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/etesian.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import etesian diff --git a/crlcore/python/technos/symbolic/lcmos/kite.py b/crlcore/python/technos/symbolic/lcmos/kite.py new file mode 100644 index 00000000..4de7143b --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/kite.py @@ -0,0 +1,194 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/kite.py" | +# +-----------------------------------------------------------------+ + + +import coriolis.Cfg as Cfg +from coriolis.Hurricane import DataBase +from coriolis.CRL import AllianceFramework, RoutingGauge, \ + RoutingLayerGauge, CellGauge +from coriolis.helpers import truncPath, l, u, n +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import kite + + +p = Cfg.getParamDouble ( 'lefImport.minTerminalWidth' ).setDouble ( 0.0 ) +p = Cfg.getParamString ( 'katabatic.routingGauge' ).setString ( 'sxlib' ) +p = Cfg.getParamInt ( "katabatic.globalLengthThreshold" ).setInt ( 1450 ) +p = Cfg.getParamPercentage( "katabatic.saturateRatio" ).setPercentage( 80 ) +p = Cfg.getParamInt ( "katabatic.saturateRp" ).setInt ( 8 ) +p = Cfg.getParamString ( 'katabatic.topRoutingLayer' ).setString ( 'METAL5' ) + + # Kite parameters. +p = Cfg.getParamInt( "kite.hTracksReservedLocal" ); p.setInt( 3 ); p.setMin( 0 ); p.setMax( 20 ) +p = Cfg.getParamInt( "kite.vTracksReservedLocal" ); p.setInt( 3 ); p.setMin( 0 ); p.setMax( 20 ) +p = Cfg.getParamInt( "kite.eventsLimit" ); p.setInt( 4000002 ) +p = Cfg.getParamInt( "kite.ripupCost" ); p.setInt( 3 ); p.setMin( 0 ) +p = Cfg.getParamInt( "kite.strapRipupLimit" ); p.setInt( 16 ); p.setMin( 1 ) +p = Cfg.getParamInt( "kite.localRipupLimit" ); p.setInt( 9 ); p.setMin( 1 ) +p = Cfg.getParamInt( "kite.globalRipupLimit" ); p.setInt( 5 ); p.setMin( 1 ) +p = Cfg.getParamInt( "kite.longGlobalRipupLimit" ); p.setInt( 5 ); p.setMin( 1 ) + +# Anabatic & Katana parameters are temporarily hosted here. +p = Cfg.getParamString ( 'anabatic.routingGauge' ); p.setString ( 'sxlib' ) +p = Cfg.getParamInt ( "anabatic.globalLengthThreshold" ); p.setInt ( 1450 ) +p = Cfg.getParamPercentage( "anabatic.saturateRatio" ); p.setPercentage( 80 ) +p = Cfg.getParamInt ( "anabatic.saturateRp" ); p.setInt ( 8 ) +p = Cfg.getParamString ( 'anabatic.topRoutingLayer' ); p.setString ( 'METAL5' ) +p = Cfg.getParamInt ( "anabatic.edgeLength" ); p.setInt ( 24 ) +p = Cfg.getParamInt ( "anabatic.edgeWidth" ); p.setInt ( 4 ) +p = Cfg.getParamDouble ( "anabatic.edgeCostH" ); p.setDouble ( 19.0 ) +p = Cfg.getParamDouble ( "anabatic.edgeCostK" ); p.setDouble ( -60.0 ) +p = Cfg.getParamDouble ( "anabatic.edgeHScaling" ); p.setDouble ( 1.0 ) +p = Cfg.getParamInt ( "anabatic.globalIterations" ); p.setInt ( 10 ); p.setMin(1); p.setMax(100) +p = Cfg.getParamEnumerate ( "anabatic.gcell.displayMode" ); p.setInt ( 1 ) +p.addValue( "Boundary", 1 ) +p.addValue( "Density" , 2 ) + +p = Cfg.getParamBool ( "katana.useGlobalEstimate" ); p.setBool ( False ); +p = Cfg.getParamInt ( "katana.hTracksReservedLocal" ); p.setInt ( 3 ); p.setMin(0); p.setMax(20) +p = Cfg.getParamInt ( "katana.vTracksReservedLocal" ); p.setInt ( 3 ); p.setMin(0); p.setMax(20) +p = Cfg.getParamInt ( "katana.hTracksReservedMin" ); p.setInt ( 1 ); p.setMin(0); p.setMax(20) +p = Cfg.getParamInt ( "katana.vTracksReservedMin" ); p.setInt ( 1 ); p.setMin(0); p.setMax(20) +p = Cfg.getParamInt ( "katana.termSatReservedLocal" ); p.setInt ( 8 ) +p = Cfg.getParamInt ( "katana.termSatThreshold" ); p.setInt ( 9 ) +p = Cfg.getParamInt ( "katana.eventsLimit" ); p.setInt ( 4000002 ) +p = Cfg.getParamInt ( "katana.ripupCost" ); p.setInt ( 3 ); p.setMin(0) +p = Cfg.getParamInt ( "katana.strapRipupLimit" ); p.setInt ( 16 ); p.setMin(1) +p = Cfg.getParamInt ( "katana.localRipupLimit" ); p.setInt ( 9 ); p.setMin(1) +p = Cfg.getParamInt ( "katana.globalRipupLimit" ); p.setInt ( 5 ); p.setMin(1) +p = Cfg.getParamInt ( "katana.longGlobalRipupLimit" ); p.setInt ( 5 ); p.setMin(1) +p = Cfg.getParamString( 'chip.padCoreSide' ); p.setString( 'South' ) + + +tech = DataBase.getDB().getTechnology() +af = AllianceFramework.get() +rg = RoutingGauge.create( 'sxlib' ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL1') # metal. + , RoutingLayerGauge.Vertical # preferred routing direction. + , RoutingLayerGauge.PinOnly # layer usage. + , 0 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA12). + , l(4) # obstacle dW. + ) ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # metal. + , RoutingLayerGauge.Horizontal # preferred routing direction. + , RoutingLayerGauge.Default # layer usage. + , 1 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA23). + , l(4) # obstacle dW. + ) ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL3') # metal. + , RoutingLayerGauge.Vertical # preferred routing direction. + , RoutingLayerGauge.Default # layer usage. + , 2 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA34). + , l(4) # obstacle dW. + ) ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL4') # metal. + , RoutingLayerGauge.Horizontal # preferred routing direction. + , RoutingLayerGauge.Default # layer usage. + , 3 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA23). + , l(4) # obstacle dW. + ) ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL5') # metal. + , RoutingLayerGauge.Vertical # preferred routing direction. + , RoutingLayerGauge.Default # layer usage. + , 4 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA23). + , l(4) # obstacle dW. + ) ) + +af.addRoutingGauge( rg ) + +rg = RoutingGauge.create( 'sxlib-2M' ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL1') # metal. + , RoutingLayerGauge.Vertical # preferred routing direction. + , RoutingLayerGauge.PinOnly # layer usage. + , 0 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA12). + , l(4) # obstacle dW. + ) ) + +rg.addLayerGauge( RoutingLayerGauge.create( tech.getLayer('METAL2') # metal. + , RoutingLayerGauge.Horizontal # preferred routing direction. + , RoutingLayerGauge.Default # layer usage. + , 1 # depth. + , 0.0 # density (deprecated). + , l(0) # track offset from AB. + , l(5) # track pitch. + , l(2) # wire width. + , 0 # perpandicular wire width. + , l(1) # VIA side (that is VIA23). + , l(4) # obstacle dW. + ) ) + +af.addRoutingGauge( rg ) +af.setRoutingGauge( 'sxlib' ) + +# Gauge for standard cells. +cg = CellGauge.create( 'sxlib' + , 'metal2' # pin layer name. + , l( 5.0) # pitch. + , l( 50.0) # cell slice height. + , l( 5.0) # cell slice step. + ) +af.addCellGauge( cg ) + +# Gauge for Alliance symbolic I/O pads. +cg = CellGauge.create( 'pxlib' + , 'metal2' # pin layer name. + , l( 5.0) # pitch. + , l(400.0) # cell slice height. + , l(200.0) # cell slice step. + ) +af.addCellGauge( cg ) diff --git a/crlcore/python/technos/symbolic/lcmos/misc.py b/crlcore/python/technos/symbolic/lcmos/misc.py new file mode 100644 index 00000000..dadb2f4b --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/misc.py @@ -0,0 +1,20 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/misc.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import misc diff --git a/crlcore/python/technos/symbolic/lcmos/patterns.py b/crlcore/python/technos/symbolic/lcmos/patterns.py new file mode 100644 index 00000000..b89e7802 --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/patterns.py @@ -0,0 +1,20 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/patterns.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import patterns diff --git a/crlcore/python/technos/symbolic/lcmos/plugins.py b/crlcore/python/technos/symbolic/lcmos/plugins.py new file mode 100644 index 00000000..4967fb0b --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/plugins.py @@ -0,0 +1,32 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/plugins.py" | +# +-----------------------------------------------------------------+ + + +import coriolis.Cfg as Cfg +from coriolis.helpers import truncPath, l, u, n +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +Cfg.getParamInt ( "chip.block.rails.count" ).setInt ( 5 ) +Cfg.getParamInt ( "chip.block.rails.hWidth" ).setInt ( l( 12) ) +Cfg.getParamInt ( "chip.block.rails.vWidth" ).setInt ( l( 12) ) +Cfg.getParamInt ( "chip.block.rails.hSpacing" ).setInt ( l( 3) ) +Cfg.getParamInt ( "chip.block.rails.vSpacing" ).setInt ( l( 3) ) +Cfg.getParamBool ( "chip.useAbstractPads" ).setBool ( True ) +Cfg.getParamInt ( 'clockTree.minimumSide' ).setInt ( l(600) ) +Cfg.getParamString( 'clockTree.buffer' ).setString( 'buf_x2') +Cfg.getParamString( 'clockTree.placerEngine' ).setString( 'Etesian') +Cfg.getParamInt ( 'block.spareSide' ).setInt ( 10 ) +Cfg.getParamString( 'spares.buffer' ).setString( 'buf_x8') +Cfg.getParamInt ( 'spares.maxSinks' ).setInt ( 31 ) diff --git a/crlcore/python/technos/symbolic/lcmos/stratus1.py b/crlcore/python/technos/symbolic/lcmos/stratus1.py new file mode 100644 index 00000000..d70bbde2 --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/stratus1.py @@ -0,0 +1,26 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/stratus1.py" | +# +-----------------------------------------------------------------+ + + +import os.path +import coriolis.Cfg as Cfg +from coriolis.helpers import sysConfDir, truncPath +from coriolis.helpers.io import vprint +vprint( 2, ' - "%s".' % truncPath(__file__) ) + +from ...common import stratus1 + +Cfg.getParamString( "stratus1.format" ).setString( "vst" ) +Cfg.getParamString( "stratus1.simulator" ).setString( "asimut" ) +Cfg.getParamString( "stratus1.mappingName" ).setString( os.path.join(sysConfDir,'symbolic/cmos/stratus2sxlib.xml') ) diff --git a/crlcore/python/technos/symbolic/lcmos/technology.py b/crlcore/python/technos/symbolic/lcmos/technology.py new file mode 100644 index 00000000..5034213e --- /dev/null +++ b/crlcore/python/technos/symbolic/lcmos/technology.py @@ -0,0 +1,401 @@ + +# This file is part of the Coriolis Software. +# Copyright (c) Sorbonne Université 2019-2023, All Rights Reserved +# +# +-----------------------------------------------------------------+ +# | C O R I O L I S | +# | Alliance / Hurricane Interface | +# | | +# | Author : Jean-Paul CHAPUT | +# | E-mail : Jean-Paul.Chaput@lip6.fr | +# | =============================================================== | +# | Python : "./etc/symbolic/lcmos/technology.py" | +# +-----------------------------------------------------------------+ + + +from coriolis.helpers import l, u, n, truncPath +from coriolis.helpers.io import WarningMessage, vprint +vprint( 2, ' - "{}".'.format(truncPath(__file__)) ) + +from coriolis.Hurricane import DbU, DataBase, Technology, Layer, BasicLayer, \ + DiffusionLayer, TransistorLayer, \ + RegularLayer, ContactLayer, ViaLayer + + +def createBL ( layerName, material ): + global tech + return BasicLayer.create( tech, layerName, BasicLayer.Material(material) ) + + +tech = DataBase.getDB().getTechnology() +if tech: + print( WarningMessage( 'lcmos.technology: Technology already exists, "{}"'.format(tech.getName()) )) +else: + tech = Technology.create( DataBase.getDB(), 'lcmos' ) + +DbU.setPrecision ( 2 ) +DbU.setPhysicalsPerGrid ( 0.5, DbU.UnitPowerMicro ) +DbU.setGridsPerLambda ( 2 ) +DbU.setSymbolicSnapGridStep( DbU.fromLambda(1.0) ) +DbU.setPolygonStep ( DbU.fromGrid (2.0) ) + + +from ...common import loadGdsLayers + + +nWell = createBL( 'nWell' , BasicLayer.Material.nWell ) # Non-Routing Layers. +pWell = createBL( 'pWell' , BasicLayer.Material.pWell ) +nImplant = createBL( 'nImplant' , BasicLayer.Material.nImplant ) +pImplant = createBL( 'pImplant' , BasicLayer.Material.pImplant ) +active = createBL( 'active' , BasicLayer.Material.active ) +poly = createBL( 'poly' , BasicLayer.Material.poly ) +poly2 = createBL( 'poly2' , BasicLayer.Material.poly ) +cut0 = createBL( 'cut0' , BasicLayer.Material.cut ) # Routing Layers & VIA Cuts. +metal1 = createBL( 'metal1' , BasicLayer.Material.metal ) # WARNING: order *is* meaningful. +cut1 = createBL( 'cut1' , BasicLayer.Material.cut ) +metal2 = createBL( 'metal2' , BasicLayer.Material.metal ) +metcap = createBL( 'metcap' , BasicLayer.Material.other ) +cut2 = createBL( 'cut2' , BasicLayer.Material.cut ) +metal3 = createBL( 'metal3' , BasicLayer.Material.metal ) +cut3 = createBL( 'cut3' , BasicLayer.Material.cut ) +metal4 = createBL( 'metal4' , BasicLayer.Material.metal ) +cut4 = createBL( 'cut4' , BasicLayer.Material.cut ) +metal5 = createBL( 'metal5' , BasicLayer.Material.metal ) +cut5 = createBL( 'cut5' , BasicLayer.Material.cut ) +metal6 = createBL( 'metal6' , BasicLayer.Material.metal ) +cut6 = createBL( 'cut6' , BasicLayer.Material.cut ) +metal7 = createBL( 'metal7' , BasicLayer.Material.metal ) +cut7 = createBL( 'cut7' , BasicLayer.Material.cut ) +metal8 = createBL( 'metal8' , BasicLayer.Material.metal ) +cut8 = createBL( 'cut8' , BasicLayer.Material.cut ) +metal9 = createBL( 'metal9' , BasicLayer.Material.metal ) +cut9 = createBL( 'cut9' , BasicLayer.Material.cut ) +metal10 = createBL( 'metal10' , BasicLayer.Material.metal ) + +blockage1 = createBL( 'blockage1' , BasicLayer.Material.blockage ) +blockage2 = createBL( 'blockage2' , BasicLayer.Material.blockage ) +blockage3 = createBL( 'blockage3' , BasicLayer.Material.blockage ) +blockage4 = createBL( 'blockage4' , BasicLayer.Material.blockage ) +blockage5 = createBL( 'blockage5' , BasicLayer.Material.blockage ) +blockage6 = createBL( 'blockage6' , BasicLayer.Material.blockage ) +blockage7 = createBL( 'blockage7' , BasicLayer.Material.blockage ) +blockage8 = createBL( 'blockage8' , BasicLayer.Material.blockage ) +blockage9 = createBL( 'blockage9' , BasicLayer.Material.blockage ) +blockage10 = createBL( 'blockage10', BasicLayer.Material.blockage ) + +metal1 .setBlockageLayer( blockage1 ) +metal2 .setBlockageLayer( blockage2 ) +metal3 .setBlockageLayer( blockage3 ) +metal4 .setBlockageLayer( blockage4 ) +metal5 .setBlockageLayer( blockage5 ) +metal6 .setBlockageLayer( blockage6 ) +metal7 .setBlockageLayer( blockage7 ) +metal8 .setBlockageLayer( blockage8 ) +metal9 .setBlockageLayer( blockage9 ) +metal10.setBlockageLayer( blockage10 ) + +textCell = createBL( 'text.cell' , BasicLayer.Material.other ) # Misc. non-physical layers. +textInst = createBL( 'text.instance', BasicLayer.Material.other ) # Used by the software for visualization +SPL1 = createBL( 'SPL1' , BasicLayer.Material.other ) # purposes only. +AutoLayer = createBL( 'AutoLayer' , BasicLayer.Material.other ) +gmetalh = createBL( 'gmetalh' , BasicLayer.Material.metal ) # Special BasicLayers for Knik & Kite Routers. +gcut = createBL( 'gcut' , BasicLayer.Material.cut ) # *Must be after all others* +gmetalv = createBL( 'gmetalv' , BasicLayer.Material.metal ) + +# VIAs for real technologies. +via12 = ViaLayer.create( tech, 'via12' , metal1, cut1, metal2 ) +via23 = ViaLayer.create( tech, 'via23' , metal2, cut2, metal3 ) +via34 = ViaLayer.create( tech, 'via34' , metal3, cut3, metal4 ) +via45 = ViaLayer.create( tech, 'via45' , metal4, cut4, metal5 ) +via56 = ViaLayer.create( tech, 'via56' , metal5, cut5, metal6 ) +via67 = ViaLayer.create( tech, 'via67' , metal6, cut6, metal7 ) +via78 = ViaLayer.create( tech, 'via78' , metal7, cut7, metal8 ) +via89 = ViaLayer.create( tech, 'via89' , metal8, cut8, metal9 ) +via910 = ViaLayer.create( tech, 'via910', metal9, cut9, metal10 ) + +# Composite/Symbolic layers. +NWELL = RegularLayer .create( tech, 'NWELL' , nWell ) +PWELL = RegularLayer .create( tech, 'PWELL' , pWell ) +NTIE = DiffusionLayer .create( tech, 'NTIE' , nImplant , active, nWell) +PTIE = DiffusionLayer .create( tech, 'PTIE' , pImplant , active, pWell) +NDIF = DiffusionLayer .create( tech, 'NDIF' , nImplant , active, None ) +PDIF = DiffusionLayer .create( tech, 'PDIF' , pImplant , active, None ) +GATE = DiffusionLayer .create( tech, 'GATE' , poly , active, None ) +NTRANS = TransistorLayer.create( tech, 'NTRANS' , nImplant , active, poly, None ) +PTRANS = TransistorLayer.create( tech, 'PTRANS' , pImplant , active, poly, None ) +POLY = RegularLayer .create( tech, 'POLY' , poly ) +POLY2 = RegularLayer .create( tech, 'POLY2' , poly2 ) +METAL1 = RegularLayer .create( tech, 'METAL1' , metal1 ) +METAL2 = RegularLayer .create( tech, 'METAL2' , metal2 ) +metcapdum = RegularLayer .create( tech, 'metcapdum' , metcap ) +metbot = RegularLayer .create( tech, 'metbot' , metal2 ) +METAL3 = RegularLayer .create( tech, 'METAL3' , metal3 ) +METAL4 = RegularLayer .create( tech, 'METAL4' , metal4 ) +METAL5 = RegularLayer .create( tech, 'METAL5' , metal5 ) +METAL6 = RegularLayer .create( tech, 'METAL6' , metal6 ) +METAL7 = RegularLayer .create( tech, 'METAL7' , metal7 ) +METAL8 = RegularLayer .create( tech, 'METAL8' , metal8 ) +METAL9 = RegularLayer .create( tech, 'METAL9' , metal9 ) +METAL10 = RegularLayer .create( tech, 'METAL10' , metal10 ) +CONT_BODY_N = ContactLayer .create( tech, 'CONT_BODY_N', nImplant , cut0, active, metal1, None ) +CONT_BODY_P = ContactLayer .create( tech, 'CONT_BODY_P', pImplant , cut0, active, metal1, None ) +CONT_DIF_N = ContactLayer .create( tech, 'CONT_DIF_N' , nImplant , cut0, active, metal1, None ) +CONT_DIF_P = ContactLayer .create( tech, 'CONT_DIF_P' , pImplant , cut0, active, metal1, None ) +CONT_POLY = ViaLayer .create( tech, 'CONT_POLY' , poly , cut0, metal1 ) + +# VIAs for symbolic technologies. +VIA12 = ViaLayer .create( tech, 'VIA12' , metal1, cut1, metal2 ) +VIA23 = ViaLayer .create( tech, 'VIA23' , metal2, cut2, metal3 ) +VIA23cap = ViaLayer .create( tech, 'VIA23cap' , metcap, cut2, metal3 ) +VIA34 = ViaLayer .create( tech, 'VIA34' , metal3, cut3, metal4 ) +VIA45 = ViaLayer .create( tech, 'VIA45' , metal4, cut4, metal5 ) +VIA56 = ViaLayer .create( tech, 'VIA56' , metal5, cut5, metal6 ) +VIA67 = ViaLayer .create( tech, 'VIA67' , metal6, cut6, metal7 ) +VIA78 = ViaLayer .create( tech, 'VIA78' , metal7, cut7, metal8 ) +VIA89 = ViaLayer .create( tech, 'VIA89' , metal8, cut8, metal9 ) +VIA910 = ViaLayer .create( tech, 'VIA910' , metal9, cut9, metal10 ) +BLOCKAGE1 = RegularLayer.create( tech, 'BLOCKAGE1' , blockage1 ) +BLOCKAGE2 = RegularLayer.create( tech, 'BLOCKAGE2' , blockage2 ) +BLOCKAGE3 = RegularLayer.create( tech, 'BLOCKAGE3' , blockage3 ) +BLOCKAGE4 = RegularLayer.create( tech, 'BLOCKAGE4' , blockage4 ) +BLOCKAGE5 = RegularLayer.create( tech, 'BLOCKAGE5' , blockage5 ) +BLOCKAGE6 = RegularLayer.create( tech, 'BLOCKAGE6' , blockage6 ) +BLOCKAGE7 = RegularLayer.create( tech, 'BLOCKAGE7' , blockage7 ) +BLOCKAGE8 = RegularLayer.create( tech, 'BLOCKAGE8' , blockage8 ) +BLOCKAGE9 = RegularLayer.create( tech, 'BLOCKAGE9' , blockage9 ) +BLOCKAGE10 = RegularLayer.create( tech, 'BLOCKAGE10', blockage10 ) +gcontact = ViaLayer .create( tech, 'gcontact' , gmetalh , gcut, gmetalv ) + +tech.setSymbolicLayer( CONT_BODY_N.getName() ) +tech.setSymbolicLayer( CONT_BODY_P.getName() ) +tech.setSymbolicLayer( CONT_DIF_N .getName() ) +tech.setSymbolicLayer( CONT_DIF_P .getName() ) +tech.setSymbolicLayer( CONT_POLY .getName() ) +tech.setSymbolicLayer( POLY .getName() ) +tech.setSymbolicLayer( POLY2 .getName() ) +tech.setSymbolicLayer( METAL1 .getName() ) +tech.setSymbolicLayer( METAL2 .getName() ) +tech.setSymbolicLayer( METAL3 .getName() ) +tech.setSymbolicLayer( METAL4 .getName() ) +tech.setSymbolicLayer( METAL5 .getName() ) +tech.setSymbolicLayer( METAL6 .getName() ) +tech.setSymbolicLayer( METAL7 .getName() ) +tech.setSymbolicLayer( METAL8 .getName() ) +tech.setSymbolicLayer( METAL9 .getName() ) +tech.setSymbolicLayer( METAL10 .getName() ) +tech.setSymbolicLayer( BLOCKAGE1 .getName() ) +tech.setSymbolicLayer( BLOCKAGE2 .getName() ) +tech.setSymbolicLayer( BLOCKAGE3 .getName() ) +tech.setSymbolicLayer( BLOCKAGE4 .getName() ) +tech.setSymbolicLayer( BLOCKAGE5 .getName() ) +tech.setSymbolicLayer( BLOCKAGE6 .getName() ) +tech.setSymbolicLayer( BLOCKAGE7 .getName() ) +tech.setSymbolicLayer( BLOCKAGE8 .getName() ) +tech.setSymbolicLayer( BLOCKAGE9 .getName() ) +tech.setSymbolicLayer( BLOCKAGE10 .getName() ) +tech.setSymbolicLayer( VIA12 .getName() ) +tech.setSymbolicLayer( VIA23 .getName() ) +tech.setSymbolicLayer( VIA34 .getName() ) +tech.setSymbolicLayer( VIA45 .getName() ) +tech.setSymbolicLayer( VIA56 .getName() ) +tech.setSymbolicLayer( VIA67 .getName() ) +tech.setSymbolicLayer( VIA78 .getName() ) +tech.setSymbolicLayer( VIA89 .getName() ) +tech.setSymbolicLayer( VIA910 .getName() ) +tech.setSymbolicLayer( gcut .getName() ) +tech.setSymbolicLayer( gmetalh .getName() ) +tech.setSymbolicLayer( gmetalv .getName() ) +tech.setSymbolicLayer( gcontact .getName() ) + +NWELL.setExtentionCap ( nWell, l(2.0) ) +NWELL.setExtentionWidth( nWell, l(0.0) ) +PWELL.setExtentionCap ( pWell, l(2.0) ) +PWELL.setExtentionWidth( nWell, l(0.0) ) + +NTIE.setMinimalSize ( l(3.0) ) +NTIE.setExtentionCap ( nWell , l(2.0) ) +NTIE.setExtentionWidth( nWell , l(2.5) ) +NTIE.setExtentionCap ( nImplant, l(1.5) ) +NTIE.setExtentionWidth( nImplant, l(0.0) ) +NTIE.setExtentionCap ( active , l(0.0) ) +NTIE.setExtentionWidth( active , l(0.0) ) + +PTIE.setMinimalSize ( l(3.0) ) +PTIE.setExtentionCap ( pWell , l(2.0) ) +PTIE.setExtentionWidth( pWell , l(2.5) ) +PTIE.setExtentionCap ( pImplant, l(1.5) ) +PTIE.setExtentionWidth( pImplant, l(0.0) ) +PTIE.setExtentionCap ( active , l(0.0) ) +PTIE.setExtentionWidth( active , l(0.0) ) + +NDIF.setMinimalSize ( l(3.0) ) +NDIF.setExtentionCap ( nImplant, l(0.5) ) +NDIF.setExtentionWidth( nImplant, l(0.0) ) +NDIF.setExtentionCap ( active , l(0.5) ) +NDIF.setExtentionWidth( active , l(0.0) ) + +PDIF.setMinimalSize ( l(3.0) ) +PDIF.setExtentionCap ( pImplant, l(0.5) ) +PDIF.setExtentionWidth( pImplant, l(0.0) ) +PDIF.setExtentionCap ( active , l(0.5) ) +PDIF.setExtentionWidth( active , l(0.0) ) + +GATE.setMinimalSize ( l(1.0) ) +GATE.setExtentionCap ( poly , l(1.5) ) + +NTRANS.setMinimalSize ( l( 1.0) ) +NTRANS.setExtentionCap ( nImplant, l(-1.5) ) +NTRANS.setExtentionWidth( nImplant, l( 3.0) ) +NTRANS.setExtentionCap ( active , l(-1.5) ) +NTRANS.setExtentionWidth( active , l( 2.0) ) + +PTRANS.setMinimalSize ( l( 1.0) ) +PTRANS.setExtentionCap ( nWell , l(-1.5) ) +PTRANS.setExtentionWidth( nWell , l( 2.5) ) +PTRANS.setExtentionCap ( pImplant, l(-1.5) ) +PTRANS.setExtentionWidth( pImplant, l( 2.5) ) +PTRANS.setExtentionCap ( active , l(-1.5) ) +PTRANS.setExtentionWidth( active , l( 2.5) ) + +POLY .setMinimalSize ( l(1.0) ) +POLY .setExtentionCap ( poly , l(0.5) ) +POLY2.setMinimalSize ( l(1.0) ) +POLY2.setExtentionCap ( poly , l(0.5) ) + +METAL1 .setMinimalSize ( l(1.0) ) +METAL1 .setExtentionCap ( metal1 , l(1.0) ) +METAL2 .setMinimalSize ( l(1.0) ) +METAL2 .setExtentionCap ( metal2 , l(1.0) ) +METAL3 .setMinimalSize ( l(1.0) ) +METAL3 .setExtentionCap ( metal3 , l(1.0) ) +METAL4 .setMinimalSize ( l(1.0) ) +METAL4 .setExtentionCap ( metal4 , l(1.0) ) +METAL4 .setMinimalSpacing( l(3.0) ) +METAL5 .setMinimalSize ( l(2.0) ) +METAL5 .setExtentionCap ( metal5 , l(1.0) ) +METAL6 .setMinimalSize ( l(2.0) ) +METAL6 .setExtentionCap ( metal6 , l(1.0) ) +METAL7 .setMinimalSize ( l(2.0) ) +METAL7 .setExtentionCap ( metal7 , l(1.0) ) +METAL8 .setMinimalSize ( l(2.0) ) +METAL8 .setExtentionCap ( metal8 , l(1.0) ) +METAL9 .setMinimalSize ( l(2.0) ) +METAL9 .setExtentionCap ( metal9 , l(1.0) ) +METAL10.setMinimalSize ( l(2.0) ) +METAL10.setExtentionCap ( metal10 , l(1.0) ) + +# Contacts (i.e. Active <--> Metal) (symbolic). +CONT_BODY_N.setMinimalSize( l( 1.0) ) +#CONT_BODY_N.setEnclosure ( nWell , l( 1.5), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_N.setEnclosure ( nImplant, l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_N.setEnclosure ( cut0 , l( 0.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_N.setEnclosure ( active , l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_N.setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) + +CONT_BODY_P.setMinimalSize( l( 1.0) ) +#CONT_BODY_P.setEnclosure ( pWell , l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_P.setEnclosure ( pImplant, l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_P.setEnclosure ( cut0 , l( 0.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_P.setEnclosure ( active , l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_BODY_P.setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) + +CONT_DIF_N.setMinimalSize( l( 1.0) ) +CONT_DIF_N.setEnclosure ( nImplant, l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_N.setEnclosure ( cut0 , l( 0.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_N.setEnclosure ( active , l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_N.setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) + +CONT_DIF_P.setMinimalSize( l( 1.0) ) +CONT_DIF_P.setEnclosure ( pImplant, l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_P.setEnclosure ( cut0 , l( 0.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_P.setEnclosure ( active , l( 1.0), Layer.EnclosureH|Layer.EnclosureV ) +CONT_DIF_P.setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) + +CONT_POLY.setMinimalSize( l( 1.0) ) +CONT_POLY.setEnclosure ( poly , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +CONT_POLY.setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) + +# VIAs (i.e. Metal <--> Metal) (symbolic). +VIA12 .setMinimalSize ( l( 1.0) ) +VIA12 .setEnclosure ( metal1 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA12 .setEnclosure ( metal2 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA12 .setMinimalSpacing( l( 4.0) ) +VIA23 .setMinimalSize ( l( 1.0) ) +VIA23 .setEnclosure ( metal2 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA23 .setEnclosure ( metal3 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA23 .setMinimalSpacing( l( 4.0) ) +VIA34 .setMinimalSize ( l( 1.0) ) +VIA34 .setEnclosure ( metal3 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA34 .setEnclosure ( metal4 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA34 .setMinimalSpacing( l( 4.0) ) +VIA45 .setMinimalSize ( l( 1.0) ) +VIA45 .setEnclosure ( metal4 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA45 .setEnclosure ( metal5 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA45 .setMinimalSpacing( l( 4.0) ) +VIA56 .setMinimalSize ( l( 1.0) ) +VIA56 .setEnclosure ( metal5 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA56 .setEnclosure ( metal6 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA56 .setMinimalSpacing( l( 4.0) ) +VIA67 .setMinimalSize ( l( 1.0) ) +VIA67 .setEnclosure ( metal6 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA67 .setEnclosure ( metal7 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA67 .setMinimalSpacing( l( 4.0) ) +VIA78 .setMinimalSpacing( l( 4.0) ) +VIA78 .setMinimalSize ( l( 1.0) ) +VIA78 .setEnclosure ( metal7 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA78 .setEnclosure ( metal8 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA78 .setMinimalSpacing( l( 4.0) ) +VIA89 .setMinimalSize ( l( 1.0) ) +VIA89 .setEnclosure ( metal8 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA89 .setEnclosure ( metal9 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA89 .setMinimalSpacing( l( 4.0) ) +VIA910.setMinimalSize ( l( 1.0) ) +VIA910.setEnclosure ( metal9 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA910.setEnclosure ( metal10 , l( 0.5), Layer.EnclosureH|Layer.EnclosureV ) +VIA910.setMinimalSpacing( l( 4.0) ) + +# Blockages (symbolic). +BLOCKAGE1 .setMinimalSize ( l( 1.0) ) +BLOCKAGE1 .setExtentionCap( blockage1 , l( 0.5) ) +BLOCKAGE2 .setMinimalSize ( l( 2.0) ) +BLOCKAGE2 .setExtentionCap( blockage2 , l( 0.5) ) +BLOCKAGE3 .setMinimalSize ( l( 2.0) ) +BLOCKAGE3 .setExtentionCap( blockage3 , l( 0.5) ) +BLOCKAGE4 .setMinimalSize ( l( 2.0) ) +BLOCKAGE4 .setExtentionCap( blockage4 , l( 0.5) ) +BLOCKAGE5 .setMinimalSize ( l( 2.0) ) +BLOCKAGE5 .setExtentionCap( blockage5 , l( 1.0) ) +BLOCKAGE6 .setMinimalSize ( l( 2.0) ) +BLOCKAGE6 .setExtentionCap( blockage6 , l( 1.0) ) +BLOCKAGE7 .setMinimalSize ( l( 2.0) ) +BLOCKAGE7 .setExtentionCap( blockage7 , l( 1.0) ) +BLOCKAGE8 .setMinimalSize ( l( 2.0) ) +BLOCKAGE8 .setExtentionCap( blockage8 , l( 1.0) ) +BLOCKAGE9 .setMinimalSize ( l( 2.0) ) +BLOCKAGE9 .setExtentionCap( blockage9 , l( 1.0) ) +BLOCKAGE10.setMinimalSize ( l( 2.0) ) +BLOCKAGE10.setExtentionCap( blockage10, l( 1.0) ) + + +gdsLayersTable = \ + [ ("nWell" , "LNWELL" , 1, 0) + , ("nImplant", "LNIF" , 3, 0) + , ("pImplant", "LPDIF" , 4, 0) + , ("active" , "LACTIVE" , 2, 0) + , ("poly" , "LPOLY" , 7, 0) + , ("cut0" , "LCONT" , 10, 0) + , ("metal1" , "LALU1" , 11, 0) + , ("cut1" , "LVIA" , 14, 0) + , ("metal2" , "LALU2" , 16, 0) + , ("cut2" , "LVIA2" , 18, 0) + , ("metal3" , "LALU3" , 19, 0) + , ("cut3" , "LVIA3" , 21, 0) + , ("metal4" , "LALU4" , 22, 0) + , ("cut4" , "LVIA4" , 25, 0) + , ("metal5" , "LALU5" , 26, 0) + , ("cut5" , "LVIA5" , 28, 0) + , ("metal6" , "LALU6" , 29, 0) + ] + + +loadGdsLayers( gdsLayersTable ) diff --git a/cumulus/src/designflow/technos.py b/cumulus/src/designflow/technos.py index 2ff7ebdc..f3234ba1 100644 --- a/cumulus/src/designflow/technos.py +++ b/cumulus/src/designflow/technos.py @@ -82,6 +82,46 @@ def setupCMOS ( checkToolkit=None ): break +def setupLCMOS ( checkToolkit=None ): + Where( checkToolkit ) + ShellEnv().export() + + from .. import Cfg + from .. import Viewer + from .. import CRL + from ..helpers import overlay, l, u, n + from .yosys import Yosys + import coriolis.technos.symbolic.lcmos + + with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg: + cfg.misc.catchCore = False + cfg.misc.info = False + cfg.misc.paranoid = False + cfg.misc.bug = False + cfg.misc.logMode = True + cfg.misc.verboseLevel1 = True + cfg.misc.verboseLevel2 = True + cfg.misc.minTraceLevel = 1900 + cfg.misc.maxTraceLevel = 3000 + cfg.katana.eventsLimit = 1000000 + cfg.katana.termSatReservedLocal = 6 + cfg.katana.termSatThreshold = 9 + Viewer.Graphics.setStyle( 'Alliance.Classic [black]' ) + af = CRL.AllianceFramework.get() + env = af.getEnvironment() + env.setCLOCK( '^ck$|m_clock|^clk$' ) + + Yosys.setLiberty( Where.checkToolkit / 'cells' / 'lsxlib' / 'lsxlib.lib' ) + ShellEnv.RDS_TECHNO_NAME = (Where.allianceTop / 'etc' / 'cmos.rds').as_posix() + + path = None + for pathVar in [ 'PATH', 'path' ]: + if pathVar in os.environ: + path = os.environ[ pathVar ] + os.environ[ pathVar ] = path + ':' + (Where.allianceTop / 'bin').as_posix() + break + + def setupCMOS45 ( useNsxlib=False, checkToolkit=None, cellsTop=None ): from .. import Cfg from .. import Viewer