Correcting non-deterministic behavior in Anabatic/Katana (again).

This non-deterministic behavior was showing only in the ARMv2a benchmark
around event 180k...
* Bug: In Anabatic::Session::_netInvalidateds & _netRevalidateds, the
    set<> was still sorted on pointers. As contacts & segments can be
    created to maintain connexity after a layer change, we got a
    discrepency in objects Ids that may generate a change in ordering
    later.
* Bug: In Katana::Session::_doRemovalEvents(), the set of Tracks that
    got elements deleted was still using pointers. Now we use a TrackSet
    sorted on (direction,depth,axis). This should not have created
    a change in the results, as destructions do not change Ids, but it
    genereate extra differences in traces.
This commit is contained in:
Jean-Paul Chaput 2019-08-20 16:30:03 +02:00
parent 014dbe1bcc
commit 1124e92ac2
15 changed files with 244 additions and 243 deletions

View File

@ -718,7 +718,7 @@ namespace Anabatic {
if (getFlags() & SegSourceTop ) cap = getViaToTopCap (depth);
else if (getFlags() & SegSourceBottom) cap = getViaToBottomCap(depth);
else cap = getViaToSameCap (depth);
cdebug_log(159,0) << "getExtensionCap(): flags:" << getFlags()
cdebug_log(145,0) << "getExtensionCap(): flags:" << getFlags()
<< " VIA cap:" << DbU::getValueString(cap)
<< " " << (getFlags() & SegSourceBottom)
<< endl;

View File

@ -875,6 +875,8 @@ namespace Anabatic {
void AnabaticEngine::layerAssign ( uint32_t method )
{
//DebugSession::open( 145, 150 );
cdebug_log(9000,0) << "Deter| Layer Assignment" << endl;
set<Net*> globalNets;
@ -980,6 +982,8 @@ namespace Anabatic {
// cmess2 << " - Global segments : " << global << endl;
// cmess2 << " - Ratio : "
// << ((float)global/(float)total)*100.0 << "%." << endl;
//DebugSession::close();
}

View File

@ -24,6 +24,7 @@
#include <boost/function.hpp>
#include "hurricane/Commons.h"
#include "hurricane/Box.h"
#include "hurricane/DBo.h"
#include "crlcore/CellGauge.h"
#include "crlcore/RoutingGauge.h"
#include "anabatic/Constants.h"
@ -55,6 +56,7 @@ namespace Anabatic {
using Hurricane::DbU;
using Hurricane::Point;
using Hurricane::Box;
using Hurricane::DBo;
using Hurricane::Net;
using Hurricane::Contact;
using Hurricane::Segment;
@ -71,118 +73,118 @@ namespace Anabatic {
class Session {
public:
// Static Methods.
static inline bool isOpen ();
static inline bool doDestroyBaseContact ();
static inline bool doDestroyBaseSegment ();
static inline bool doDestroyTool ();
static bool isInDemoMode ();
static bool doWarnGCellOverload ();
static Session* get ( const char* message=NULL );
static inline Technology* getTechnology ();
static inline AnabaticEngine* getAnabatic ();
static inline const Configuration* getConfiguration ();
static float getSaturateRatio ();
static size_t getSaturateRp ();
static inline size_t getAllowedDepth ();
static DbU::Unit getExtensionCap ();
static inline CellGauge* getCellGauge ();
static inline DbU::Unit getSliceHeight ();
static inline DbU::Unit getSliceStep ();
static inline size_t getGVerticalDepth ();
static inline size_t getGHorizontalDepth ();
static inline DbU::Unit getGHorizontalPitch ();
static inline DbU::Unit getGVerticalPitch ();
static inline size_t getDVerticalDepth ();
static inline const Layer* getDVerticalLayer ();
static inline DbU::Unit getDVerticalWidth ();
static inline DbU::Unit getDVerticalPitch ();
static inline DbU::Unit getDVerticalOffset ();
static inline size_t getDHorizontalDepth ();
static inline const Layer* getDHorizontalLayer ();
static inline DbU::Unit getDHorizontalWidth ();
static inline DbU::Unit getDHorizontalPitch ();
static inline DbU::Unit getDHorizontalOffset ();
static inline size_t getDContactDepth ();
static inline const Layer* getDContactLayer ();
static inline DbU::Unit getDContactWidth ();
static inline DbU::Unit getDContactPitch ();
static inline RoutingGauge* getRoutingGauge ();
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
static inline size_t getDepth ();
static inline size_t getViaDepth ( const Layer* layer );
static inline size_t getLayerDepth ( const Layer* layer );
static inline const Layer* getRoutingLayer ( size_t );
static inline const Layer* getContactLayer ( size_t );
static Flags getDirection ( size_t depth );
static inline DbU::Unit getPitch ( size_t depth, Flags flags );
static inline DbU::Unit getOffset ( size_t depth );
static inline DbU::Unit getWireWidth ( size_t depth );
static inline DbU::Unit getViaWidth ( size_t depth );
static inline Flags getDirection ( const Layer* );
static inline DbU::Unit getPitch ( const Layer*, Flags flags );
static inline DbU::Unit getOffset ( const Layer* );
static inline DbU::Unit getWireWidth ( const Layer* );
static inline DbU::Unit getViaWidth ( const Layer* );
static inline DbU::Unit getExtensionCap ( const Layer* );
static inline Point getNearestGridPoint ( Point, Box constraints );
static inline size_t getSegmentStackSize ();
static inline size_t getContactStackSize ();
static inline const vector<AutoSegment*>& getInvalidateds ();
static inline const vector<AutoSegment*>& getRevalidateds ();
static inline const set<AutoSegment*>& getDestroyeds ();
static inline const vector<AutoSegment*>& getDoglegs ();
static inline const set<Net*>& getNetsModificateds ();
static void close ();
static void setAnabaticFlags ( Flags );
static inline void dogleg ( AutoSegment* );
static inline void doglegReset ();
static inline void revalidateTopology ();
static inline void setInvalidateMask ( Flags );
static inline void invalidate ( Net* );
static inline void invalidate ( AutoContact* );
static inline void invalidate ( AutoSegment* );
static inline size_t revalidate ();
static void link ( AutoContact* );
static void link ( AutoSegment* );
static void unlink ( AutoContact* );
static void unlink ( AutoSegment* );
static AutoContact* lookup ( Contact* );
static AutoSegment* lookup ( Segment* );
static inline void destroyRequest ( AutoSegment* );
static inline bool isOpen ();
static inline bool doDestroyBaseContact ();
static inline bool doDestroyBaseSegment ();
static inline bool doDestroyTool ();
static bool isInDemoMode ();
static bool doWarnGCellOverload ();
static Session* get ( const char* message=NULL );
static inline Technology* getTechnology ();
static inline AnabaticEngine* getAnabatic ();
static inline const Configuration* getConfiguration ();
static float getSaturateRatio ();
static size_t getSaturateRp ();
static inline size_t getAllowedDepth ();
static DbU::Unit getExtensionCap ();
static inline CellGauge* getCellGauge ();
static inline DbU::Unit getSliceHeight ();
static inline DbU::Unit getSliceStep ();
static inline size_t getGVerticalDepth ();
static inline size_t getGHorizontalDepth ();
static inline DbU::Unit getGHorizontalPitch ();
static inline DbU::Unit getGVerticalPitch ();
static inline size_t getDVerticalDepth ();
static inline const Layer* getDVerticalLayer ();
static inline DbU::Unit getDVerticalWidth ();
static inline DbU::Unit getDVerticalPitch ();
static inline DbU::Unit getDVerticalOffset ();
static inline size_t getDHorizontalDepth ();
static inline const Layer* getDHorizontalLayer ();
static inline DbU::Unit getDHorizontalWidth ();
static inline DbU::Unit getDHorizontalPitch ();
static inline DbU::Unit getDHorizontalOffset ();
static inline size_t getDContactDepth ();
static inline const Layer* getDContactLayer ();
static inline DbU::Unit getDContactWidth ();
static inline DbU::Unit getDContactPitch ();
static inline RoutingGauge* getRoutingGauge ();
static inline RoutingLayerGauge* getLayerGauge ( size_t depth );
static inline size_t getDepth ();
static inline size_t getViaDepth ( const Layer* layer );
static inline size_t getLayerDepth ( const Layer* layer );
static inline const Layer* getRoutingLayer ( size_t );
static inline const Layer* getContactLayer ( size_t );
static Flags getDirection ( size_t depth );
static inline DbU::Unit getPitch ( size_t depth, Flags flags );
static inline DbU::Unit getOffset ( size_t depth );
static inline DbU::Unit getWireWidth ( size_t depth );
static inline DbU::Unit getViaWidth ( size_t depth );
static inline Flags getDirection ( const Layer* );
static inline DbU::Unit getPitch ( const Layer*, Flags flags );
static inline DbU::Unit getOffset ( const Layer* );
static inline DbU::Unit getWireWidth ( const Layer* );
static inline DbU::Unit getViaWidth ( const Layer* );
static inline DbU::Unit getExtensionCap ( const Layer* );
static inline Point getNearestGridPoint ( Point, Box constraints );
static inline size_t getSegmentStackSize ();
static inline size_t getContactStackSize ();
static inline const vector<AutoSegment*>& getInvalidateds ();
static inline const vector<AutoSegment*>& getRevalidateds ();
static inline const set<AutoSegment*>& getDestroyeds ();
static inline const vector<AutoSegment*>& getDoglegs ();
static inline const set<Net*,DBo::CompareById>& getNetsModificateds ();
static void close ();
static void setAnabaticFlags ( Flags );
static inline void dogleg ( AutoSegment* );
static inline void doglegReset ();
static inline void revalidateTopology ();
static inline void setInvalidateMask ( Flags );
static inline void invalidate ( Net* );
static inline void invalidate ( AutoContact* );
static inline void invalidate ( AutoSegment* );
static inline size_t revalidate ();
static void link ( AutoContact* );
static void link ( AutoSegment* );
static void unlink ( AutoContact* );
static void unlink ( AutoSegment* );
static AutoContact* lookup ( Contact* );
static AutoSegment* lookup ( Segment* );
static inline void destroyRequest ( AutoSegment* );
// Methods.
static Session* _open ( AnabaticEngine* );
bool _doDestroyBaseContact ();
bool _doDestroyBaseSegment ();
bool _doDestroyTool ();
virtual Configuration* _getConfiguration ();
inline void _dogleg ( AutoSegment* );
inline void _doglegReset ();
void _invalidate ( Net* );
inline void _invalidate ( AutoContact* );
inline void _invalidate ( AutoSegment* );
inline void _destroyRequest ( AutoSegment* );
void _canonize ();
void _revalidateTopology ();
virtual size_t _revalidate ();
DbU::Unit _getPitch ( size_t depth, Flags flags ) const;
Point _getNearestGridPoint ( Point, Box constraints );
Record* _getRecord () const;
string _getString () const;
inline string _getTypeName () const;
static Session* _open ( AnabaticEngine* );
bool _doDestroyBaseContact ();
bool _doDestroyBaseSegment ();
bool _doDestroyTool ();
virtual Configuration* _getConfiguration ();
inline void _dogleg ( AutoSegment* );
inline void _doglegReset ();
void _invalidate ( Net* );
inline void _invalidate ( AutoContact* );
inline void _invalidate ( AutoSegment* );
inline void _destroyRequest ( AutoSegment* );
void _canonize ();
void _revalidateTopology ();
virtual size_t _revalidate ();
DbU::Unit _getPitch ( size_t depth, Flags flags ) const;
Point _getNearestGridPoint ( Point, Box constraints );
Record* _getRecord () const;
string _getString () const;
inline string _getTypeName () const;
protected:
static Session* _session;
AnabaticEngine* _anabatic;
Technology* _technology;
CellGauge* _cellGauge;
RoutingGauge* _routingGauge;
vector<AutoContact*> _autoContacts;
vector<AutoSegment*> _doglegs;
vector<AutoSegment*> _segmentInvalidateds;
vector<AutoSegment*> _segmentRevalidateds;
set<Net*> _netInvalidateds;
set<Net*> _netRevalidateds;
set<AutoSegment*> _destroyedSegments;
static Session* _session;
AnabaticEngine* _anabatic;
Technology* _technology;
CellGauge* _cellGauge;
RoutingGauge* _routingGauge;
vector<AutoContact*> _autoContacts;
vector<AutoSegment*> _doglegs;
vector<AutoSegment*> _segmentInvalidateds;
vector<AutoSegment*> _segmentRevalidateds;
set<Net*,DBo::CompareById> _netInvalidateds;
set<Net*,DBo::CompareById> _netRevalidateds;
set<AutoSegment*> _destroyedSegments;
// Constructors.
protected:
@ -197,77 +199,77 @@ namespace Anabatic {
// Inline Functions.
inline bool Session::isOpen () { return get() != NULL; }
inline Technology* Session::getTechnology () { return get("getTechnology()")->_technology; }
inline CellGauge* Session::getCellGauge () { return get("getCellGauge()")->_cellGauge; }
inline RoutingGauge* Session::getRoutingGauge () { return get("getRoutingGauge()")->_routingGauge; }
inline bool Session::doDestroyBaseContact () { return get("doDestroyBaseContact()")->_doDestroyBaseContact(); }
inline bool Session::doDestroyBaseSegment () { return get("doDestroyBaseSegment()")->_doDestroyBaseSegment(); }
inline bool Session::doDestroyTool () { return get("doDestroyTool()")->_doDestroyTool(); }
inline const Configuration* Session::getConfiguration () { return get("getConfiguration()")->_getConfiguration(); }
inline AnabaticEngine* Session::getAnabatic () { return get("getAnabatic()")->_anabatic; }
inline void Session::revalidateTopology () { return get("revalidateTopology()")->_revalidateTopology(); }
inline size_t Session::revalidate () { return get("revalidate()")->_revalidate(); }
inline size_t Session::getSegmentStackSize () { return get("getSegmentStackSize()")->_segmentInvalidateds.size(); }
inline size_t Session::getContactStackSize () { return get("getContactStackSize()")->_autoContacts.size(); }
inline const vector<AutoSegment*>& Session::getInvalidateds () { return get("getInvalidateds()")->_segmentInvalidateds; }
inline const vector<AutoSegment*>& Session::getRevalidateds () { return get("getRevalidateds()")->_segmentRevalidateds; }
inline const set<AutoSegment*>& Session::getDestroyeds () { return get("getDestroyeds()")->_destroyedSegments; }
inline const vector<AutoSegment*>& Session::getDoglegs () { return get("getDoglegs()")->_doglegs; }
inline const set<Net*>& Session::getNetsModificateds () { return get("getNetsModificateds()")->_netRevalidateds; }
inline void Session::doglegReset () { return get("doglegReset()")->_doglegReset (); }
inline void Session::invalidate ( Net* net ) { return get("invalidate(Net*)")->_invalidate(net); }
inline void Session::invalidate ( AutoContact* autoContact ) { return get("invalidate(AutoContact*)")->_invalidate(autoContact); }
inline void Session::invalidate ( AutoSegment* autoSegment ) { return get("invalidate(AutoSegment*)")->_invalidate(autoSegment); }
inline void Session::dogleg ( AutoSegment* autoSegment ) { return get("dogleg(AutoSegment*)")->_dogleg(autoSegment); }
inline void Session::destroyRequest ( AutoSegment* autoSegment ) { return get("destroyRequest(AutoSegment*)")->_destroyRequest(autoSegment); }
inline size_t Session::getAllowedDepth () { return getConfiguration()->getAllowedDepth(); }
inline DbU::Unit Session::getSliceHeight () { return getCellGauge()->getSliceHeight(); }
inline DbU::Unit Session::getSliceStep () { return getCellGauge()->getSliceStep(); }
inline size_t Session::getGVerticalDepth () { return getConfiguration()->getGVerticalDepth(); }
inline size_t Session::getGHorizontalDepth () { return getConfiguration()->getGHorizontalDepth(); }
inline DbU::Unit Session::getGVerticalPitch () { return getConfiguration()->getGVerticalPitch(); }
inline DbU::Unit Session::getGHorizontalPitch () { return getConfiguration()->getGHorizontalPitch(); }
inline size_t Session::getDVerticalDepth () { return getConfiguration()->getDVerticalDepth(); }
inline const Layer* Session::getDVerticalLayer () { return getConfiguration()->getDVerticalLayer(); }
inline DbU::Unit Session::getDVerticalWidth () { return getConfiguration()->getDVerticalWidth(); }
inline DbU::Unit Session::getDVerticalPitch () { return getConfiguration()->getDVerticalPitch(); }
inline DbU::Unit Session::getDVerticalOffset () { return getConfiguration()->getDVerticalOffset(); }
inline size_t Session::getDHorizontalDepth () { return getConfiguration()->getDHorizontalDepth(); }
inline const Layer* Session::getDHorizontalLayer () { return getConfiguration()->getDHorizontalLayer(); }
inline DbU::Unit Session::getDHorizontalWidth () { return getConfiguration()->getDHorizontalWidth(); }
inline DbU::Unit Session::getDHorizontalPitch () { return getConfiguration()->getDHorizontalPitch(); }
inline DbU::Unit Session::getDHorizontalOffset () { return getConfiguration()->getDHorizontalOffset(); }
inline size_t Session::getDContactDepth () { return getConfiguration()->getDContactDepth(); }
inline const Layer* Session::getDContactLayer () { return getConfiguration()->getDContactLayer(); }
inline DbU::Unit Session::getDContactWidth () { return getConfiguration()->getDContactWidth(); }
inline DbU::Unit Session::getDContactPitch () { return getConfiguration()->getDContactPitch(); }
inline RoutingLayerGauge* Session::getLayerGauge ( size_t depth ) { return getRoutingGauge()->getLayerGauge(depth); }
inline size_t Session::getDepth () { return getRoutingGauge()->getDepth(); }
inline size_t Session::getViaDepth ( const Layer* layer ) { return getRoutingGauge()->getViaDepth(layer); }
inline size_t Session::getLayerDepth ( const Layer* layer ) { return getRoutingGauge()->getLayerDepth(layer); }
inline const Layer* Session::getRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth); }
inline const Layer* Session::getContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(depth); }
inline DbU::Unit Session::getPitch ( size_t depth, Flags flags=Flags::NoFlags ) { return get("getPitch(depth,flags)")->_getPitch( depth, flags ); }
inline DbU::Unit Session::getOffset ( size_t depth ) { return getRoutingGauge()->getLayerOffset(depth); }
inline DbU::Unit Session::getWireWidth ( size_t depth ) { return getRoutingGauge()->getLayerWireWidth(depth); }
inline DbU::Unit Session::getViaWidth ( size_t depth ) { return getRoutingGauge()->getViaWidth(depth); }
inline DbU::Unit Session::getPitch ( const Layer* layer, Flags flags=Flags::NoFlags ) { return getPitch( getLayerDepth(layer), flags ); }
inline DbU::Unit Session::getOffset ( const Layer* layer ) { return getOffset ( getLayerDepth(layer) ); }
inline DbU::Unit Session::getWireWidth ( const Layer* layer ) { return getWireWidth( getLayerDepth(layer) ); }
inline DbU::Unit Session::getViaWidth ( const Layer* layer ) { return getViaWidth ( getViaDepth(layer) ); }
inline DbU::Unit Session::getExtensionCap ( const Layer* layer ) { return getConfiguration()->getExtensionCap(layer); }
inline Flags Session::getDirection ( const Layer* layer ) { return getDirection( getLayerDepth(layer) ); }
inline Point Session::getNearestGridPoint ( Point p, Box b ) { return get("getNearestGridPoint()")->_getNearestGridPoint(p,b); }
inline void Session::_dogleg ( AutoSegment* segment ) { _doglegs.push_back(segment); }
inline void Session::_doglegReset () { _doglegs.clear(); }
inline void Session::_invalidate ( AutoContact* contact ) { _autoContacts.push_back(contact); }
inline void Session::_invalidate ( AutoSegment* segment ) { _segmentInvalidateds.push_back(segment); }
inline void Session::_destroyRequest ( AutoSegment* segment ) { _destroyedSegments.insert(segment); }
inline string Session::_getTypeName () const { return _TName("Session"); }
inline bool Session::isOpen () { return get() != NULL; }
inline Technology* Session::getTechnology () { return get("getTechnology()")->_technology; }
inline CellGauge* Session::getCellGauge () { return get("getCellGauge()")->_cellGauge; }
inline RoutingGauge* Session::getRoutingGauge () { return get("getRoutingGauge()")->_routingGauge; }
inline bool Session::doDestroyBaseContact () { return get("doDestroyBaseContact()")->_doDestroyBaseContact(); }
inline bool Session::doDestroyBaseSegment () { return get("doDestroyBaseSegment()")->_doDestroyBaseSegment(); }
inline bool Session::doDestroyTool () { return get("doDestroyTool()")->_doDestroyTool(); }
inline const Configuration* Session::getConfiguration () { return get("getConfiguration()")->_getConfiguration(); }
inline AnabaticEngine* Session::getAnabatic () { return get("getAnabatic()")->_anabatic; }
inline void Session::revalidateTopology () { return get("revalidateTopology()")->_revalidateTopology(); }
inline size_t Session::revalidate () { return get("revalidate()")->_revalidate(); }
inline size_t Session::getSegmentStackSize () { return get("getSegmentStackSize()")->_segmentInvalidateds.size(); }
inline size_t Session::getContactStackSize () { return get("getContactStackSize()")->_autoContacts.size(); }
inline const vector<AutoSegment*>& Session::getInvalidateds () { return get("getInvalidateds()")->_segmentInvalidateds; }
inline const vector<AutoSegment*>& Session::getRevalidateds () { return get("getRevalidateds()")->_segmentRevalidateds; }
inline const set<AutoSegment*>& Session::getDestroyeds () { return get("getDestroyeds()")->_destroyedSegments; }
inline const vector<AutoSegment*>& Session::getDoglegs () { return get("getDoglegs()")->_doglegs; }
inline const set<Net*,DBo::CompareById>& Session::getNetsModificateds () { return get("getNetsModificateds()")->_netRevalidateds; }
inline void Session::doglegReset () { return get("doglegReset()")->_doglegReset (); }
inline void Session::invalidate ( Net* net ) { return get("invalidate(Net*)")->_invalidate(net); }
inline void Session::invalidate ( AutoContact* autoContact ) { return get("invalidate(AutoContact*)")->_invalidate(autoContact); }
inline void Session::invalidate ( AutoSegment* autoSegment ) { return get("invalidate(AutoSegment*)")->_invalidate(autoSegment); }
inline void Session::dogleg ( AutoSegment* autoSegment ) { return get("dogleg(AutoSegment*)")->_dogleg(autoSegment); }
inline void Session::destroyRequest ( AutoSegment* autoSegment ) { return get("destroyRequest(AutoSegment*)")->_destroyRequest(autoSegment); }
inline size_t Session::getAllowedDepth () { return getConfiguration()->getAllowedDepth(); }
inline DbU::Unit Session::getSliceHeight () { return getCellGauge()->getSliceHeight(); }
inline DbU::Unit Session::getSliceStep () { return getCellGauge()->getSliceStep(); }
inline size_t Session::getGVerticalDepth () { return getConfiguration()->getGVerticalDepth(); }
inline size_t Session::getGHorizontalDepth () { return getConfiguration()->getGHorizontalDepth(); }
inline DbU::Unit Session::getGVerticalPitch () { return getConfiguration()->getGVerticalPitch(); }
inline DbU::Unit Session::getGHorizontalPitch () { return getConfiguration()->getGHorizontalPitch(); }
inline size_t Session::getDVerticalDepth () { return getConfiguration()->getDVerticalDepth(); }
inline const Layer* Session::getDVerticalLayer () { return getConfiguration()->getDVerticalLayer(); }
inline DbU::Unit Session::getDVerticalWidth () { return getConfiguration()->getDVerticalWidth(); }
inline DbU::Unit Session::getDVerticalPitch () { return getConfiguration()->getDVerticalPitch(); }
inline DbU::Unit Session::getDVerticalOffset () { return getConfiguration()->getDVerticalOffset(); }
inline size_t Session::getDHorizontalDepth () { return getConfiguration()->getDHorizontalDepth(); }
inline const Layer* Session::getDHorizontalLayer () { return getConfiguration()->getDHorizontalLayer(); }
inline DbU::Unit Session::getDHorizontalWidth () { return getConfiguration()->getDHorizontalWidth(); }
inline DbU::Unit Session::getDHorizontalPitch () { return getConfiguration()->getDHorizontalPitch(); }
inline DbU::Unit Session::getDHorizontalOffset () { return getConfiguration()->getDHorizontalOffset(); }
inline size_t Session::getDContactDepth () { return getConfiguration()->getDContactDepth(); }
inline const Layer* Session::getDContactLayer () { return getConfiguration()->getDContactLayer(); }
inline DbU::Unit Session::getDContactWidth () { return getConfiguration()->getDContactWidth(); }
inline DbU::Unit Session::getDContactPitch () { return getConfiguration()->getDContactPitch(); }
inline RoutingLayerGauge* Session::getLayerGauge ( size_t depth ) { return getRoutingGauge()->getLayerGauge(depth); }
inline size_t Session::getDepth () { return getRoutingGauge()->getDepth(); }
inline size_t Session::getViaDepth ( const Layer* layer ) { return getRoutingGauge()->getViaDepth(layer); }
inline size_t Session::getLayerDepth ( const Layer* layer ) { return getRoutingGauge()->getLayerDepth(layer); }
inline const Layer* Session::getRoutingLayer ( size_t depth ) { return getRoutingGauge()->getRoutingLayer(depth); }
inline const Layer* Session::getContactLayer ( size_t depth ) { return getRoutingGauge()->getContactLayer(depth); }
inline DbU::Unit Session::getPitch ( size_t depth, Flags flags=Flags::NoFlags ) { return get("getPitch(depth,flags)")->_getPitch( depth, flags ); }
inline DbU::Unit Session::getOffset ( size_t depth ) { return getRoutingGauge()->getLayerOffset(depth); }
inline DbU::Unit Session::getWireWidth ( size_t depth ) { return getRoutingGauge()->getLayerWireWidth(depth); }
inline DbU::Unit Session::getViaWidth ( size_t depth ) { return getRoutingGauge()->getViaWidth(depth); }
inline DbU::Unit Session::getPitch ( const Layer* layer, Flags flags=Flags::NoFlags ) { return getPitch( getLayerDepth(layer), flags ); }
inline DbU::Unit Session::getOffset ( const Layer* layer ) { return getOffset ( getLayerDepth(layer) ); }
inline DbU::Unit Session::getWireWidth ( const Layer* layer ) { return getWireWidth( getLayerDepth(layer) ); }
inline DbU::Unit Session::getViaWidth ( const Layer* layer ) { return getViaWidth ( getViaDepth(layer) ); }
inline DbU::Unit Session::getExtensionCap ( const Layer* layer ) { return getConfiguration()->getExtensionCap(layer); }
inline Flags Session::getDirection ( const Layer* layer ) { return getDirection( getLayerDepth(layer) ); }
inline Point Session::getNearestGridPoint ( Point p, Box b ) { return get("getNearestGridPoint()")->_getNearestGridPoint(p,b); }
inline void Session::_dogleg ( AutoSegment* segment ) { _doglegs.push_back(segment); }
inline void Session::_doglegReset () { _doglegs.clear(); }
inline void Session::_invalidate ( AutoContact* contact ) { _autoContacts.push_back(contact); }
inline void Session::_invalidate ( AutoSegment* segment ) { _segmentInvalidateds.push_back(segment); }
inline void Session::_destroyRequest ( AutoSegment* segment ) { _destroyedSegments.insert(segment); }
inline string Session::_getTypeName () const { return _TName("Session"); }
} // Anabatic namespace.

View File

@ -1035,37 +1035,6 @@ namespace Etesian {
}
#if DISABLED
void EtesianEngine::place ( Instance* instance )
{
setBlock( instance );
if (getCell()->getAbutmentBox().isEmpty()) {
cmess2 << Error( "EtesianEngine::place(): Cell \"%s\" must have an abutment box."
, getString(getCell()->getName()).c_str()
) << std::endl;
return;
}
if (getBlockCell()->getAbutmentBox().isEmpty()) {
cmess2 << Error( "EtesianEngine::place(): Instance \"%s\" must have an abutment box."
, getString(instance->getName()).c_str()
) << std::endl;
return;
}
if(getBlockCell()->isPlaced()){
cmess2 << Error( "EtesianEngine::place(): The instance \"%s\" is already placed."
, getString(instance->getName()).c_str()
) << std::endl;
return;
}
getBlockCell()->uniquify();
getConfiguration()->print( getCell() );
findYSpin();
}
#endif
void EtesianEngine::_progressReport1 ( string label ) const
{
size_t w = label.size();

View File

@ -211,10 +211,10 @@ namespace Katana {
{
cdebug_log(159,1) << "Katana::Session::_doRemovalEvents()" << endl;
set<Track*> packTracks;
TrackSet packTracks;
for ( size_t i=0 ; i<_removeEvents.size() ; ++i ) {
cdebug_log(159,0) << "Event:" << _removeEvents[i]._segment << endl;
cdebug_log(159,0) << "Remove event for:" << _removeEvents[i]._segment << endl;
if (not _removeEvents[i]._segment->getTrack()) continue;
_removeEvents[i]._segment->detach( packTracks );
@ -222,7 +222,7 @@ namespace Katana {
}
_removeEvents.clear();
for ( set<Track*>::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
for ( TrackSet::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it )
(*it)->doRemoval();
cdebug_tabw(159,-1);
@ -453,7 +453,8 @@ namespace Katana {
return;
}
if (forced) track->invalidate();
_sortEvents.insert( track );
for ( Track* elem : _sortEvents ) if (elem == track) return;
_sortEvents.push_back( track );
}

View File

@ -93,7 +93,7 @@ namespace Katana {
{
cdebug_log(155,1) << "Track::_preDestroy() - " << (void*)this << " " << this << endl;
set<Track*> dummy;
TrackSet dummy;
for ( size_t i=0 ; i<_segments.size() ; i++ )
if (_segments[i]) {
_segments[i]->detach( dummy );
@ -520,7 +520,7 @@ namespace Katana {
bool holes = false;
if (message) cerr << " o Checking Track - " << message << endl;
cdebug_log(155,0) << (void*)this << ":" << this << endl;
cdebug_log(155,0) << /*(void*)this << ":" <<*/ this << endl;
for ( size_t i=0 ; i<_segments.size() ; i++ ) {
if (_segments[i]) {

View File

@ -189,7 +189,7 @@ namespace Katana {
void TrackElement::swapTrack ( TrackElement* ) { }
void TrackElement::reschedule ( uint32_t ) { }
//void TrackElement::detach () { }
void TrackElement::detach ( set<Track*>& ) { }
//void TrackElement::detach ( TrackSet& ) { }
void TrackElement::revalidate () { }
void TrackElement::updatePPitch () { }
void TrackElement::updateTrackSpan () { }

View File

@ -237,6 +237,12 @@ namespace Katana {
{ }
void TrackFixedSegment::detach ( TrackSet& removeds )
{
// cerr << Error( "TrackFixedSegment::detach(): Must never be called on %s."
// , getString(this).c_str()) << endl;
}
string TrackFixedSegment::_getTypeName () const
{ return "TrackFixedSegment"; }

View File

@ -441,9 +441,9 @@ namespace Katana {
// }
void TrackSegment::detach ( set<Track*>& removeds )
void TrackSegment::detach ( TrackSet& removeds )
{
cdebug_log(159,1) << "TrackSegment::detach(set<Track*>&) - <id:" << getId() << "> trackSpan:"
cdebug_log(159,1) << "TrackSegment::detach(TrackSet&) - <id:" << getId() << "> trackSpan:"
<< getTrackSpan() << endl;
Track* wtrack = getTrack();

View File

@ -60,8 +60,8 @@ namespace Katana {
, _trackSpan (0)
, _trackCount(0)
{
cdebug_log(159,1) << "CTOR TrackSegmentNonPref " << (void*)this << ":" << this << endl;
cdebug_log(159,0) << " over " << (void*)segment << ":" << segment << endl;
cdebug_log(159,1) << "CTOR TrackSegmentNonPref " << /*(void*)this << ":" <<*/ this << endl;
cdebug_log(159,0) << " over " << /*(void*)segment << ":" <<*/ segment << endl;
updateTrackSpan();
@ -94,7 +94,7 @@ namespace Katana {
void TrackSegmentNonPref::updateTrackSpan ()
{
DebugSession::open( getNet(), 150, 160 );
cdebug_log(159,1) << "TrackSegmentNonPref::updateTrackspan() " << (void*)this << ":" << this << endl;
cdebug_log(159,1) << "TrackSegmentNonPref::updateTrackspan() " << /*(void*)this << ":" <<*/ this << endl;
RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(_base->getLayer());
Interval newAxisSpan ( _base->getSourcePosition(), _base->getTargetPosition() );

View File

@ -128,11 +128,11 @@ namespace Katana {
};
protected:
// Attributes.
vector<TrackElement*> _indirectInvalids;
vector<Event> _insertEvents;
vector<Event> _removeEvents;
vector<Event> _lockEvents;
set<Track*> _sortEvents;
vector<TrackElement*> _indirectInvalids;
vector<Event> _insertEvents;
vector<Event> _removeEvents;
vector<Event> _lockEvents;
vector<Track*> _sortEvents;
protected:
// Constructors & Destructors.
Session ( KatanaEngine* );

View File

@ -87,7 +87,7 @@ namespace Katana {
TrackElement* getPrevious ( size_t& index, Net* ) const;
TrackElement* getNextFixed ( size_t& index ) const;
size_t find ( const TrackElement* ) const;
DbU::Unit getSourcePosition ( vector<TrackElement*>::iterator ) const;
DbU::Unit getSourcePosition ( std::vector<TrackElement*>::iterator ) const;
DbU::Unit getMinimalPosition ( size_t index, uint32_t state ) const;
DbU::Unit getMaximalPosition ( size_t index, uint32_t state ) const;
Interval getFreeInterval ( DbU::Unit position, Net* net=NULL ) const;
@ -115,16 +115,16 @@ namespace Katana {
protected:
// Attributes.
RoutingPlane* _routingPlane;
size_t _index;
DbU::Unit _axis;
DbU::Unit _min;
DbU::Unit _max;
vector<TrackElement*> _segments;
vector<TrackMarker*> _markers;
bool _localAssigned;
bool _segmentsValid;
bool _markersValid;
RoutingPlane* _routingPlane;
size_t _index;
DbU::Unit _axis;
DbU::Unit _min;
DbU::Unit _max;
std::vector<TrackElement*> _segments;
std::vector<TrackMarker*> _markers;
bool _localAssigned;
bool _segmentsValid;
bool _markersValid;
protected:
// Constructors & Destructors.
@ -153,6 +153,11 @@ namespace Katana {
struct SegmentCompare {
inline bool operator() ( const TrackElement* lhs, const TrackElement* rhs );
};
public:
struct Compare {
inline bool operator() ( const Track* lhs, const Track* rhs ) const;
};
};
@ -210,6 +215,18 @@ namespace Katana {
}
inline bool Track::Compare::operator() ( const Track* lhs, const Track* rhs ) const
{
if (lhs->isHorizontal() xor rhs->isHorizontal()) return lhs->isHorizontal();
if (lhs->getDepth () != rhs->getDepth ()) return lhs->getDepth() < rhs->getDepth();
return (lhs->getAxis() < rhs->getAxis());
}
class TrackSet : public std::set<Track*,Track::Compare> { };
} // Katana namespace.

View File

@ -55,6 +55,7 @@ namespace Katana {
class Track;
class TrackCost;
class TrackSegment;
class TrackSet;
typedef map<TrackElement*,TrackElement*> TrackElementPairing;
@ -174,7 +175,7 @@ namespace Katana {
virtual Interval getTargetConstraints () const;
virtual DataNegociate* getDataNegociate ( Flags flags=Flags::DataSelf ) const;
inline TrackElement* getCanonical ( Interval& );
virtual size_t getGCells ( vector<GCell*>& ) const;
virtual size_t getGCells ( std::vector<GCell*>& ) const;
virtual TrackElement* getParent () const;
virtual uint32_t getDoglegLevel () const;
virtual TrackElement* getSourceDogleg ();
@ -197,7 +198,7 @@ namespace Katana {
virtual void swapTrack ( TrackElement* );
virtual void reschedule ( uint32_t level );
//virtual void detach ();
virtual void detach ( std::set<Track*>& );
virtual void detach ( TrackSet& ) = 0;
virtual void invalidate ();
virtual void revalidate ();
virtual void updatePPitch ();

View File

@ -65,6 +65,7 @@ namespace Katana {
virtual void forcePriority ( float );
virtual void computePriority ();
virtual void computeAlignedPriority ();
virtual void detach ( TrackSet& );
virtual Record* _getRecord () const;
virtual string _getString () const;
virtual string _getTypeName () const;

View File

@ -134,7 +134,7 @@ namespace Katana {
virtual void swapTrack ( TrackElement* );
virtual void reschedule ( uint32_t level );
//virtual void detach ();
virtual void detach ( std::set<Track*>& );
virtual void detach ( TrackSet& );
virtual void invalidate ();
virtual void revalidate ();
virtual void updatePPitch ();