get rid of unused files

This commit is contained in:
The Coriolis Project 2008-04-02 15:56:45 +00:00
parent acb390082e
commit 7f2370713b
9 changed files with 18 additions and 187 deletions

View File

@ -8,7 +8,6 @@
#include "RdsUnit.h" #include "RdsUnit.h"
#include "GenTrans.h" #include "GenTrans.h"
#include "DtrAccess.h" #include "DtrAccess.h"
#include "GenericDtrAccess.h"
#include "Technology.h" #include "Technology.h"
#include "UpdateSession.h" #include "UpdateSession.h"
@ -41,7 +40,7 @@ GenV1Trans::GenV1Trans(Transistor::MaskV1Info* masqueinfo)
void GenV1Trans::Calculate(Transistor* transistor) void GenV1Trans::Calculate(Transistor* transistor)
// ********************************************** // **********************************************
{ {
DtrAccess * dtraccess = DtrAccess::Instance(); DtrAccess* dtraccess = DtrAccess::getDtrAccess();
// Check out mask param. // Check out mask param.
// ********************* // *********************
@ -318,7 +317,7 @@ void GenV1Trans::Generate(Transistor* transistor)
Net* drain = transistor->getNet(Name(transistor->getDrainName()) ); Net* drain = transistor->getNet(Name(transistor->getDrainName()) );
Net* grid = transistor->getNet(Name(transistor->getGridName()) ); Net* grid = transistor->getNet(Name(transistor->getGridName()) );
DtrAccess * dtraccess = DtrAccess::Instance(); DtrAccess * dtraccess = DtrAccess::getDtrAccess();
//string mostype(1, transistor->getType()); // get Mos Type (N/P). //string mostype(1, transistor->getType()); // get Mos Type (N/P).
string mostype; // get Mos Type (N/P). string mostype; // get Mos Type (N/P).

View File

@ -15,7 +15,6 @@
#include "Cells.h" #include "Cells.h"
#include "DtrAccess.h" #include "DtrAccess.h"
#include "GenericDtrAccess.h"
using namespace Hurricane; using namespace Hurricane;
// **************************************************************************************************** // ****************************************************************************************************
@ -68,9 +67,6 @@ void Device::_postCreate() {
//state->SetCell(this); //state->SetCell(this);
//state->SetLibrary(getLibrary()); //state->SetLibrary(getLibrary());
// Create GenericDtrAccess and DtrAccess
// *************************************
GenericDtrAccess::Instance(DtrAccess::Instance());
} }

View File

@ -62,7 +62,7 @@ void TrMos::_postCreate() {
_lowPinOrder.push_back(S); _lowPinOrder.push_back(S);
_lowPinOrder.push_back(B); _lowPinOrder.push_back(B);
double minWidth = (DtrAccess::Instance())->getSingleRealRuleByLabel(string("RW_ALU1")); double minWidth = (DtrAccess::getDtrAccess())->getSingleRealRuleByLabel(string("RW_ALU1"));
_widthOfSourceWire = minWidth; _widthOfSourceWire = minWidth;
_widthOfDrainWire = minWidth; _widthOfDrainWire = minWidth;

View File

@ -42,7 +42,7 @@ void TrMos::_PlaceAndRoute()
// get Dtr Rules And Calculate the Size of AbutmentBox of Device. // get Dtr Rules And Calculate the Size of AbutmentBox of Device.
// ************************************************************** // **************************************************************
DtrAccess * dtraccess = DtrAccess::Instance(); DtrAccess * dtraccess = DtrAccess::getDtrAccess();
char type; char type;
if(_type == 'P') type = 'N'; if(_type == 'P') type = 'N';

View File

@ -32,9 +32,7 @@ SET_SOURCE_FILES_PROPERTIES(${binary_dir}/ParserDtrScan.cpp GENERATED)
ADD_LIBRARY(dtr SHARED ADD_LIBRARY(dtr SHARED
${DST_SRCS} ${DST_SRCS}
DtrAccess.cpp DtrAccess.cpp
RdsUnit.cpp RdsUnit.cpp)
GenericDtrAccess.cpp)
TARGET_LINK_LIBRARIES(dtr ${HURRICANE_LIBRARIES}) TARGET_LINK_LIBRARIES(dtr ${HURRICANE_LIBRARIES})

View File

@ -24,18 +24,12 @@ namespace Hurricane {
// static data defintion // static data defintion
// ********************* // *********************
DtrAccess* DtrAccess::_instance = NULL; DtrAccess* DtrAccess::_singleton = NULL;
map<string, DtrAccess*> DtrAccess::_registry; map<string, DtrAccess*> DtrAccess::_registry;
DtrAccess::DtrAccess()
// *******************
{
}
DtrAccess * DtrAccess::create() { DtrAccess * DtrAccess::create() {
DtrAccess * dtraccess = new DtrAccess(); DtrAccess* dtraccess = new DtrAccess();
dtraccess->_postCreate(); dtraccess->_postCreate();
@ -92,9 +86,9 @@ void DtrAccess::_postCreate() {
while(m!=n) { while(m!=n) {
Layer * layer = tech->getLayer(Name(*m)); Layer * layer = tech->getLayer(Name(*m));
if(!layer) { if(!layer) {
throw Error("Error : in function DtrAccess::_PostCreate , Can't find Layer " throw Error("Error : in function DtrAccess::_postCreate , Can't find Layer "
+ getString(*m) + " in technology file when parser DtrFile."); + getString(*m) + " in technology file when parser DtrFile.");
// cerr << Warning("In function DtrAccess::_PostCreate , Can't find Layer " // cerr << Warning("In function DtrAccess::_postCreate , Can't find Layer "
// + getString(*m) + " in technology file when parser DtrFile"); // + getString(*m) + " in technology file when parser DtrFile");
} }
@ -107,41 +101,24 @@ void DtrAccess::_postCreate() {
} }
DtrAccess * DtrAccess::Instance() { DtrAccess * DtrAccess::getDtrAccess() {
// User or environnement supplies this at startup // User or environnement supplies this at startup
// ********************************************** // **********************************************
const char * singleton_name = getenv("DTRACCESS_SINGLETON"); const char * singleton_name = getenv("DTRACCESS_SINGLETON");
if(!singleton_name) { // if MACRO IS INVALID if(!singleton_name) { // if MACRO IS INVALID
if(!_instance) { if(!_singleton) {
_instance = DtrAccess::create(); _singleton = DtrAccess::create();
} }
} else { } else {
if(!_instance){ if(!_singleton){
if( !(_instance=LookUp(string(singleton_name))) ) // if singleton hasn't been registered if( !(_singleton=LookUp(string(singleton_name))) ) // if singleton hasn't been registered
_instance = DtrAccess::create(); _singleton = DtrAccess::create();
} }
} }
return _instance; return _singleton;
} }
void DtrAccess::_preDestroy()
// ***********************
{
// Do something
// ************
}
void DtrAccess::destroy()
// ********************
{
_preDestroy();
delete this;
}
GenericCollection<double> DtrAccess::getRuleByLabel(const string& label) const GenericCollection<double> DtrAccess::getRuleByLabel(const string& label) const
// *************************************************************************** // ***************************************************************************
{ {
@ -153,7 +130,6 @@ GenericCollection<double> DtrAccess::getRuleByLabel(const string& label) const
return getCollection((*i).second); return getCollection((*i).second);
} }
GenericCollection<long> DtrAccess::getRdsRuleByLabel(const string& label) const GenericCollection<long> DtrAccess::getRdsRuleByLabel(const string& label) const
// ****************************************************************************** // ******************************************************************************
{ {

View File

@ -18,7 +18,7 @@ class DtrAccess {
// Attributes // Attributes
// ********** // **********
private: typedef map<string, list<double> > Label2RuleMap; private: typedef map<string, list<double> > Label2RuleMap;
private: static DtrAccess * _instance; private: static DtrAccess * _singleton;
private: Label2RuleMap _label2ruleMap; private: Label2RuleMap _label2ruleMap;
private: map<string, list<string> > _label2layerNameMap; private: map<string, list<string> > _label2layerNameMap;
@ -37,26 +37,13 @@ class DtrAccess {
// Constructors // Constructors
// ************ // ************
protected : DtrAccess();
private : DtrAccess(const DtrAccess&);
private : DtrAccess& operator=(const DtrAccess&); private : DtrAccess& operator=(const DtrAccess&);
protected : static DtrAccess * create(); protected : static DtrAccess * create();
protected : virtual void _postCreate(); protected : virtual void _postCreate();
# endif # endif
public : static DtrAccess* Instance(); public : static DtrAccess* getDtrAccess();
// Destructors
// ***********
# if !defined(__DOXYGEN_PROCESSOR__)
protected : virtual ~DtrAccess() {};
protected : virtual void _preDestroy();
# endif
public : virtual void destroy();
// Accessors // Accessors
// ********* // *********

View File

@ -1,50 +0,0 @@
// ****************************************************************************************************
// File: GenericDtrAccess.cpp
// Authors: Wu YiFei
// Date : 21/12/2006
// ****************************************************************************************************
#include "DtrAccess.h"
#include "GenericDtrAccess.h"
namespace Hurricane {
// ****************************************************************************************************
// GenericDtrAccess implementation
// ****************************************************************************************************
GenericDtrAccess GenericDtrAccess::instance(NULL);
GenericDtrAccess::GenericDtrAccess(DtrAccess* dtraccess):_dtrAccess(dtraccess)
// **************************************************************************
{
}
void GenericDtrAccess::Instance(DtrAccess* dtraccess)
// **************************************************
{
if(!(instance._dtrAccess))
instance._dtrAccess = dtraccess;
}
string GenericDtrAccess::_getString() const
// ****************************************
{
string s("Singleton GenericDtrAccess");
return s;
}
}
// ****************************************************************************************************
// Generic functions
// ****************************************************************************************************
string getString(const Hurricane::GenericDtrAccess& access)
// ************************************************
{
return access._getString();
}

View File

@ -1,75 +0,0 @@
// ****************************************************************************************************
// File: GenericDtrAccess.h
// Authors: Wu YiFei
// Date : 21/12/2006
// ****************************************************************************************************
#ifndef HURRICANE_GENERICDTRACCESS
#define HURRICANE_GENERICDTRACCESS
//BEGIN_NAMESPACE_HURRICANE
namespace Hurricane {
class DtrAccess;
class GenericDtrAccess {
// *********************
// Types
// *****
# if !defined(__DOXYGEN_PROCESSOR__)
// Attributes
// **********
private : static GenericDtrAccess instance;
private : DtrAccess * _dtrAccess;
// Constructors
// ************
protected : GenericDtrAccess(DtrAccess*);
private : GenericDtrAccess(const GenericDtrAccess&);
private : GenericDtrAccess& operator=(const GenericDtrAccess&);
# endif
public : static void Instance(DtrAccess*);
// Destructors
// ***********
protected : virtual ~GenericDtrAccess();
// Accessors
// *********
// Updators
// ********
// Operations
// **********
# if !defined(__DOXYGEN_PROCESSOR__)
// Others
// ******
public: virtual string _getTypeName() const {return _TName("GenericDtrAccess");};
public: virtual string _getString() const;
# endif
};
}
// ****************************************************************************************************
// Generic functions
// ****************************************************************************************************
string getString(const Hurricane::GenericDtrAccess&);
#endif // HURRICANE_GENERICDTRACCESS