non functionnal version

just for synchronization
This commit is contained in:
The Coriolis Project 2008-05-31 17:29:35 +00:00
parent c2b9798777
commit ce9ebab18f
2 changed files with 47 additions and 20 deletions

View File

@ -9,19 +9,43 @@ using namespace Hurricane;
namespace { 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; i<columns; i++) {
for (unsigned j=0; j<columns; j++) {
Pad::create(net, layer, xCenter, yCenter, rw_cont , rw_cont);
yCenter += rw_cont + rd_cont;
}
xCenter += rw_cont + rd_cont;
yCenter = box.getYMin() + (rw_cont/2);
}
}
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");
const Name Transistor::BulkName("BULK"); const Name Transistor::BulkName("BULK");
Contact* createContact(Technology* technology, Net* net, const string& layerName) {
Layer* layer = technology->getLayer(Name(layerName));
Contact* contact = Contact::create(net, layer, 0, 0);
return contact;
}
}
Transistor::Transistor(Library* library, const Name& name, const Polarity& polarity): Transistor::Transistor(Library* library, const Name& name, const Polarity& polarity):
Cell(library, name), Cell(library, name),
_drain(NULL), _drain(NULL),
@ -32,10 +56,9 @@ Transistor::Transistor(Library* library, const Name& name, const Polarity& polar
_abutmentType(), _abutmentType(),
_l(0.0), _l(0.0),
_w(0.0), _w(0.0),
_source20(NULL), _source20(NULL), _source22(NULL),
_source22(NULL), _drain40(NULL), _drain42(NULL)
_drain40(NULL), _grid00(NULL), _grid01(NULL), _grid(30), _grid(31)
_drain42(NULL)
{} {}
@ -59,10 +82,15 @@ void Transistor::_postCreate() {
_grid->setExternal(true); _grid->setExternal(true);
_bulk = Net::create(this, BulkName); _bulk = Net::create(this, BulkName);
_bulk->setExternal(true); _bulk->setExternal(true);
_source20 = createContact(technology, _source, "cut0"); _source20 = createPad(technology, _source, "cut0");
_source22 = createContact(technology, _source, "cut1"); _source22 = createPad(technology, _source, "cut1");
_drain40 = createContact(technology, _drain, "cut0"); _drain40 = createPad(technology, _drain, "cut0");
_drain42 = createContact(technology, _drain, "cut1"); _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() { void Transistor::createLayout() {

View File

@ -37,10 +37,9 @@ class Transistor : public Cell {
AbutmentType _abutmentType; AbutmentType _abutmentType;
double _l; double _l;
double _w; double _w;
Contact* _source20; Pad *_source20, *_source22;
Contact* _source22; Pad *_drain40, *_drain42;
Contact* _drain40; Pad *_grid00, *_grid01, *_grid30, *_grid31;
Contact* _drain42;
Transistor(Library* library, const Name& name, const Polarity& polarity); Transistor(Library* library, const Name& name, const Polarity& polarity);
}; };