Add support for GF180MCU, borrowed from Chips4Makers.

Original source:
    https://gitlab.com/Chips4Makers/c4m-pdk-gf180mcu.git
Duplicated because I needed to do some patches and combine it with
the vendor I/O pads.
This commit is contained in:
Jean-Paul Chaput 2023-08-31 16:14:08 +02:00
parent 8dc13eab5b
commit 2c32dbbf67
6 changed files with 15988 additions and 1 deletions

View File

@ -25,7 +25,7 @@ def _setup_techno():
tech = Technology.create( db, 'GF180MCU' ) tech = Technology.create( db, 'GF180MCU' )
DbU.setPrecision( 2 ) DbU.setPrecision( 2 )
DbU.setPhysicalsPerGrid( 0.005, DbU.UnitPowerMicro ) DbU.setPhysicalsPerGrid( 0.0005, DbU.UnitPowerMicro )
with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg: with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg:
cfg.gdsDriver.metricDbu = 1e-09 cfg.gdsDriver.metricDbu = 1e-09
cfg.gdsDriver.dbuPerUu = 0.001 cfg.gdsDriver.dbuPerUu = 0.001

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,76 @@
import sys
import os.path
from coriolis import Cfg
from coriolis.Hurricane import Technology, DataBase, DbU, Library, Layer, \
BasicLayer, Cell, Net, Horizontal, Vertical, Contact, \
Rectilinear, Box, Point, Instance, Transformation, \
NetExternalComponents, Pad, Path, Query
import coriolis.Viewer
from coriolis.CRL import AllianceFramework, Gds, LefImport, CellGauge, \
RoutingGauge, RoutingLayerGauge
from coriolis.Anabatic import StyleFlags
from coriolis.helpers import trace, l, u, n, overlay, io, ndaTopDir
from coriolis.helpers.overlay import CfgCache, UpdateSession
__all__ = [ 'setup' ]
def _routing ():
"""
Define the routing gauge for I/O cells along with the various P&R tool parameters.
"""
with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg:
cfg.chip.block.rails.count = 2
cfg.chip.block.rails.hWidth = u(30.0)
cfg.chip.block.rails.vWidth = u(30.0)
cfg.chip.block.rails.hSpacing = u( 6.0)
cfg.chip.block.rails.vSpacing = u( 6.0)
cfg.chip.padCorner = 'gf180mcu_fd_io__cor_5lm'
cfg.chip.padSpacers = 'gf180mcu_fd_io__fill10_5lm,gf180mcu_fd_io__fill5_5lm,gf180mcu_fd_io__fill1_5lm'
af = AllianceFramework.get()
cg = CellGauge.create( 'LEF.GF_IO_Site'
, 'Metal2' # pin layer name.
, u( 1.0) # pitch.
, u(350.0) # cell slice height.
, u( 75.0) # cell slice step.
)
af.addCellGauge( cg )
def _loadIoLib ( pdkDir ):
"""
Load the I/O cells from the LEF+GDS files.
"""
af = AllianceFramework.get()
db = DataBase.getDB()
tech = db.getTechnology()
rootlib = db.getRootLibrary()
ioLib = Library.create( rootlib, 'iolib' )
LefImport.setMergeLibrary( ioLib )
LefImport.load( (pdkDir / 'libraries'
/ 'gf180mcu_fd_sc_mcu9t5v0'
/ 'latest'
/ 'tech'
/ 'gf180mcu_6LM_1TM_9K_9t_tech.lef').as_posix() )
print( ' o Setup GF180MCU I/O library in {}.'.format( ioLib.getName() ))
io.vprint( 1, ' o Setup GF180MCU I/O library in {}.'.format( ioLib.getName() ))
cellsDir = pdkDir / 'libraries' / 'gf180mcu_fd_io' / 'latest' / 'cells'
print( cellsDir )
for lefFile in cellsDir.glob( '*/*_5lm.lef' ):
print( lefFile )
gdsFile = lefFile.with_suffix( '.gds' )
if gdsFile.is_file():
Gds.setTopCellName( gdsFile.stem[:-4] )
Gds.load( ioLib, gdsFile.as_posix(), Gds.Layer_0_IsBoundary|Gds.NoBlockages )
LefImport.load( lefFile.as_posix() )
af.wrapLibrary( ioLib, 1 )
def setup ( pdkDir ):
#with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg:
# cfg.misc.minTraceLevel = 100
# cfg.misc.maxTraceLevel = 102
_routing()
_loadIoLib( pdkDir )

