From 58db1608a93586a4c27faae8d67a847ff83e92b8 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Thu, 24 Jul 2008 15:39:12 +0000 Subject: [PATCH] MetaCapacitor in progress --- chamsin/src/analogic/MetaCapacitor.cpp | 88 ++++--------------------- chamsin/src/analogic/MetaCapacitor.h | 12 +++- chamsin/src/analogic/MetaTransistor.cpp | 1 + 3 files changed, 23 insertions(+), 78 deletions(-) diff --git a/chamsin/src/analogic/MetaCapacitor.cpp b/chamsin/src/analogic/MetaCapacitor.cpp index a12d8a66..f143148b 100644 --- a/chamsin/src/analogic/MetaCapacitor.cpp +++ b/chamsin/src/analogic/MetaCapacitor.cpp @@ -6,40 +6,13 @@ using namespace Hurricane; const Name MetaCapacitor::BottomPlateName("BOTTOMPLATE"); const Name MetaCapacitor::TopPlateName("TOPPLATE"); -#if 0 -const Name Capacitor::AnonymousName("ANONYMOUS"); -#endif - MetaCapacitor::MetaCapacitor(Library* library, const Name& name): Device(library, name), - Capacitor::Capacitor(Library* library, const Name& name): - AnalogComponent(library, name), - _bottomPlate(NULL), - _topPlate(NULL), - _anonymous(NULL), - _l(0), _w(0), - _topPlate10(NULL), - _topPlate20(NULL),_topPlate30(NULL), - _bottomPlate00(NULL) -#if 0 - _anonymous01(NULL), - _anonymous11(NULL), - _anonymous12(NULL), - _anonymous13(NULL), - _anonymous21(NULL), - _anonymousT11(NULL), - _anonymousT12(NULL), - _anonymousT13(NULL), - _anonymousT14(NULL), - _anonymousT21(NULL) -#endif + _capacitorMatrix(), + _rows(0), _columns(0) {} - - -//Déclaration de la library: -//************************* MetaCapacitor* MetaCapacitor::create(Library* library, const Name& name) { MetaCapacitor* mCapacitor = new MetaCapacitor(library, name); @@ -57,54 +30,15 @@ void MetaCapacitor::_postCreate() { _bottomPlate->setExternal(true); _topPlate = Net::create(this, TopPlateName); _topPlate->setExternal(true); - //_anonymous = Net::create(this, AnonymousName); - - _topPlate10 = createPad(technology, _topPlate, "topmim6"); - _topPlate20 = createPad(technology, _topPlate, "padopen"); - _topPlate30 = createPad(technology, _topPlate, "alucap"); - _bottomPlate00 = createPad(technology, _bottomPlate, "botmim6"); - #if 0 - - _anonymous01 = createPad(technology, _anonymous, "Implant"); - _anonymous11 = createPad(technology, _anonymous, "topmim6"); - _anonymous12 = createPad(technology, _anonymous, "topmim6"); - _anonymous13 = createPad(technology, _anonymous, "topmim6"); - _anonymous21 = createPad(technology, _anonymous, "padopen"); - _anonymous14 = createPad(technology, _anonymous, "topmim6"); - -#endif - -} - - -//La matrice des capas: - void MetaTransistor::setMatrix(unsigned m , unsigned n) { - assert(_Capacitor.largeur() == _w); - assert(getInstances().getlargeur() == _w); - assert(_Capacitor.longeur() == _l); - assert(getInstances().getlongeur() == _l); - - if (_w != m && _l != n) { - UpdateSession::open(); - if ( (m > _w ) || (n> _l ) ) { - Library* library = getLibrary(); - Transformation transformation; - for (unsigned i=_w; i CapacitorVector; + typedef vector CapacitorMatrix; + CapacitorMatrix _capacitorMatrix; + unsigned _rows; + unsigned _columns; + Net* _bottomPlate; + Net* _topPlate; }; - #endif // METACAPACITOR_H diff --git a/chamsin/src/analogic/MetaTransistor.cpp b/chamsin/src/analogic/MetaTransistor.cpp index 93a9ddf3..58ca0243 100644 --- a/chamsin/src/analogic/MetaTransistor.cpp +++ b/chamsin/src/analogic/MetaTransistor.cpp @@ -124,6 +124,7 @@ void MetaTransistor::setM(unsigned m) { } UpdateSession::close(); _m = m; + updateLayout(); } }