Transistor layout in progress
This commit is contained in:
parent
0e1e4e2573
commit
1e0622a450
|
@ -1,6 +1,7 @@
|
||||||
#include "hurricane/DataBase.h"
|
#include "hurricane/DataBase.h"
|
||||||
#include "hurricane/Technology.h"
|
#include "hurricane/Technology.h"
|
||||||
#include "hurricane/UpdateSession.h"
|
#include "hurricane/UpdateSession.h"
|
||||||
|
#include "hurricane/Pad.h"
|
||||||
using namespace Hurricane;
|
using namespace Hurricane;
|
||||||
|
|
||||||
#include "AEnv.h"
|
#include "AEnv.h"
|
||||||
|
@ -12,35 +13,40 @@ namespace {
|
||||||
|
|
||||||
Pad* createPad(Technology* technology, Net* net, const string& layerName) {
|
Pad* createPad(Technology* technology, Net* net, const string& layerName) {
|
||||||
Layer* layer = technology->getLayer(Name(layerName));
|
Layer* layer = technology->getLayer(Name(layerName));
|
||||||
Pad* pad = Pad::create(net, layer, 0, 0);
|
Pad* pad = Pad::create(net, layer, Box());
|
||||||
return pad;
|
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;
|
unsigned contacts = 0;
|
||||||
long xCenter = 0;
|
if (box.getHeight() < rwCont) {
|
||||||
long yCenter = 0;
|
|
||||||
if (box.getHeight() < RW_CONT__) {
|
|
||||||
contacts = 0;
|
contacts = 0;
|
||||||
} else {
|
} 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 padMin(box.getXMin(), box.getYMin());
|
||||||
Point yCenter(box.getYMin() + (rw_cont/2));
|
Point padMax(padMin);
|
||||||
|
padMax += Point(rwCont, rwCont);
|
||||||
|
|
||||||
for (unsigned i=0; i<columns; i++) {
|
for (unsigned i=0; i<columns; i++) {
|
||||||
for (unsigned j=0; j<columns; j++) {
|
for (unsigned j=0; j<contacts; j++) {
|
||||||
Pad::create(net, layer, xCenter, yCenter, rw_cont , rw_cont);
|
Box padBox(padMin, padMax);
|
||||||
yCenter += rw_cont + rd_cont;
|
Pad::create(net, layer, padBox);
|
||||||
|
padMin.setY(padMin.getY() + rwCont + rdCont);
|
||||||
|
padMax.setY(padMax.getY() + rwCont + rdCont);
|
||||||
}
|
}
|
||||||
xCenter += rw_cont + rd_cont;
|
padMin.setX(padMin.getX() + rwCont + rdCont);
|
||||||
yCenter = box.getYMin() + (rw_cont/2);
|
padMax.setX(padMax.getX() + rwCont + rdCont);
|
||||||
|
padMin.setY(box.getYMin());
|
||||||
|
padMax.setY(box.getYMax());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const Name Transistor::DrainName("DRAIN");
|
const Name Transistor::DrainName("DRAIN");
|
||||||
const Name Transistor::SourceName("SOURCE");
|
const Name Transistor::SourceName("SOURCE");
|
||||||
const Name Transistor::GridName("GRID");
|
const Name Transistor::GridName("GRID");
|
||||||
|
@ -57,8 +63,8 @@ Transistor::Transistor(Library* library, const Name& name, const Polarity& polar
|
||||||
_l(0.0),
|
_l(0.0),
|
||||||
_w(0.0),
|
_w(0.0),
|
||||||
_source20(NULL), _source22(NULL),
|
_source20(NULL), _source22(NULL),
|
||||||
_drain40(NULL), _drain42(NULL)
|
_drain40(NULL), _drain42(NULL),
|
||||||
_grid00(NULL), _grid01(NULL), _grid(30), _grid(31)
|
_grid00(NULL), _grid01(NULL), _grid30(NULL), _grid31(NULL)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue