From 51a72fc639b4cc55b6a102ceb1dcd8e466df2b7e Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Mon, 30 Jun 2008 19:10:15 +0000 Subject: [PATCH] Transistor Layout in Progress --- chamsin/etc/technology.hcmos9.dtr.xml | 10 +++- chamsin/src/analogic/Transistor.cpp | 86 ++++++++++++++++++++++++--- chamsin/src/technology/ATechnology.h | 14 +---- chamsin/src/tests/AnalogicTest.cpp | 4 +- 4 files changed, 90 insertions(+), 24 deletions(-) diff --git a/chamsin/etc/technology.hcmos9.dtr.xml b/chamsin/etc/technology.hcmos9.dtr.xml index d8523d4a..f7d84d0c 100644 --- a/chamsin/etc/technology.hcmos9.dtr.xml +++ b/chamsin/etc/technology.hcmos9.dtr.xml @@ -6,9 +6,11 @@ + - + + @@ -19,8 +21,10 @@ - - + + + + diff --git a/chamsin/src/analogic/Transistor.cpp b/chamsin/src/analogic/Transistor.cpp index 6696fd8d..c01e2fa7 100644 --- a/chamsin/src/analogic/Transistor.cpp +++ b/chamsin/src/analogic/Transistor.cpp @@ -157,20 +157,30 @@ void Transistor::createLayout() { ATechnology* atechno = AEnv::getATechnology(); DbU::Unit widthCut0 = atechno->getPhysicalRule("minWidth", getLayer(techno, "cut0"))->getValue(); + DbU::Unit spacingCut0 = atechno->getPhysicalRule("minSpacing", getLayer(techno, "cut0"))->getValue(); DbU::Unit extGateActive = atechno->getPhysicalRule("minExtension", getLayer(techno, "poly"), getLayer(techno, "active"))->getValue(); DbU::Unit extPolyCut0 = atechno->getPhysicalRule("minExtension", getLayer(techno, "poly"), getLayer(techno, "cut0"))->getValue(); DbU::Unit spacingActiveCut0 = atechno->getPhysicalRule("minSpacing", getLayer(techno, "active"), getLayer(techno, "cut0"))->getValue(); + DbU::Unit spacingGateCut0 = atechno->getPhysicalRule("minGateSpacing", + getLayer(techno, "cut0"), getLayer(techno, "active"))->getValue(); DbU::Unit spacingActivePoly = atechno->getPhysicalRule("minSpacing", getLayer(techno, "active"), getLayer(techno, "poly"))->getValue(); + DbU::Unit sourceDrainWidth = atechno->getPhysicalRule("minSourceDrainWidth", + getLayer(techno, "active"), getLayer(techno, "poly"))->getValue(); + DbU::Unit extActiveCut0 = atechno->getPhysicalRule("minExtension", + getLayer(techno, "active"), getLayer(techno, "cut0"))->getValue(); DbU::Unit enclosureImplantPoly = 0; + DbU::Unit enclosureGateImplant = 0; DbU::Unit extImplantActive = 0; DbU::Unit extImplantCut0 = 0; if (_polarity == Polarity::N) { enclosureImplantPoly = atechno->getPhysicalRule("minEnclosure", getLayer(techno, "nImplant"), getLayer(techno, "poly"))->getValue(); + enclosureGateImplant = atechno->getPhysicalRule("minGateEnclosure", + getLayer(techno, "nImplant"), getLayer(techno, "poly"))->getValue(); extImplantActive = atechno->getPhysicalRule("minExtension", getLayer(techno, "nImplant"), getLayer(techno, "active"))->getValue(); extImplantCut0 = atechno->getPhysicalRule("minExtension", @@ -178,6 +188,8 @@ void Transistor::createLayout() { } else { enclosureImplantPoly = atechno->getPhysicalRule("minEnclosure", getLayer(techno, "pImplant"), getLayer(techno, "poly"))->getValue(); + enclosureGateImplant = atechno->getPhysicalRule("minGateEnclosure", + getLayer(techno, "nImplant"), getLayer(techno, "poly"))->getValue(); extImplantActive = atechno->getPhysicalRule("minExtension", getLayer(techno, "pImplant"), getLayer(techno, "active"))->getValue(); extImplantCut0 = atechno->getPhysicalRule("minExtension", @@ -191,10 +203,8 @@ void Transistor::createLayout() { DbU::Unit x00 = 0; DbU::Unit y00 = -extGateActive; DbU::Unit dx00 = _l; - DbU::Unit dy00 = _w - y00*2; - Box box00(x00, y00, dx00, dy00); - cerr << _w << endl; - cerr << box00 << endl; + DbU::Unit dy00 = _w + extGateActive; + Box box00(x00, y00, x00 + dx00, y00 + dy00); _grid00->setBoundingBox(box00); //grid30 @@ -210,7 +220,7 @@ void Transistor::createLayout() { y30 = _w + spacingActiveCut0; } x30 = x00 + dx00/2 - dx30/2; - Box box30(x30, y30, dx30, dy30); + Box box30(x30, y30, x30 + dx30, y30 + dy30); _grid30->setBoundingBox(box30); //grid31 @@ -218,7 +228,7 @@ void Transistor::createLayout() { DbU::Unit dy31 = dy30 + 2*extPolyCut0; DbU::Unit x31 = x30 - extPolyCut0; DbU::Unit y31 = y30 - extPolyCut0; - Box box31(x31, y31, dx31, dy31); + Box box31(x31, y31, x31 + dx31, y31 + dy31); _grid31->setBoundingBox(box31); //grid01 @@ -231,7 +241,7 @@ void Transistor::createLayout() { dx01 = dx00; dy01 = y31 - (y00 + dy00); } - Box box01(x01, y01, dx01, dy01); + Box box01(x01, y01, x01 + dx01, y01 + dy01); _grid01->setBoundingBox(box01); //anonymous12 @@ -241,10 +251,70 @@ void Transistor::createLayout() { DbU::Unit yMax = max( max(y30 + dy30 + extImplantCut0, max(y31 + dy31, y00 + dy00) + enclosureImplantPoly), _w + extImplantActive); DbU::Unit dy12 = yMax - y12; - Box box12(x12, y12, dx12, dy12); + Box box12(x12, y12, x12 + dx12, y12 + dy12); _anonymous12->setBoundingBox(box12); + //_source20 + DbU::Unit y20 = extActiveCut0; + DbU::Unit dy20 = _w - 2 * extActiveCut0; + unsigned sourceColumnNumber = 1; + DbU::Unit dx20 = sourceColumnNumber * widthCut0 + (sourceColumnNumber - 1) * spacingCut0; + DbU::Unit x20 = -(dx20 + spacingGateCut0); + Box box20(x20, y20, x20 + dx20, y20 + dy20); + _source20->setBoundingBox(box20); + + //_drain40 + DbU::Unit y40 = y20; + DbU::Unit x40 = x00 + dx00 + spacingGateCut0; + unsigned drainColumnNumber = 1; + DbU::Unit dx40 = drainColumnNumber * widthCut0 + (drainColumnNumber - 1) * (spacingCut0); + DbU::Unit dy40 = dy20; + + Box box40(x40, y40, x40 + dx40, y40 + dy40); + _drain40->setBoundingBox(box40); + + //_anonymous10 + DbU::Unit y10 = 0; + DbU::Unit x10 = min(x20 - spacingActiveCut0, sourceDrainWidth); + DbU::Unit dy10 = _w; + DbU::Unit extension10 = max(x40 + dx40 + spacingActiveCut0, dx00 + sourceDrainWidth); + DbU::Unit dx10 = -x10 + extension10; + + Box box10(x10, y10, x10 + dx10, y10 + dy10); + _anonymous10->setBoundingBox(box10); + + //Rectangle 23 + DbU::Unit x23 = x10; + DbU::Unit y23 = y10; + DbU::Unit dx23 = x10; + DbU::Unit dy23 = _w; + + //_anonymous11 + DbU::Unit extension11_1 = enclosureGateImplant; + DbU::Unit extension11_2 = extImplantCut0 - x20; + DbU::Unit extension11_3 = extImplantActive - x10; + + DbU::Unit extension11_4 = max(max(extension11_1, extension11_2), extension11_3); + + DbU::Unit x11 = extension11_4; + + extension11_1 = enclosureGateImplant + x00 + dx00; + extension11_2 = extImplantCut0 + x40 + dx40; + extension11_3 = extImplantActive + x10 + dx10; + + extension11_4 = max(max(extension11_1, extension11_2), extension11_3); + + DbU::Unit dx11 = -x11 + extension11_4; + + DbU::Unit y11 = min(y20 - extImplantCut0, y23 - extImplantActive); + DbU::Unit dy11 = max(y20 + dy20 + extImplantCut0, y23 + dy23 + extImplantActive) - y11; + + Box box11(x11, y11, x11 + dx11, y11 + dy11); + _anonymous11->setBoundingBox(box11); + +#if 0 //setAbutmentBox(getAbutmentBox()); +#endif UpdateSession::close(); } diff --git a/chamsin/src/technology/ATechnology.h b/chamsin/src/technology/ATechnology.h index f68e1872..8993fa2f 100644 --- a/chamsin/src/technology/ATechnology.h +++ b/chamsin/src/technology/ATechnology.h @@ -99,19 +99,11 @@ class ATechnology : public PrivateProperty { // ------------------------------------------------------------------- -// Inspector Support for : "ATechnology::LayerPair&". +// Inspector Support for : "ATechnology::LayerPair". template<> -inline std::string getString (ATechnology::LayerPair& lp) { - return "add(getSlot("Layer2", lp.second)); - return record; +inline std::string getString (ATechnology::LayerPair lp) { + return ""; } INSPECTOR_P_SUPPORT(ATechnology); diff --git a/chamsin/src/tests/AnalogicTest.cpp b/chamsin/src/tests/AnalogicTest.cpp index 80581915..b2b0689a 100644 --- a/chamsin/src/tests/AnalogicTest.cpp +++ b/chamsin/src/tests/AnalogicTest.cpp @@ -41,8 +41,8 @@ int main(int argc, char* argv[]) { DbU::Unit transistorMinW = aTechnology->getPhysicalRule("transistorMinW")->getValue(); DbU::Unit L = transistorMinL; - DbU::Unit W = transistorMinW; - Transistor* trans = Transistor::create(userLibrary, Name("TEST"), Transistor::Polarity::P, L, W); + DbU::Unit W = 2 * transistorMinW; + Transistor* trans = Transistor::create(userLibrary, Name("TEST"), Transistor::Polarity::N, L, W); trans->createLayout(); CellViewer* viewer = new CellViewer ( trans ); viewer->show();