diff --git a/chamsin/src/analogic/AnalogicalCommons.h b/chamsin/src/analogic/AnalogicalCommons.h index 172521ba..0cbbddb1 100644 --- a/chamsin/src/analogic/AnalogicalCommons.h +++ b/chamsin/src/analogic/AnalogicalCommons.h @@ -13,33 +13,32 @@ // Macros Declaration. // ********************************************************************* -# define TRANSN 'N' -# define TRANSP 'P' +#define TRANSN 'N' +#define TRANSP 'P' -# define MAXNBCONTACT 8 +#define MAXNBCONTACT 8 -# define IF_DEBUG_HUR_ANALOG \ - if(getenv("DEBUG_HUR_ANALOG")) { +#define IF_DEBUG_HUR_ANALOG \ + if(getenv("DEBUG_HUR_ANALOG")) { -# ifndef END_IF -# define END_IF \ +#ifndef END_IF +#define END_IF \ } -# endif +#endif // ********************************************************************* // Analogical Unit declaration. // ********************************************************************* -# if !defined(__DOXYGEN_PROCESSOR__) +#if !defined(__DOXYGEN_PROCESSOR__) typedef double Micro; typedef double MicroPower2; typedef long Nano; -# endif +#endif -#include "TwoSpaces.h" #endif // HURRICANE_ANALOGICALCOMMONS diff --git a/chamsin/src/analogic/CMakeLists.txt b/chamsin/src/analogic/CMakeLists.txt index 467b93e8..3ee358ac 100644 --- a/chamsin/src/analogic/CMakeLists.txt +++ b/chamsin/src/analogic/CMakeLists.txt @@ -3,8 +3,7 @@ INCLUDE_DIRECTORIES(${CHAMSIN_SOURCE_DIR}/src/dtr ${HURRICANE_INCLUDE_DIR} ${sou ADD_LIBRARY(analogic SHARED GenV1Trans.cpp MetaTransistor.cpp -Transistor.cpp -TwoSpaces.cpp) +Transistor.cpp) TARGET_LINK_LIBRARIES(analogic dtr ${HURRICANE_LIBRARIES}) diff --git a/chamsin/src/analogic/GenV1Trans.cpp b/chamsin/src/analogic/GenV1Trans.cpp index da6eefcf..037b5616 100644 --- a/chamsin/src/analogic/GenV1Trans.cpp +++ b/chamsin/src/analogic/GenV1Trans.cpp @@ -65,7 +65,7 @@ void GenV1Trans::Calculate(Transistor* transistor) ); IF_DEBUG_HUR_ANALOG - cout << ts << getString(transistor) + " 's masqueinfo is " + getString(_masqueV1Info) + cout << getString(transistor) + " 's masqueinfo is " + getString(_masqueV1Info) << endl; END_IF @@ -298,7 +298,7 @@ void GenV1Trans::Calculate(Transistor* transistor) _mapString2Box[(*i).first] = (*i).second.translate(-xmin, -ymin); IF_DEBUG_HUR_ANALOG - cout << ts << (*i).first <<" " << getString((*i).second) << endl; + cout << (*i).first <<" " << getString((*i).second) << endl; END_IF assert(BOX_IS_VALID((*i).second)); @@ -350,16 +350,16 @@ void GenV1Trans::Generate(Transistor* transistor) // Cenerate Components For Net Source. // *********************************** IF_DEBUG_HUR_ANALOG - cout << ts << "Begin for create components for net Source of " << getString(transistor) << endl; + cout << "Begin for create components for net Source of " << getString(transistor) << endl; END_IF for(size_t i=0; igetNbSourceColumn(), layer_20, source) - //cout << ts << " Finish create contact for source " <getNbDrainColumn(), layer_40, drain) - //cout << ts << " Finish create contact for drain" <1) _n--; - return *this; -} - - -TwoSpaces TwoSpaces::operator--(int) -// ********************************* -{ - TwoSpaces ts = *this; - if(_n>1) _n--; - return ts; -} - - -TwoSpaces TwoSpaces::operator+(int count) -// ************************************** -{ - TwoSpaces ts = *this; - if( (_n+count) <= 100 ) ts._n = _n + count; - return ts; -} - - -TwoSpaces TwoSpaces::operator-(int count) -// ************************************** -{ - TwoSpaces ts = *this; - if ( (_n - count) >= 1 ) ts._n = _n - count; - return ts; -} - - -string TwoSpaces::_GetString() const -// ********************************* -{ - string s; - unsigned n = _n; - - while(n--) { - s += _s; - } - - return s; -} - - - -// **************************************************************************************************** -// Variables definition. -// **************************************************************************************************** -TwoSpaces ts(" "); - -} - - -// **************************************************************************************************** -// Generic functions -// **************************************************************************************************** -string GetString(const Hurricane::TwoSpaces& ts) -// *********************************** -{ - return ts._GetString(); -} - diff --git a/chamsin/src/analogic/TwoSpaces.h b/chamsin/src/analogic/TwoSpaces.h deleted file mode 100644 index 50123ba4..00000000 --- a/chamsin/src/analogic/TwoSpaces.h +++ /dev/null @@ -1,72 +0,0 @@ -// ************************************************************** -// TwoSpaces.h -// Author : Wu YiFei -// Date : 12/04/2007 -// *************************************************************** - - -#ifndef HURRICANE_TWOSPACES -#define HURRICANE_TWOSPACES - -#include "Commons.h" - -namespace Hurricane { - - -// **************************************************************************************************** -// TwoSpaces declaration. -// **************************************************************************************************** -class TwoSpaces { -// *************** - -// Attributes -// ********** - private : string _s; - private : unsigned _n; - -// Constructors -// ************* - public : TwoSpaces(const string& s = " "); - public : TwoSpaces(const TwoSpaces&); - -// Destructors -// *********** - public : ~TwoSpaces(){}; - -// Operators -// ********* - public : TwoSpaces& operator=(const TwoSpaces&); - public : TwoSpaces& operator++(); - public : TwoSpaces operator++(int); - public : TwoSpaces& operator--(); - public : TwoSpaces operator--(int); - public : TwoSpaces operator+(int); - public : TwoSpaces operator-(int); - -// Others -// ****** - public : string _GetString() const ; - -}; - - -// **************************************************************************************************** -// Variables declaration. -// **************************************************************************************************** -extern TwoSpaces ts; - -} - - -// **************************************************************************************************** -// Generic functions -// **************************************************************************************************** -string GetString(const Hurricane::TwoSpaces&); - -inline ostream& operator<<(ostream& stream, const Hurricane::TwoSpaces& ts) -// **************************************************************** -{ - return stream<< GetString(ts); -} - -#endif // END HURRICANE_TWOSPACES diff --git a/chamsin/src/device/TrMos.cpp b/chamsin/src/device/TrMos.cpp index 86fb3174..03b9f38f 100644 --- a/chamsin/src/device/TrMos.cpp +++ b/chamsin/src/device/TrMos.cpp @@ -173,9 +173,9 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr // ***************************************** Library * library = getLibrary(); - cout << ts << "################################################################" << endl << - ts << "#### BEGIN AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" << endl << - ts << "################################################################" << endl << endl; + cout << "################################################################" << endl << + "#### BEGIN AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" << endl << + "################################################################" << endl << endl; // OpenUpdateSession(); @@ -204,8 +204,8 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr IF_DEBUG_HUR_ANALOG cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <getM()) + ".\n" - << ts << getString(_m) + " Transistors are created.\n" <getM()) + ".\n" + << getString(_m) + " Transistors are created.\n" <_le) + "." << endl -// << ts << "Real w of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_we) + "." << endl +// cout << "Real l of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_le) + "." << endl +// << "Real w of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_we) + "." << endl // <materialize(); IF_DEBUG_HUR_ANALOG - cout << ts << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<getBoundingBox())<