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)) {
throw Error("Can't generate layout : " + getString(this) + " hasn't been dimensionned");
@ -105,6 +103,7 @@ void MetaTransistor::createLayout()
if(trans->isInternal()) {
if(!internal_ref) {
cerr << "akecoucou" << endl;
trans->createLayout();
internal_ref = trans;
} else {

View File

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

View File

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

View File

@ -169,9 +169,9 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
/* (1) */
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF
//END_IF
// Create Motifs according to m, and instance the Motifs according
// 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);
}
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 1 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << getString(_tr1) + " 's M is " + getString(_tr1->getM()) + ".\n"
<< getString(_m) + " Transistors are created.\n" <<endl;
END_IF
//END_IF
/* (2) */
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF
//END_IF
// Create connexion for each MetaTransistor.
// *****************************************
_tr1->createConnection();
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 2 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << " The connection in " + getString(_tr1) + " is created.\n"
<<endl;
END_IF
//END_IF
// Pseudo dimensionnement of metatransistor.
// 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);
/* (3) */
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
END_IF
//END_IF
// Set dessin Parameter of generation for each finger.
// ***************************************************
@ -237,11 +237,10 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
list<Transistor*>::iterator i = _transistorList.begin()
, j = _transistorList.end();
if(_m == 1){
if(_m == 1) {
masqueinfo->setType(Transistor::Type::SINGLE);
(*(_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.
while(i!=j) {
if(++count>2)
@ -256,8 +255,7 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
(*i)->setMaskInfo(masqueinfo);
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){
++ count ;
if (count == 1)
@ -274,20 +272,20 @@ void TrMos::generate(const unsigned m, const bool sourceisfirst, const bool hasr
delete masqueinfo;
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 3 : CreateLayout of " + getString(this) + " finish ***" <<endl;
cout << "Real l_finger is " + getString(l_finger) + "." << endl
<< "Real w_finger is " + getString(w_finger) + "." << endl
<<endl;
END_IF
//END_IF
/* (4) */
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " Begin ***" <<endl;
cout << "Call GenerateLayout for " + getString(_tr1)
+ " who will launch the generator of its fingers" << ".\n"
<<endl;
END_IF
//END_IF
// 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();
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << "*** Stage 4 : CreateLayout of " + getString(this) + " finish ***"<<endl
<< endl;
END_IF
//END_IF
/* (5) */
// 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->materialize();
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << getString(instance) <<" 's boundingBox is " << getString(instance->getBoundingBox())<<endl;
END_IF
//END_IF
end_for
// CloseUpdateSession();
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << getString(this) << " 's primary (without wire) boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF
//END_IF
materialize();
IF_DEBUG_HUR_ANALOG
//IF_DEBUG_HUR_ANALOG
cout << getString(this) << " 's boundingBox is " << getString(getBoundingBox()) <<endl;
END_IF
//END_IF
cout << endl
<< "################################################################" <<endl

View File

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

View File

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

View File

@ -8,9 +8,11 @@ namespace {
static Name ATechnologyPropertyName("ATechnologyProperty");
class ATechnologyProperty : public PrivateProperty {
public:
typedef PrivateProperty Inherit;
typedef map<string, ATechnology::PhysicalRule*> PhysicalRules;
static ATechnologyProperty* create(Technology* technology);
ATechnologyProperty();
virtual Name getName() const {
@ -19,11 +21,22 @@ class ATechnologyProperty : public PrivateProperty {
virtual string _getTypeName() const {
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():
Inherit()
Inherit(),
physicalRules_()
{}
ATechnologyProperty* ATechnologyProperty::create(Technology* technology) {

View File

@ -2,7 +2,24 @@
#define ATECHNOLOGY_H_
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_*/