commit to merge versions

This commit is contained in:
The Coriolis Project 2008-05-06 13:34:26 +00:00
parent 36af88f8c2
commit 60e4882d0c
8 changed files with 75 additions and 41 deletions

View File

@ -74,9 +74,7 @@ void MetaTransistor::createConnection()
} }
void MetaTransistor::createLayout() void MetaTransistor::createLayout() {
// ********************************
{
if((_le == 0.0) || (_we == 0.0)) { if((_le == 0.0) || (_we == 0.0)) {
throw Error("Can't generate layout : " + getString(this) + " hasn't been dimensionned"); throw Error("Can't generate layout : " + getString(this) + " hasn't been dimensionned");
@ -105,6 +103,7 @@ void MetaTransistor::createLayout()
if(trans->isInternal()) { if(trans->isInternal()) {
if(!internal_ref) { if(!internal_ref) {
cerr << "akecoucou" << endl;
trans->createLayout(); trans->createLayout();
internal_ref = trans; internal_ref = trans;
} else { } else {

View File

@ -1,8 +1,8 @@
INCLUDE_DIRECTORIES(${CHAMSIN_SOURCE_DIR}/src/dtr ${CHAMSIN_SOURCE_DIR}/src/analogic INCLUDE_DIRECTORIES(${CHAMSIN_SOURCE_DIR}/src/dtr ${CHAMSIN_SOURCE_DIR}/src/analogic
${HURRICANE_INCLUDE_DIR}) ${HURRICANE_INCLUDE_DIR})
ADD_LIBRARY(device SHARED Device.cpp TrMos.cpp TrMos_PlaceRoute.cpp) #ADD_LIBRARY(device SHARED Device.cpp TrMos.cpp TrMos_PlaceRoute.cpp)
#
TARGET_LINK_LIBRARIES(device analogic dtr hurricane) #TARGET_LINK_LIBRARIES(device analogic dtr hurricane)
#
INSTALL(TARGETS device DESTINATION /lib) #INSTALL(TARGETS device DESTINATION /lib)

View File

@ -12,6 +12,8 @@
#include "Cell.h" #include "Cell.h"
using namespace Hurricane; using namespace Hurricane;
namespace DEVICE {
class Device : public Cell { class Device : public Cell {
#if !defined(__DOXYGEN_PROCESSOR__) #if !defined(__DOXYGEN_PROCESSOR__)
@ -64,4 +66,6 @@ class Device : public Cell {
}; };
}
#endif // DEVICE_H #endif // DEVICE_H

View File

@ -169,9 +169,9 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
/* (1) */ /* (1) */
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " Begin ***" <<endl; cout << "*** Stage 1 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF //END_IF
// Create Motifs according to m, and instance the Motifs according // Create Motifs according to m, and instance the Motifs according
// to the Meta-Transistor . // to the Meta-Transistor .
@ -189,29 +189,29 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
Instance::create(_tr1, Name("Ins_" + getString(finger->getName())), finger); Instance::create(_tr1, Name("Ins_" + getString(finger->getName())), finger);
} }
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <<endl; cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n" cout << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
<< getString(_m) + " Transistors are created.\n" <<endl; << getString(_m) + " Transistors are created.\n" <<endl;
END_IF //END_IF
/* (2) */ /* (2) */
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " Begin ***" <<endl; cout << "*** Stage 2 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF //END_IF
// Create connexion for each MetaTransistor. // Create connexion for each MetaTransistor.
// ***************************************** // *****************************************
_tr1->createConnection(); _tr1->createConnection();
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " finish ***" <<endl; cout << "*** Stage 2 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << " The connection in " + getString(_tr1) + " is created.\n" cout << " The connection in " + getString(_tr1) + " is created.\n"
<<endl; <<endl;
END_IF //END_IF
// Pseudo dimensionnement of metatransistor. // Pseudo dimensionnement of metatransistor.
// In the futur, this will be the work of auto-dimensionnement tool (DSES). // In the futur, this will be the work of auto-dimensionnement tool (DSES).
@ -220,9 +220,9 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
// _tr1->setWe(11); // _tr1->setWe(11);
/* (3) */ /* (3) */
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " Begin ***" <<endl; cout << "*** Stage 3 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF //END_IF
// Set dessin Parameter of generation for each finger. // Set dessin Parameter of generation for each finger.
// *************************************************** // ***************************************************
@ -240,8 +240,7 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
if(_m == 1) { if(_m == 1) {
masqueinfo->setType(Transistor::Type::SINGLE); masqueinfo->setType(Transistor::Type::SINGLE);
(*(_transistorList.begin()))->setMaskInfo(masqueinfo); (*(_transistorList.begin()))->setMaskInfo(masqueinfo);
} } else if(_m%2==0) { // if m is pair, create two left fingers if is source first.
else if(_m%2==0) { // if m is pair, create two left fingers if is source first.
// and create two right fingers if is drain first. // and create two right fingers if is drain first.
while(i!=j) { while(i!=j) {
if(++count>2) if(++count>2)
@ -256,8 +255,7 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
(*i)->setMaskInfo(masqueinfo); (*i)->setMaskInfo(masqueinfo);
i++; i++;
} }
} } else if(_m%2==1) { // if m is impair, create one left finger, one right finger.
else if(_m%2==1) { // if m is impair, create one left finger, one right finger.
while(i!=j){ while(i!=j){
++ count ; ++ count ;
if (count == 1) if (count == 1)
@ -274,20 +272,20 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
delete masqueinfo; delete masqueinfo;
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl; cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << "Real l_finger is " + getString(l_finger) + "." << endl cout << "Real l_finger is " + getString(l_finger) + "." << endl
<< "Real w_finger is " + getString(w_finger) + "." << endl << "Real w_finger is " + getString(w_finger) + "." << endl
<<endl; <<endl;
END_IF //END_IF
/* (4) */ /* (4) */
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl; cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
cout << "Call GenerateLayout for " + getString(_tr1) cout << "Call GenerateLayout for " + getString(_tr1)
+ " who will launch the generator of its fingers" << ".\n" + " who will launch the generator of its fingers" << ".\n"
<<endl; <<endl;
END_IF //END_IF
// Call function CreateLayout of MetaTransistor to launch the generator of finger. // Call function CreateLayout of MetaTransistor to launch the generator of finger.
// ******************************************************************************* // *******************************************************************************
@ -303,10 +301,10 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
// //
_tr1->createLayout(); _tr1->createLayout();
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " finish ***"<<endl cout << "*** Stage 4 : CreateLayout of " + getString(this) + " finish ***"<<endl
<< endl; << endl;
END_IF //END_IF
/* (5) */ /* (5) */
// Lauch Algo of Placement and routage selected. // Lauch Algo of Placement and routage selected.
@ -322,23 +320,23 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
instance->unmaterialize(); instance->unmaterialize();
instance->materialize(); instance->materialize();
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl; cout << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl;
END_IF //END_IF
end_for end_for
// CloseUpdateSession(); // CloseUpdateSession();
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << 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 //END_IF
materialize(); materialize();
IF_DEBUG_HUR_ANALOG //IF_DEBUG_HUR_ANALOG
cout << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl; cout << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF //END_IF
cout << endl cout << endl
<< "################################################################" <<endl << "################################################################" <<endl

View File

@ -16,6 +16,8 @@ using namespace Hurricane;
#include "Device.h" #include "Device.h"
namespace DEVICE {
class TrMos : public Device { class TrMos : public Device {
public : enum PinName { D, G, S, B }; public : enum PinName { D, G, S, B };
@ -119,4 +121,6 @@ class TrMos : public Device {
}; };
}
#endif // TRMOS_H #endif // TRMOS_H

View File

@ -88,11 +88,10 @@ 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) {
layer = BasicLayer::create(tech, Name(*m), BasicLayer::Type::UNDEFINED, 100);
//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 << "In function DtrAccess::_postCreate , Can't find Layer " +
// + getString(*m) + " in technology file when parser DtrFile"); getString(*m) + " in technology file when parser DtrFile" << endl;
} }
_label2layerMap[(*it_layermap).first].push_back(layer); _label2layerMap[(*it_layermap).first].push_back(layer);

View File

@ -8,9 +8,11 @@ namespace {
static Name ATechnologyPropertyName("ATechnologyProperty"); static Name ATechnologyPropertyName("ATechnologyProperty");
class ATechnologyProperty : public PrivateProperty { class ATechnologyProperty : public PrivateProperty {
public: public:
typedef PrivateProperty Inherit; typedef PrivateProperty Inherit;
typedef map<string, ATechnology::PhysicalRule*> PhysicalRules;
static ATechnologyProperty* create(Technology* technology); static ATechnologyProperty* create(Technology* technology);
ATechnologyProperty(); ATechnologyProperty();
virtual Name getName() const { virtual Name getName() const {
@ -19,11 +21,22 @@ class ATechnologyProperty : public PrivateProperty {
virtual string _getTypeName() const { virtual string _getTypeName() const {
return _TName("ATechnologyProperty"); return _TName("ATechnologyProperty");
} }
void addPhysicalRule(ATechnology::PhysicalRule& physicalRule) {
PhysicalRules::iterator prit = physicalRules_.find(physicalRule.name_);
if (prit != physicalRules_.end()) {
throw Error("");
}
ATechnology::PhysicalRule* newPhysicalRule = new ATechnology::PhysicalRule(physicalRule);
physicalRules_[newPhysicalRule->name_] = newPhysicalRule;
}
private:
PhysicalRules physicalRules_;
}; };
ATechnologyProperty::ATechnologyProperty(): ATechnologyProperty::ATechnologyProperty():
Inherit() Inherit(),
physicalRules_()
{} {}
ATechnologyProperty* ATechnologyProperty::create(Technology* technology) { ATechnologyProperty* ATechnologyProperty::create(Technology* technology) {

View File

@ -2,7 +2,24 @@
#define ATECHNOLOGY_H_ #define ATECHNOLOGY_H_
class ATechnology { class ATechnology {
public:
class PhysicalRule {
public:
PhysicalRule(string& name,
double value,
string& reference):
name_(name),
value_(value),
reference_(reference) {}
PhysicalRule(const PhysicalRule& physicalRule):
name_(physicalRule.name_),
value_(physicalRule.value_),
reference_(physicalRule.reference_) {}
const string name_;
const double value_;
const string reference_;
};
static const PhysicalRule& getPhysicalRule(string name);
}; };
#endif /* ATECHNOLOGY_H_*/ #endif /* ATECHNOLOGY_H_*/