View File

@ -0,0 +1,403 @@
# Autogenerated file
# SPDX-License-Identifier: GPL-2.0-or-later OR AGPL-3.0-or-later OR CERN-OHL-S-2.0+
# Autogenerated file. Changes will be overwritten.
try:
import coriolis
except ImportError:
import CRL, Hurricane, Viewer, Cfg
from Hurricane import (
Technology, DataBase, DbU, Library,
Layer, BasicLayer,
Cell, Net, Horizontal, Vertical, Rectilinear, Box, Point,
NetExternalComponents,
)
from common.colors import toRGB
from common.patterns import toHexa
from helpers import u
from helpers.technology import createBL, createVia
from helpers.overlay import CfgCache
from helpers.analogtechno import Length, Area, Unit, Asymmetric, loadAnalogTechno
else:
from coriolis import CRL, Hurricane, Viewer, Cfg
from coriolis.Hurricane import (
Technology, DataBase, DbU, Library,
Layer, BasicLayer,
Cell, Net, Horizontal, Vertical, Rectilinear, Box, Point,
NetExternalComponents,
)
from coriolis.technos.common.colors import toRGB
from coriolis.technos.common.patterns import toHexa
from coriolis.helpers import u
from coriolis.helpers.technology import createBL, createVia
from coriolis.helpers.overlay import CfgCache
from coriolis.helpers.analogtechno import Length, Area, Unit, Asymmetric, loadAnalogTechno
__all__ = ["analogTechnologyTable", "setup"]
analogTechnologyTable = (
('Header', 'gf180mcu', DbU.UnitPowerMicro, 'alpha'),
('PhysicalGrid', 0.005, Length, ''),
('minWidth', 'Nwell', 0.86, Length, ''),
('minSpacing', 'Nwell', 1.7, Length, ''),
('minWidth', 'Nplus', 0.4, Length, ''),
('minSpacing', 'Nplus', 0.4, Length, ''),
('minArea', 'Nplus', 0.35, Area, ''),
('minWidth', 'Pplus', 0.4, Length, ''),
('minSpacing', 'Pplus', 0.4, Length, ''),
('minArea', 'Pplus', 0.35, Area, ''),
('minWidth', 'Dualgate', 0.7, Length, ''),
('minSpacing', 'Dualgate', 0.44, Length, ''),
('minWidth', 'COMP', 0.3, Length, ''),
('minSpacing', 'COMP', 0.28, Length, ''),
('minArea', 'COMP', 0.2025, Area, ''),
('minEnclosure', 'Nwell', 'COMP', (0.6, 0.6), Length|Asymmetric, ''),
('minSpacing', 'Nwell', 'COMP', (0.6, 0.6), Length|Asymmetric, ''),
# TODO for COMP:
# allow_in_substrate, implant_abut, allow_contactless_implant, allow_well_crossing
('minWidth', 'Poly2', 0.28, Length, ''),
('minSpacing', 'Poly2', 0.24, Length, ''),
('minWidth', 'Metal1', 0.23, Length, ''),
('minSpacing', 'Metal1', 0.23, Length, ''),
('minArea', 'Metal1', 0.1444, Area, ''),
('minDensity', 'Metal1', 0.3, Unit, ''),
('minWidth', 'Metal2', 0.28, Length, ''),
('minSpacing', 'Metal2', 0.28, Length, ''),
('minArea', 'Metal2', 0.1444, Area, ''),
('minDensity', 'Metal2', 0.3, Unit, ''),
('minWidth', 'Metal3', 0.28, Length, ''),
('minSpacing', 'Metal3', 0.28, Length, ''),
('minArea', 'Metal3', 0.1444, Area, ''),
('minDensity', 'Metal3', 0.3, Unit, ''),
('minWidth', 'Metal4', 0.28, Length, ''),
('minSpacing', 'Metal4', 0.28, Length, ''),
('minArea', 'Metal4', 0.1444, Area, ''),
('minDensity', 'Metal4', 0.3, Unit, ''),
('minWidth', 'Metal5', 0.28, Length, ''),
('minSpacing', 'Metal5', 0.28, Length, ''),
('minArea', 'Metal5', 0.1444, Area, ''),
('minDensity', 'Metal5', 0.3, Unit, ''),
('minWidth', 'MetalTop', 0.44, Length, ''),
('minSpacing', 'MetalTop', 0.436, Length, ''),
('minArea', 'MetalTop', 0.5625, Area, ''),
('minDensity', 'MetalTop', 0.3, Unit, ''),
('minWidth', 'Contact', 0.22, Length, ''),
('maxWidth', 'Contact', 0.22, Length, ''),
('minSpacing', 'Contact', 0.28, Length, ''),
('minEnclosure', 'COMP', 'Contact', (0.07, 0.07), Length|Asymmetric, ''),
('minEnclosure', 'Poly2', 'Contact', (0.07, 0.07), Length|Asymmetric, ''),
('minEnclosure', 'Metal1', 'Contact', (0.06, 0.005), Length|Asymmetric, ''),
('minWidth', 'Via1', 0.26, Length, ''),
('maxWidth', 'Via1', 0.26, Length, ''),
('minSpacing', 'Via1', 0.36, Length, ''),
('minEnclosure', 'Metal1', 'Via1', (0.06, 0.0), Length|Asymmetric, ''),
('minEnclosure', 'Metal2', 'Via1', (0.06, 0.01), Length|Asymmetric, ''),
('minWidth', 'Via2', 0.26, Length, ''),
('maxWidth', 'Via2', 0.26, Length, ''),
('minSpacing', 'Via2', 0.36, Length, ''),
('minEnclosure', 'Metal2', 'Via2', (0.06, 0.01), Length|Asymmetric, ''),
('minEnclosure', 'Metal3', 'Via2', (0.06, 0.01), Length|Asymmetric, ''),
('minWidth', 'Via3', 0.26, Length, ''),
('maxWidth', 'Via3', 0.26, Length, ''),
('minSpacing', 'Via3', 0.36, Length, ''),
('minEnclosure', 'Metal3', 'Via3', (0.06, 0.01), Length|Asymmetric, ''),
('minEnclosure', 'Metal4', 'Via3', (0.06, 0.01), Length|Asymmetric, ''),
('minWidth', 'Via4', 0.26, Length, ''),
('maxWidth', 'Via4', 0.26, Length, ''),
('minSpacing', 'Via4', 0.36, Length, ''),
('minEnclosure', 'Metal4', 'Via4', (0.06, 0.01), Length|Asymmetric, ''),
('minEnclosure', 'Metal5', 'Via4', (0.06, 0.01), Length|Asymmetric, ''),
('minWidth', 'Via5', 0.26, Length, ''),
('maxWidth', 'Via5', 0.26, Length, ''),
('minSpacing', 'Via5', 0.36, Length, ''),
('minEnclosure', 'Metal5', 'Via5', (0.06, 0.01), Length|Asymmetric, ''),
('minEnclosure', 'MetalTop', 'Via5', (0.06, 0.01), Length|Asymmetric, ''),
# ('minTransistorL', 'fet33gate', 0.28, Length, ''),
# ('minTransistorW', 'fet33gate', 0.22, Length, ''),
# ('minGateExtension', 'COMP', 'fet33gate', 0.3, Length|Asymmetric, ''),
# ('minGateExtension', 'Poly2', 'fet33gate', 0.22, Length|Asymmetric, ''),
# ('minGateSpacing', 'Contact', 'fet33gate', 0.15, Length|Asymmetric, ''),
# ('minTransistorL', 'fet5gate', 0.5, Length, ''),
# ('minGateExtension', 'COMP', 'fet5gate', 0.4, Length|Asymmetric, ''),
# ('minGateExtension', 'Poly2', 'fet5gate', 0.22, Length|Asymmetric, ''),
# ('minGateSpacing', 'Contact', 'fet5gate', 0.15, Length|Asymmetric, ''),
# ('minGateEnclosure', 'Nplus', 'nfet_03v3', (0.23, 0.23), Length|Asymmetric, ''),
# ('minTransistorL', 'nfet_05v0', 0.6, Length, ''),
# ('minGateEnclosure', 'Nplus', 'nfet_05v0', (0.23, 0.23), Length|Asymmetric, ''),
# ('minGateEnclosure', 'Pplus', 'pfet_03v3', (0.23, 0.23), Length|Asymmetric, ''),
# ('minGateEnclosure', 'Pplus', 'pfet_05v0', (0.23, 0.23), Length|Asymmetric, ''),
# ('minWidth', 'intersect(Poly2,Dualgate)', '0.2', Length, ''),
('minSpacing', 'COMP', 'Poly2', 0.3, Length|Asymmetric, ''),
# ('minWidth', 'intersect(COMP,Dualgate)', '0.3', Length, ''),
# ('minSpacing', 'intersect(COMP,Dualgate)', 0.36, Length, ''),
('minSpacing', 'COMP', 'Nwell', 0.6, Length|Asymmetric, ''),
)
def _setup_techno():
db = DataBase.create()
CRL.System.get()
tech = Technology.create(db, 'gf180mcu')
DbU.setPrecision(2)
DbU.setPhysicalsPerGrid(0.005, DbU.UnitPowerMicro)
with CfgCache(priority=Cfg.Parameter.Priority.ConfigurationFile) as cfg:
cfg.gdsDriver.metricDbu = 1e-09
cfg.gdsDriver.dbuPerUu = 0.001
DbU.setGridsPerLambda(56)
DbU.setSymbolicSnapGridStep(DbU.fromGrid(1.0))
DbU.setPolygonStep(DbU.fromGrid(1.0))
DbU.setStringMode(DbU.StringModePhysical, DbU.UnitPowerMicro)
createBL(
tech, 'Nwell', BasicLayer.Material.nWell,
size=u(0.86), spacing=u(1.7), gds2Layer=21, gds2DataType=0,
)
createBL(
tech, 'Nplus', BasicLayer.Material.nImplant,
size=u(0.4), spacing=u(0.4), area=0.35, gds2Layer=32, gds2DataType=0,
)
createBL(
tech, 'Pplus', BasicLayer.Material.pImplant,
size=u(0.4), spacing=u(0.4), area=0.35, gds2Layer=31, gds2DataType=0,
)
createBL(
tech, 'Dualgate', BasicLayer.Material.other,
gds2Layer=55, gds2DataType=0,
)
createBL( tech, 'Metal1_Label', BasicLayer.Material.other, gds2Layer=34, gds2DataType=10 )
createBL( tech, 'Metal2_Label', BasicLayer.Material.other, gds2Layer=36, gds2DataType=10 )
createBL( tech, 'Metal3_Label', BasicLayer.Material.other, gds2Layer=42, gds2DataType=10 )
createBL( tech, 'Metal4_Label', BasicLayer.Material.other, gds2Layer=46, gds2DataType=10 )
createBL( tech, 'Metal5_Label', BasicLayer.Material.other, gds2Layer=81, gds2DataType=10 )
createBL( tech, 'MetalTop_Label', BasicLayer.Material.other, gds2Layer=53, gds2DataType=10 )
createBL(
tech, 'COMP', BasicLayer.Material.active,
size=u(0.3), spacing=u(0.28), area=0.2025, gds2Layer=22, gds2DataType=0,
)
createBL(
tech, 'Poly2', BasicLayer.Material.poly,
size=u(0.28), spacing=u(0.24), gds2Layer=30, gds2DataType=0,
)
createBL(
tech, 'Contact', BasicLayer.Material.cut,
size=u(0.22), spacing=u(0.28), gds2Layer=33, gds2DataType=0,
)
Metal1 = createBL( tech, 'Metal1' , BasicLayer.Material.metal, size=u(0.23), spacing=u(0.23 ), area=0.1444, gds2Layer=34, gds2DataType=0, )
Via1 = createBL( tech, 'Via1' , BasicLayer.Material.cut , size=u(0.26), spacing=u(0.36 ), gds2Layer=35, gds2DataType=0, )
Metal2 = createBL( tech, 'Metal2' , BasicLayer.Material.metal, size=u(0.28), spacing=u(0.28 ), area=0.1444, gds2Layer=36, gds2DataType=0, )
Via2 = createBL( tech, 'Via2' , BasicLayer.Material.cut , size=u(0.26), spacing=u(0.36 ), gds2Layer=38, gds2DataType=0, )
Metal3 = createBL( tech, 'Metal3' , BasicLayer.Material.metal, size=u(0.28), spacing=u(0.28 ), area=0.1444, gds2Layer=42, gds2DataType=0, )
Via3 = createBL( tech, 'Via3' , BasicLayer.Material.cut , size=u(0.26), spacing=u(0.36 ), gds2Layer=40, gds2DataType=0, )
Metal4 = createBL( tech, 'Metal4' , BasicLayer.Material.metal, size=u(0.28), spacing=u(0.28 ), area=0.1444, gds2Layer=46, gds2DataType=0, )
Via4 = createBL( tech, 'Via4' , BasicLayer.Material.cut , size=u(0.26), spacing=u(0.36 ), gds2Layer=41, gds2DataType=0, )
Metal5 = createBL( tech, 'Metal5' , BasicLayer.Material.metal, size=u(0.28), spacing=u(0.28 ), area=0.1444, gds2Layer=81, gds2DataType=0, )
Via5 = createBL( tech, 'Via5' , BasicLayer.Material.cut , size=u(0.26), spacing=u(0.36 ), gds2Layer=82, gds2DataType=0, )
MetalTop = createBL( tech, 'MetalTop', BasicLayer.Material.metal, size=u(0.44), spacing=u(0.436), area=0.5625, gds2Layer=53, gds2DataType=0, )
createBL(
tech, 'V5_XTOR', BasicLayer.Material.other,
gds2Layer=112, gds2DataType=1,
)
# ViaLayers
# Metal1<>Via1<>Metal2
createVia(
tech, 'Metal1_Via1_Metal2', 'Metal1', 'Via1', 'Metal2',
u(0.26),
)
# Metal2<>Via2<>Metal3
createVia(
tech, 'Metal2_Via2_Metal3', 'Metal2', 'Via2', 'Metal3',
u(0.26),
)
# Metal3<>Via3<>Metal4
createVia(
tech, 'Metal3_Via3_Metal4', 'Metal3', 'Via3', 'Metal4',
u(0.26),
)
# Metal4<>Via4<>Metal5
createVia(
tech, 'Metal4_Via4_Metal5', 'Metal4', 'Via4', 'Metal5',
u(0.26),
)
# Metal5<>Via5<>MetalTop
createVia(
tech, 'Metal5_Via5_MetalTop', 'Metal5', 'Via5', 'MetalTop',
u(0.26),
)
# Blockages
Metal1_BLK = createBL( tech, 'Metal1_BLK', BasicLayer.Material.blockage, gds2Layer=34, gds2DataType=5 )
Metal2_BLK = createBL( tech, 'Metal2_BLK', BasicLayer.Material.blockage, gds2Layer=36, gds2DataType=5 )
Metal3_BLK = createBL( tech, 'Metal3_BLK', BasicLayer.Material.blockage, gds2Layer=42, gds2DataType=5 )
Metal4_BLK = createBL( tech, 'Metal4_BLK', BasicLayer.Material.blockage, gds2Layer=46, gds2DataType=5 )
Metal5_BLK = createBL( tech, 'Metal5_BLK', BasicLayer.Material.blockage, gds2Layer=81, gds2DataType=5 )
MetalT_BLK = createBL( tech, 'MetalT_BLK', BasicLayer.Material.blockage, gds2Layer=53, gds2DataType=5 )
Via1_BLK = createBL( tech, 'Via1_BLK', BasicLayer.Material.blockage, gds2Layer=35, gds2DataType=5 )
Via2_BLK = createBL( tech, 'Via2_BLK', BasicLayer.Material.blockage, gds2Layer=38, gds2DataType=5 )
Via3_BLK = createBL( tech, 'Via3_BLK', BasicLayer.Material.blockage, gds2Layer=40, gds2DataType=5 )
Via4_BLK = createBL( tech, 'Via4_BLK', BasicLayer.Material.blockage, gds2Layer=41, gds2DataType=5 )
Via5_BLK = createBL( tech, 'Via5_BLK', BasicLayer.Material.blockage, gds2Layer=82, gds2DataType=5 )
Metal1.setBlockageLayer( Metal1_BLK )
Metal2.setBlockageLayer( Metal2_BLK )
Metal3.setBlockageLayer( Metal3_BLK )
Metal4.setBlockageLayer( Metal4_BLK )
Metal5.setBlockageLayer( Metal5_BLK )
MetalTop.setBlockageLayer( MetalT_BLK )
Via1.setBlockageLayer( Via1_BLK )
Via2.setBlockageLayer( Via2_BLK )
Via3.setBlockageLayer( Via3_BLK )
Via4.setBlockageLayer( Via4_BLK )
Via5.setBlockageLayer( Via5_BLK )
createBL( tech, 'Text_Label', BasicLayer.Material.other, gds2Layer=58 )
createBL( tech, 'Border' , BasicLayer.Material.other, gds2Layer=63 )
# Coriolis internal layers
createBL(
tech, 'text.cell', BasicLayer.Material.other,
)
createBL(
tech, 'text.instance', BasicLayer.Material.other,
)
createBL(
tech, 'SPL1', BasicLayer.Material.other,
)
createBL(
tech, 'AutoLayer', BasicLayer.Material.other,
)
createBL(
tech, 'gmetalh', BasicLayer.Material.metal,
)
createBL(
tech, 'gcontact', BasicLayer.Material.cut,
)
createBL(
tech, 'gmetalv', BasicLayer.Material.metal,
)
# Resistors
# Capacitors
# Transistors
# GateLayer.create(tech, 'fet33gate', 'COMP', 'Poly2')
# GateLayer.create(tech, 'fet5gate', 'COMP', 'Poly2', 'Dualgate')
# TransistorLayer.create(tech, 'nfet_03v3', 'fet33gate', 'Nplus')
# TransistorLayer.create(tech, 'nfet_05v0', 'fet5gate', 'Nplus')
# TransistorLayer.create(tech, 'pfet_03v3', 'fet33gate', 'Pplus', 'Nwell')
# TransistorLayer.create(tech, 'pfet_05v0', 'fet5gate', 'Pplus', 'Nwell')
# Bipolars
def _setup_display():
# ----------------------------------------------------------------------
# Style: Alliance.Classic [black]
threshold = 0.2 if Viewer.Graphics.isHighDpi() else 0.1
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 )
style.addDrawingStyle( group='Viewer', name='phantom' , color=toRGB('Seashell4' ), border=1 )
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=2.0 )
style.addDrawingStyle( group='Viewer', name='spot' , color=toRGB('White' ), border=2, threshold=6.0 )
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 )
style.addDrawingStyle( group='Viewer', name='text.instance' , color=toRGB('White' ), border=1, threshold=400.0 )
style.addDrawingStyle( group='Viewer', name='text.reference', color=toRGB('White' ), border=1, threshold=200.0 )
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=threshold)
style.addDrawingStyle(group='Active Layers', name='Nplus', color=toRGB('LawnGreen'), pattern=toHexa('antihash0.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Active Layers', name='Pplus', color=toRGB('Yellow'), pattern=toHexa('antihash0.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Active Layers', name='COMP', color=toRGB('White'), pattern=toHexa('antihash0.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Active Layers', name='Poly2', color=toRGB('Red'), pattern=toHexa('antihash0.8'), border=1, threshold=threshold)
# Routing Layers.
style.addDrawingStyle(group='Routing Layers', name='Metal1', color=toRGB('Blue'), pattern=toHexa('slash.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal1_Label', color=toRGB('Blue'), pattern=toHexa('slash.8'), border=2, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal2', color=toRGB('Aqua'), pattern=toHexa('poids4.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal2_Label', color=toRGB('Aqua'), pattern=toHexa('poids4.8'), border=2, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal3', color=toRGB('LightPink'), pattern=toHexa('poids4.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal3_Label', color=toRGB('LightPink'), pattern=toHexa('poids4.8'), border=2, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal4', color=toRGB('Green'), pattern=toHexa('poids4.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal4_Label', color=toRGB('Green'), pattern=toHexa('poids4.8'), border=2, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal5', color=toRGB('Yellow'), pattern=toHexa('poids4.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='Metal5_Label', color=toRGB('Yellow'), pattern=toHexa('poids4.8'), border=2, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='MetalTop', color=toRGB('Violet'), pattern=toHexa('poids4.8'), border=1, threshold=threshold)
style.addDrawingStyle(group='Routing Layers', name='MetalTop_Label', color=toRGB('Violet'), pattern=toHexa('poids4.8'), border=2, threshold=threshold)
# Cuts (VIA holes).
style.addDrawingStyle(group='Cuts (VIA holes)', name='Contact', color=toRGB('0,150,150'), threshold=threshold)
style.addDrawingStyle(group='Cuts (VIA holes)', name='Via1' , color=toRGB('Aqua' ), threshold=threshold)
style.addDrawingStyle(group='Cuts (VIA holes)', name='Via2' , color=toRGB('LightPink'), threshold=threshold)
style.addDrawingStyle(group='Cuts (VIA holes)', name='Via3' , color=toRGB('Green' ), threshold=threshold)
style.addDrawingStyle(group='Cuts (VIA holes)', name='Via4' , color=toRGB('Yellow' ), threshold=threshold)
style.addDrawingStyle(group='Cuts (VIA holes)', name='Via5' , color=toRGB('Violet' ), threshold=threshold)
# Group: Blockages.
style.addDrawingStyle( group='Blockages', name='Metal1_BLK' , color=toRGB('Blue' ), pattern='006070381c0e0703' , threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='Metal2_BLK' , color=toRGB('Aqua' ), pattern='8103060c183060c0' , threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='Metal3_BLK' , color=toRGB('LightPink'), pattern=toHexa('poids4.8' ), threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='Metal4_BLK' , color=toRGB('Green' ), pattern=toHexa('light_antihash2.8'), threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='Metal5_BLK' , color=toRGB('Yellow' ), pattern='1144114411441144' , threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='MetalTop_BLK', color=toRGB('Violet' ), pattern=toHexa('light_antihash0.8'), threshold=0.80, border=2 )
style.addDrawingStyle( group='Blockages', name='Via1_BLK' , color=toRGB('Aqua' ), threshold=threshold, border=2 )
style.addDrawingStyle( group='Blockages', name='Via2_BLK' , color=toRGB('LightPink'), threshold=threshold, border=2 )
style.addDrawingStyle( group='Blockages', name='Via3_BLK' , color=toRGB('Green' ), threshold=threshold, border=2 )
style.addDrawingStyle( group='Blockages', name='Via4_BLK' , color=toRGB('Yellow' ), threshold=threshold, border=2 )
style.addDrawingStyle( group='Blockages', name='Via5_BLK' , color=toRGB('Violet' ), threshold=threshold, border=2 )
# 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='gcontact' , 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 )
style.addDrawingStyle( group='Knik & Kite', name='Anabatic::GCell', color=toRGB('255,255,190'), pattern='0000000000000000' , border=2, threshold=threshold )
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) )
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='boundaries', color=toRGB('Black'), border=1, pattern='0000000000000000' )
Viewer.Graphics.addStyle( style )
Viewer.Graphics.setStyle( 'Alliance.Classic [black]' )
def setup():
_setup_techno()
_setup_display()
loadAnalogTechno(analogTechnologyTable, __file__)
try:
from .techno_fix import fix
except:
pass
else:
fix()

View File

@ -244,6 +244,58 @@ def setupSky130_c4m ( checkToolkit=None, pdkMasterTop=None ):
ShellEnv.CHECK_TOOLKIT = Where.checkToolkit.as_posix() ShellEnv.CHECK_TOOLKIT = Where.checkToolkit.as_posix()
def setupGf180mcu_c4m ( checkToolkit=None
, pdkMasterTop=Path('/usr/share/open_pdks/C4M.gf180mcu') ):
from .. import Cfg
from .. import Viewer
from .. import CRL
from ..helpers import overlay, l, u, n
from .yosys import Yosys
if isinstance(pdkMasterTop,str):
pdkMasterTop = Path( pdkMasterTop )
if not pdkMasterTop.is_dir():
print( '[ERROR] technos.setupGf180mcu_c4m(): pdkMasterTop directory do *not* exists:' )
print( ' "{}"'.format(pdkMasterTop.as_posix()) )
#sys.path.append( (pdkMasterTop / 'libs.tech'
# / 'coriolis'
# / 'techno'
# / 'etc'
# / 'coriolis2').resolve().as_posix() )
Where( checkToolkit )
from ..technos.node180.gf180mcu_c4m import techno, StdCell3V3Lib, iolib
techno.setup()
StdCell3V3Lib.setup()
iolib.setup( Where.checkToolkit / '..' / 'gf180mcu-pdk' )
liberty = pdkMasterTop / 'libs.ref' / 'StdCell3V3Lib' / 'liberty' / 'StdCell3V3Lib_nom.lib'
with overlay.CfgCache(priority=Cfg.Parameter.Priority.UserFile) as cfg:
cfg.misc.catchCore = False
cfg.misc.minTraceLevel = 12300
cfg.misc.maxTraceLevel = 12400
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.etesian.graphics = 3
cfg.etesian.spaceMargin = 0.10
cfg.anabatic.topRoutingLayer = 'metal6'
cfg.katana.eventsLimit = 4000000
af = CRL.AllianceFramework.get()
lg5 = af.getRoutingGauge('StdCell3V3Lib').getLayerGauge( 5 )
lg5.setType( CRL.RoutingLayerGauge.PowerSupply )
env = af.getEnvironment()
env.setCLOCK( '^sys_clk$|^ck|^jtag_tck$' )
Yosys.setLiberty( liberty )
ShellEnv.CHECK_TOOLKIT = Where.checkToolkit.as_posix()
def setupFreePDK45_c4m ( checkToolkit=None, pdkMasterTop=None ): def setupFreePDK45_c4m ( checkToolkit=None, pdkMasterTop=None ):
from .. import Cfg from .. import Cfg
from .. import Viewer from .. import Viewer