diff --git a/chamsin/src/analogic/Transistor.cpp b/chamsin/src/analogic/Transistor.cpp index b2684234..3504db84 100644 --- a/chamsin/src/analogic/Transistor.cpp +++ b/chamsin/src/analogic/Transistor.cpp @@ -9,19 +9,43 @@ using namespace Hurricane; namespace { + +Pad* createPad(Technology* technology, Net* net, const string& layerName) { + Layer* layer = technology->getLayer(Name(layerName)); + Pad* pad = Pad::create(net, layer, 0, 0); + return pad; +} + + +void createContactMatrix(Net* net, const Layer* layer, const Box& box, unsigned columns) { + unsigned contacts = 0; + long xCenter = 0; + long yCenter = 0; + if (box.getHeight() < RW_CONT__) { + contacts = 0; + } else { + contacts = (box.getHeight()-rw_cont)/(rw_cont + rd_cont) + 1; + } + + Point xCenter(box.getXMin() + (rw_cont/2)); + Point yCenter(box.getYMin() + (rw_cont/2)); + + for (unsigned i=0; igetLayer(Name(layerName)); - Contact* contact = Contact::create(net, layer, 0, 0); - return contact; -} - -} - Transistor::Transistor(Library* library, const Name& name, const Polarity& polarity): Cell(library, name), _drain(NULL), @@ -32,10 +56,9 @@ Transistor::Transistor(Library* library, const Name& name, const Polarity& polar _abutmentType(), _l(0.0), _w(0.0), - _source20(NULL), - _source22(NULL), - _drain40(NULL), - _drain42(NULL) + _source20(NULL), _source22(NULL), + _drain40(NULL), _drain42(NULL) + _grid00(NULL), _grid01(NULL), _grid(30), _grid(31) {} @@ -59,10 +82,15 @@ void Transistor::_postCreate() { _grid->setExternal(true); _bulk = Net::create(this, BulkName); _bulk->setExternal(true); - _source20 = createContact(technology, _source, "cut0"); - _source22 = createContact(technology, _source, "cut1"); - _drain40 = createContact(technology, _drain, "cut0"); - _drain42 = createContact(technology, _drain, "cut1"); + _source20 = createPad(technology, _source, "cut0"); + _source22 = createPad(technology, _source, "cut1"); + _drain40 = createPad(technology, _drain, "cut0"); + _drain42 = createPad(technology, _drain, "cut1"); + _grid00 = createPad(technology, _grid, "poly"); + _grid01 = createPad(technology, _grid, "poly"); + _grid30 = createPad(technology, _grid, "cut0"); + _grid31 = createPad(technology, _grid, "metal1"); + } void Transistor::createLayout() { diff --git a/chamsin/src/analogic/Transistor.h b/chamsin/src/analogic/Transistor.h index 6b5ea4b3..722b41c2 100644 --- a/chamsin/src/analogic/Transistor.h +++ b/chamsin/src/analogic/Transistor.h @@ -37,10 +37,9 @@ class Transistor : public Cell { AbutmentType _abutmentType; double _l; double _w; - Contact* _source20; - Contact* _source22; - Contact* _drain40; - Contact* _drain42; + Pad *_source20, *_source22; + Pad *_drain40, *_drain42; + Pad *_grid00, *_grid01, *_grid30, *_grid31; Transistor(Library* library, const Name& name, const Polarity& polarity); };