diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index 617fa35a..8258673b 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -52,6 +52,15 @@ def safeImport ( moduleName, symbol=None ): return module +def checkCMake (): + child = subprocess.Popen ( ["which", "cmake"], stdout=subprocess.PIPE, stderr=subprocess.PIPE ) + (pid,status) = os.waitpid ( child.pid, 0 ) + status >>= 8 + if status != 0: + print '[ERROR] The program has not been found, please install it.' + sys.exit(1) + + def guessOs (): libDir = 'lib' osSlsoc7x_64 = re.compile (".*Linux.*(el7|slsoc7).*x86_64.*") @@ -171,6 +180,7 @@ def autoLocate (): # CCB Main Part. autoLocate() +checkCMake() parser = optparse.OptionParser () parser.add_option ( "-g", "--gui" , action="store_true" , dest="gui" , help="Lauch the graphical interface." ) diff --git a/crlcore/etc/cmos/alliance.conf b/crlcore/etc/cmos/alliance.conf index 6650712e..ae13ea35 100644 --- a/crlcore/etc/cmos/alliance.conf +++ b/crlcore/etc/cmos/alliance.conf @@ -31,7 +31,7 @@ allianceConfig = \ , ( 'OUT_PH' , 'ap') , ( 'POWER' , 'vdd') , ( 'GROUND' , 'vss') - , ( 'CLOCK' , '^ck.*') + , ( 'CLOCK' , '.*ck.*|.*nck.*') , ( 'BLOCKAGE' , '^blockage[Nn]et*') , ( 'PAD' , '.*_px$') # The following are only read by the Alliance tool wrappers. diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 54d15635..dbaea95a 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -495,10 +495,12 @@ namespace Etesian { Instance* instance = static_cast((*ioccurrence).getEntity()); Cell* masterCell = instance->getMasterCell(); - // Have to check here if the model is fully placed or not. - masterCell->setAbutmentBox( topAb ); - instance->setTransformation( Transformation() ); // (0,0,ID). - instance->setPlacementStatus( Instance::PlacementStatus::PLACED ); + if (masterCell->getAbutmentBox().isEmpty()) { + // Have to check here if the model is fully placed or not. + masterCell->setAbutmentBox( topAb ); + instance->setTransformation( Transformation() ); // (0,0,ID). + instance->setPlacementStatus( Instance::PlacementStatus::PLACED ); + } } UpdateSession::close(); @@ -533,7 +535,7 @@ namespace Etesian { instances[instanceId].size = point( xsize, ysize ); instances[instanceId].list_index = instanceId; instances[instanceId].area = static_cast(xsize) * static_cast(ysize); - positions[instanceId] = point( xpos, ypos ); + positions[instanceId] = point( xpos, ypos ); if ( not instance->isFixed() and instance->isTerminal() ) { instances[instanceId].attributes = coloquinte::XMovable diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index 7067631e..ec2513e4 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -189,6 +189,26 @@ void Cell::setAbutmentBox(const Box& abutmentBox) } } + +DeepNet* Cell::getDeepNet ( Path path, const Net* leafNet ) const +// ************************************************************** +{ + if (not (_flags & FlattenedNets)) return NULL; + + Occurrence rootNetOccurrence ( getHyperNetRootNetOccurrence(Occurrence(leafNet,path)) ); + + forEach ( Net*, inet, getNets() ) { + DeepNet* deepNet = dynamic_cast( *inet ); + if (not deepNet) continue; + + Occurrence deepNetOccurrence = deepNet->getRootNetOccurrence(); + if ( (rootNetOccurrence.getEntity() == deepNetOccurrence.getEntity()) + and (rootNetOccurrence.getPath () == deepNetOccurrence.getPath ()) ) + return deepNet; + } + return NULL; +} + void Cell::flattenNets(unsigned int flags) // *************************************** { diff --git a/hurricane/src/hurricane/hurricane/Cell.h b/hurricane/src/hurricane/hurricane/Cell.h index 7d67c2a1..fa3d40d5 100644 --- a/hurricane/src/hurricane/hurricane/Cell.h +++ b/hurricane/src/hurricane/hurricane/Cell.h @@ -258,6 +258,7 @@ class Cell : public Entity { public: Instances getNonLeafInstances() const; public: Instances getNonLeafInstancesUnder(const Box& area) const; public: Net* getNet(const Name& name) const {return _netMap.getElement(name);}; + public: DeepNet* getDeepNet( Path, const Net* ) const; public: Nets getNets() const {return _netMap.getElements();}; public: Nets getGlobalNets() const; public: Nets getExternalNets() const; diff --git a/kite/src/BuildPowerRails.cpp b/kite/src/BuildPowerRails.cpp index 02236945..1c19d8e3 100644 --- a/kite/src/BuildPowerRails.cpp +++ b/kite/src/BuildPowerRails.cpp @@ -53,6 +53,8 @@ namespace { using Hurricane::DbU; using Hurricane::Box; using Hurricane::Interval; + using Hurricane::Net; + using Hurricane::DeepNet; using Hurricane::Horizontal; using Hurricane::Vertical; using Hurricane::RoutingPad; @@ -107,6 +109,7 @@ namespace { public: GlobalNetTable ( KiteEngine* ); bool isCoreClockNetRouted ( const Net* ) const; + inline Cell* getTopCell () const; Net* getRootNet ( const Net*, Path ) const; inline Net* getVdde () const; inline Net* getVddi () const; @@ -136,9 +139,11 @@ namespace { Net* _cki; // Clock net in the pad ring. Net* _cko; // Clock net of the core (design). Net* _blockage; + Cell* _topCell; }; + inline Cell* GlobalNetTable::getTopCell () const { return _topCell; } inline Net* GlobalNetTable::getVdde () const { return _vdde; } inline Net* GlobalNetTable::getVddi () const { return _vddi; } inline Net* GlobalNetTable::getVsse () const { return _vsse; } @@ -166,14 +171,14 @@ namespace { , _cki (NULL) , _cko (NULL) , _blockage(NULL) + , _topCell (kite->getCell()) { - Cell* topCell = kite->getCell(); - if (topCell == NULL) return; + if (_topCell == NULL) return; AllianceFramework* af = AllianceFramework::get(); bool hasPad = false; - forEach ( Instance*, iinstance, topCell->getInstances() ) { + forEach ( Instance*, iinstance, _topCell->getInstances() ) { if (af->isPad(iinstance->getMasterCell())) { if (not hasPad) { cmess1 << " o Design has pads, assuming complete chip top structure." << endl; @@ -195,7 +200,7 @@ namespace { Net* net = iplug->getNet(); if (not net) { - net = topCell->getNet( masterNet->getName() ); + net = _topCell->getNet( masterNet->getName() ); if (not net) { cerr << Error("Missing global net <%s> at chip level.",getString(masterNet->getName()).c_str()) << endl; continue; @@ -216,7 +221,7 @@ namespace { Net* masterNet = iplug->getMasterNet(); Net* net = iplug->getNet(); if (not net) { - net = topCell->getNet( masterNet->getName() ); + net = _topCell->getNet( masterNet->getName() ); if (not net) { cerr << Error("Missing global net <%s> at chip level.",getString(masterNet->getName()).c_str()) << endl; continue; @@ -249,7 +254,7 @@ namespace { _vssiPadNetName = ""; _ckoPadNetName = ""; - forEach ( Net*, inet, topCell->getNets() ) { + forEach ( Net*, inet, _topCell->getNets() ) { if (NetRoutingExtension::isManualGlobalRoute(*inet)) continue; Net::Type netType = inet->getType(); @@ -368,6 +373,7 @@ namespace { Net* GlobalNetTable::getRootNet ( const Net* net, Path path ) const { ltrace(300) << " getRootNet:" << path << ":" << net << endl; + if (net == _blockage) return _blockage; if (_vdde and (net->getName() == _vdde->getName())) return _vdde; @@ -379,6 +385,17 @@ namespace { return NULL; } + DeepNet* deepClockNet = getTopCell()->getDeepNet( path, net ); + if (deepClockNet) { + ltrace(300) << " Deep Clock Net:" << deepClockNet + << " state:" << NetRoutingExtension::getFlags(deepClockNet) << endl; + + return NetRoutingExtension::isFixed(deepClockNet) ? _blockage : NULL; + } else { + ltrace(300) << " Top Clock Net:" << net + << " state:" << NetRoutingExtension::getFlags(net) << endl; + } + // Track up, *only* for clocks. const Net* upNet = net; diff --git a/kite/src/BuildPreRouteds.cpp b/kite/src/BuildPreRouteds.cpp index 6c20f70b..a062c507 100644 --- a/kite/src/BuildPreRouteds.cpp +++ b/kite/src/BuildPreRouteds.cpp @@ -124,7 +124,6 @@ namespace Kite { Horizontal* horizontal = dynamic_cast(*icomponent); if (horizontal) { - cerr << horizontal << endl; segments.push_back( horizontal ); isPreRouted = true; if (horizontal->getWidth() != Session::getWireWidth(horizontal->getLayer())) @@ -132,7 +131,6 @@ namespace Kite { } else { Vertical* vertical = dynamic_cast(*icomponent); if (vertical) { - cerr << vertical << endl; isPreRouted = true; segments.push_back( vertical ); if (vertical->getWidth() != Session::getWireWidth(vertical->getLayer())) @@ -140,7 +138,6 @@ namespace Kite { } else { Contact* contact = dynamic_cast(*icomponent); if (contact) { - cerr << contact << endl; isPreRouted = true; contacts.push_back( contact ); if ( (contact->getWidth () != Session::getViaWidth(contact->getLayer())) diff --git a/stratus1/src/stratus/stratus.py b/stratus1/src/stratus/stratus.py index 2160195f..16e99e5c 100644 --- a/stratus1/src/stratus/stratus.py +++ b/stratus1/src/stratus/stratus.py @@ -1,7 +1,7 @@ #!/usr/bin/python # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +# Copyright (c) UPMC 2008-2014, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -16,6 +16,7 @@ try: import sys + import traceback import Cfg import CRL @@ -63,3 +64,44 @@ except Exception, e: print ' modules. Something may be wrong at Python/C API level.\n' print ' %s' % e sys.exit(2) + + +DoNetlist = 0x0001 +DoLayout = 0x0002 +DoStop = 0x0004 + + +def buildModel ( name, flags ): + try: + module = __import__( name, globals(), locals(), name ) + if not module.__dict__.has_key(name): + print '[ERROR] Stratus module <%s> do not contains a design of the same name.' % name + sys.exit(1) + + print ' - Generating Stratus Model <%s>' % name + model = module.__dict__[name](name) + model.Interface() + + if flags & DoNetlist: model.Netlist() + if flags & DoLayout: model.Layout () + + stopLevel=0 + if flags & DoStop: stopLevel = 1 + model.View(stopLevel, 'Model %s' % name) + model.Save(LOGICAL|PHYSICAL) + + except ImportError, e: + module = str(e).split()[-1] + + print '[ERROR] The <%s> Stratus design cannot be loaded.' % module + print ' Please check your design hierarchy.' + sys.exit(1) + except Exception, e: + print '[ERROR] A strange exception occurred while loading the Stratus' + print ' design <%s>. Please check that module for error:\n' % name + traceback.print_tb(sys.exc_info()[2]) + print ' %s' % e + sys.exit(2) + + framework = CRL.AllianceFramework.get() + return framework.getCell( name, CRL.Catalog.State.Views ) diff --git a/unicorn/src/cgt.py b/unicorn/src/cgt.py index 1a6c4601..8a91ab7a 100755 --- a/unicorn/src/cgt.py +++ b/unicorn/src/cgt.py @@ -121,6 +121,7 @@ if __name__ == '__main__': args.insert(0, 'cgt') af = CRL.AllianceFramework.get() + print af.getEnvironment().getPrint() #Hurricane.trace(True) Cfg.Configuration.pushDefaultPriority(Cfg.Parameter.Priority.CommandLine)