get rid of useless files

This commit is contained in:
Christophe Alexandre 2008-04-08 15:11:12 +00:00
parent 8d46981a42
commit afda64c645
6 changed files with 43 additions and 239 deletions

View File

@ -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

View File

@ -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})

View File

@ -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; i<sizeof(segsforsource)/sizeof(string); i++) {
if(segsforsource[i]=="20") {
//cout << ts << " Begin create contact for source , Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
//cout << " Begin create contact for source , Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
Box underbox = GET_BOX(segsforsource[i]);
CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->getNbSourceColumn(), layer_20, source)
//cout << ts << " Finish create contact for source " <<endl;
//cout << " Finish create contact for source " <<endl;
}
else {
Contact::create(source, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsforsource[i])
@ -372,14 +372,14 @@ END_IF
}
IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Source of " << getString(transistor) << endl;
cout << "End for create components for net Source of " << getString(transistor) << endl;
END_IF
// Generate Components For Net Grid.
// *********************************
IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Grid of " << getString(transistor) << endl;
cout << "Begin for create components for net Grid of " << getString(transistor) << endl;
END_IF
for(size_t i=0; i<sizeof(segsforgrid)/sizeof(string); i++) {
if(segsforgrid[i]=="30"){
@ -395,7 +395,7 @@ END_IF
unsigned int nbcolumn = (GET_BOX(segsforgrid[i]).getWidth()-rw_cont)/(rw_cont + rd_cont) + 1;
IF_DEBUG_HUR_ANALOG
cout << ts << "nbcolumn in rectangle 30 is " << nbcolumn <<endl;
cout << "nbcolumn in rectangle 30 is " << nbcolumn <<endl;
END_IF
Box underbox = GET_BOX(segsforgrid[i]);
@ -416,22 +416,22 @@ END_IF
}
IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Grid of " << getString(transistor) << endl;
cout << "End for create components for net Grid of " << getString(transistor) << endl;
END_IF
// Generate Components For Net Drain.
// **********************************
IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Drain of " << getString(transistor) << endl;
cout << "Begin for create components for net Drain of " << getString(transistor) << endl;
END_IF
for(size_t i=0; i<sizeof(segsfordrain)/sizeof(string); i++) {
if(segsfordrain[i]=="40") {
//cout << ts << " Begin create contact for drain, Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
//cout << " Begin create contact for drain, Under Box is " << getString(GET_BOX(segsforsource[i])) <<endl;
Box underbox = GET_BOX(segsfordrain[i]);
CREATE_CONTACT_MATRIX_UNDER(underbox, transistor->getNbDrainColumn(), layer_40, drain)
//cout << ts << " Finish create contact for drain" <<endl;
//cout << " Finish create contact for drain" <<endl;
}
else {
Contact::create(drain, GET_LAYER_BYNP("TRANS_",mostype,"_LAYER_"+segsfordrain[i])
@ -444,13 +444,13 @@ END_IF
}
IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Drain of " << getString(transistor) << endl;
cout << "End for create components for net Drain of " << getString(transistor) << endl;
END_IF
// Generate Components For Anonyms Nets.
// *************************************
IF_DEBUG_HUR_ANALOG
cout << ts << "Begin for create components for net Anonyme of " << getString(transistor) << endl;
cout << "Begin for create components for net Anonyme of " << getString(transistor) << endl;
END_IF
Net * anonym = Net::create(transistor, Name("anonym"));
for(size_t i=0; i<sizeof(segsforanonym)/sizeof(string);i++) {
@ -466,7 +466,7 @@ END_IF
}
IF_DEBUG_HUR_ANALOG
cout << ts << "End for create components for net Anonyme of " << getString(transistor) << endl;
cout << "End for create components for net Anonyme of " << getString(transistor) << endl;
END_IF
// End Generation.

View File

@ -1,122 +0,0 @@
// **************************************************************
// TwoSpaces.cpp
// Author : Wu YiFei
// Date : 12/04/2007
// ***************************************************************
#include "TwoSpaces.h"
namespace Hurricane {
// ****************************************************************************************************
// Two Spaces definition.
// ****************************************************************************************************
TwoSpaces::TwoSpaces(const string& s)
// *********************************
: _s(s)
,_n(1)
{
}
TwoSpaces::TwoSpaces(const TwoSpaces& ts)
// **************************************
: _s(ts._s)
,_n(ts._n)
{
}
TwoSpaces& TwoSpaces::operator=(const TwoSpaces& ts)
// ************************************************
{
_s = ts._s;
_n = ts._n;
return *this;
}
TwoSpaces& TwoSpaces::operator++()
// *******************************
{
if(_n<100) _n++;
return *this;
}
TwoSpaces TwoSpaces::operator++(int)
// *********************************
{
TwoSpaces ts = *this;
if(_n<100) _n++;
return ts;
}
TwoSpaces& TwoSpaces::operator--()
// *******************************
{
if(_n>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();
}

View File

@ -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

View File

@ -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 ***" <<endl;
cout << ts << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
<< ts << getString(_m) + " Transistors are created.\n" <<endl;
cout << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
<< getString(_m) + " Transistors are created.\n" <<endl;
END_IF
@ -288,15 +288,15 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << ts << "Real l_finger is " + getString(l_finger) + "." << endl
<< ts << "Real w_finger is " + getString(w_finger) + "." << endl
cout << "Real l_finger is " + getString(l_finger) + "." << endl
<< "Real w_finger is " + getString(w_finger) + "." << endl
<<endl;
END_IF
/* (4) */
IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
cout << ts << "Call GenerateLayout for " + getString(_tr1)
cout << "Call GenerateLayout for " + getString(_tr1)
+ " who will launch the generator of its fingers" << ".\n"
<<endl;
END_IF
@ -308,8 +308,8 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
//
// IF_DEBUG_HUR_ANALOG
// cout << endl;
// cout << ts << "Real l of " << (long)_tr1 << getString(_tr1) + " is " + getString(_tr1->_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
// <<endl;
// END_IF
//
@ -335,7 +335,7 @@ void TrMos::Generate(const unsigned m, const bool sourceisfirst, const bool hasr
instance->materialize();
IF_DEBUG_HUR_ANALOG
cout << ts << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl;
cout << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl;
END_IF
end_for
@ -343,19 +343,19 @@ END_IF
// CloseUpdateSession();
IF_DEBUG_HUR_ANALOG
cout << ts << getString(this) << " 's primary (without wire) boundingBox is " << getString(getBoundingBox()) <<endl;
cout << getString(this) << " 's primary (without wire) boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF
materialize();
IF_DEBUG_HUR_ANALOG
cout << ts << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl;
cout << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF
cout << ts << endl
<< ts << "################################################################" <<endl
<< ts << "#### END AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" <<endl
<< ts << "################################################################" <<endl
cout << endl
<< "################################################################" <<endl
<< "#### END AUTOGENERATON FOR " + _getTypeName() + " " + getString(getName()) + " #####" <<endl
<< "################################################################" <<endl
<< endl;
}