diff --git a/chamsin/src/analogic/Transistor.cpp b/chamsin/src/analogic/Transistor.cpp index 3504db84..0aea6d89 100644 --- a/chamsin/src/analogic/Transistor.cpp +++ b/chamsin/src/analogic/Transistor.cpp @@ -1,6 +1,7 @@ #include "hurricane/DataBase.h" #include "hurricane/Technology.h" #include "hurricane/UpdateSession.h" +#include "hurricane/Pad.h" using namespace Hurricane; #include "AEnv.h" @@ -12,35 +13,40 @@ namespace { Pad* createPad(Technology* technology, Net* net, const string& layerName) { Layer* layer = technology->getLayer(Name(layerName)); - Pad* pad = Pad::create(net, layer, 0, 0); + Pad* pad = Pad::create(net, layer, Box()); return pad; } -void createContactMatrix(Net* net, const Layer* layer, const Box& box, unsigned columns) { +void createContactMatrix(Net* net, const Layer* layer, const Box& box, unsigned columns, const Unit& rwCont, const Unit& rdCont) { unsigned contacts = 0; - long xCenter = 0; - long yCenter = 0; - if (box.getHeight() < RW_CONT__) { + if (box.getHeight() < rwCont) { contacts = 0; } else { - contacts = (box.getHeight()-rw_cont)/(rw_cont + rd_cont) + 1; + contacts = (box.getHeight() - rwCont) / (rwCont + rdCont) + 1; } - Point xCenter(box.getXMin() + (rw_cont/2)); - Point yCenter(box.getYMin() + (rw_cont/2)); + Point padMin(box.getXMin(), box.getYMin()); + Point padMax(padMin); + padMax += Point(rwCont, rwCont); for (unsigned i=0; i