get rid of unused files
This commit is contained in:
parent
acb390082e
commit
7f2370713b
|
@ -8,7 +8,6 @@
|
|||
#include "RdsUnit.h"
|
||||
#include "GenTrans.h"
|
||||
#include "DtrAccess.h"
|
||||
#include "GenericDtrAccess.h"
|
||||
|
||||
#include "Technology.h"
|
||||
#include "UpdateSession.h"
|
||||
|
@ -41,7 +40,7 @@ GenV1Trans::GenV1Trans(Transistor::MaskV1Info* masqueinfo)
|
|||
void GenV1Trans::Calculate(Transistor* transistor)
|
||||
// **********************************************
|
||||
{
|
||||
DtrAccess * dtraccess = DtrAccess::Instance();
|
||||
DtrAccess* dtraccess = DtrAccess::getDtrAccess();
|
||||
|
||||
// Check out mask param.
|
||||
// *********************
|
||||
|
@ -318,7 +317,7 @@ void GenV1Trans::Generate(Transistor* transistor)
|
|||
Net* drain = transistor->getNet(Name(transistor->getDrainName()) );
|
||||
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; // get Mos Type (N/P).
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include "Cells.h"
|
||||
#include "DtrAccess.h"
|
||||
#include "GenericDtrAccess.h"
|
||||
using namespace Hurricane;
|
||||
|
||||
// ****************************************************************************************************
|
||||
|
@ -68,9 +67,6 @@ void Device::_postCreate() {
|
|||
//state->SetCell(this);
|
||||
//state->SetLibrary(getLibrary());
|
||||
|
||||
// Create GenericDtrAccess and DtrAccess
|
||||
// *************************************
|
||||
GenericDtrAccess::Instance(DtrAccess::Instance());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void TrMos::_postCreate() {
|
|||
_lowPinOrder.push_back(S);
|
||||
_lowPinOrder.push_back(B);
|
||||
|
||||
double minWidth = (DtrAccess::Instance())->getSingleRealRuleByLabel(string("RW_ALU1"));
|
||||
double minWidth = (DtrAccess::getDtrAccess())->getSingleRealRuleByLabel(string("RW_ALU1"));
|
||||
|
||||
_widthOfSourceWire = minWidth;
|
||||
_widthOfDrainWire = minWidth;
|
||||
|
|
|
@ -42,7 +42,7 @@ void TrMos::_PlaceAndRoute()
|
|||
|
||||
// get Dtr Rules And Calculate the Size of AbutmentBox of Device.
|
||||
// **************************************************************
|
||||
DtrAccess * dtraccess = DtrAccess::Instance();
|
||||
DtrAccess * dtraccess = DtrAccess::getDtrAccess();
|
||||
|
||||
char type;
|
||||
if(_type == 'P') type = 'N';
|
||||
|
|
|
@ -32,9 +32,7 @@ SET_SOURCE_FILES_PROPERTIES(${binary_dir}/ParserDtrScan.cpp GENERATED)
|
|||
ADD_LIBRARY(dtr SHARED
|
||||
${DST_SRCS}
|
||||
DtrAccess.cpp
|
||||
RdsUnit.cpp
|
||||
GenericDtrAccess.cpp)
|
||||
|
||||
RdsUnit.cpp)
|
||||
|
||||
TARGET_LINK_LIBRARIES(dtr ${HURRICANE_LIBRARIES})
|
||||
|
||||
|
|
|
@ -24,18 +24,12 @@ namespace Hurricane {
|
|||
|
||||
// static data defintion
|
||||
// *********************
|
||||
DtrAccess* DtrAccess::_instance = NULL;
|
||||
DtrAccess* DtrAccess::_singleton = NULL;
|
||||
|
||||
map<string, DtrAccess*> DtrAccess::_registry;
|
||||
|
||||
DtrAccess::DtrAccess()
|
||||
// *******************
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
DtrAccess * DtrAccess::create() {
|
||||
DtrAccess * dtraccess = new DtrAccess();
|
||||
DtrAccess* dtraccess = new DtrAccess();
|
||||
|
||||
dtraccess->_postCreate();
|
||||
|
||||
|
@ -92,9 +86,9 @@ void DtrAccess::_postCreate() {
|
|||
while(m!=n) {
|
||||
Layer * layer = tech->getLayer(Name(*m));
|
||||
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.");
|
||||
// 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");
|
||||
}
|
||||
|
||||
|
@ -107,41 +101,24 @@ void DtrAccess::_postCreate() {
|
|||
}
|
||||
|
||||
|
||||
DtrAccess * DtrAccess::Instance() {
|
||||
DtrAccess * DtrAccess::getDtrAccess() {
|
||||
// User or environnement supplies this at startup
|
||||
// **********************************************
|
||||
const char * singleton_name = getenv("DTRACCESS_SINGLETON");
|
||||
|
||||
if(!singleton_name) { // if MACRO IS INVALID
|
||||
if(!_instance) {
|
||||
_instance = DtrAccess::create();
|
||||
if(!_singleton) {
|
||||
_singleton = DtrAccess::create();
|
||||
}
|
||||
} else {
|
||||
if(!_instance){
|
||||
if( !(_instance=LookUp(string(singleton_name))) ) // if singleton hasn't been registered
|
||||
_instance = DtrAccess::create();
|
||||
if(!_singleton){
|
||||
if( !(_singleton=LookUp(string(singleton_name))) ) // if singleton hasn't been registered
|
||||
_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
|
||||
// ***************************************************************************
|
||||
{
|
||||
|
@ -153,7 +130,6 @@ GenericCollection<double> DtrAccess::getRuleByLabel(const string& label) const
|
|||
return getCollection((*i).second);
|
||||
}
|
||||
|
||||
|
||||
GenericCollection<long> DtrAccess::getRdsRuleByLabel(const string& label) const
|
||||
// ******************************************************************************
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@ class DtrAccess {
|
|||
// Attributes
|
||||
// **********
|
||||
private: typedef map<string, list<double> > Label2RuleMap;
|
||||
private: static DtrAccess * _instance;
|
||||
private: static DtrAccess * _singleton;
|
||||
|
||||
private: Label2RuleMap _label2ruleMap;
|
||||
private: map<string, list<string> > _label2layerNameMap;
|
||||
|
@ -37,26 +37,13 @@ class DtrAccess {
|
|||
|
||||
// Constructors
|
||||
// ************
|
||||
protected : DtrAccess();
|
||||
private : DtrAccess(const DtrAccess&);
|
||||
private : DtrAccess& operator=(const DtrAccess&);
|
||||
|
||||
protected : static DtrAccess * create();
|
||||
protected : virtual void _postCreate();
|
||||
# endif
|
||||
|
||||
public : static DtrAccess* Instance();
|
||||
|
||||
// Destructors
|
||||
// ***********
|
||||
# if !defined(__DOXYGEN_PROCESSOR__)
|
||||
protected : virtual ~DtrAccess() {};
|
||||
protected : virtual void _preDestroy();
|
||||
# endif
|
||||
|
||||
|
||||
public : virtual void destroy();
|
||||
|
||||
public : static DtrAccess* getDtrAccess();
|
||||
|
||||
// Accessors
|
||||
// *********
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
@ -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
|
Loading…
Reference in New Issue