diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index 35f5786f..ca5985a6 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -1,3 +1,4 @@ +# -*- explicit-buffer-name: "CMakeLists.txt" -*- project(KITE) @@ -40,6 +41,6 @@ add_subdirectory(src) add_subdirectory(cmake_modules) - if(BUILD_DOC AND DOXYGEN_FOUND AND IS_DIRECTORY doc) + if(BUILD_DOC AND DOXYGEN_FOUND) add_subdirectory(doc) - endif(BUILD_DOC AND DOXYGEN_FOUND AND IS_DIRECTORY doc) + endif(BUILD_DOC AND DOXYGEN_FOUND) diff --git a/kite/doc/ASIM-bigfonts.css b/kite/doc/ASIM-bigfonts.css deleted file mode 100644 index f8ec6823..00000000 --- a/kite/doc/ASIM-bigfonts.css +++ /dev/null @@ -1,353 +0,0 @@ - - -/* - * x-----------------------------------------------------------------x - * | HTML Standart Tags | - * x-----------------------------------------------------------------x - */ - - html, body, th, td, tr, p, li, h1, h2, h3, h4, h5, h6 { - font-size: 100%; - font-family: verdana, sans-serif; - } - - body { - color: black; - background: white; - background-color: white; - background-position: top left; - background-attachment: fixed; - background-repeat: no-repeat; - margin-top: 2em; - margin-right: 10%; - margin-left: 10%; - } - - hr { - height: 1px; - border: 0; - color: #004400; - background-color: #004400; - } - - - h1, h2, h3, h4, h5, h6 { - font-family: verdana, sans-serif; - } - - h1 { text-align: center; } - h2, h3, h4, h5, h6 { text-align: left; - padding-top: 2em; - } - h1, h2, h3 { font-family: "Trebuchet MS", sans-serif; - color: #09550B; - } - h1 { font-weight: bold; font-size: 170%; } - h2 { font-weight: bold; font-size: 140%; } - h3 { font-weight: bold; font-size: 118%; } - h4 { font-weight: bold; font-size: 100%; } - h5 { font-style: italic; font-size: 100%; } - h6 { font-variant: small-caps; font-size: 100%; } - - .hide { - display: none; - color: white; - } - - - p { - margin-top: 0.6em; - margin-bottom: 0.6em; - margin-left: 0.0em; - margin-right: 0.0em; - } - - - address { - text-align: right; - font-weight: bold; - font-style: italic; - font-size: 80%; - } - - - caption { font-weight: bold } - - - blockquote { - margin-left: 4em; - margin-right: 4em; - margin-top: 0.8em; - margin-bottom: 0.8em; - font-style: italic; - color: #003300; - } - - blockquote p { - margin-bottom: 0; - } - - blockquote address { - margin: 0; - } - - - table { - border-collapse: collapse; - } - - dt, dd { margin-top: 0; margin-bottom: 0; } - dt { font-weight: bold; } - - - pre, tt, code { - font-family: "andale mono", monospace; - font-size: 100%; - white-space: pre; - } - - pre { - font-size: 80%; - border: solid; - border-width: thin; - border-color: #003300; - background-color: #EEEEEE; - padding: 0.5em; - margin-left: 2em; - margin-right: 2em - } - - tt { color: green; } - em { font-style: italic; font-weight: bold; } - strong { font-weight: bold; } - - span.textit { font-style: italic; } - span.textbf { font-weight: bold; } - - .small { font-size: 90%; } - .white { color: #FFFFFF; } - - - ul.toc { - list-style: disc; - list-style: none; - } - - - a:link img, a:visited img { border-style: none; } - a img { color: white; } - - a:link, a:active, a:visited { - color: #09550B; - text-decoration: none; - } - - a:hover, a:focus { - color: #FF9900; - text-decoration: underline; - } - - - - -/* - * x-----------------------------------------------------------------x - * | Doxygen Specific Classes | - * x-----------------------------------------------------------------x - */ - - -/* ------------------------------------------------------------------- - * Header & Footer Classes (customized top page navigation bar). - */ - - table.header { - width: 100%; - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - } - - h1.header { - font-family: times, verdana, sans-serif; - } - - td.header { - /*width: 14%;*/ - text-align: center; - font-weight: bold; - font-family: verdana, sans-serif; - } - - table.footer { - width: 100%; - } - - td.leftFoot1, td.leftFoot2 { - text-align: left; - } - - td.rightFoot1, td.rightFoot2 { - text-align: right; - } - - td.leftFoot2 { - font-family: time; - font-weight: bold; - } - - td.rightFoot2 { - font-weight: bold; - } - - div.ah { - font-family: time; - font-size: 250%; - } - - -/* ------------------------------------------------------------------- - * Quick Index Class (top page navigation bar). - */ - - div.qindex, div.nav { - width: 100%; - /*background-color: #DADAEF;*/ - /*background-color: #eeeeff;*/ - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - border: 1px solid #003300; - text-align: center; - margin: 2px; - padding: 2px; - line-height: 140%; - } - - a.qindex, a.qindex:visited, a.qindex:hover, a.qindexHL, a.el, a.elRef { - text-decoration: none; - font-weight: bold; - } - - a.qindex, a.qindex:visited { - color: #09550B; - } - - a.qindex:hover { - background-color: #ddddff; - } - - a.qindexHL, a.qindexHL:hover, a.qindexHL:visited { - background-color: #0c780c; - color: #ffffff; - border: 1px double #9295C2; - } - - a.code:link, a.code:visited, a.codeRef:link, a.codeRef:visited { - text-decoration: none; - font-weight: normal; - color: #0000ff; - } - - .indexkey { - background-color: #eeeeff; - border: 1px solid #b0b0b0; - padding: 2px 15px; - } - - .indexkey, .indexvalue { - background-color: #eeeeff; - border: 1px solid #b0b0b0; - padding: 2px 15px; - } - - .indexkey { - width: 40%; - } - - .indexvalue { - width: 80%; - } - - -/* ------------------------------------------------------------------- - * Verbatim Source Code / Examples. - */ - - pre.fragment { background-color: #EEEEEE; } - - span.keyword { color: #008000 } - span.keywordtype { color: #604020 } - span.keywordflow { color: #e08000 } - span.comment { color: #800000 } - span.preprocessor { color: #806020 } - span.stringliteral { color: #002080 } - span.charliteral { color: #008080 } - - -/* ------------------------------------------------------------------- - * Attributes Listing. - */ - - .mdTable { - /*border: 1px solid #868686;*/ - /*background-color: #DADAEF;*/ - /*background-color: #F4F4FB;*/ - border: 1px none #868686; - /*background-color: #B8E6B8;*/ - background-color: #CCE6CA; - margin-top: 25px; - } - - .mdRow { - padding: 5px 10px; - } - - /* This Mozilla/Firefox bug has been corrected from v1.5. - * .mdname1 { - * padding: 3px 0px 0px 0px; - * } - */ - - .mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - font-size: 12px; - font-style: italic; - /*background-color: #FAFAFA;*/ - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; - } - - .memItemLeft, .memItemRight, .memTemplItemLeft { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #0c0c0c; - border-right-color: #0c0c0c; - border-bottom-color: #0c0c0c; - border-left-color: #0c0c0c; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - /*background-color: #DADAEF;*/ - /*background-color: #eeeeff;*/ - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - } - - .memItemLeft { font-size: 12px; } - .memItemRight { font-size: 13px; } - .memTemplItemLeft { font-size: 12px; } - .memTemplItemRight { font-size: 13px; } - - .memTemplParams { - color: #606060; - background-color: #DADAEF; - font-size: 12px; - } - diff --git a/kite/doc/ASIM.css b/kite/doc/ASIM.css deleted file mode 100644 index 6d92a0c5..00000000 --- a/kite/doc/ASIM.css +++ /dev/null @@ -1,485 +0,0 @@ - - -/* - * x-----------------------------------------------------------------x - * | HTML Standart Tags | - * x-----------------------------------------------------------------x - */ - - html, body, th, td, tr, p, li, h1, h2, h3, h4, h5, h6 { - font-size: 96%; - font-family: verdana, sans-serif; - } - - body { - color: black; - background: white; - background-color: white; - background-position: top left; - background-attachment: fixed; - background-repeat: no-repeat; - margin-top: 2em; - margin-right: 8%; - margin-left: 8%; - } - - hr { - height: 1px; - border: 0; - color: #004400; - background-color: #004400; - } - - - h1, h2, h3, h4, h5, h6 { - font-family: verdana, sans-serif; - } - - h1 { text-align: center; } - h2, h3, h4, h5, h6 { text-align: left; - padding-top: 2em; - } - h1, h2, h3 { font-family: "Trebuchet MS", sans-serif; - color: #09550B; - } - h1 { font-weight: bold; font-size: 170%; } - h2 { font-weight: bold; font-size: 140%; } - h3 { font-weight: bold; font-size: 118%; } - h4 { font-weight: bold; font-size: 100%; } - h5 { font-style: italic; font-size: 100%; } - h6 { font-variant: small-caps; font-size: 100%; } - - h2.classHierarchy { - /*border: 1px none #008500;*/ - border: 1px none #000000; - border-top-width: 2px; - border-top-style: solid; - padding-top: 1em; - } - - - .hide { - display: none; - color: white; - } - - - p { - margin-top: 0.6em; - margin-bottom: 0.6em; - margin-left: 0.0em; - margin-right: 0.0em; - } - - - address { - text-align: right; - font-weight: bold; - font-style: italic; - font-size: 80%; - } - - - caption { font-weight: bold } - - - blockquote { - margin-left: 4em; - margin-right: 4em; - margin-top: 0.8em; - margin-bottom: 0.8em; - font-style: italic; - color: #003300; - } - - blockquote p { - margin-bottom: 0; - } - - blockquote address { - margin: 0; - } - - - table { - border-collapse: collapse; - } - - dt, dd { margin-top: 0; margin-bottom: 0; } - dt { font-weight: bold; } - - - pre, tt, code { - font-family: "andale mono", monospace; - font-size: 100%; - white-space: pre; - } - - pre { - font-size: 80%; - border: dashed; - border-width: thin; - border-color: #003300; - /* - background-color: #EEEEEE; - */ - background-color: #FCFCE1; - padding: 0.5em; - margin-left: 2em; - margin-right: 2em - } - - tt { color: green; } - em { font-style: italic; - font-weight: bold; } - strong { font-weight: bold; } - - span.textit { font-style: italic; } - span.textbf { font-weight: bold; } - - .small { font-size: 90%; } - .white { color: #FFFFFF; } - - - ul.toc { - list-style: disc; - list-style: none; - } - - - a:link img, a:visited img { border-style: none; } - a img { color: white; } - - a:link, a:active, a:visited { - color: #09550B; - text-decoration: none; - } - - a:hover, a:focus { - color: #FF9900; - text-decoration: underline; - } - - - - -/* - * x-----------------------------------------------------------------x - * | Doxygen Specific Classes | - * x-----------------------------------------------------------------x - */ - - -/* ------------------------------------------------------------------- - * Header & Footer Classes (customized top page navigation bar). - */ - - h1.header { - font-size: 200%; - font-family: times, verdana, sans-serif; - } - - center.header { - background-color: #CCE6CA; - } - - table.header { - /*width: 100%;*/ - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - } - - table.header td { - padding: 2px 14px; - text-align: center; - font-weight: bold; - font-family: verdana, sans-serif; - font-size: 110%; - } - - table.footer1, table.footer2 { width: 100%; } - td.LFooter { text-align: left; } - td.RFooter { text-align: right; } - td.CFooter { text-align: center;} - table.footer2 td.RFooter { font-weight: bold; width: 35% } - table.footer2 td.CFooter { width: 30% } - table.footer2 td.LFooter { font-weight: bold; width: 35%; font-family: time; } - - table.classHierarchy { - border-collapse: separate; - border-spacing: 5px; - font-size: 110%; - } - - table.classHierarchy tr { - border: 1px solid blue; - } - - table.classHierarchy td.normal { - border: 1px solid #CCE6CA; - width: 140pt; - text-align: center; - font-weight: bold; - background-color: #CCE6CA; - } - - table.classHierarchy td.virtual { - border: 1px solid black; - width: 140pt; - text-align: center; - font-weight: bold; - } - - table.classHierarchy td.wnormal { - border: 1px solid #CCE6CA; - width: 240pt; - text-align: center; - font-weight: bold; - background-color: #CCE6CA; - } - - table.classHierarchy td.wvirtual { - border: 1px solid black; - width: 240pt; - text-align: center; - font-weight: bold; - } - - div.ah { - font-family: time; - font-size: 250%; - } - - -/* ------------------------------------------------------------------- - * Quick Index Class (top page navigation bar). - */ - - div.qindex, div.nav { - width: 100%-4px; - /*background-color: #DADAEF;*/ - /*background-color: #eeeeff;*/ - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - border: 0px solid #003300; - text-align: center; - margin: 0px; - padding: 2px; - line-height: 140%; - } - - a.qindex, a.qindex:visited, a.qindex:hover, a.qindexHL, a.el, a.elRef { - text-decoration: none; - font-weight: bold; - } - - a.qindex, a.qindex:visited { - color: #09550B; - } - - a.qindex:hover { - background-color: #ddddff; - } - - a.qindexHL, a.qindexHL:hover, a.qindexHL:visited { - background-color: #0c780c; - color: #ffffff; - border: 1px double #9295C2; - } - - a.code:link, a.code:visited, a.codeRef:link, a.codeRef:visited { - text-decoration: none; - font-weight: normal; - color: #0000ff; - } - - .indexkey { - background-color: #eeeeff; - border: 1px solid #b0b0b0; - padding: 2px 15px; - } - - .indexkey, .indexvalue { - background-color: #eeeeff; - border: 1px solid #b0b0b0; - padding: 2px 15px; - } - - .indexkey { - width: 40%; - } - - .indexvalue { - width: 80%; - } - - h3 a[name="index__"], - h3 a[name="index_a"], - h3 a[name="index_b"], - h3 a[name="index_c"], - h3 a[name="index_d"], - h3 a[name="index_e"], - h3 a[name="index_f"], - h3 a[name="index_g"], - h3 a[name="index_h"], - h3 a[name="index_i"], - h3 a[name="index_j"], - h3 a[name="index_k"], - h3 a[name="index_l"], - h3 a[name="index_m"], - h3 a[name="index_n"], - h3 a[name="index_o"], - h3 a[name="index_p"], - h3 a[name="index_q"], - h3 a[name="index_r"], - h3 a[name="index_s"], - h3 a[name="index_t"], - h3 a[name="index_u"], - h3 a[name="index_v"], - h3 a[name="index_w"], - h3 a[name="index_x"], - h3 a[name="index_y"], - h3 a[name="index_z"], - h3 a[name="index_0"], - h3 a[name="index_1"], - h3 a[name="index_2"], - h3 a[name="index_3"], - h3 a[name="index_4"], - h3 a[name="index_5"], - h3 a[name="index_6"], - h3 a[name="index_7"], - h3 a[name="index_8"], - h3 a[name="index_9"] - { - font-family: time; - font-size: 250%; - } - - -/* ------------------------------------------------------------------- - * Verbatim Source Code / Examples. - */ - - /* pre.fragment { background-color: #EEEEEE; } */ - - span.keyword { color: #008000 } - span.keywordtype { color: #604020 } - span.keywordflow { color: #e08000 } - span.comment { color: #800000 } - span.preprocessor { color: #806020 } - span.stringliteral { color: #002080 } - span.charliteral { color: #008080 } - - -/* ------------------------------------------------------------------- - * Attributes Listing. - */ - - .mdTable { - /*border: 1px solid #868686;*/ - /*background-color: #DADAEF;*/ - /*background-color: #F4F4FB;*/ - border: 1px none #008500; - border-left-width: 1px; - border-left-style: solid; - /*background-color: #B8E6B8;*/ - /*background-color: #CCE6CA;*/ - margin-top: 25px; - font-size: 105%; - } - - .mdRow { - padding: 5px 10px; - } - - /* This Mozilla/Firefox bug has been corrected from v1.5. - * .mdname1 { - * padding: 3px 0px 0px 0px; - * } - */ - - .mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - font-size: 11px; - font-style: italic; - /*background-color: #FAFAFA;*/ - border-top: 1px none #E0E0E0; - border-right: 1px none #E0E0E0; - border-bottom: 1px none #E0E0E0; - border-left: 1px none #E0E0E0; - margin: 0px; - } - - .memitem { - margin-bottom: 30px; - border: 1px none #008500; - } - - .memproto { - background-color: #CCE6CA; - border-left-width: 4px; - border-left-style: solid; - border-color: #008500; - } - - .memname { - white-space: nowrap; - padding-left: 5px; - font-size: 105%; - } - - - .memdoc{ - padding-left: 5px; - /*margin-top: -8px;*/ - border-left-width: 1px; - border-left-style: solid; - border-color: #008500; - } - - .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight { - padding: 1px 0px 0px 8px; - margin: 4px; - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-color: #0c0c0c; - border-right-color: #0c0c0c; - border-bottom-color: #0c0c0c; - border-left-color: #0c0c0c; - border-top-style: solid; - border-right-style: none; - border-bottom-style: none; - border-left-style: none; - /*background-color: #DADAEF;*/ - /*background-color: #eeeeff;*/ - /*background-color: #EEEEEE;*/ - background-color: #CCE6CA; - } - - .memTemplItemLeft, .memTemplItemRight { - border-bottom-width: 2px; - border-bottom-style: solid; - font-weight: bold; - } - - .memItemLeft { font-size: 11px; } - .memItemRight { font-size: 12px; } - .memTemplItemLeft { font-size: 11px; } - .memTemplItemRight { font-size: 12px; } - - .memTemplParams { - color: #FFFFFF; - background-color: #000000; - font-size: 11px; - font-weight: bold; - } - - .groupText, .groupHeader { - color: #09550B; - margin-top: 15px; - font-size: 130%; - font-weight: bold; - } - diff --git a/kite/doc/CMakeLists.txt b/kite/doc/CMakeLists.txt index 0e41c9e0..29be9b3d 100644 --- a/kite/doc/CMakeLists.txt +++ b/kite/doc/CMakeLists.txt @@ -1,3 +1,4 @@ +# -*- explicit-buffer-name: "CMakeLists.txt" -*- set ( htmlInstallDir share/doc/coriolis2/en/html/kite ) set ( latexInstallDir share/doc/coriolis2/en/latex/kite ) @@ -5,8 +6,8 @@ add_custom_target ( doc ALL cd ${KITE_SOURCE_DIR}/doc && ${DOXYGEN_EXECUTABLE} doxyfile ) install ( DIRECTORY html/ DESTINATION ${htmlInstallDir} ) -# install ( FILES customHierarchy.html DESTINATION ${htmlInstallDir} ) -# install ( FILES customSummary.html DESTINATION ${htmlInstallDir} ) + install ( FILES customHierarchy.html DESTINATION ${htmlInstallDir} ) + install ( FILES customSummary.html DESTINATION ${htmlInstallDir} ) install ( DIRECTORY latex/ DESTINATION ${latexInstallDir} ) install ( FILES asimbook.cls DESTINATION ${latexInstallDir} ) diff --git a/kite/doc/RoutingEvent.dox b/kite/doc/RoutingEvent.dox index 031e85e6..e95601a6 100644 --- a/kite/doc/RoutingEvent.dox +++ b/kite/doc/RoutingEvent.dox @@ -1,597 +1,246 @@ - // -*- C++ -*- namespace Kite { + /*! \class RoutingEvent::Key + * \brief RoutingEvent cached key for maps + * + * The key is used as a cache in RoutingEvent, that is, the RoutingEvent + * attributes could be modificated without the key changing. It is + * important for the key to remain stable as it used in the various + * event queue as the sorting attribute. The key should be updated + * only when the RoutingEvent is temporarily whidrawn from the queue. + * + * Cached attributes: (used in that lexicographical order for sorting) + * - \b 1 -- \c eventLevel. + * - \b 2 -- \c canRipple. + * - \b 3 -- \c priority. + * - \b 4 -- \c length. + * - \b 5 -- \c isHorizontal. + * - \b 6 -- \c axis. + * - \b 7 -- \c sourceU. + * - \b 8 -- \c net (name). + * - \b 9 -- \c id. + * - \b X -- \c slackenStrap \b unused. + * - \b X -- \c tracksNb \b unused. + * + * It is internally managed by RoutingEvent and the queue. + */ + + //! \function RoutingEvent::Key::update ( const RoutingEvent* event ); + //! Cache the value of the key from \c event. + /*! \class RoutingEvent - * \brief Manage TrackSegment routing requests. + * \brief Atomic Placement Request for a TrackSegment * - * The \RoutingEvent is the workhorse of Kite. A \RoutingEvent is - * associated to one \TrackSegment. One \TrackSegment could be - * associated to many \RoutingEvent in the queue, but only one - * of those is active (marked as unprocessed). + * \red{The trackFrees attribute has to be reviewed not sure it's still useful.} * - * \see ClassManipulator. - * - * \section secProcessAlgorithm Description of the process() method - * -\code -void RoutingEvent::process () -{ - if ( isProcessed() ) return; - setProcessed (); - incRipupCount (); - - if ( getRipupCount() > MAX_RIPUP_COUNT ) { - // We are *not* in ripup mode. - // The event's segment has to be topologically modified. - modifyTopology ( _segment ); - } else { - // We are in ripup mode. - // Other overlaping segments are to be removeds/pusheds. It can result in - // segment breaking *if* other segment came from an already routed GCell. - - // optimal, constraint, perpandicular. - computeAllIntervals (); - - // Find & order all candidates Tracks. - candidates = computeCostOnCandidateTracks (); - sort ( candidates ); - - if ( candidates[0].isFree() ) { - // Case -A.1- "Free Track". - candidate[0].insert ( _segment ); - } else if ( candidates[0].isSoftOverlap() - || candidates[0].isHardOverlap() ) { - // Case -A.2- "Soft Overlap". - // Case -A.3- "Hard Overlap". - for ( size_t i=0 ; i - *
  • New \c isLocal() method on \TrackSegment. Tells if the \TrackSegment - * is associated only to local AutoSegment. - *
  • Increase the overlap cost of a \TrackSegment from an already routed - * GCell routing set. - * - * - * - * \section secRoutingEventInterval The various intervals of a RoutingEvent - * - * The three Intervals controlling a RoutingEvent : all those intervals - * defines the track range in which the \TrackSegment could be inserted. - *
      - *
    • The optimal interval : where the \Net wirelength will be - * minimal (comes from \c Katabatic::AutoSegment). - *
    • The constraint interval : the interval outside of which - * the \Net connexity would be broken. This is the bigger interval - * but it must be strictly respected (also comes from - * \c Katabatic::AutoSegment). - *
    • The perpandicular interval : for each perpandicular - * \TrackSegment connected, the intersection of the free interval - * around them in their track. - * - * It is important to note that the \TrackSegment overlaping in the - * target track is not removed from the track. It is it's perpandiculars - * which are, along with a modification of theirs left axis weight and/or - * right axis weight. - * - * Second remark: no overlap will be created (due to the non-removal of - * overlaping \TrackSegments) because the insertion is delayed in case - * of overlap. - *
    - * The perpandicular interval comes from perpandicular constraints on \TrackSegment - * of the same \c Net. The left/right axis weights comes from requests of - * other \c Nets. - * - * \image html RoutingEvent-1.png "RoutingEvent Intervals" - * \image latex RoutingEvent-1.pdf "RoutingEvent Intervals" width=0.6\textwidth - * - * Example of perpandicular interval computation : - * - * \image html RoutingEvent-2.png "Perpandicular Interval" - * \image latex RoutingEvent-2.pdf "Perpandicular Interval" - * - * - * \section secRoutingEventRules Rules governing RoutingEvents - * - * \RoutingEvent respect the following rules: - *
      - *
    • A \TrackSegment can only be displaced by it's associated \RoutingEvent. - *
    • Corollary: the only \TrackSegment displaced while processing a - * \RoutingEvent is the one associated to the event. - *
    • Conflicts occurs between the \RoutingEvent \TrackSegment and already - * placed others \TrackSegment. - * - * The conflict can be solved by displacing/modifying others - * \TrackSegment or by modifying the to be inserted one. In the later - * case, the newly created or modified \TrackSegment are (re)scheduleds - * before the would be inserted. - *
    • Conflicting \TrackSegments are only removed from their \Track - * but their axis remains unchanged. Movement requests are passed - * through increase of the left/right axis weights, if needed. - *
    • \TrackSegment are inserted only, and only if there is enough free space. - * That is, if any kind of overlap occurs, it is not inserted - * but rescheduled. The blocking \TrackSegments are then - * rescheduled after the current one. - *
    • Each \RoutingEvent processing takes place inside a one atomic - * Session. That is, the coherency of the data-base is restored - * immediatly afterward (both Kite & Katabatic). - *
    - * - * \remark Be very careful to distinguish between Session commands, which affects - * \Track and \TrackSegment insertion/update/removal and schedule/re-schedule - * events, which relates to the negociation algorithm. - * - * Re-ordering rules: - *
      - *
    1. In normal mode, that is, no maximum ripup has been reached, the - * blocking other \TrackSegment are removed and the current - * is rescheduled before them. - *
    2. In maximum ripup mode, some \TrackSegment has to give way. - *
        - *
      • If the current one is modified, it must be rescheduled after - * it's modified bits are rescheduleds. - *
      • If others are modifieds they must be rescheduled after - * the current one (so it will grabs the place). - *
      - *
    - * - * - * \section secRoutingEventCycle RoutingEvent life cycle - * - * As an active \RoutingEvent is associated with one and only one \TrackSegment - * we can talk indeferently of \RoutingEvent lifecycle or \TrackSegment - * lifecycle. - * - * Below is the ordered list of states that a \RoutingEvent could be in. - * The order correspond to increasing level of slackening/freedom. - * Transition between states occurs each time a maximum ripup is reached. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
     \b Id \b Type \b Local  \b Global \b Action
    \e 1\c Minimize\e yes\e notry to fit into a hole
    \e 2\c DogLeg\e yes\e noDogleg : analyse overlap and try to solve it by breaking (self)
    \e 3\c Desalignate\e yes\e yeson a set of alignated \TrackSegment, suppress the - * alignment constraints, thus making then independants - *
    \e 4\c Slacken\e yes\e yesif the target/source constraint is less than the - * GCell, adds perpandicular straps to free the \TrackSegment. - * This occurs to free from terminal constraints - *
    \e 5\c ConflictSolve1\e yes\e yestry to find in the history a reccurent dislodger, - * and break (self) to accomodate it - *
    \e 6\c ConflictSolve2\e no\e yestry to find a Track on which we can dislodge - * an other \TrackSegment - *
    \e 7\c MoveUp\e no\e yestry to go on upper layer. - *
    \e 8\c Unimplemented\e no\e yeswe failed to place this \TrackSegment - *
    - * - * - * \section secManageMaximumRipup Managing the maximum ripup case - * -\code -bool State::manageMaximumRipup () -{ - bool success = false; - - if ( !_segment->isGlobal() ) { - // Candidates Tracks (ignore optimal & perpandiculars). - candidates = computeAllIntervals (); - overlap = _segment->getInterval(); - - for ( size_t i=0 ; i reject. - // Local vs. Terminal => reject. - if ( others[0]->isLocal() || others[0]->isTerminal() ) continue; - - // Local vs. Global (not routed yet). - if ( others[i]->getOrder() >= _segment->getOrder() ) { - success = modifyTopology(others[0]); - break; - } - - // Local vs. Global (already routed). - success = relax(_others[0],overlap); - if ( success ) break; - } - } - } - - if ( !success ) { - // Global vs. Local. - // Failed Local vs. Any. - success = modifyTopology(_segment); - } - return success; -} -\endcode - * - * - * \section secModifyTopology Description of the modifyTopology() method - * -\code -bool Manipulator::modifyTopology ( TrackSegment* segment ) -{ - bool success = false; - - if ( segment->isLocal() ) { - if ( segment->canMinimize() { - segment->minimize(); - success = true; - } - if ( segment->canDogLeg() ) { - // Case -C.4- "Self Relax". - segment->makeDogLeg(); - success = true; - } - } else if ( segment->canDesalignate() ) { - // Case -C.5- "Desalignate". - segment->desalignate(); - success = true; - } else if ( segment->canSlacken() ) { - // Case -C.6- "Slacken". - segment->slacken(); - success = true; - } else { - RipupHistory* history = RipupHistory(segment); - GCell* dogLegGCell = history.getDogLegGCell(); - - if ( dogLegGCell ) { - if ( segment->canDogLegAt(dogLegGCell) ) { - segment->makeDogLeg(dogLegGCell) - success = true; - } - } else { - // Dislodgers seems to far in ripup history. - // Recheck the Track, maybe they have vanish. - Track* track = getTrack(segment); - if ( track->getFreeInterval(segment) ) { - track.insert ( segment ); - success = true; - } - } - } - - if ( segment->canMoveUp() ) { - segment->moveUp (); - success = true; - } - - if ( success ) { - resetRipupCount(segment); - } else { - cerr << "[UNIMPLEMENTED] " << segment << endl; - } - - return success; -} -\endcode - * - * - * \section secHardSoftOverlap Hard and soft overlap - * - * Schematic execution of a \RoutingEvent leading to a set aside. - *
      - *
    1. The scheduler try to place the \TrackSegment on top of the - * event queue, calling process(). - *
    2. There is a soft overlap on the best candidate track, a set - * aside is issued. - *
    3. Each \TrackSegment in conflict in the candidate track has the - * \RoutingEvent bounds of it's perpandicular \TrackSegment modificated - * according to the free space requested through setLeftBound() or setRightBound(). - *
    4. If a perpandicular is already in a \Track is removed from it and scheduled for - * immediate re-routing (it's event level is increased so it pops - * out immediately from the queue). - *
    5. If the perpandicular is not routed yet, we are done. - * - * Note that this technique of modificating a \RoutingEvent yet to come is - * kind a like seeing the future... - *
    - * - * \image html RoutingEvent-3.png "Set aside schematic" - * \image latex RoutingEvent-3.pdf "Set aside schematic" - * - * - * \section setDetructionStrategy Destruction Strategy - * - * \RoutingEvent are not destroyed as soon as they have been processed by - * the scheduler. Instead, they are stored in the historical queue. - * They are two reasons for that behavior : - *
      - *
    • \RoutingEvent are used to store algorithmic informations that - * must persist until the negociation algorithm have fully - * completed (bound interval in particular). - *
    • When ripup phases takes place and maximum ripup count is - * reached, the history can be used to find the whole set of - * \TrackSegment in conflict an made an educated guess about - * which one must be relaxed. - *
    - * - * \important This is the history queue which is responsible for freeing all the - * \RoutingEvent in his destructor. - * - * - * \section secRoutingEventCase Routing Event actions - * - *
      - *
    • Free Track Case - * - * There is a sufficent free space in the candidate \Track to insert the - * \TrackSegment. The \TrackSegment is inserted. - * - * \important This is the only way for a \TrackSegment to be inserted into a \Track. - * - * \image html RoutingEvent-10.png - * \image latex RoutingEvent-10.pdf - * - * - *
    • Soft Overlap Case - * - * Already inserted \TrackSegment a & b could be shrunk - * to make place for \TrackSegment c. Parallel overlaping \TrackSegment - * are not removed, their perpandiculars are with updated left/right axis weight. - * - * The a perpandicular belongs the same GCell routing set so it - * is removed from is \Track to be displaced. - * - * The b perdandicular belongs to a more prioritary GCell routing - * set, which has therefore be placed earlier so it can't be removed. - * Instead it is broken. - * - * \image html RoutingEvent-11.png - * \image latex RoutingEvent-11.pdf - * - * - *
    • Hard Overlap Case - * - * No way to shrunk overlaping \TrackSegment to make place for c. - * All parallel overlaping \TrackSegments must be removeds to be displaced - * on other \Tracks. - * - * The a parallel belongs to a more prioritary GCell routing set - * so it can be removed, it is therefore broken. - * - * The b parallel belongs the same GCell routing set so it can be - * removed to be displaced. - * - * \image html RoutingEvent-12.png - * \image latex RoutingEvent-12.pdf - * - * - *
    • Self Relax - * - * Instead of trying to displace overlaping \TrackSegments we break the - * current one. - * - * \image html RoutingEvent-13.png - * \image latex RoutingEvent-13.pdf - * - * - *
    • Self Desalignate - * - * Instead of trying to displace overlaping \TrackSegments we desalignate - * it's components (by supressing alignement constraints on it's - * AutoContacts). We do not create new Katabatic components but new - * \TrackSegments will appears. - * - * \image html RoutingEvent-14.png - * \image latex RoutingEvent-14.pdf - * - * - *
    • Self Slacken - * - * Instead of trying to displace overlaping \TrackSegments we slacken - * the current one. This is different than desalignate because we create - * new Katabatic component to relax any AutoContact transmitted constraints. - * This operation is most likely to be applied on \TrackSegments that are - * directly connecteds to terminals. - * - * \image html RoutingEvent-15.png - * \image latex RoutingEvent-15.pdf - * - *
    + * Cached key for stable sorting, see RoutingEvent::Key. */ - /*! \function bool RoutingEvent::isProcessed () const; - * \return \true if this event has already been processed. - * - * \remark Note that inside a _setAside() a \RoutingEvent can be re-posted for - * a given \TrackSegment which has been processed yet. This can lead - * to two or more \RoutingEvent in the queue (as we cannot easily remove - * a \RoutingEvent already in the queue). We need this new \RoutingEvent - * because we want to reschedule with a new priority/slack. - * As we cannot remove the previous \RoutingEvent, we mark it as - * processed for it to be ignored by the scheduler. + //! \enum RoutingEvent::Mode + //! The working mode of the router, affect how events are to + //! be handled. + + //! \var RoutingEvent::Negociate + //! This is the normal mode of operation, topological modifications + //! and ripup are enableds. + + //! \var RoutingEvent::Pack + //! First post-processing step. For each segment, tries to find a + //! more compact position for a segment, but without riping any others. + + //! \var RoutingEvent::Repair + //! Second post-processing step, try to find a suitable location for + //! a segment more aggressively. + + //! \function unsigned int RoutingEvent::getStage (); + //! \sreturn The stage the router is in (see RoutingEvent::Mode). + + //! \function size_t RoutingEvent::getAllocateds (); + //! \sreturn The number of RoutingEvent currently allocateds. + + //! \function size_t RoutingEvent::getProcesseds (); + //! \sreturn The number of RoutingEvent that have been processeds since + //! the last call to RoutingEvent::resetProcesseds(). + + //! \function void RoutingEvent::resetProcesseds (); + //! \sreturn Reset the number of processeds events. + + //! \function unsigned int RoutingEvent::setStage ( unsigned int mode ); + //! Sets the router's stage (see RoutingEvent::Mode). + + //! \function RoutingEvent* RoutingEvent::create ( TrackElement* element, unsigned int mode ); + //! \param element The element for which to create the event. + //! \param mode The mode into which this event will be valid. + //! + //! RoutingEvent constructor. + + //! \function RoutingEvent* RoutingEvent::clone () const; + //! \return A clone of the event. + //! + //! Cloning an event is slightly different from copying it (which is forbidden). + //! There can be multiple events for one \c element but only one must be + //! active at a time. This is a cheap way of implementing the rescheduling + //! mechanism. The original event remains the active one, but it's cloned + //! flag is raised. The cloned event is created inactive and with a null + //! \e eventLevel. + + //! \function void RoutingEvent::destroy (); + //! The destructor. + + //! \function bool RoutingEvent::isCloned () const; + //! \sreturn \true if this event has been cloned at least once. + + //! \function bool RoutingEvent::isValid () const; + //! \sreturn \true if the cached informations from the \e element are valid + //! (i.e. the element has not been changed). + + //! \function bool RoutingEvent::isUnimplemented () const; + //! \sreturn \true if the event has tried to use an unimplemented feature. + + //! \function bool RoutingEvent::isProcessed () const; + //! \sreturn \true if the event has been processed. + + //! \function bool RoutingEvent::isDisabled () const; + //! \sreturn \true if the event is \b not the active one. It should be discarted + //! by the algorithm. + + //! \function bool RoutingEvent::isForcedToHint () const; + //! \sreturn \true the \e element must be placed exacltly on the given axis hint. + + //! \function bool RoutingEvent::isRipedByLocal () const; + //! \sreturn \true the \e element (global) has been riped up to place a local one. + + //! \function bool RoutingEvent::canMinimize () const; + //! \sreturn \true the \e element could still be minimized. + + //! \function unsigned int RoutingEvent::getMode () const; + //! \sreturn the mode the event must be taken into account to. + + //! \function unsigned int RoutingEvent::getState () const; + //! \sreturn the mode the router is currently in. + + //! \function const Key& RoutingEvent::getKey () const; + //! \sreturn The \e key to use in map & queue for this event. + + //! \function TrackElement* RoutingEvent::getSegment () const; + //! \sreturn The associated segment. + + //! \function const vector& RoutingEvent::getPerpandiculars () const; + //! \sreturn A vector of cached perpandiculars to the associated segment. + + //! \function DbU::Unit RoutingEvent::getAxisHint () const; + //! \sreturn The preferred position for the segment axis. + + //! \function DbU::Unit RoutingEvent::getAxisHistory () const; + //! \sreturn The previous position of the segment axis (before it's current position). + + //! \function DbU::Unit RoutingEvent::getAxisWeight ( DbU::Unit axis ) const; + //! \sreturn The distance between \c axis and the preferred position. + + //! \function const Interval& RoutingEvent::getOptimal () const; + //! \sreturn The range of positions for the optimal axis (cached). + + //! \function const Interval& RoutingEvent::getConstraints () const; + //! \sreturn The range of legal positions for the axis. + + /*! \function unsigned int RoutingEvent::getPriority () const; + * \sreturn The priority of the event, it quantify the degree of freedom of the + * segment. Currently it's computed from the length of the segment + * and it's slack: + \f[ + priority = (slack(segment)+1.0) \times (length(segment)+1.0) + \f] + * A high priority means that the segment will be harder to place + * thus it will be scheduled first. With this function, longer + * segments will be placed first. */ - /*! \function TrackSegment* RoutingEvent::getSegment () const; - * \Return The associated and unique \TrackSegment. - */ + //! \function unsigned int RoutingEvent::getEventLevel () const; + //! \sreturn The event level of the event, used to tweak the order inside the event + //! queue. It differs from the priority in the sense that it isn't a + //! topologicaly based value, but manipulated by the algorithm. - /*! \function unsigned long RoutingEvent::getPriority () const; - * \Return The second criterion used to sort \RoutingEvents in the negociation queue. - * Currently, it is the area of the associated \TrackSegment, which in - * turn return the slack (not a very fortunate choice of name...). - */ + //! \function unsigned int RoutingEvent::getTracksNb () const; + //! \sreturn The number of tracks avalaibles for the segment to be placed. - /*! \function unsigned int RoutingEvent::getEventLevel () const; - * \Return The first criterion used to sort \RoutingEvents in the negociation queue. - * It is used to re-schedule a \RoutingEvent and make the new event be - * processed before the original one, which is marked as - * processed to be ignored. - * - * \see setEventLevel(). - */ + //! \function unsigned int RoutingEvent::getInsertState () const; + //! \return The kind of track insertion that will be intended. It's a counter + //! whose values have the following meaning: + //! - \b 1 : normal insert. + //! - \b 2 : shrink the segment to it's minimum before inserting. + //! - \b 3 : attempt to ripup conflicting others before inserting. - /*! \function RoutingEvent* RoutingEvent::getClone () const; - * \Return An exact copy of the current \RoutingEvent. - */ + //! \function void RoutingEvent::revalidate (); + //! Perform an event revalidation. - /*! \function RoutingEvent* RoutingEvent::reschedule ( RoutingEventQueue& queue ); - * \param queue The \RoutingEvent queue. - * \return The rescheduled \RoutingEvent. May be \NULL if it cannot be rescheduled. - */ + //! \function void RoutingEvent::updateKey (); + //! Update the key with the new values from the event, the key \e must + //! not be inserted in the queue when this method is called. - /*! \function void RoutingEvent::setProcessed ( bool state=true ); - * \param state The state into which the event is to be put. - * - * Mark the event as processed. This arises in two cases : - *
      - *
    • The event has really been processed by the process() member - * function. - *
    • There has been a fork from this event and it has been - * superseded by a newly rescheduled one, so we have to - * invalidate this one. - *
    - */ + //! \function void RoutingEvent::process ( RoutingEventQueue& queue, RoutingEventHistory& history, RoutingEventLoop& loop ); + //! \param queue The main event queue. + //! \param history The event's history list. + //! \param loop The loop detector. + //! + //! Process the event, that is: + //! - First, check if there is no looping, if any, do not process the + //! event but dicard it (marked as unimplemented). + //! - Second, attempt to place the associated segment. Pass it to the relevant + //! function, according to the router's mode (\c _processNegociate(), + //! \c processPack() or \c _processRepair() ). + //! Once processed, the event is added to both \c history (for the record) + //! and \c loop to check if we are not looping. - /*! \function void RoutingEvent::setEventLevel ( unsigned int level ); - * \param level The new event level. - * - * \see getEventLevel(). - */ + //! \function void RoutingEvent::setSegment ( TrackElement* element ); + //! Change the associated \c segment. \red{Used only by TrackSegment::swapTrack().} - /*! \function void RoutingEvent::process ( RoutingEventQueue& queue, RoutingEventHistory& history ); - * \param queue The event queue from the negociate algorithm. - * \param history The event history. - * - * Perform all the operations shared by all \RoutingEvent classes then - * calls the virtual _subProcess() functions. - * - * Shared operations are : - *
      - *
    1. Invalidating all perpandicular \TrackSegments. - *
    2. Computing the free interval allowed by the free intervals - * in perpandicular \Tracks holding the perpandicular \TrackSegments. - *
    3. Merging in the various constraints intervals : from the - * \TrackSegment itself, from the free intervals in the - * perpandicular \Tracks and from the \RoutingEvent bound - * constraints. - *
    4. Finding the candidate \Tracks for the \RoutingEvent, - * using \c Track_Spiral \Collection. - *
    - * The results of the shared operation are passed to derived classes - * trough the \c State internal structure. - */ + //! \function RoutingEvent* RoutingEvent::reschedule ( RoutingEventQueue& queue, unsigned int eventLevel); + //! \return The newly reinserted event. Depending on the cases it could be itself. + //! + //! Insert or reinsert an event in the scheduler. The \c eventLevel parameter only + //! allows to increase the level (if it is less than the current level of the + //! event, it will be ignored). + //! + //! Cloning Management. As an event could be cloned, if we try to re-insert + //! a disabled original, we must first lookup the currently cloned active event. + //! This is done through the associated \c segment which must always be associated + //! with the active event (if any). + //! + //! Unimplemented Protection. If the unimplemented flag is set the reschedule + //! is cancelled (\c NULL is returned). + //! + //! Unprocessed Event. The event is still in queue, waiting to be + //! processed, then just repush it in the queue with it's new level. + //! + //! Processed Event. Clone the already processed one, activate it + //! and push it on the queue. + //! + //! Router's Mode. The mode is also updated. - /* \function bool RoutingEvent::_setAside ( Track* track, size_t begin, size_t end, Net* net, Interval interval, RoutingEventQueue& queue ); - * \param track The track in wich to make free space. - * \param begin The index of the first overlaping TrackSegment. - * \param end The index of the last overlaping TrackSegment. - * \param net The net for which we want to insert a TrackSegment. - * \param interval The interval which must be made empty. - * \param queue The queue of RoutingEvent. - * - * Manage the case of soft overlap. Create or enlarge a free space - * in \c track so it can contain the requested \interval. [begin:end] defines - * the range of indexes of overlaping \TrackSegment in \c track. - * Displace TrackSegment that are perpandicular to those overlaping, - * remove them from their \c Track if needed and issue an associated \RoutingEvent - * with an updated bound constraint. Note that the overlaping \TrackSegment - * themselves are not removed from the \c track. - * - * A note on implementation : - *
      - *
    • \c data1 : the DataNegociate of the to be inserted \TrackSegment. - *
    • \c segment2 : the current overlaping \TrackSegment (from \c begin - * to \c end). - *
    • \c data2 : the DataNegociate of the overlaping \TrackSegment. - *
    • \c segment3 : a \TrackSegment perpandicular to \c segment2. - *
    - */ + //! \function void RoutingEvent::setMode ( unsigned int mode ); + //! Set the mode in which the event must be processed (see RoutingEvent::Mode). - /* \function void RoutingEvent::_ripup ( Track* track, Net* net, Interval interval, size_t begin, size_t end, RoutingEventQueue& queue ); - * \param track The track in wich to make free space. - * \param net The net for which we want to insert a TrackSegment. - * \param interval The interval which must be made empty. - * \param begin The index of the first overlaping TrackSegment. - * \param end The index of the last overlaping TrackSegment. - * \param queue The queue of RoutingEvent. - * - * Manage the case of hard overlap, that is bluntly remove - * any \TrackSegment overlaping \interval. Issue both a remove event - * (to \c Session) and a \RoutingEvent to re-process the dislodged - * \TrackSegment. - */ + //! \function void RoutingEvent::setState ( unsigned int state ); + //! Proxy mutator for DataNegociate::setState(). - } // End of Kite namespace. + //! \function void RoutingEvent::setAxisHintFromParent (); + //! Sets the axis hint from it's parent segment. The parentage is found + //! through the TrackSegment parentage. + + //! \function void RoutingEvent::incInsertState (); + //! Increment the insertion state. + //! + //! \sa RoutingEvent::getInsertState(). + + //! \function void RoutingEvent::resetInsertState (); + //! Reset the insertion state. + //! + //! \sa RoutingEvent::getInsertState(). + + //! \function void RoutingEvent::setEventLevel ( unsigned int level ); + //! Set the event level (user-controlled re-ordering). + + } diff --git a/kite/doc/Session.dox b/kite/doc/Session.dox index 45ca9041..dc6dd463 100644 --- a/kite/doc/Session.dox +++ b/kite/doc/Session.dox @@ -1,133 +1,163 @@ - - // -*- C++ -*- + // -*- mode: C++; explicit-buffer-name: "Session.dox" -*- namespace Kite { /*! \class Session - * \brief Kite update Session (\b API). + * \brief Kite update Session * * Session extend the Katabatic update session to the Kite * router level. Mainly by managing Track update. * + * Difference between Kite & Katabatic sessions: + * - In Katabatic, segments are actually moved \e before the + * revalidation, then \e during the revalidation, contacts + * and topologies are adjusteds + * - In Kite, nothing is moved until the revalidation. + * Requests for segment displacement are queued for the session. + * + * Asymmetry between invalidation & revalidation: + * - When a TrackSegment (or directly an AutoSegment) is invalidated + * both associated AutoSegment and TrackSegment are invalidated + * (through the Observer mechanism). + * - When an AutoSegment is revalidated, the TrackSegment is \b not + * immediatly revalidated. See the revalidate algorithm for more + * details. + * + * Indirect TrackSegment invalidation: + * - TrackSegment invalidation do not result only from direct insertion + * in Track. For example, any or all of it's perpandicular can be + * invalidated trough the Katabatic::Session update (the perpandicular + * Katabatic::AutoSegment is revalidated, generating invalidation on their + * associated TrackSegment). + * * For details on how Katabatic Sessions works, have a look to - * \ref katabaticSession. + * Katabatic::Session. * * * \section secSessionMechanism The Session Mechanism. * * Delayed modification procedure : - *
      - *
    1. Modifications events are recorded into the Session. - * At this step, no modification are actually done, the - * data-base retains it's previous state and coherency. - *
    2. The Revalidate() procedure is called (or the Session - * is closed), then all the modification events are applied. - * the data-base is in it's new state. - *
    + * - Modifications events are recorded (queued) into the Session. + * At this step, no modification are actually done, the + * data-base retains it's previous state and coherency. + * - The \c revalidate() procedure is called (or the Session + * is closed), then all the modification events are applied. + * The data-base is in now in it's new state. * * * \section secKiteSessionRevalidate The Revalidate Algorithm. * * Revalidation steps : - *
      - *
    1. process all remove events. detach TrackSegment from - * their Track, but do not remove the pointer from the - * internal \vector. - *
    2. Pack all Track in which removal have took place. - *
    3. process all insert events. This is the time TrackSegment - * are moved into their new Track (physical displacement). - *
    4. Call the Katabatic::Session::revalidate() method. - *
    5. Recompute the canonical position of source and target - * of all invalidateds TrackSegment (take account of - * extention modifications). - *
    6. Perform a sort() on all Track that have been modifieds. - *
    - */ - - - /*! \name Accessors - */ - // \{ - - /*! \function static Session* Session::get (); - * \Return The currently opened session, \c NULL if no session has - * been opened. - */ - - /*! \function static KiteEngine* Session::getKiteEngine (); - * \Return The Kite ToolEngine associated to the current update - * session. - */ - - // \} - - - /*! \name Miscellaneous - */ - // \{ - - /*! \function bool Session::isEmpty (); - * Ensure that the Session is empty and can be closed (deleted) - * safely. - */ - - /*! \function static Session* Session::open ( KiteEngine* kite ); - * \param kite A Kite ToolEngine on which to work. - * \return A new Kite update Session. + * - Process all remove events. detach TrackSegment from + * their Track, but do not remove the pointer from the + * internal \vector. + * - Pack all Track in which removal have took place. + * - Process all insert events. This is the time TrackSegment + * are moved into their new Track (physical displacement). + * It is at this point that the invalidation of both AutoSegment + * and TrackSEgment is done. + * - Call the Katabatic::Session::revalidate() method which + * will recompute the correct contact extensions and topologies. + * \e After this step the Katabatic data-base is up to date, + * but \e not the Kite one. AutoSEgment are revalidated. + * - Recompute the canonical position of source and target + * of all invalidateds TrackSegment (take account of + * extention modifications). The set of invalidated TrackSegment + * is computed from the revalidated AutoSegment, that is + * AutoSegment that are canonical. + * - Perform a sort() on all Track that have been modifieds. * - * Open a new Kite update Session on the \c kite \c ToolEngine. - * At this point only one session can be opened at a time. Attempt - * to open a second one will result in an exception. - */ - - // \} - - - /*! \name Event Scheduling - */ - // \{ - - /* \function void Session::addInvalidated ( TrackSegment* segment ); - * \param segment An AutoSegment that has been moved. + * Note: We cannot use the Observer mechanism to automatically + * update TrackSegment from an AutoSegment, because we must wait for all + * AutoSegments (canonical or not) involved into the TrackSegment to be + * up to date before we can update it. * - * add \e segment to the \vector of TrackSegment for which we - * have to recompute the canonical size (i.e. extentions may - * have moved). + * Note: Have to talk about the special case when new canonical + * AutoSegment appears after dogleg creation. + * + * + * \section secKiteSessionLookup The Lookup Mechanism + * + * There are two lookup mechanisms: + * - From a Hurricane::Segment, we uses the Katabatic segment lookup + * table (slow, stored in a \c map<>). + * - From a Katabatic::AutoSegment, we uses the Observer, it's owner + * is the TrackSegment (fast). */ - /*! \function void Session::addInsertEvent ( TrackSegment* segment, Track* track ); - * \param segment An AutoSegment to insert in a Track. - * \param track The Track into which the \e segment will be inserted. - * - * Schedule the insertion of \e segment into Track \e track. - * The \e segment must not already be part of a Track. - */ + //! \function Session* Session::open ( KiteEngine* kite ); + //! \param kite A Kite ToolEngine on which to work. + //! \return A new Kite update Session. + //! + //! Open a new Kite update Session on the \c kite \c ToolEngine. + //! At this point only one session can be opened at a time. Attempt + //! to open a second one will result in an exception. - /*! \function void Session::addRemoveEvent ( TrackSegment* segment ); - * \param segment An AutoSegment to remove from a Track. - * - * Schedule the removal of \e segment from Track \e track. - */ + //! \function Session* Session::get ( const char* message=NULL ); + //! \sreturn The currently opened session, \c NULL if no session has + //! been opened. - /*! \function void Session::addMoveEvent ( TrackSegment* segment, Track* track ); - * \param segment An AutoSegment to move into a new Track. - * \param track The Track into which the \e segment will be moved. - * - * Schedule the displacement of \e segment into Track \e track. - */ + //! \function Katabatic::Session* Session::base (); + //! \sreturn The Session, casted as it's base object. - /*! \function void Session::addSortEvent ( Track* track, bool forced=false ); - * \param track The Track to update. - * \param forced Force the invalidation of the \Track. - * - * Schedule the update of Track \e track. If the \Track has not been - * invalidated, no actual sort will takes place. To force a sort - * (manually invalidating the \Track), sets \b forced to \true. - * - * \see Track::pack() & Track::sort(). - */ + //! \function bool Session::isEmpty (); + //! Ensure that the Session is empty and can be closed (deleted) + //! safely. + + //! \function Configuration* Session::getConfiguration (); + //! \sreturn The Kite Configuration of the Router (proxy helper). + + //! \function Net* Session::getBlockageNet (); + //! \sreturn The net used to create blockage components (proxy helper). + + //! \function KiteEngine* Session::getKiteEngine (); + //! \sreturn The Kite ToolEngine associated to the current update + //! session (proxy helper). + + //! \function NegociateWindow* Session::getNegociateWindow (); + //! \sreturn The current NegociateWindow (proxy helper). + + //! \function Katabatic::GCell* Session::getGCellUnder ( DbU::Unit x, DbU::Unit y ); + //! \sreturn The GCell under \c (x,y) (proxy helper, see Katabatic::GCellGrid::getGCell()). + + //! \function void Session::addInsertEvent ( TrackElement* segment, Track* track ); + //! \param segment An AutoSegment to insert in a Track. + //! \param track The Track into which the \e segment will be inserted. + //! + //! Schedule the insertion of \e segment into Track \e track. + //! The \e segment must not already be part of a Track. + + //! \function void Session::addRemoveEvent ( TrackElement* segment ); + //! \param segment A TrackSegment to remove from a Track. + //! + //! Schedule the removal of \e segment from Track \e track. + + //! \function void Session::addMoveEvent ( TrackElement* segment, Track* track ); + //! \param segment An AutoSegment to move into a new Track. + //! \param track The Track into which the \e segment will be moved. + //! + //! Schedule the displacement of \e segment into Track \e track. + + //! \function void Session::addSortEvent ( Track* track, bool forced=false ); + //! \param track The Track to update. + //! \param forced Force the invalidation of the \Track. + //! + //! Schedule the update of Track \e track. If the \Track has not been + //! invalidated, no actual sort will takes place. To force a sort + //! (manually invalidating the \Track), sets \b forced to \true. + //! + //! \sa Track::pack() & Track::sort(). + + //! \function void Session::revalidate (); + //! Applies all the requested modifications, but keeping the session + //! opened. + + //! \function TrackElement* Session::lookup ( Segment* segment ); + //! \sreturn the TrackElement associated to \c segment. + + //! \function TrackElement* Session::lookup ( AutoSegment* segment ); + //! \sreturn the TrackElement associated to \c segment. - // \} } diff --git a/kite/doc/Track.dox b/kite/doc/Track.dox index 3422d6ee..a7b3f156 100644 --- a/kite/doc/Track.dox +++ b/kite/doc/Track.dox @@ -7,391 +7,481 @@ /*! \class Track * \brief Structure managing one routing track. * + * \section secTrackPurpose Track Purpose + * + * We use an array of regularly spaced Track as a geometrical + * fast access structure. It allows to know whether an area is used or + * not. The whole area may be seen as a set of adjoining tiles of fixed + * \e width but variable \e length. + * + * The figure (1.b) show, for an horizontal, track the relation + * between y,min,max and the occupied area of the plane. + * \c min and \c max must take into account segment extensions (\c e) and + * the minimal distance between two rectangles (\c MD) of the same layer. + * We assume that the width of the segment, augmented of all it's + * contraints is no greater than \c TS (in fact it's how \c TS must be + * calculated). + * + * For the whole track array, see RoutingPlane. + * + * \image html Track-0.png "Fig 1: Track Area" + * + * * \section secTrackImplementation Track Implementation * - * Basically a Track is a sorted vector of TrackSegment, TrackSegment - * beeing a decoration of the Katabatic::AutoSegment. Managment rules : - *
      - *
    • Rule 1 : the vector of TrackSegment is sorted by - * increasing source positions. - *
    • Rule 2 : two consecutives segments TrackSegment do - * not overlap, except in case of rule 3. - *
    • Rule 3 : if they belongs to the same \Net, two - * consecutive segments can overlap, see Track::getNetUsedInterval(). - *
    + * A Track is implemented with a sorted vector of TrackElement. + * TrackElements from differents nets must not overlap. + * The sorting order is defined as follow: + * - TrackElements are sorted by increasing source (\e min) + * positions. + * - In case of overlap (i.e. belongs to the same net), if + * they share the same source position, then they are sorted + * by \e decreasing length. This way, the longest one will be + * the first encountered when walking through the Track in + * increasing index order. * - * \image html Track-1.png "Track Structure" + * Figure 2.b shows the details of the Track [1] of + * figure 1.a. Net \b \ show an exemple of overlapping. + * + * \image html Track-1.png "Fig 2: Track Structure" * \image latex Track-1.pdf "Track Structure" width=0.7\textwidth * + * In addition to the TrackSegments, the Track also manage additionnal + * informations through a second vector of TrackMarkers. TrackMarker + * are currently used only to hints at how strongly a terminal is + * dependant on that portion of Track to be accessed. * - * updates procedures * - * Kite extend the Katabatic::Session mechanism to manage Track - * modifications. - * - * Indexes vs. Iterators + * \subsection ssecTrackIndexes Indexes vs. Iterators * * Numerical indexes have been prefered over iterators because they can * be used more easily by objects other the Track itself for referencing. * So internal managment follow the same rule, handling indexes or * reference to indexes. * - * Looking up free/used zones * - * The most important operation performed on a Track is to locate - * free or used zones at a given point. We uses the \STL \lower_bound - * function to find the index in the vector from a position. - * It relies heavily on the hypothesis that consecutives TrackSegment - * do not overlap, however, as segments from a same net can overlap - * the \c max() function is more complex than the \c min(). In fact - * it has to aggregate all the overlaping TrackSegment from the - * same \Net (getUsedNetInterval()). + * \subsection ssecTrackUpdate Update Mechanism * - * \image html Track-2.png "Track Zones - First Approach" - * \image latex Track-2.pdf "Track Zones - First Approach" width=0.7\textwidth + * When a TrackElement is normaly inserted in a Track, a two way link + * is established. The Track has an entry in it's vector refering to + * TrackElement, and conversely, the TrackElement has it's \c track + * field pointing to it's owning Track. * - * As can be seen on the previous figure it is slightly more - * efficient to work on \c lower_bound-1 instead of \c lower_bound. + * TrackElement Removal * - * \image html Track-3.png "Track Zones - Optimized" - * \image latex Track-3.pdf "Track Zones - Optimized" width=0.7\textwidth - */ - - /*! \enum Track::IndexState - * Indicates how to compute the bounds of the interval enclosing - * a given position. + * To remove a TrackElement from a Track, we break one of those two links: + * the TrackElement cease to refer to the owning Track, marking him for + * removal which will occurs at the next track revalidation (Track::doRemoval()). + * In figure 3, the TrackElement belonging to net \b \ is + * marked for removal. * - * \note According to \e position, the interval can be a free interval - * or a used interval. - */ - - /*! \var Track::MinTrackMin - * Minimum/Source : uses the Track minimum. - */ - - /*! \var Track::MinSegmentMin - * Minimum/Source : uses the begin segment minimum (source). - */ - - /*! \var Track::MinSegmentMax - * Minimum/Source : uses the begin segment maximum (target). - */ - - /*! \var Track::MaxTrackMax - * Maximum/Target : uses the Track maximum. - */ - - /*! \var Track::MaxSegmentMin - * Maximum/Target : uses the end segment minimum (source). - */ - - /*! \var Track::MaxNextSegmentMin - * Maximum/Target : uses the next to end segment minimum (source). - */ - - /*! \var Track::MaxSegmentMax - * Maximum/Target : uses the end segment maximum (target). - */ - - /*! \var Track::BeforeFirst - * Interval type : free, before the first interval [case (1)]. - */ - - /*! \var Track::Inside - * Interval type : used, in the Track [case (2)]. - */ - - /*! \var Track::Outside - * Interval type : free, between two used TrackSegment [case (3)]. - */ - - /*! \var Track::AfterLast - * Interval type : free, after the last used TrackSegment [case (4)]. - */ - - /*! \var Track::EmptyTrack - * Interval type : free, and the Track is empty [case (5)]. - */ - - /*! \var Track::MinMask - * Mask value : used to reset all the minimal values. - */ - - /*! \var Track::MaxMask - * Mask value : used to reset all the maximal values. - */ - - /*! \var Track::NPOS; - * A special index value (greatest integer) meaning that - * an index is invalid. - */ - - - /*! \name Accessors - */ - // \{ - - /*! \function RoutingPlane* Track::getRoutingPlane () const; - * \Return The RoutingPlane owning this Track. - */ - - /*! \function KiteEngine* Track::getKiteEngine () const; - * \Return The KiteEngine owning this Track. - */ - - /*! \function RoutingPlane* Track::getIndex () const; - * \Return The index of this Track in the RoutingPlane Track vector. - */ - - /*! \function Layer* Track::getLayer () const; - * \Return The \Layer of the Track. - */ - - /*! \function DbU::Unit Track::getAxis () const; - * \Return The Axis of the Track. - */ - - /*! \function DbU::Unit Track::getMin () const; - * \Return The minimal allowed coordinate of the Track. - */ - - /*! \function DbU::Unit Track::getMax () const; - * \Return The maximal allowed coordinate of the Track. - */ - - /*! \function Track* Track::getNext () const; - * \Return The next Ttrack in the \RoutingPlane vector. That is the - * one with the axis immediatly superior. - */ - - /*! \function Track* Track::getPrevious () const; - * \Return The previous Track in the \RoutingPlane vector. That is the - * one with the axis immediatly inferior. - */ - - /*! \function size_t Track::getSize () const; - * \Return The total number of TrackSegment in the Track. - */ - - /*! \function Point Track::getPosition ( DbU::Unit position ) const; - * \Return the point at \c (position,getAxis()) for horizontal Track - * at or \c (getAxis(),position) for vertical Track. - */ - - // \} - - - /*! \name TrackSegment Accessors - */ - // \{ - - /*! \function TrackSegment* Track::getNext ( size_t& index, Net* net ) const; - * \param index Index of the starting TrackSegment. - * \param net A \Net to ignore. - * \return The next TrackSegment (\NULL if not found). + * \image html Track-2.png "Fig 3: TrackElement Removal" * - * find, starting from TrackSegment at \e index the next TrackSegment - * ignoring TrackSegment from \e net. \e index is modified to point - * on the returned TrackSegment. If there's no next TrackSegment (\NULL) - * then index is set to Track::NPOS. - */ - - /*! \function TrackSegment* Track::getPrevious ( size_t& index, Net* net ) const; - * \param index Index of the starting TrackSegment. - * \param net A \Net to ignore. - * \return The previous TrackSegment (\NULL if not found). + * TrackElement Insertion * - * find, starting from TrackSegment at \e index the previous TrackSegment - * ignoring TrackSegment from \e net. \e index is modified to point - * on the returned TrackSegment. If there's no previous TrackSegment (\NULL) - * then index is set to Track::NPOS. - */ - - /*! \function TrackSegment* Track::getNextFixed ( size_t& index ) const; - * \param index Index of the starting TrackSegment. - * \return The first previous \e Fixed TrackSegment. + * When a TrackElement is inserted into a Track, the two way link is + * immediatly created (but the TrackElement is not yet at it's final + * place in the Track's vector). Before inserting a TrackElement we + * check that it's been already detached (\c track field to \c NULL). * - * find, starting from TrackSegment at \e index the first previous - * with a \e Fixed attribute set. \e index is modified to point on the - * returned TrackSegment. If there's no previous TrackSegment (\NULL) - * then index is set to Track::NPOS. - */ - - /*! \function TrackSegment* Track::getSegment ( size_t index ) const; - * \param index The index of the TrackSegment. - * \return The TrackSegment at \e index. The result will be \NULL in the - * follwing cases : - *
      - *
    • \e index is outside the sorted zone. - *
    • \e index points to a hole in the Track. - *
    • \e index is equal to Track::NPOS. - *
    - */ - - /*! \function TrackSegment* Track::getSegment ( DbU::Unit position ) const; - * \param position The position where to search. - * \return The TrackSegment whose starting point is immediatly inferior to \e position. - */ - - /*! \function size_t Track::find ( const TrackSegment* segment ) const; - * \Return the \e index of \e segment inside the Track. If the \e segment do - * not belongs to the Track, return Track::NPOS. - */ - - /*! \function void Track::getIBounds ( DbU::Unit position, size_t& begin, size_t& end, unsigned int& state ) const; - * \param position The position where to search. - * \param begin Index of the starting bound. - * \param end Index of the ending bound. - * \param state how to use the returned \e indexes. - * \return The TrackSegment index around \e position. + * It is at that step that the TrackElement axis is actually updated + * through a call to TrackElement::setAxis(). + * + * Revalidation Sequence * - * The relation between the returned \e index and the position is - * given through the \e state parameter. + * After a Track has been modificated either the Track element vector or + * the MarkerElement vector (or both) has been invalidateds. Revalidation + * take place in three steps: + * - Track::doRemoval(), remove all TrackElement marked for removal. + * - Track::insert(), insert the TrackElement into their new Track. + * - Track::doReorder(), sort the TrackElement of the vector, that is, put the + * newly inserted elements at their right place. * - * \note It uses the \lower_bound \STL function. - */ - - /*! \function DbU::Unit Track::getSourcePosition ( size_t index ) const; - * \Return The canonical source position of TrackSegment at index \e index. - * If \e index is equal to Track::NPOS, returns zero. - */ - - /*! \function DbU::Unit Track::getSourcePosition ( vector::iterator it ) const; - * \Return The canonical source position of TrackSegment pointed by iterator \e it. - * If \e it is equal to \c end() , returns zero. - */ - - /*! \function DbU::Unit Track::getMinimalPosition ( size_t index, unsigned int state ) const; - * \Return The minmal position (lower bound) of an interval, starting near index \e index - * with state \e state. + * Each step must be done for all Tracks before proceeding to the + * next. This way a TrackElement \c track field doesn't get set \e before + * it has been actually removed from it's previous Track. + * + * * - * \see Track::IndexState. - */ - - /*! \function DbU::Unit Track::getMaximalPosition ( size_t index, unsigned int state ) const; - * \Return The maximal position (upper bound) of an interval, ending near index \e index - * with state \e state. + * \subsection ssecTrackOperations Main Operations on Tracks * - * \see Track::IndexState. - */ - - /*! \function Interval Track::getFreeInterval ( DbU::Unit position, Net* net ) const; - * \param position where fo find a free interval. - * \param net for which net to find the free interval. - * \return The longuest free interval enclosing \e position (may be empty). - */ - - /*! \function Interval Track::expandUsedInterval ( size_t& begin, size_t& end ) const; - * \param begin index on any of the overlaping TrackSegment. This value - * is then modified to point on the lower TrackSegment of the set. - * \param end initial value is ignored. sets to the index of the rightmost - * extended TrackSegment of the set (i.e. the one setting the - * upper bound). - * \return the whole interval used by a set of overlaping TrackSegment. + * Helper Function: Track::getBeginIndex() * - * \image html Track-4.png "Overlap - Example 1" - * \image html Track-5.png "Overlap - Example 2" - * \image latex Track-4.pdf "Overlap - Example 1" width=0.7\textwidth - * \image latex Track-5.pdf "Overlap - Example 2" width=0.7\textwidth - */ - - /*! \function Interval Track::expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* net ) const; - * \param begin the lowest used TrackSegment. - * \param end the highest used TrackSegment. - * \param state the enclosing characterics. - * \param net the for wich we seek place. - * \Return The longuest free interval between \c ]begin,end[ . + * Return in \c begin the index of the TrackElement whose minimum is immediately + * below the requested \c position on the Track axis. The second returned + * parameter \c state is a set of flags to tell how the \c begin index + * has to be interpreted. * - * \note \c ]begin,end[ must define a free interval between two TrackSegment. - */ - - /*! \function void Track::_check ( const char* message=NULL ) const; - * \param message An iformative message, only printed if an error occurs. - * \return \true if the Track contains no incoherencies. + * Helper Function: Track::getOccupiedInterval() * - * Perform a complete Track check. Looks for the following incoherencies : - *
      - *
    • TrackSegment do not refers this Track. - *
    • TrackSegment is detached (TrackSegment::getTrack() is \NULL). - *
    • TrackSegment is hollow, this one is very unlikely as hollow - * TrackSegment are only created for the \lower_bound. - *
    • \NULL pointers (should never occurs, nevertheless...) - *
    • And finally, call checkOverlap(). - *
    + * Returns the complete interval of a set of overlapping TrackElement from + * the same net. */ - /*! \function void Track::checkOverlap () const; - * \return the number of overlaping TrackSegment. - * - * Perform the following checks : - *
      - *
    • Two consecutive TrackSegment from different \Net must not - * overlap. - *
    • For TrackSegment starting from the same position, the - * longuest must be first. - *
    - */ + //! \enum Track::IndexState + //! Indicates how to compute the bounds of the interval enclosing + //! a given \c position on track axis. + //! + //! \note According to \e position, the interval can be a free interval + //! or a used interval. - /*! \function void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const; - * \param interval the overlaping interval. - * \param begin where to store the starting bound. - * \param end where to store the ending bound. - * - * find the range of TrackSegment intersecting \e interval. - * Note that when the \e interval lower bound crosses a set of - * overlaping intervals from the same \Net, the interval at - * \e begin will crosses the lower bound but some following - * of the same \Net may not. - */ + //! \var Track::BeginIsTrackMin + //! (implies \c begin=0) there is no TrackElement \e before \c position - /*! \function DbU::Unit Track::getOverlapCost ( Interval interval, Net* net, size_t begin, size_t end ) const; - * \param interval the overlaping interval. - * \param net a Net to ignore (null cost). - * \param begin the starting bound. - * \param end the ending bound. - * \return The cost of the overlap. - * - * compute the cost of the overlap of \e interval with the range - * \c [begin,end] of TrackSegment. Any TrackSegment belonging to - * \e net will be ignored. - */ + //! \var Track::BeginIsSegmentMin + //! The \c begin segment starts \e before \c position and ends \e after. - /*! \function DbU::Unit Track::getOverlapCost ( Interval interval, Net* net ) const; - * \param interval the overlaping interval. - * \param net a Net to ignore (null cost). - * - * compute the overlap of \e interval with TrackSegment from - * the current Track, ignoring thoses belonging to \e net. - */ + //! \var Track::BeginIsSegmentMax + //! The \c begin segment starts and ends \e before \c position. - // \} + //! \var Track::EndIsTrackMax + //! There is no TrackElement \e after \c position. + //! \var Track::EndIsSegmentMin + //! The \c begin segment starts \e before \c position. - /*! \name Updators - */ - // \{ + //! \var Track::EndIsNextSegmentMin + //! The \c begin segment starts and ends \e before \c position. So the maximum + //! is given by the \c minimum of the \e next TrackElement. - /*! \function void Track::insert ( TrackSegment* segment ); - * adds \e segment to the Track. Must only be used inside a - * TrackSession. - * - * \see TrackSession. - */ + //! \var Track::EndIsSegmentMax + //! The \c begin segment starts \e before \c position and ends \e after. - /*! \function size_t Track::pack (); - * \Return The number of removeds TrackSegment. - * - * Suppress all the TrackSegment that have been withdraw from the - * Track. TrackSegment must be withdraw trough the TrackSegment::detach() - * method which sets their owning Track to \NULL (the removal criterion). - */ + //! \var Track::BeforeFirstElement + //! the \c position is before the first TrackElement. - /*! \function void Track::sort (); - * - * sort the the vector. Must be called \e after the Pack() method, - * so no detached TrackSegment are presents. - */ + //! \var Track::InsideElement + //! the \c position is inside a TrackElement. - // \} + //! \var Track::OutsideElement + //! the \c position is in free zone between two TrackElements. + + //! \var Track::AfterLastElement + //! the position is after the end of the last element. + + //! \var Track::EmptyTrack + //! the track is still empty. + + //! \var Track::BeginMask + //! To extract the \e begin part from a combination of flags. + + //! \var Track::EndMask + //! To extract the \e end part from a combination of flags. + + //! \var Track::npos; + //! A special index value (greatest integer) meaning that + //! an index is invalid. + + //! \function bool Track::isHorizontal () const; + //! \sreturn \true if the Track in horizontal direction. + + //! \function bool Track::isVertical () const; + //! \sreturn \true if the Track in vertical direction. + + //! \function bool Track::isLocalAssigned () const; + //! \sreturn \true is the Track should be preferentially used for local routing. + + //! \function RoutingPlane* Track::getRoutingPlane () const; + //! \sreturn The RoutingPlane owning this Track. + + //! \function KiteEngine* Track::getKiteEngine () const; + //! \sreturn The KiteEngine owning this Track. + + //! \function unsigned int Track::getDirection () const; + //! \sreturn The direction of the Track, either Katabatic::KbHorizontal or + //! Katabatic::KbVertical. + + //! \function RoutingPlane* Track::getIndex () const; + //! \sreturn The index of this Track in the RoutingPlane Track vector. + + //! \function unsigned int Track::getDepth () const; + //! \sreturn The depth (as given by the RoutingGauge) of the Track's layer. + + //! \function Layer* Track::getLayer () const; + //! \sreturn The \Layer of the Track. + + //! \function Layer* Track::getBlockageLayer () const; + //! \sreturn The associated blockage \Layer to the Track's layer. + + //! \function DbU::Unit Track::getAxis () const; + //! \sreturn The Axis of the Track. + + //! \function DbU::Unit Track::getMin () const; + //! \sreturn The minimal allowed coordinate of the Track. + + //! \function DbU::Unit Track::getMax () const; + //! \sreturn The maximal allowed coordinate of the Track. + + //! \function Track* Track::getNextTrack () const; + //! \sreturn The next Track in the \RoutingPlane vector. That is the + //! one with the axis immediatly superior. + + //! \function Track* Track::getPreviousTrack () const; + //! \sreturn The previous Track in the \RoutingPlane vector. That is the + //! one with the axis immediatly inferior. + + //! \function size_t Track::getSize () const; + //! \sreturn The total number of TrackSegment in the Track. + + //! \function Point Track::getPosition ( DbU::Unit position ) const; + //! \sreturn the point at \c (position,getAxis()) for horizontal Track + //! at or \c (getAxis(),position) for vertical Track. + + //! \function TrackSegment* Track::getSegment ( size_t index ) const; + //! \param index The index of the TrackSegment. + //! \return The TrackSegment at \e index. The result will be \NULL in the + //! follwing cases : + //! - \e index is outside the sorted zone. + //! - \e index points to a hole in the Track. + //! - \e index is equal to Track::npos. + + //! \function TrackSegment* Track::getSegment ( DbU::Unit position ) const; + //! \param position The position where to search. + //! \return The TrackSegment whose starting point is immediatly inferior to \e position. + + //! \function TrackSegment* Track::getNext ( size_t& index, Net* net ) const; + //! \param index Index of the starting TrackSegment. + //! \param net A \Net to ignore. + //! \return The next TrackSegment (\NULL if not found). + //! + //! Find, starting from TrackSegment at \e index the next TrackSegment + //! ignoring TrackSegment from \e net. \e index is modified to point + //! on the returned TrackSegment. If there's no next TrackSegment (\NULL) + //! then index is set to Track::npos. + + //! \function TrackSegment* Track::getPrevious ( size_t& index, Net* net ) const; + //! \param index Index of the starting TrackSegment. + //! \param net A \Net to ignore. + //! \return The previous TrackSegment (\NULL if not found). + //! + //! find, starting from TrackSegment at \e index the previous TrackSegment + //! ignoring TrackSegment from \e net. \e index is modified to point + //! on the returned TrackSegment. If there's no previous TrackSegment (\NULL) + //! then index is set to Track::npos. + + //! \function TrackSegment* Track::getNextFixed ( size_t& index ) const; + //! \param index Index of the starting TrackSegment. + //! \return The first previous \e Fixed TrackSegment. + //! + //! find, starting from TrackSegment at \e index the first previous + //! with a \e Fixed attribute set. \e index is modified to point on the + //! returned TrackSegment. If there's no previous TrackSegment (\NULL) + //! then index is set to Track::npos. + + //! \function size_t Track::find ( const TrackElement* element ) const; + //! \sreturn the \e index of \e element inside the Track. If the \e element do + //! not belongs to the Track, return Track::npos. + + //! \function DbU::Unit Track::getSourcePosition ( size_t index ) const; + //! \sreturn The source position of TrackSegment at index \e index. + //! If \e index is equal to Track::npos, returns zero. + + //! \function DbU::Unit Track::getSourcePosition ( vector::iterator it ) const; + //! \sreturn The source position of TrackSegment pointed by iterator \e it. + //! If \e it is equal to \c end() , returns zero. + + //! \function DbU::Unit Track::getMinimalPosition ( size_t index, unsigned int state ) const; + //! \sreturn Extract the minimal position from the interval at \c index in accordance + //! to \c state hinting. + //! + //! \sa Track::IndexState. + + //! \function DbU::Unit Track::getMaximalPosition ( size_t index, unsigned int state ) const; + //! \sreturn Extract the maximal position from the interval at \c index in accordance + //! to \c state hinting. + //! + //! \sa Track::IndexState. + + //! \function Interval Track::getFreeInterval ( DbU::Unit position, Net* net=NULL ) const; + //! \param position where fo find a free interval. + //! \param net for which net to find the free interval. + //! \sreturn The longuest free interval enclosing \e position (may be empty). + + //! \function Interval Track::getOccupiedInterval ( size_t& begin ) const; + //! \param begin index of one of the TrackElement set. May be modificated. + //! \sreturn the whole interval used by a set of overlaping TrackSegment. + //! + //! As TrackElement from a same net can overlap, the interval of one of + //! them do not give the full extend of the Track occupation at this point. + //! This function looks for all overlaping segments and returns the + //! merged interval. Additionnaly it sets \c begin to the index of the + //! lowest TrackElement of the set. + //! + //! \image html TrackOccupiedInterval-1.png "Fig 4: Track::getOccuppiedInterval()" + + //! \function Interval Track::expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* net ) const; + //! \param begin the lowest used TrackSegment. + //! \param end the highest used TrackSegment. + //! \param state tells how to interpret the \c begin & \c end indexes. + //! \param net the for wich we seek place. + //! \sreturn The longuest free interval between \c ]begin,end[ . + //! + //! Starting from the initial [begin,end] interval, expand the + //! interval to encompass all free space or segments belonging to \c net. + //! \c state may be used to compute the interval bounds from \c begin + //! and \c end instead of directly using the returned \c interval. + //! + //! \note \c ]begin,end[ must define a free interval between two TrackSegment. + + //! \function void Track::getBeginIndex ( DbU::Unit position, size_t& begin, unsigned int& state ) const; + //! \param position The position where to search. + //! \param begin Index of the immediatly inferior TrackElement. + //! \param state how to interpret the returned \c begin. + //! + //! Return in \c begin the index of the TrackElement whose minimum is immediately + //! below the requested \c position on the Track axis. The second returned + //! parameter \c state is a set of flags to tell how the \c begin index + //! has to be interpreted. + //! + //! Flags for the \c state are: + //! - Track::BeginIsTrackMin : (implies \c begin=0) there is no TrackElement + //! \e before \c position. + //! - Track::EndIsSegmentMin : The \c begin segment starts \e before \c position. + //! - Track::BeginIsSegmentMin : The \c begin segment starts \e before \c position + //! and ends \e after. + //! - Track::EndIsSegmentMax : The \c begin segment starts \e before \c position + //! and ends \e after. + //! - Track::BeginIsSegmentMax : The \c begin segment starts and ends \e before + //! \c position. + //! - Track::EndIsNextSegmentMin : The \c begin segment starts and ends \e before + //! \c position. So the maximum is given by the \c minimum of the \e next + //! TrackElement. + //! - Track::EndIsTrackMax : There is no TrackElement \e after \c position. + //! + //! Based on the previous flags, we build the \c state parameter: + //! - Track::BeforeFirstElement : the \c position is before the first TrackElement. + //! - Track::InsideElement : the \c position is inside a TrackElement. + //! - Track::OutsideElement : the \c position is in free zone between two + //! TrackElements. + //! - Track::AfterLastElement : the position is after the end of the last + //! element. + //! - Track::EmptyTrack : the track is still empty. + //! + //! To separate flags relevant to \e begin and \e end informations, two masks + //! are provideds: + //! - Track::BeginMask + //! - Track::EndMask + //! + //! \image html TrackBeginIndex-1.png "Fig 3: Track::getBeginIndex()" + //! + //! Reminder for myself: + //! The Track::getBeginIndex() function relies on the \STL \lower_bound + //! function. \c lower_bound() finds the TrackElement immediately \e superior + //! to \c position (shown on Figure 3 by the \c LB label in white on black). + //! + //! The relation between the returned \c begin index and the position is + //! given through the \c state parameter. + + //! \function void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const; + //! \param interval the overlaping interval. + //! \param begin where to store the starting bound. + //! \param end where to store the ending bound. + //! + //! find the range of TrackSegment intersecting \e interval. + //! Note that when the \e interval lower bound crosses a set of + //! overlaping intervals from the same \Net, the interval at + //! \e begin will crosses the lower bound but some following + //! of the same \Net may not. + + //! \function TrackCost Track::getOverlapCost ( Interval interval, Net* net, size_t begin, size_t end, unsigned int flags ) const; + //! \param interval the overlaping interval. + //! \param net a Net to ignore (null cost). + //! \param begin the starting bound. + //! \param end the ending bound. + //! \param flags passed to the overlap cost function. + //! \return The cost of the overlap. + //! + //! Compute the cost of the overlap of \e interval with the range + //! \c [begin,end] of TrackSegment. Any TrackSegment belonging to + //! \e net will be ignored. + + //! \function TrackCost Track::getOverlapCost ( Interval interval, Net* net, unsigned int flags ) const; + //! \param interval the overlaping interval. + //! \param net a Net to ignore (null cost). + //! \param flags passed to the overlap cost function. + //! + //! Compute the overlap cost of \e interval with TrackSegment from + //! the current Track, ignoring thoses belonging to \e net. + + //! \function TrackCost Track::getOverlapCost ( TrackElement* segment, unsigned int flags ) const; + //! \param segment under which to compute overlap cost. + //! \param flags passed to the overlap cost function. + //! + //! Compute the overlap cost of \c segment with TrackSegment from + //! the current Track (interval and net are deduced from \c segment). + + //! \function void Track::getTerminalWeight ( Interval interval, Net* net, size_t& count, unsigned int& weight ) const; + //! \param interval under which to compute terminal weight. + //! \param net a net to be ignored. + //! \param count incremented of the number of track markers under the + //! \c interval. + //! \param weight incremented of the sum of the weight of the track markers + //! under the \c interval. + //! + //! Compute and return the sum of the weight of the track markers (see TrackMarker) + //! under \c interval ignoring \c net (that is, \e for \c net). + //! + //! \remark The referenced variables \c count and \c weight are not reset to + //! zero by this function. It is of the caller's responsability. + + //! \function bool Track::check ( unsigned int& overlaps, const char* message=NULL ) const; + //! \param overlaps The number of overlaping segments. + //! \param message An iformative message, only printed if an error occurs. + //! \return \true if the Track contains no incoherencies. + //! + //! Perform a complete Track check. Looks for the following incoherencies : + //! - TrackSegment do not refers this Track. + //! - TrackSegment is detached (TrackSegment::getTrack() is \NULL). + //! - TrackSegment is hollow, this one is very unlikely as hollow + //! TrackSegment are only created for the \lower_bound. + //! - \NULL pointers (should never occurs, nevertheless...) + //! - Two consecutive TrackSegment from different \Net must not + //! overlap. + //! - For TrackSegment starting from the same position, the + //! longuest must be first. + + //! \function void Track::invalidate (); + //! Inconditionnaly invalidate the Track, regardless if it has been + //! modificated. The Track will be forced to be revalidated on closure + //! of the current session. + + //! \function void Track::insert ( TrackElement* segment ); + //! Adds \e segment to the Track. Must only be used inside a + //! Session. They must appears \e after Track::doRemoval() + //! and \e before Track::doReorder(). + //! + //! \sa Kite::Session. + + //! \function void Track::insert ( TrackMarker* marker ); + //! Adds \e marker to the Track. Must only be used inside a + //! Session. + //! + //! \sa Kite::Session. + + //! \function void Track::setSegment ( TrackElement* element, size_t index ); + //! Directly affect the Track entry at position \c index to + //! \c element (use with great care). + //! + //! \sa Kite::Session. + + //! \function size_t Track::doRemoval (); + //! \sreturn The number of removeds TrackSegment. + //! + //! Suppress all the TrackSegment that have been withdraw from the + //! Track. TrackSegment must be withdraw trough the TrackSegment::detach() + //! method which sets their owning Track to \NULL (the removal criterion). + //! It uses the \STL \e remove_if algorithm that put all the to be removed + //! elements at the end of the vector. + //! + //! \sa Kite::Session. + + //! \function void Track::doReorder (); + //! + //! (Re)sort the TrackElement of the vector. Must be called \e after: + //! - Track::doRemoval() so no detached TrackSegment are presents. + //! - All calls to Track::insert(), as the newly inserted elements + //! are put at the back of the vector. + //! + //! \sa Kite::Session. } diff --git a/kite/doc/TrackSegment.dox b/kite/doc/TrackSegment.dox index cb68db85..eb8e54ca 100644 --- a/kite/doc/TrackSegment.dox +++ b/kite/doc/TrackSegment.dox @@ -1,18 +1,13 @@ - // -*- C++ -*- namespace Kite { - /*! \typedef SegmentOverlapCostCB - * Prototype of overlap cost callback functions. - * - * \see TrackSegment::setOverlapCostCB(), TrackSegment::getOverlapCost(). - */ - /*! \class TrackSegment * \brief Derived Katabatic::AutoSegment for the router. * + * \image html TrackSegment-10.png "Fig 1: TrackSegment Context" + * * We create one TrackSegment per aligned Katabatic::AutoSegment set, * the TrackSegment is associated to the canonical one of the set. * @@ -21,150 +16,114 @@ * The drawback beeing that whenever one segment from the aligned * set has it's extention modified, the full extention must be * recomputed. - */ - - - /*! \name Constructors & Destructors - */ - // \{ - - /*! \function static TrackSegment* TrackSegment::create ( AutoSegment* segment, Track* track, bool& created ); - * \param segment The Katabatic AutoSegment to decorate. - * \param track A Track into which insert the TrackSegment (may be \NULL). - * \param created This flag is sets is a new TrackSegment has be created. - * \return A TrackSegment wrapped around an AutoSegment. * - * Constructor mainly used at loading time to decorate the Katabatic - * data-base with the router attributes. - */ - - // \} - - - /*! \name Predicates - */ - // \{ - - /*! \function bool TrackSegment::isLocked () const; - * \Return \True if the TrackSegment is locked (cannot be deleted from the - * Track). - */ - - // \} - - - /*! \name Callback modifier - */ - // \{ - - /*! \function SegmentOverlapCostCB* TrackSegment::setOverlapCostCB ( SegmentOverlapCostCB* cb ); - * \param cb the new overlap cost callback. - * \return the previous overlap cost callback. * - * sets the overlap callback. - */ - - // \} - - - /*! \name Accessors - */ - // \{ - - /*! \function Track* TrackSegment::getTrack () const; - * \Return The Track in which this TrackSegment is inserted (can be \NULL). - */ - - /*! \function size_t TrackSegment::getIndex () const; - * \Return Index of the TrackSegment inside the Track's vector. set to - * Track::NPOS if not inserted in any Track. - */ - - /*! \function unsigned long TrackSegment::getArea () const; - * \Return The priority value used for TrackSegment sorting. Currently, - * the slack of the AutoSegment. - */ - - /*! \function TrackSegment* TrackSegment::getNext () const; - * \Return The next TrackSegment in the Track (can be \NULL). + * \section secTSLazyRevalidate Lazy Revalidate * - * \see Track::getNext(). - */ - - /*! \function TrackSegment* TrackSegment::getPrevious () const; - * \Return The previous TrackSegment in the Track (can be \NULL). + * When the TrackSegment::revalidate() method is called, it only update + * the cached size of the segment (from the AutoSegment set of aligneds) + * and the track into which it may be inserted. * - * \see Track::getPrevious(). - */ - - /*! \function Interval TrackSegment::getFreeInterval () const; - * \Return The free interval around this TrackSegment in the Track. - */ - - /*! \function DbU::Unit TrackSegment::getSourceCanonical () const; - * \Return The leftmost position of the associated aligned segment set. - */ - - /*! \function DbU::Unit TrackSegment::getTargetCanonical () const; - * \Return The rightmost position of the associated aligned segment set. - */ - - /*! \function DbU::Unit TrackSegment::getCanonicalInterval () const; - * \Return The canonical interval of the associated aligned segment set. - */ - - /* \function DbU::Unit TrackSegment::getOverlapCost ( Interval interval, Net* net ) const; - * \param interval the overlaping interval. - * \param net the \Net owning the overlaping interval. - * \return The cost of overlaping the TrackSegment with \e interval from \Net \e net. - */ - - // \} - - - /*! \name Modifiers - */ - // \{ - - /*! \function void TrackSegment::setLock ( bool state ); - * \param state set the Track locking state. - */ - - /*! \function void TrackSegment::setTrack ( Track* track ); - * \param track The Track the TrackSegment is assigned to. - */ - - /*! \function void TrackSegment::setIndex ( size_t index ); - * \param index The index of TrackSegment in the Track's vector. - */ - - /*! \function void TrackSegment::setArea (); - * compute the the sorting criterion used as priority, for - * now it's simply the AutoSegment's slack. - */ - - /*! \function void TrackSegment::detach (); - * remove the TrackSegment from the Track. + * The associated DataNegociate and RoutingEvent are \b not updated. + * - The RoutingEvent will be updated when it's key is updated, + * typically during a requeueing operation \b and in the + * SegmentFsm constructor. This should be optimzed in the future. + * - The DataNegociate is updated \e only in the SegmentFsm + * constructor. This is the most costly of the two updates as + * it perform a perpandicular & parallel connexity exploration. * - * \important This function do not update the Track itself. The - * program must take care of it under penalty of introducing - * incoherencies. * - * \see Track::detach(). + * \section secDogleg Dogleg Management + * + * The basic AutoSegment::canDogleg() method is declined in three more + * dedicated methods in this class: + * - TrackSegment::canDogleg(), for locals only, check if a break + * is possible, never break a segment more than once (to avoid + * fragmentation). + * - TrackSegment::canDogleg(Katabatic::GCell*,unsigned int flags) + * for globals, check that the segment is breakable in the desired + * GCell. Never break twice in the first/last GCell (fragmentation + * limitation), but may \e reuse an already existing dogleg. + * - TrackSegment::canDogleg(Interval), for locals only, direct proxy + * for the AutoSegment method. Never allow more than one break. + * + * Relationship between AutoSegment and TrackSegment + * + * Figure 2 below, shows an example of dogleg creation: + * - At the Katabatic level, AutoSegment \c id:12 is broken. Thus + * the creation of AutoSegments \c id:20 and \c id:21. As per + * specification, the orignal segment \c id:10 remains on the + * left side (source) of the break. + * - But, because the canonical of the former aligned AutoSegment + * set \c (10,11,12,13,14) was on the \e right side of the break, + * the new parallel TrackSegment will be created on the \c left + * side, associated to the newly promoted canonical AutoSegment + * \c id:12. + * + * \image html _makeDogleg-10.png "Fig 2: Dogleg Management" + * + * The TrackSegment::_postDoglegs() method called by all flavors of + * TrackSegment::makeDogleg() methods is responsible for creating new + * TrackSegments for the new doglegs (there may be more than one), it + * also update the dogleg level and source/target dogleg flags. + * + * \redB{This section is not finished.} I need to review the parent and + * doglevel numbering management. There seems to be a risk of infinite + * fragmentation as the numbering of the original segment is not + * increased, we should create a \e break counter separate from + * deepness. + * + * + * \section secWeakGlobal Global, Weak Global and Local Segments + * + * There's a slight semantic change between Katabatic and Kite about + * what is local and what is local. This is due to how we consider the + * intermediate status of \e WeakGlobal. + * + * A \c WeakGlobal segment is a local segment which is aligned with a + * global (though a VTee or an HTee contact). + * + * In Katabatic a local segment is one that is not \c Global, a local segment + * can be both \c Local and \c WeakGlobal. + * + * In Kite a local segment is one that is neither \c Global or \c WeakGlobal. + * The \c WeakGlobal sides with \c Global unlike in Katabatic. + * */ - /* \function void TrackSegment::autoInvalidate (); - * add \e this TrackSegment to the Kite level update Session. - * Something maybe buggy here, or at least not very clean. - */ + //! \function static TrackSegment* TrackSegment::create ( AutoSegment* segment, Track* track, bool& created ); + //! \param segment The Katabatic AutoSegment to decorate. + //! \param track A Track into which insert the TrackSegment (may be \NULL). + //! \param created This flag is sets is a new TrackSegment has be created. + //! \return A TrackSegment wrapped around an AutoSegment. + //! + //! Constructor mainly used at loading time to decorate the Katabatic + //! data-base with the router attributes. - /* \function void TrackSegment::refreshCanonical (); - * Recompute the letfmost & rightmost position of the collapsed set. - * Must be done after each modification of the TrackSegment. - * Dealt by the TrackSession mechanism. - * - */ + //! \function unsigned long TrackElement::getFreedomDegree() const; + //! \sreturn The degree of freedom of the element. It is used as a priority value + //! when sorting TrackElement (in RoutingEvent). + //! + //! Currently, it is the \e slack of the Katabatic::AutoSegment. - // \} + //! \function void TrackSegment::revalidate (); + //! Actualize the TrackSegment characteristics from the supporting + //! elements (set of AutoSegment). + //! + //! This method do not update the DataNegociate or the RoutingEvent. + //! This is a lazy update delayed until the constructor of SegmentFsm is called. + //! (see \ref secTSLazyRevalidate "Lazy Revalidate"). + + //! \function TrackSegment* TrackSegment::_postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel ); + //! Post-process to be called inside the various dogleg creation or slacken + //! methods. Iterate through the newly created AutoSegments to create, for + //! the perpandicular and the new parallel associateds + //! TrackSegments. Also sets the dogleg levels and flags of the newly + //! created elements. + //! + //! The session dogleg reset is called at the end of this method. The \c perpandicular + //! and \c parallel references to pointers contains the newly created segments + //! for the \b last dogleg. If more than one was created, you cannot access them + //! (the need has not arised yet). } diff --git a/kite/doc/asimbook.cls b/kite/doc/asimbook.cls deleted file mode 100644 index 54270780..00000000 --- a/kite/doc/asimbook.cls +++ /dev/null @@ -1,798 +0,0 @@ -%% -%% This is file `book.cls', -%% generated with the docstrip utility. -%% -%% The original source files were: -%% -%% classes.dtx (with options: `book') -%% -%% This is a generated file. -%% -%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 -%% The LaTeX3 Project and any individual authors listed elsewhere -%% in this file. -%% -%% This file was generated from file(s) of the LaTeX base system. -%% -------------------------------------------------------------- -%% -%% It may be distributed and/or modified under the -%% conditions of the LaTeX Project Public License, either version 1.2 -%% of this license or (at your option) any later version. -%% The latest version of this license is in -%% http://www.latex-project.org/lppl.txt -%% and version 1.2 or later is part of all distributions of LaTeX -%% version 1999/12/01 or later. -%% -%% This file may only be distributed together with a copy of the LaTeX -%% base system. You may however distribute the LaTeX base system without -%% such generated files. -%% -%% The list of all files belonging to the LaTeX base distribution is -%% given in the file `manifest.txt'. See also `legal.txt' for additional -%% information. -%% -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} -\NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesClass{asimbook} - [2005/11/21 v1.0 - ASIM LaTeX document class] -\newcommand\@ptsize{} -\newif\if@restonecol -\newif\if@titlepage -\@titlepagetrue -\newif\if@openright -\newif\if@mainmatter \@mainmattertrue -\if@compatibility\else -\DeclareOption{a4paper} - {\setlength\paperheight {297mm}% - \setlength\paperwidth {210mm}} -\DeclareOption{a5paper} - {\setlength\paperheight {210mm}% - \setlength\paperwidth {148mm}} -\DeclareOption{b5paper} - {\setlength\paperheight {250mm}% - \setlength\paperwidth {176mm}} -\DeclareOption{letterpaper} - {\setlength\paperheight {11in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{legalpaper} - {\setlength\paperheight {14in}% - \setlength\paperwidth {8.5in}} -\DeclareOption{executivepaper} - {\setlength\paperheight {10.5in}% - \setlength\paperwidth {7.25in}} -\DeclareOption{landscape} - {\setlength\@tempdima {\paperheight}% - \setlength\paperheight {\paperwidth}% - \setlength\paperwidth {\@tempdima}} -\fi -\if@compatibility - \renewcommand\@ptsize{0} -\else -\DeclareOption{10pt}{\renewcommand\@ptsize{0}} -\fi -\DeclareOption{11pt}{\renewcommand\@ptsize{1}} -\DeclareOption{12pt}{\renewcommand\@ptsize{2}} -\if@compatibility\else -\DeclareOption{oneside}{\@twosidefalse \@mparswitchfalse} -\fi -\DeclareOption{twoside}{\@twosidetrue \@mparswitchtrue} -\DeclareOption{draft}{\setlength\overfullrule{5pt}} -\if@compatibility\else -\DeclareOption{final}{\setlength\overfullrule{0pt}} -\fi -\DeclareOption{titlepage}{\@titlepagetrue} -\if@compatibility\else -\DeclareOption{notitlepage}{\@titlepagefalse} -\fi -\if@compatibility -\@openrighttrue -\else -\DeclareOption{openright}{\@openrighttrue} -\DeclareOption{openany}{\@openrightfalse} -\fi -\if@compatibility\else -\DeclareOption{onecolumn}{\@twocolumnfalse} -\fi -\DeclareOption{twocolumn}{\@twocolumntrue} -\DeclareOption{leqno}{\input{leqno.clo}} -\DeclareOption{fleqn}{\input{fleqn.clo}} -\DeclareOption{openbib}{% - \AtEndOfPackage{% - \renewcommand\@openbib@code{% - \advance\leftmargin\bibindent - \itemindent -\bibindent - \listparindent \itemindent - \parsep \z@ - }% - \renewcommand\newblock{\par}}% -} -\ExecuteOptions{letterpaper,10pt,twoside,onecolumn,final,openright} -\ProcessOptions -\input{bk1\@ptsize.clo} -\setlength\lineskip{1\p@} -\setlength\normallineskip{1\p@} -\renewcommand\baselinestretch{} -\setlength\parskip{0\p@ \@plus \p@} -\@lowpenalty 51 -\@medpenalty 151 -\@highpenalty 301 -\setcounter{topnumber}{2} -\renewcommand\topfraction{.7} -\setcounter{bottomnumber}{1} -\renewcommand\bottomfraction{.3} -\setcounter{totalnumber}{3} -\renewcommand\textfraction{.2} -\renewcommand\floatpagefraction{.5} -\setcounter{dbltopnumber}{2} -\renewcommand\dbltopfraction{.7} -\renewcommand\dblfloatpagefraction{.5} -%%%% Select Chapter font. -\newcommand \textchapter [1] {\textsf{\textbf{#1}}} -\newcommand \fontchapter {\sffamily \bfseries} -\if@twoside - \def\ps@headings{% - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\thepage\hfil\slshape\leftmark}% - \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% - \let\@mkboth\markboth - \def\chaptermark##1{% - \markboth {\MakeUppercase{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \@chapapp\ \thechapter. \ % - \fi - \fi - ##1}}{}}% - \def\sectionmark##1{% - \markright {\MakeUppercase{% - \ifnum \c@secnumdepth >\z@ - \thesection. \ % - \fi - ##1}}}} -\else - \def\ps@headings{% - \let\@oddfoot\@empty - \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% - \let\@mkboth\markboth - \def\chaptermark##1{% - \markright {\MakeUppercase{% - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \@chapapp\ \thechapter. \ % - \fi - \fi - ##1}}}} -\fi -\def\ps@myheadings{% - \let\@oddfoot\@empty\let\@evenfoot\@empty - \def\@evenhead{\thepage\hfil\slshape\leftmark}% - \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% - \let\@mkboth\@gobbletwo - \let\chaptermark\@gobble - \let\sectionmark\@gobble - } - \if@titlepage - \newcommand\maketitle{\begin{titlepage}% - \let\footnotesize\small - \let\footnoterule\relax - \let \footnote \thanks - \null\vfil - \vskip 60\p@ - \begin{center}% - {\LARGE \@title \par}% - \vskip 3em% - {\large - \lineskip .75em% - \begin{tabular}[t]{c}% - \@author - \end{tabular}\par}% - \vskip 1.5em% - {\large \@date \par}% % Set date in \large size. - \end{center}\par - \@thanks - \vfil\null - \end{titlepage}% - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\title\relax - \global\let\author\relax - \global\let\date\relax - \global\let\and\relax -} -\else -\newcommand\maketitle{\par - \begingroup - \renewcommand\thefootnote{\@fnsymbol\c@footnote}% - \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% - \long\def\@makefntext##1{\parindent 1em\noindent - \hb@xt@1.8em{% - \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% - \if@twocolumn - \ifnum \col@number=\@ne - \@maketitle - \else - \twocolumn[\@maketitle]% - \fi - \else - \newpage - \global\@topnum\z@ % Prevents figures from going at top of page. - \@maketitle - \fi - \thispagestyle{plain}\@thanks - \endgroup - \setcounter{footnote}{0}% - \global\let\thanks\relax - \global\let\maketitle\relax - \global\let\@maketitle\relax - \global\let\@thanks\@empty - \global\let\@author\@empty - \global\let\@date\@empty - \global\let\@title\@empty - \global\let\title\relax - \global\let\author\relax - \global\let\date\relax - \global\let\and\relax -} -\def\@maketitle{% - \newpage - \null - \vskip 2em% - \begin{center}% - \let \footnote \thanks - {\LARGE \@title \par}% - \vskip 1.5em% - {\large - \lineskip .5em% - \begin{tabular}[t]{c}% - \@author - \end{tabular}\par}% - \vskip 1em% - {\large \@date}% - \end{center}% - \par - \vskip 1.5em} -\fi -\newcommand*\chaptermark[1]{} -\setcounter{secnumdepth}{2} -\newcounter {part} -\newcounter {chapter} -\newcounter {section}[chapter] -\newcounter {subsection}[section] -\newcounter {subsubsection}[subsection] -\newcounter {paragraph}[subsubsection] -\newcounter {subparagraph}[paragraph] -\renewcommand \thepart {\@Roman\c@part} -\renewcommand \thechapter {\@arabic\c@chapter} -\renewcommand \thesection {\thechapter.\@arabic\c@section} -\renewcommand\thesubsection {\thesection.\@arabic\c@subsection} -\renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection} -\renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph} -\renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} -\newcommand\@chapapp{\chaptername} -\newcommand\frontmatter{% - \cleardoublepage - \@mainmatterfalse - \pagenumbering{roman}} -\newcommand\mainmatter{% - \cleardoublepage - \@mainmattertrue - \pagenumbering{arabic}} -\newcommand\backmatter{% - \if@openright - \cleardoublepage - \else - \clearpage - \fi - \@mainmatterfalse} -\newcommand\part{% - \if@openright - \cleardoublepage - \else - \clearpage - \fi - \thispagestyle{plain}% - \if@twocolumn - \onecolumn - \@tempswatrue - \else - \@tempswafalse - \fi - \null\vfil - \secdef\@part\@spart} - -\def\@part[#1]#2{% - \ifnum \c@secnumdepth >-2\relax - \refstepcounter{part}% - \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% - \else - \addcontentsline{toc}{part}{#1}% - \fi - \markboth{}{}% - {\centering - \interlinepenalty \@M - \normalfont - \ifnum \c@secnumdepth >-2\relax - \huge\bfseries \partname\nobreakspace\thepart - \par - \vskip 20\p@ - \fi - \Huge \bfseries #2\par}% - \@endpart} -\def\@spart#1{% - {\centering - \interlinepenalty \@M - \normalfont - \Huge \bfseries #1\par}% - \@endpart} -\def\@endpart{\vfil\newpage - \if@twoside - \if@openright - \null - \thispagestyle{empty}% - \newpage - \fi - \fi - \if@tempswa - \twocolumn - \fi} -\newcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi - \thispagestyle{plain}% - \global\@topnum\z@ - \@afterindentfalse - \secdef\@chapter\@schapter} -\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \refstepcounter{chapter}% - \typeout{\@chapapp\space\thechapter.}% - \addcontentsline{toc}{chapter}% - {\protect\numberline{\thechapter}#1}% - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \else - \addcontentsline{toc}{chapter}{#1}% - \fi - \chaptermark{#1}% - \addtocontents{lof}{\protect\addvspace{10\p@}}% - \addtocontents{lot}{\protect\addvspace{10\p@}}% - \if@twocolumn - \@topnewpage[\@makechapterhead{#2}]% - \else - \@makechapterhead{#2}% - \@afterheading - \fi} -%%%%\def\@makechapterhead#1{% -%%%% \vspace*{50\p@}% -%%%% {\parindent \z@ \raggedright \normalfont -%%%% \ifnum \c@secnumdepth >\m@ne -%%%% \if@mainmatter -%%%% \huge\bfseries \@chapapp\space \thechapter -%%%% \par\nobreak -%%%% \vskip 20\p@ -%%%% \fi -%%%% \fi -%%%% \interlinepenalty\@M -%%%% \Huge \bfseries #1\par\nobreak -%%%% \vskip 40\p@ -%%%% }} - \newlength \titlewidth - \setlength \titlewidth {\textwidth} - \addtolength \titlewidth {\marginparwidth} - \addtolength \titlewidth {\marginparsep} - \def\@makechapterhead#1{% - \vspace*{50\p@}% - {\parindent \z@ \raggedleft \fontchapter - \ifnum \c@secnumdepth >\m@ne - \if@mainmatter - \huge \@chapapp\space \thechapter - \par\nobreak - \vskip 20\p@ - \fi - \fi - \interlinepenalty\@M - \hsize=\titlewidth - \Huge #1 \par\nobreak - \hsize=\textwidth - \vskip 40\p@ - }} -\def\@schapter#1{\if@twocolumn - \@topnewpage[\@makeschapterhead{#1}]% - \else - \@makeschapterhead{#1}% - \@afterheading - \fi} -%%%%\def\@makeschapterhead#1{% -%%%% \vspace*{50\p@}% -%%%% {\parindent \z@ \raggedright -%%%% \normalfont -%%%% \interlinepenalty\@M -%%%% \Huge \bfseries #1\par\nobreak -%%%% \vskip 40\p@ -%%%% }} - \def\@makeschapterhead#1{% - \vspace*{50\p@}% - {\parindent \z@ \raggedright - \normalfont - \interlinepenalty\@M - \hsize=\titlewidth - \flushright - \Huge \bfseries #1\par\nobreak - \hsize=\textwidth - \vskip 40\p@ - }} -\newcommand\section{\@startsection {section}{1}{\z@}% - {-3.5ex \@plus -1ex \@minus -.2ex}% - {2.3ex \@plus.2ex}% - {\normalfont\Large\bfseries}} -\newcommand\subsection{\@startsection{subsection}{2}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\large\bfseries}} -\newcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% - {-3.25ex\@plus -1ex \@minus -.2ex}% - {1.5ex \@plus .2ex}% - {\normalfont\normalsize\bfseries}} -\newcommand\paragraph{\@startsection{paragraph}{4}{\z@}% - {3.25ex \@plus1ex \@minus.2ex}% - {-1em}% - {\normalfont\normalsize\bfseries}} -\newcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}% - {3.25ex \@plus1ex \@minus .2ex}% - {-1em}% - {\normalfont\normalsize\bfseries}} -\if@twocolumn - \setlength\leftmargini {2em} -\else - \setlength\leftmargini {2.5em} -\fi -\leftmargin \leftmargini -\setlength\leftmarginii {2.2em} -\setlength\leftmarginiii {1.87em} -\setlength\leftmarginiv {1.7em} -\if@twocolumn - \setlength\leftmarginv {.5em} - \setlength\leftmarginvi {.5em} -\else - \setlength\leftmarginv {1em} - \setlength\leftmarginvi {1em} -\fi -\setlength \labelsep {.5em} -\setlength \labelwidth{\leftmargini} -\addtolength\labelwidth{-\labelsep} -\@beginparpenalty -\@lowpenalty -\@endparpenalty -\@lowpenalty -\@itempenalty -\@lowpenalty -\renewcommand\theenumi{\@arabic\c@enumi} -\renewcommand\theenumii{\@alph\c@enumii} -\renewcommand\theenumiii{\@roman\c@enumiii} -\renewcommand\theenumiv{\@Alph\c@enumiv} -\newcommand\labelenumi{\theenumi.} -\newcommand\labelenumii{(\theenumii)} -\newcommand\labelenumiii{\theenumiii.} -\newcommand\labelenumiv{\theenumiv.} -\renewcommand\p@enumii{\theenumi} -\renewcommand\p@enumiii{\theenumi(\theenumii)} -\renewcommand\p@enumiv{\p@enumiii\theenumiii} -\newcommand\labelitemi{\textbullet} -\newcommand\labelitemii{\normalfont\bfseries \textendash} -\newcommand\labelitemiii{\textasteriskcentered} -\newcommand\labelitemiv{\textperiodcentered} -\newenvironment{description} - {\list{}{\labelwidth\z@ \itemindent-\leftmargin - \let\makelabel\descriptionlabel}} - {\endlist} -\newcommand*\descriptionlabel[1]{\hspace\labelsep - \normalfont\bfseries #1} -\newenvironment{verse} - {\let\\\@centercr - \list{}{\itemsep \z@ - \itemindent -1.5em% - \listparindent\itemindent - \rightmargin \leftmargin - \advance\leftmargin 1.5em}% - \item\relax} - {\endlist} -\newenvironment{quotation} - {\list{}{\listparindent 1.5em% - \itemindent \listparindent - \rightmargin \leftmargin - \parsep \z@ \@plus\p@}% - \item\relax} - {\endlist} -\newenvironment{quote} - {\list{}{\rightmargin\leftmargin}% - \item\relax} - {\endlist} -\if@compatibility -\newenvironment{titlepage} - {% - \cleardoublepage - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse\newpage - \fi - \thispagestyle{empty}% - \setcounter{page}\z@ - }% - {\if@restonecol\twocolumn \else \newpage \fi - } -\else -\newenvironment{titlepage} - {% - \cleardoublepage - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse\newpage - \fi - \thispagestyle{empty}% - \setcounter{page}\@ne - }% - {\if@restonecol\twocolumn \else \newpage \fi - \if@twoside\else - \setcounter{page}\@ne - \fi - } -\fi -\newcommand\appendix{\par - \setcounter{chapter}{0}% - \setcounter{section}{0}% - \gdef\@chapapp{\appendixname}% - \gdef\thechapter{\@Alph\c@chapter}} -\setlength\arraycolsep{5\p@} -\setlength\tabcolsep{6\p@} -\setlength\arrayrulewidth{.4\p@} -\setlength\doublerulesep{2\p@} -\setlength\tabbingsep{\labelsep} -\skip\@mpfootins = \skip\footins -\setlength\fboxsep{3\p@} -\setlength\fboxrule{.4\p@} -\@addtoreset {equation}{chapter} -\renewcommand\theequation - {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@equation} -\newcounter{figure}[chapter] -\renewcommand \thefigure - {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@figure} -\def\fps@figure{tbp} -\def\ftype@figure{1} -\def\ext@figure{lof} -\def\fnum@figure{\figurename\nobreakspace\thefigure} -\newenvironment{figure} - {\@float{figure}} - {\end@float} -\newenvironment{figure*} - {\@dblfloat{figure}} - {\end@dblfloat} -\newcounter{table}[chapter] -\renewcommand \thetable - {\ifnum \c@chapter>\z@ \thechapter.\fi \@arabic\c@table} -\def\fps@table{tbp} -\def\ftype@table{2} -\def\ext@table{lot} -\def\fnum@table{\tablename\nobreakspace\thetable} -\newenvironment{table} - {\@float{table}} - {\end@float} -\newenvironment{table*} - {\@dblfloat{table}} - {\end@dblfloat} -\newlength\abovecaptionskip -\newlength\belowcaptionskip -\setlength\abovecaptionskip{10\p@} -\setlength\belowcaptionskip{0\p@} -\long\def\@makecaption#1#2{% - \vskip\abovecaptionskip - \sbox\@tempboxa{#1: #2}% - \ifdim \wd\@tempboxa >\hsize - #1: #2\par - \else - \global \@minipagefalse - \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% - \fi - \vskip\belowcaptionskip} -\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} -\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} -\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} -\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} -\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} -\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} -\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} -\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} -\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} -\newcommand\@pnumwidth{1.55em} -\newcommand\@tocrmarg{2.55em} -\newcommand\@dotsep{4.5} -\setcounter{tocdepth}{2} -\newcommand\tableofcontents{% - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse - \fi - \chapter*{\contentsname - \@mkboth{% - \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% - \@starttoc{toc}% - \if@restonecol\twocolumn\fi - } -\newcommand*\l@part[2]{% - \ifnum \c@tocdepth >-2\relax - \addpenalty{-\@highpenalty}% - \addvspace{2.25em \@plus\p@}% - \setlength\@tempdima{3em}% - \begingroup - \parindent \z@ \rightskip \@pnumwidth - \parfillskip -\@pnumwidth - {\leavevmode - \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par - \nobreak - \global\@nobreaktrue - \everypar{\global\@nobreakfalse\everypar{}}% - \endgroup - \fi} -%%%%\newcommand*\l@chapter[2]{% -%%%% \ifnum \c@tocdepth >\m@ne -%%%% \addpenalty{-\@highpenalty}% -%%%% \vskip 1.0em \@plus\p@ -%%%% \setlength\@tempdima{1.5em}% -%%%% \begingroup -%%%% \parindent \z@ \rightskip \@pnumwidth -%%%% \parfillskip -\@pnumwidth -%%%% \leavevmode \bfseries -%%%% \advance\leftskip\@tempdima -%%%% \hskip -\leftskip -%%%% #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par -%%%% \penalty\@highpenalty -%%%% \endgroup -%%%% \fi} -\newcommand\l@chapter[2]{% - \ifnum \c@tocdepth >\m@ne - \addpenalty{-\@highpenalty}% - \vskip 1.0em \@plus\p@ - \setlength\@tempdima{1.5em}% - \begingroup - \parindent \z@ \rightskip \@pnumwidth - \parfillskip -\@pnumwidth - \leavevmode \fontchapter - \advance\leftskip\@tempdima - \hskip -\leftskip - #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par - \penalty\@highpenalty - \endgroup - \fi} -\newcommand*\l@section{\@dottedtocline{1}{1.5em}{2.3em}} -\newcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} -\newcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} -\newcommand*\l@paragraph{\@dottedtocline{4}{10em}{5em}} -\newcommand*\l@subparagraph{\@dottedtocline{5}{12em}{6em}} -\newcommand\listoffigures{% - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse - \fi - \chapter*{\listfigurename}% - \@mkboth{\MakeUppercase\listfigurename}% - {\MakeUppercase\listfigurename}% - \@starttoc{lof}% - \if@restonecol\twocolumn\fi - } -\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} -\newcommand\listoftables{% - \if@twocolumn - \@restonecoltrue\onecolumn - \else - \@restonecolfalse - \fi - \chapter*{\listtablename}% - \@mkboth{% - \MakeUppercase\listtablename}% - {\MakeUppercase\listtablename}% - \@starttoc{lot}% - \if@restonecol\twocolumn\fi - } -\let\l@table\l@figure -\newdimen\bibindent -\setlength\bibindent{1.5em} -\newenvironment{thebibliography}[1] - {\chapter*{\bibname}% - \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}% - \list{\@biblabel{\@arabic\c@enumiv}}% - {\settowidth\labelwidth{\@biblabel{#1}}% - \leftmargin\labelwidth - \advance\leftmargin\labelsep - \@openbib@code - \usecounter{enumiv}% - \let\p@enumiv\@empty - \renewcommand\theenumiv{\@arabic\c@enumiv}}% - \sloppy - \clubpenalty4000 - \@clubpenalty \clubpenalty - \widowpenalty4000% - \sfcode`\.\@m} - {\def\@noitemerr - {\@latex@warning{Empty `thebibliography' environment}}% - \endlist} -\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} -\let\@openbib@code\@empty -\newenvironment{theindex} - {\if@twocolumn - \@restonecolfalse - \else - \@restonecoltrue - \fi - \columnseprule \z@ - \columnsep 35\p@ - \twocolumn[\@makeschapterhead{\indexname}]% - \@mkboth{\MakeUppercase\indexname}% - {\MakeUppercase\indexname}% - \thispagestyle{plain}\parindent\z@ - \parskip\z@ \@plus .3\p@\relax - \let\item\@idxitem} - {\if@restonecol\onecolumn\else\clearpage\fi} -\newcommand\@idxitem{\par\hangindent 40\p@} -\newcommand\subitem{\@idxitem \hspace*{20\p@}} -\newcommand\subsubitem{\@idxitem \hspace*{30\p@}} -\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} -\renewcommand\footnoterule{% - \kern-3\p@ - \hrule\@width.4\columnwidth - \kern2.6\p@} -\@addtoreset{footnote}{chapter} -\newcommand\@makefntext[1]{% - \parindent 1em% - \noindent - \hb@xt@1.8em{\hss\@makefnmark}#1} -\newcommand\contentsname{Contents} -\newcommand\listfigurename{List of Figures} -\newcommand\listtablename{List of Tables} -\newcommand\bibname{Bibliography} -\newcommand\indexname{Index} -\newcommand\figurename{Figure} -\newcommand\tablename{Table} -\newcommand\partname{Part} -\newcommand\chaptername{Chapter} -\newcommand\appendixname{Appendix} -\def\today{\ifcase\month\or - January\or February\or March\or April\or May\or June\or - July\or August\or September\or October\or November\or December\fi - \space\number\day, \number\year} -\setlength\columnsep{10\p@} -\setlength\columnseprule{0\p@} -\pagestyle{headings} -\pagenumbering{arabic} -\if@twoside -\else - \raggedbottom -\fi -\if@twocolumn - \twocolumn - \sloppy - \flushbottom -\else - \onecolumn -\fi -\endinput -%% -%% End of file `book.cls'. diff --git a/kite/doc/doxyfile b/kite/doc/doxyfile index a51583ff..9824b7d8 100644 --- a/kite/doc/doxyfile +++ b/kite/doc/doxyfile @@ -1,3 +1,5 @@ +# -*- explicit-buffer-name: "doxyfile" -*- + # Doxyfile 1.3.4 # -------------------------------------------------------------------- @@ -24,7 +26,8 @@ TAB_SIZE = 2 ALIASES = "function=\fn"\ "important=\par Important:\n"\ "remark=\par Remark:\n"\ - "Return=Returns:"\ + "sreturn=\b Returns:"\ + "sa=See also: "\ "True=\b True"\ "true=\b true"\ "False=\b False"\ @@ -33,7 +36,7 @@ ALIASES = "function=\fn"\ "HORIZONTAL=\b HORIZONTAL"\ "NULL=\c NULL"\ "vector=\c vector"\ - "lower_bound=\c lower_bound"\ + "lower_bound=\c lower_bound()"\ "Collection=\c Collection"\ "Collections=\c Collections"\ "Interval=\c Interval"\ @@ -72,7 +75,9 @@ ALIASES = "function=\fn"\ "Session=\c Session"\ "Sessions=\c Sessions"\ "Hurricane=Hurricane"\ - "STL=STL" + "STL=STL"\ + "red{1}=\1" \ + "redB{1}=\1" OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_JAVA = NO SUBGROUPING = YES @@ -91,7 +96,7 @@ HIDE_FRIEND_COMPOUNDS = NO HIDE_IN_BODY_DOCS = NO INTERNAL_DOCS = NO CASE_SENSE_NAMES = YES -HIDE_SCOPE_NAMES = NO +HIDE_SCOPE_NAMES = YES SHOW_INCLUDE_FILES = YES INLINE_INFO = YES SORT_MEMBER_DOCS = NO @@ -117,13 +122,30 @@ WARN_LOGFILE = # Configuration options related to the input files INPUT = \ - ../src/kite/TrackSegment.h ../src/TrackSegment.cpp TrackSegment.dox \ - ../src/kite/TrackSegmentCost.h ../src/TrackSegmentCost.cpp TrackSegmentCost.dox \ - ../src/kite/Track.h ../src/Track.cpp Track.dox \ - ../src/kite/TrackCost.h ../src/TrackCost.cpp TrackCost.dox \ - ../src/kite/RoutingEvent.h ../src/RoutingEvent.cpp RoutingEvent.dox \ - ../src/kite/Session.h Session.dox \ - Kite.dox + ../src/kite/Constants.h Constants.dox \ + ../src/kite/KiteEngine.h KiteEngine.dox \ + ../src/kite/DataNegociate.h ../src/DataNegociate.cpp DataNegociate.dox \ + ../src/kite/TrackMarker.h ../src/TrackMarker.cpp TrackMarker.dox \ + ../src/kite/TrackElement.h ../src/TrackElement.cpp TrackElement.dox \ + ../src/kite/TrackSegment.h ../src/TrackSegment.cpp TrackSegment.dox \ + ../src/kite/TrackFixedSegment.h ../src/TrackFixedSegment.cpp TrackFixedSegment.dox \ + ../src/kite/Track.h ../src/Track.cpp Track.dox \ + ../src/kite/HorizontalTrack.h ../src/HorizontalTrack.cpp HorizontalTrack.dox \ + ../src/kite/VerticalTrack.h ../src/VerticalTrack.cpp VerticalTrack.dox \ + ../src/kite/RoutingPlane.h ../src/RoutingPlane.cpp RoutingPlane.dox \ + ../src/kite/Manipulator.h ../src/Manipulator.cpp Manipulator.dox \ + ../src/kite/SegmentFsm.h ../src/SegmentFsm.cpp SegmentFsm.dox \ + ../src/kite/RoutingEvent.h ../src/RoutingEvent.cpp RoutingEvent.dox \ + ../src/kite/RoutingEventQueue.h ../src/RoutingEventQueue.cpp RoutingEventQueue.dox \ + ../src/kite/RoutingEventLoop.h ../src/RoutingEventLoop.cpp RoutingEventLoop.dox \ + ../src/kite/RoutingEventHistory.h ../src/RoutingEventHistory.cpp RoutingEventHistory.dox \ + ../src/kite/NegociateWindow.h ../src/NegociateWindow.cpp NegociateWindow.dox \ + ../src/kite/Session.h Session.dox \ + Kite.dox \ + notes.dox + +# ../src/kite/TrackSegmentCost.h ../src/TrackSegmentCost.cpp TrackSegmentCost.dox \ +# ../src/kite/TrackCost.h ../src/TrackCost.cpp TrackCost.dox \ FILE_PATTERNS = *.h \ *.cpp \ @@ -166,7 +188,7 @@ HTML_OUTPUT = html HTML_FILE_EXTENSION = .html HTML_HEADER = header.html HTML_FOOTER = footer.html -HTML_STYLESHEET = ASIM.css +HTML_STYLESHEET = SoC.css HTML_ALIGN_MEMBERS = YES GENERATE_HTMLHELP = NO CHM_FILE = @@ -250,7 +272,7 @@ SKIP_FUNCTION_MACROS = YES # -------------------------------------------------------------------- # Configuration options related to external references -TAGFILES = ../../../../hurricane/doc/hurricane/html/hurricane.tag=../hurricane \ +TAGFILES = ../../hurricane/doc/hurricane/html/hurricane.tag=../hurricane \ ../../katabatic/doc/html/katabatic.tag=../katabatic GENERATE_TAGFILE = html/kite.tag ALLEXTERNALS = NO diff --git a/kite/doc/footer.html b/kite/doc/footer.html index d0245539..e0fc72ad 100644 --- a/kite/doc/footer.html +++ b/kite/doc/footer.html @@ -9,7 +9,7 @@ - +
    Kite - Detailed RouterCopyright © 2008-2009 LIP6. All rights reservedCopyright © 2008-2013 UPMC. All rights reserved
    diff --git a/kite/doc/header.html b/kite/doc/header.html index bf039968..0806b4a4 100644 --- a/kite/doc/header.html +++ b/kite/doc/header.html @@ -1,17 +1,16 @@ - Kite - Detailed Router: Router Documentation - + Kite - Detailed Router +

    Kite - Detailed Router

    - - + - + diff --git a/kite/doc/images/ConflictSolve-1.fig b/kite/doc/images/ConflictSolve-1.fig new file mode 100644 index 00000000..d36cc429 --- /dev/null +++ b/kite/doc/images/ConflictSolve-1.fig @@ -0,0 +1,96 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 750 525 11400 1050 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 600 9900 600 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 11400 900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 900 4500 900 +4 0 0 50 -1 12 14 0.0000 4 105 150 1500 825 a\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 975 [3]\001 +-6 +6 750 975 11400 1350 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1200 11400 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 1200 5100 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8100 1200 11100 1200 +4 0 0 50 -1 12 14 0.0000 4 150 150 2100 1125 b\001 +4 0 0 50 -1 12 14 0.0000 4 150 150 8100 1125 f\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 1275 [2]\001 +-6 +6 750 1275 11400 1650 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1500 11400 1500 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 1500 5700 1500 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7500 1500 10500 1500 +4 0 0 50 -1 12 14 0.0000 4 105 150 2700 1425 c\001 +4 0 0 50 -1 12 14 0.0000 4 105 150 7500 1425 e\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 1575 [1]\001 +-6 +6 750 1575 11400 1950 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1800 11400 1800 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6900 1800 9900 1800 +4 0 0 50 -1 12 14 0.0000 4 150 150 6900 1725 d\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 1875 [0]\001 +-6 +6 750 2775 11400 4050 +6 750 2775 11400 3150 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3000 11400 3000 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 3000 4500 3000 +4 0 0 50 -1 12 14 0.0000 4 105 150 1500 2925 a\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 3075 [3]\001 +-6 +6 750 3075 11400 3450 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3300 11400 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 3300 5100 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8100 3300 11100 3300 +4 0 0 50 -1 12 14 0.0000 4 150 150 2100 3225 b\001 +4 0 0 50 -1 12 14 0.0000 4 150 150 8100 3225 f\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 3375 [2]\001 +-6 +6 750 3375 11400 3750 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3600 11400 3600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 3600 5700 3600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7575 3600 10575 3600 +4 0 0 50 -1 12 14 0.0000 4 105 150 2700 3525 c\001 +4 0 0 50 -1 12 14 0.0000 4 105 150 7575 3525 e\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 3675 [1]\001 +-6 +6 750 3675 11400 4050 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 11400 3900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6900 3900 9900 3900 +4 0 0 50 -1 12 14 0.0000 4 150 150 6900 3825 d\001 +4 0 4 50 -1 14 14 0.0000 4 150 150 2400 3825 g\001 +4 2 0 50 -1 14 14 0.0000 4 180 450 1200 3975 [0]\001 +-6 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2400 3900 6300 3900 6300 3000 9900 3000 +-6 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 675 0 11700 0 11700 4500 675 4500 675 0 +4 0 4 50 -1 14 14 0.0000 4 150 150 2400 525 g\001 diff --git a/kite/doc/images/ConflictSolve-1.png b/kite/doc/images/ConflictSolve-1.png new file mode 100644 index 00000000..d3e70ce2 Binary files /dev/null and b/kite/doc/images/ConflictSolve-1.png differ diff --git a/kite/doc/images/ConflictSolveByHistory-1.fig b/kite/doc/images/ConflictSolveByHistory-1.fig new file mode 100644 index 00000000..d36ea80e --- /dev/null +++ b/kite/doc/images/ConflictSolveByHistory-1.fig @@ -0,0 +1,89 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 5025 1425 7350 2175 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 1500 5100 1500 5100 2100 5175 2100 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7275 1500 7200 1500 7200 2100 7275 2100 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 5100 1650 7200 1650 7200 1950 5100 1950 5100 1650 +4 1 0 40 -1 14 14 0.0000 4 180 600 5475 1575 [-4]\001 +-6 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1800 9300 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 2.00 120.00 240.00 + 0 0 2.00 120.00 240.00 + 2400 600 2400 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3675 600 3600 600 3600 1200 3675 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5475 600 5400 600 5400 1200 5475 1200 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 3600 750 5400 750 5400 1050 3600 1050 3600 750 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 900 5400 900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 2700 3300 2700 3300 3300 3375 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 2700 5100 2700 5100 3300 5175 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 3225 4500 3225 4500 2775 4575 2775 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 3225 7500 3225 7500 2775 7575 2775 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 3300 2850 5100 2850 5100 3150 3300 3150 3300 2850 +2 1 0 4 1 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3300 3000 7500 3000 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 9300 900 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 4500 2925 7500 2925 7500 3075 4500 3075 4500 2925 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3000 9300 3000 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1575 3600 1500 3600 1500 4200 1575 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8775 3600 8700 3600 8700 4200 8775 4200 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 9300 3900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3975 3600 3900 3600 3900 4200 3975 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 3600 6000 3600 6000 4200 6075 4200 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 1500 3750 3900 3750 3900 4050 1500 4050 1500 3750 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 6000 3750 8700 3750 8700 4050 6000 4050 6000 3750 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 2250 6300 2250 6300 2550 6375 2550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 2250 1800 2250 1800 2550 1875 2550 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 2325 6300 2325 6300 2475 1800 2475 1800 2325 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 900 300 9600 300 9600 5700 900 5700 900 300 +3 0 0 1 4 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1800 2400 1500 2550 1500 3000 + 0.000 1.000 0.000 +3 0 0 4 1 7 50 -1 -1 0.000 0 0 0 2 + 1200 5100 2700 5100 + 0.000 0.000 +4 1 4 50 -1 14 12 1.5708 4 165 2160 2325 2250 perpandicular span\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 3975 675 [-3]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 3675 2775 [-1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 4800 2775 [-2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 1875 3675 [-5]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 6975 3675 [-6]\001 +4 1 4 40 -1 14 14 0.0000 4 150 1500 4050 2250 conflicted\001 +4 0 1 50 -1 14 14 0.0000 4 150 2100 3000 5100 UnionIntervals\001 +4 0 0 50 -1 14 14 0.0000 4 195 6900 1200 5400 [-INDEX] index of the segment in event history\001 diff --git a/kite/doc/images/ConflictSolveByHistory-1.png b/kite/doc/images/ConflictSolveByHistory-1.png new file mode 100644 index 00000000..4451754c Binary files /dev/null and b/kite/doc/images/ConflictSolveByHistory-1.png differ diff --git a/kite/doc/images/ConflictSolveByHistory-2.fig b/kite/doc/images/ConflictSolveByHistory-2.fig new file mode 100644 index 00000000..b1000acb --- /dev/null +++ b/kite/doc/images/ConflictSolveByHistory-2.fig @@ -0,0 +1,116 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1425 6825 5850 7575 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1575 6900 1500 6900 1500 7500 1575 7500 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 6900 3300 6900 3300 7500 3375 7500 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2775 7425 2700 7425 2700 6975 2775 6975 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5775 7425 5700 7425 5700 6975 5775 6975 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 1500 7050 3300 7050 3300 7350 1500 7350 1500 7050 +2 1 0 4 1 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 1500 7200 5700 7200 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 2700 7125 5700 7125 5700 7275 2700 7275 2700 7125 +-6 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 2700 3300 2700 3300 3300 3375 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 2700 5100 2700 5100 3300 5175 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 3225 4500 3225 4500 2775 4575 2775 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 3225 7500 3225 7500 2775 7575 2775 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 3300 2850 5100 2850 5100 3150 3300 3150 3300 2850 +2 1 0 4 1 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3300 3000 7500 3000 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 4500 2925 7500 2925 7500 3075 4500 3075 4500 2925 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3000 9600 3000 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 2250 6300 2250 6300 2550 6375 2550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 2250 1800 2250 1800 2550 1875 2550 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 2325 6300 2325 6300 2475 1800 2475 1800 2325 +2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3300 1800 3300 3900 +2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 7500 1800 7500 3900 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 4050 1800 4050 1800 4350 1875 4350 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 4950 6300 4950 6300 5250 6375 5250 +2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3000 4200 3000 5100 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3225 4050 3150 4050 3150 4350 3225 4350 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2925 4950 2850 4950 2850 5250 2925 5250 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 4125 3150 4125 3150 4275 1800 4275 1800 4125 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 2850 5025 6300 5025 6300 5175 2850 5175 2850 5025 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 7200 9600 7200 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 6450 6300 6450 6300 6750 6375 6750 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 6450 1800 6450 1800 6750 1875 6750 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 6525 6300 6525 6300 6675 1800 6675 1800 6525 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 8250 1800 8250 1800 8550 1875 8550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 9150 6300 9150 6300 9450 6375 9450 +2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 1500 6000 1500 8100 +2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 5700 6000 5700 8100 +2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 6000 8400 6000 9300 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6225 8250 6150 8250 6150 8550 6225 8550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5925 9150 5850 9150 5850 9450 5925 9450 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 8325 6150 8325 6150 8475 1800 8475 1800 8325 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 5850 9225 6300 9225 6300 9375 5850 9375 5850 9225 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 900 1500 9900 1500 9900 10200 900 10200 900 1500 +3 0 0 1 4 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1800 2400 1500 2550 1500 3000 + 0.000 1.000 0.000 +3 0 0 1 4 7 60 -1 -1 0.000 0 1 0 4 + 0 0 1.00 60.00 120.00 + 3300 2325 2700 3000 2700 3900 3000 4500 + 0.000 1.000 1.000 0.000 +3 0 0 1 4 7 60 -1 -1 0.000 0 1 0 4 + 0 0 1.00 60.00 120.00 + 5700 6525 5100 7200 5100 8100 6000 8850 + 0.000 1.000 1.000 0.000 +4 1 4 40 -1 14 14 0.0000 4 150 1500 4050 2250 conflicted\001 +4 0 4 60 -1 12 14 0.0000 4 195 1800 3375 3900 sourceDogleg\001 +4 0 4 60 -1 12 14 0.0000 4 195 1800 7575 3900 targetDogleg\001 +4 0 0 50 -1 12 14 0.0000 4 150 1650 3375 1950 minConflict\001 +4 0 0 50 -1 12 14 0.0000 4 150 1650 7575 1950 maxConflict\001 +4 1 0 50 -1 14 16 0.0000 4 210 3960 4500 5700 (a) - Break under Source\001 +4 1 4 40 -1 14 14 0.0000 4 150 1500 4050 6450 conflicted\001 +4 0 4 60 -1 12 14 0.0000 4 195 1800 1575 8100 sourceDogleg\001 +4 0 4 60 -1 12 14 0.0000 4 195 1800 5775 8100 targetDogleg\001 +4 1 0 50 -1 14 16 0.0000 4 225 3960 4425 9900 (b) - Break under Target\001 diff --git a/kite/doc/images/ConflictSolveByHistory-2.png b/kite/doc/images/ConflictSolveByHistory-2.png new file mode 100644 index 00000000..2b4761f5 Binary files /dev/null and b/kite/doc/images/ConflictSolveByHistory-2.png differ diff --git a/kite/doc/images/ConflictSolveByHistory.fig b/kite/doc/images/ConflictSolveByHistory.fig new file mode 100644 index 00000000..cfdff50e --- /dev/null +++ b/kite/doc/images/ConflictSolveByHistory.fig @@ -0,0 +1,93 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1725 2100 6450 2625 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 2250 6300 2250 6300 2550 6375 2550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 2250 1800 2250 1800 2550 1875 2550 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 2325 6300 2325 6300 2475 1800 2475 1800 2325 +4 1 4 40 -1 14 14 0.0000 4 150 1500 4050 2250 conflicted\001 +-6 +6 5025 1425 7350 2175 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 1500 5100 1500 5100 2100 5175 2100 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7275 1500 7200 1500 7200 2100 7275 2100 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 5100 1650 7200 1650 7200 1950 5100 1950 5100 1650 +4 1 0 40 -1 14 14 0.0000 4 180 600 5475 1575 [-4]\001 +-6 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 15000 -300 24900 -300 24900 12300 15000 12300 15000 -300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 13800 1800 13800 300 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1800 9300 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 2.00 120.00 240.00 + 0 0 2.00 120.00 240.00 + 2400 600 2400 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3675 600 3600 600 3600 1200 3675 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5475 600 5400 600 5400 1200 5475 1200 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 3600 750 5400 750 5400 1050 3600 1050 3600 750 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 900 5400 900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 2700 3300 2700 3300 3300 3375 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 2700 5100 2700 5100 3300 5175 3300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 3225 4500 3225 4500 2775 4575 2775 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 3225 7500 3225 7500 2775 7575 2775 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 3300 2850 5100 2850 5100 3150 3300 3150 3300 2850 +2 1 0 4 1 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3300 3000 7500 3000 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 9300 900 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 4500 2925 7500 2925 7500 3075 4500 3075 4500 2925 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3000 9300 3000 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1575 3600 1500 3600 1500 4200 1575 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8775 3600 8700 3600 8700 4200 8775 4200 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 9300 3900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3975 3600 3900 3600 3900 4200 3975 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 3600 6000 3600 6000 4200 6075 4200 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 1500 3750 3900 3750 3900 4050 1500 4050 1500 3750 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 6000 3750 8700 3750 8700 4050 6000 4050 6000 3750 +3 0 0 1 4 7 50 -1 -1 0.000 0 1 0 3 + 0 0 1.00 60.00 120.00 + 1800 2400 1500 2550 1500 3000 + 0.000 1.000 0.000 +4 0 0 50 -1 14 12 0.0000 4 120 2160 12750 -675 BeforeFirstElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 13200 -1200 Pos\001 +4 0 1 50 -1 14 12 0.0000 4 165 1800 4800 -750 EndIsSegmentMin\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 2100 -1200 begin:0\001 +4 1 4 50 -1 14 12 1.5708 4 165 2160 2325 2250 perpandicular span\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 3975 675 [-3]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 3675 2775 [-1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 4800 2775 [-2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 1875 3675 [-5]\001 +4 1 0 40 -1 14 14 0.0000 4 180 600 6975 3675 [-6]\001 diff --git a/kite/doc/images/ConflictSolveByPlaceds-1.fig b/kite/doc/images/ConflictSolveByPlaceds-1.fig new file mode 100644 index 00000000..c30cf0a1 --- /dev/null +++ b/kite/doc/images/ConflictSolveByPlaceds-1.fig @@ -0,0 +1,145 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 5625 1575 7050 2025 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5775 1650 5700 1650 5700 1950 5775 1950 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 5700 1725 6900 1725 6900 1875 5700 1875 5700 1725 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6975 1650 6900 1650 6900 1950 6975 1950 +-6 +6 3225 1575 4650 2025 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 1650 3300 1650 3300 1950 3375 1950 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 1725 4500 1725 4500 1875 3300 1875 3300 1725 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 1650 4500 1650 4500 1950 4575 1950 +-6 +6 3225 675 5850 1125 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 750 3300 750 3300 1050 3375 1050 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5775 750 5700 750 5700 1050 5775 1050 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 825 5700 825 5700 975 3300 975 3300 825 +-6 +6 3225 2775 4650 3225 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 2850 3300 2850 3300 3150 3375 3150 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 2925 4500 2925 4500 3075 3300 3075 3300 2925 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 2850 4500 2850 4500 3150 4575 3150 +-6 +6 2625 3675 4050 4125 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2775 3750 2700 3750 2700 4050 2775 4050 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 2700 3825 3900 3825 3900 3975 2700 3975 2700 3825 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3975 3750 3900 3750 3900 4050 3975 4050 +-6 +6 4425 3675 4950 4125 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 3750 4500 3750 4500 4050 4575 4050 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 4500 3825 4800 3825 4800 3975 4500 3975 4500 3825 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4875 3750 4800 3750 4800 4050 4875 4050 +-6 +6 5625 3675 7050 4125 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5775 3750 5700 3750 5700 4050 5775 4050 +2 2 0 0 0 0 60 -1 10 0.000 0 0 -1 0 0 5 + 5700 3825 6900 3825 6900 3975 5700 3975 5700 3825 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6975 3750 6900 3750 6900 4050 6975 4050 +-6 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 1800 7800 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 2.00 120.00 240.00 + 0 0 2.00 120.00 240.00 + 2400 600 2400 4200 +2 1 0 4 1 7 60 -1 -1 0.000 0 0 -1 0 0 2 + 3300 3000 7500 3000 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 7800 900 +2 2 0 0 0 0 70 -1 10 0.000 0 0 -1 0 0 5 + 4500 2925 7500 2925 7500 3075 4500 3075 4500 2925 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3000 7800 3000 +2 1 0 1 0 7 100 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 7800 3900 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6375 2250 6300 2250 6300 2550 6375 2550 +2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 2250 1800 2250 1800 2550 1875 2550 +2 2 0 0 0 4 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 2325 6300 2325 6300 2475 1800 2475 1800 2325 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 2850 5100 2850 5100 3150 5175 3150 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 2850 7500 2850 7500 3150 7575 3150 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 900 5700 900 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 1800 4500 1800 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 1800 6900 1800 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 3900 3900 3900 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 3900 6900 3900 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1800 600 1800 4800 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6300 600 6300 4800 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 1800 4725 6300 4725 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8100 -1500 8100 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8700 -1500 8700 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9300 -1500 9300 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8100 600 9300 600 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 900 -1800 9600 -1800 9600 6000 900 6000 900 -1800 +3 0 0 4 1 7 50 -1 -1 0.000 0 0 0 2 + 1200 5700 2700 5700 + 0.000 0.000 +4 1 4 50 -1 14 12 1.5708 4 165 2160 2325 2250 perpandicular span\001 +4 1 4 40 -1 14 14 0.0000 4 150 1500 4050 2250 conflicted\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 4650 4200 L\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 3300 4200 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 6300 4200 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 3900 3300 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 6000 3300 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 4500 750 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 6300 1650 G\001 +4 1 0 50 -1 12 14 0.0000 4 135 150 3900 1650 G\001 +4 0 1 50 -1 14 14 0.0000 4 150 4200 2775 5700 accounted conflict intervals\001 +4 1 4 50 -1 12 12 0.0000 4 165 3000 3900 4650 conflict span (begin,end)\001 +4 0 0 50 -1 14 12 1.5708 4 120 1800 9075 450 Candidate Order\001 +4 0 0 50 -1 14 12 1.5708 4 150 1680 8475 375 Track Id/Index\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 8400 3975 [0]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 8400 975 [3]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 8400 1875 [2]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 8400 3075 [1]\001 +4 1 0 50 -1 14 12 0.0000 4 120 120 9000 3075 0\001 +4 1 0 50 -1 14 12 0.0000 4 120 120 9000 975 1\001 +4 1 0 50 -1 14 12 0.0000 4 120 120 9000 1875 2\001 +4 1 0 50 -1 14 12 0.0000 4 120 120 9000 3975 3\001 diff --git a/kite/doc/images/ConflictSolveByPlaceds-1.png b/kite/doc/images/ConflictSolveByPlaceds-1.png new file mode 100644 index 00000000..f0d7d2c6 Binary files /dev/null and b/kite/doc/images/ConflictSolveByPlaceds-1.png differ diff --git a/kite/doc/images/DataNegociate-1.fig b/kite/doc/images/DataNegociate-1.fig new file mode 100644 index 00000000..73791a82 --- /dev/null +++ b/kite/doc/images/DataNegociate-1.fig @@ -0,0 +1,145 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 2475 975 2925 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 2550 1200 2850 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 2700 1050 2700 1200 +-6 +6 3225 1125 3675 1425 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 3300 1200 3600 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 3450 1350 3450 1200 +-6 +6 4125 975 4575 1275 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 4200 1200 4500 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 4350 1050 4350 1200 +-6 +6 5175 975 5475 1425 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 5400 1350 5400 1050 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5250 1200 5400 1200 +-6 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 3 + 1800 1200 1650 1200 1650 1350 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 2700 1200 2700 300 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 3450 1200 3450 1800 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 4350 1200 4350 600 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 5400 1200 5400 1800 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 5400 1200 5400 0 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 + 1650 1950 1650 2250 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 + 1500 2100 1650 2100 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1650 2100 1650 2850 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 1725 2850 6300 2850 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 4425 600 6300 600 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 2775 300 6300 300 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 5475 0 6300 0 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1650 1200 1650 2100 +2 1 3 1 4 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 1725 2100 6300 2100 +2 1 0 2 0 7 70 -1 -1 6.000 0 0 -1 0 0 2 + 1650 1200 2700 1200 +2 1 0 2 0 7 70 -1 -1 6.000 0 0 -1 0 0 2 + 3450 1200 5400 1200 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 0 6300 0 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 300 6300 300 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 600 6300 600 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 1800 6300 1800 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 2850 6300 2850 +2 1 0 2 4 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 2100 6300 2100 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 1650 2700 1650 2850 1500 2850 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 2550 300 2700 300 2700 450 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 4200 600 4350 600 4350 750 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 5250 0 5400 0 5400 150 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 3450 1650 3450 1800 3300 1800 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 5400 1650 5400 1800 5550 1800 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 240.00 + 1200 3150 1200 -600 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 2850 1275 2850 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 2100 1275 2100 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 1200 1275 1200 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 300 1275 300 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 0 1275 0 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 600 1275 600 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 1800 1275 1800 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 5475 1200 6300 1200 +2 1 0 2 0 7 69 -1 -1 6.000 0 0 -1 0 0 2 + 6000 1200 6300 1200 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 3525 1800 6300 1800 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 6900 -450 7200 -450 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 6900 150 7200 150 +2 2 1 0 32 32 100 -1 20 2.000 0 0 -1 0 0 5 + 600 -900 8850 -900 8850 3750 600 3750 600 -900 +2 2 0 2 0 0 50 -1 10 0.000 0 0 -1 0 0 5 + 6900 -225 7200 -225 7200 -150 6900 -150 6900 -225 +2 2 0 2 0 7 50 -1 10 0.000 0 0 -1 0 0 5 + 2700 1200 3450 1200 3450 1275 2700 1275 2700 1200 +4 1 0 60 -1 14 10 0.0000 4 105 210 6150 2775 -1\001 +4 1 0 60 -1 14 10 0.0000 4 105 210 6150 1725 -2\001 +4 1 0 60 -1 14 10 0.0000 4 105 210 6150 525 +1\001 +4 1 0 60 -1 14 10 0.0000 4 105 210 6150 -75 +1\001 +4 1 0 60 -1 14 10 0.0000 4 105 210 6150 225 +1\001 +4 1 4 60 -1 14 10 0.0000 4 105 105 6150 2025 0\001 +4 2 0 60 -1 14 12 0.0000 4 135 120 1050 -450 y\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 0 29\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 300 27\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 600 25\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 1200 21\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 2100 15\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 2850 10\001 +4 1 0 60 -1 14 12 0.0000 4 150 3360 3750 3450 _attractors=[10,17,25,27,29]\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 1800 17\001 +4 1 0 60 -1 14 10 0.0000 4 135 315 6150 1125 N/A\001 +4 1 0 60 -1 14 12 0.0000 4 165 480 6150 -450 spin\001 +4 0 0 60 -1 14 10 0.0000 4 135 840 7275 -450 aligneds\001 +4 0 0 60 -1 14 10 0.0000 4 105 945 7275 -150 canonical\001 +4 0 0 60 -1 14 10 0.0000 4 135 1470 7275 150 perpandiculars\001 diff --git a/kite/doc/images/DataNegociate-1.png b/kite/doc/images/DataNegociate-1.png new file mode 100644 index 00000000..867aa1aa Binary files /dev/null and b/kite/doc/images/DataNegociate-1.png differ diff --git a/kite/doc/images/DataNegociate-2.fig b/kite/doc/images/DataNegociate-2.fig new file mode 100644 index 00000000..5ef62a1a --- /dev/null +++ b/kite/doc/images/DataNegociate-2.fig @@ -0,0 +1,164 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 2475 975 2925 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 2550 1200 2850 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 2700 1050 2700 1200 +-6 +6 3225 1125 3675 1425 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 3300 1200 3600 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 3450 1350 3450 1200 +-6 +6 4125 975 4575 1275 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 4200 1200 4500 1200 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 4350 1050 4350 1200 +-6 +6 5175 975 5475 1425 +2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 + 5400 1350 5400 1050 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5250 1200 5400 1200 +-6 +6 6150 3000 7650 3300 +3 0 0 1 0 7 50 -1 -1 4.000 0 0 0 4 + 6150 3000 6150 3150 6900 3150 6900 3300 + 0.000 1.000 1.000 0.000 +3 0 0 1 0 7 50 -1 -1 4.000 0 0 0 4 + 7650 3000 7650 3150 6900 3150 6900 3300 + 0.000 1.000 1.000 0.000 +-6 +6 4725 3375 8700 3675 +6 6000 3375 8700 3675 +4 0 0 50 -1 32 14 0.0000 4 195 225 6225 3600 S(\001 +4 0 0 50 -1 12 14 0.0000 4 45 150 6000 3600 =\001 +4 0 0 50 -1 12 12 0.0000 4 150 2160 6450 3600 |axis - attractor|\001 +4 0 0 50 -1 32 14 0.0000 4 195 75 8625 3600 )\001 +-6 +4 1 0 50 -1 14 10 0.0000 4 135 1155 5325 3600 wiringDelta\001 +-6 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 3 + 1800 1200 1650 1200 1650 1350 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 2700 1200 2700 300 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 3450 1200 3450 1800 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 4350 1200 4350 600 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 5400 1200 5400 1800 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 5400 1200 5400 0 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 + 1650 1950 1650 2250 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 + 1500 2100 1650 2100 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1650 2100 1650 2850 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1650 1200 1650 2100 +2 1 0 2 0 7 70 -1 -1 6.000 0 0 -1 0 0 2 + 1650 1200 2700 1200 +2 1 0 2 0 7 70 -1 -1 6.000 0 0 -1 0 0 2 + 3450 1200 5400 1200 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 1650 2700 1650 2850 1500 2850 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 2550 300 2700 300 2700 450 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 4200 600 4350 600 4350 750 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 5250 0 5400 0 5400 150 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 3450 1650 3450 1800 3300 1800 +2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 3 + 5400 1650 5400 1800 5550 1800 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 1 0 2 + 0 0 2.00 120.00 240.00 + 1200 3150 1200 -600 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 2850 1275 2850 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 2100 1275 2100 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 1200 1275 1200 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 300 1275 300 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 0 1275 0 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 600 1275 600 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 1125 1800 1275 1800 +2 2 0 2 0 7 50 -1 10 0.000 0 0 -1 0 0 5 + 2700 1200 3450 1200 3450 1275 2700 1275 2700 1200 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 1725 2850 6525 2850 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 3525 1800 6525 1800 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 5475 1200 6675 1200 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 4425 600 6825 600 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 2775 300 6975 300 +2 1 3 1 0 7 70 -1 -1 4.000 0 0 7 0 0 2 + 5475 0 7125 0 +2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 6300 2250 7350 2250 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6450 2250 6450 1800 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6450 2250 6450 2850 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6600 2250 6600 1200 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6750 2250 6750 600 +2 1 0 2 4 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 7950 150 8250 150 +2 2 0 2 0 7 50 -1 10 0.000 0 0 -1 0 0 5 + 7950 -225 8250 -225 8250 -150 7950 -150 7950 -225 +2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 + 7950 -450 8250 -450 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6900 300 6900 2250 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 7050 0 7050 2250 +2 2 1 0 32 32 100 -1 20 2.000 0 0 -1 0 0 5 + 600 -900 10050 -900 10050 3900 600 3900 600 -900 +4 2 0 60 -1 14 12 0.0000 4 135 120 1050 -450 y\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 0 29\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 300 27\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 600 25\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 1200 21\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 2100 15\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 2850 10\001 +4 2 0 60 -1 14 10 0.0000 4 105 210 1050 1800 17\001 +4 0 0 60 -1 14 10 0.0000 4 135 1470 8400 150 perpandiculars\001 +4 0 0 60 -1 14 10 0.0000 4 105 945 8400 -150 canonical\001 +4 0 0 60 -1 14 10 0.0000 4 135 840 8400 -450 aligneds\001 +4 0 0 50 -1 14 10 0.0000 4 105 420 7500 2250 axis\001 diff --git a/kite/doc/images/DataNegociate-2.png b/kite/doc/images/DataNegociate-2.png new file mode 100644 index 00000000..142e5cbd Binary files /dev/null and b/kite/doc/images/DataNegociate-2.png differ diff --git a/kite/doc/images/ManipulatorRelax-1.fig b/kite/doc/images/ManipulatorRelax-1.fig new file mode 100644 index 00000000..9bcb65c1 --- /dev/null +++ b/kite/doc/images/ManipulatorRelax-1.fig @@ -0,0 +1,158 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1200 1200 2625 1500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 1200 2100 1200 2100 1500 1200 1500 1200 1200 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 1425 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 1425 d:7\001 +-6 +6 1200 6900 2625 7200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 6900 2100 6900 2100 7200 1200 7200 1200 6900 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 7125 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 7125 d:7\001 +-6 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 2700 75 75 5025 2700 5175 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 8100 2700 75 75 8025 2700 8175 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 6000 75 75 5025 6000 5175 6000 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 8100 6000 75 75 8025 6000 8175 6000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 1200 3000 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 1200 4800 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 1200 6600 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 1200 8400 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 1200 10200 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 1200 12000 3000 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 900 7200 900 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 1200 3900 1200 3900 1500 3000 1500 3000 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 1200 5700 1200 5700 1500 4800 1500 4800 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 1200 7500 1200 7500 1500 6600 1500 6600 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 1200 9300 1200 9300 1500 8400 1500 8400 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 1200 11100 1200 11100 1500 10200 1500 10200 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 1200 12900 1200 12900 1500 12000 1500 12000 1200 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 2400 12600 2400 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 1200 13800 1200 13800 3000 1200 3000 1200 1200 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 825 5400 2700 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 7200 825 7200 2700 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 5100 2700 5100 3600 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 8100 2700 8100 3600 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 2400 7200 2400 7425 3000 7425 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 1650 7275 1650 7725 3000 7725 +2 2 0 0 1 1 110 -1 30 2.000 0 0 -1 0 0 5 + 5100 4125 5400 4125 5400 6000 5100 6000 5100 4125 +2 2 0 0 1 1 110 -1 30 2.000 0 0 -1 0 0 5 + 7200 4125 7500 4125 7500 6000 7200 6000 7200 4125 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 4500 3000 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 4500 4800 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 4500 6600 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 4500 8400 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 4500 10200 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 4500 12000 6300 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 4200 7200 4200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 4500 2100 4500 2100 4800 1200 4800 1200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 4500 3900 4500 3900 4800 3000 4800 3000 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 4500 5700 4500 5700 4800 4800 4800 4800 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 4500 7500 4500 7500 4800 6600 4800 6600 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 4500 9300 4500 9300 4800 8400 4800 8400 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 4500 11100 4500 11100 4800 10200 4800 10200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 4500 12900 4500 12900 4800 12000 4800 12000 4500 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 5700 5100 5700 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 4500 13800 4500 13800 6300 1200 6300 1200 4500 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 4125 5400 6000 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 7200 4125 7200 6000 +2 1 0 4 19 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5100 5700 5100 5100 7500 5100 7500 5700 12600 5700 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 4875 5700 5100 5700 5100 5475 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 5100 5325 5100 5100 5250 5100 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 7275 5100 7500 5100 7500 5250 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 7500 5475 7500 5700 7725 5700 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 600 300 14400 300 14400 8100 600 8100 600 300 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 1425 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 1425 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 1425 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 1425 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 1425 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 1425 id:16\001 +4 0 0 50 -1 12 14 0.0000 4 150 1800 8250 3600 imaxconflict\001 +4 2 0 50 -1 12 14 0.0000 4 150 1800 5025 3600 iminconflict\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 6300 750 interval\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 1425 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 1425 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 1425 d:7\001 +4 0 0 50 -1 14 14 0.0000 4 195 1950 3075 7500 GCell density\001 +4 0 0 50 -1 14 14 0.0000 4 150 1200 3075 7800 GCell id\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 4725 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 4725 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 4725 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 4725 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 4725 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 4725 id:16\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 4725 id:10\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 6300 4050 interval\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 4725 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 4725 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 4725 d:7\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 4800 5250 (b)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 6300 5325 (c)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 7800 5250 (d)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 12375 5550 (e)\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 5550 (a)\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 2250 (a)\001 diff --git a/kite/doc/images/ManipulatorRelax-1.png b/kite/doc/images/ManipulatorRelax-1.png new file mode 100644 index 00000000..852202e4 Binary files /dev/null and b/kite/doc/images/ManipulatorRelax-1.png differ diff --git a/kite/doc/images/ManipulatorRelax-2.fig b/kite/doc/images/ManipulatorRelax-2.fig new file mode 100644 index 00000000..773b4196 --- /dev/null +++ b/kite/doc/images/ManipulatorRelax-2.fig @@ -0,0 +1,163 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1200 1200 2625 1500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 1200 2100 1200 2100 1500 1200 1500 1200 1200 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 1425 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 1425 d:7\001 +-6 +6 1200 6900 2625 7200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 6900 2100 6900 2100 7200 1200 7200 1200 6900 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 7125 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 7125 d:7\001 +-6 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 6000 75 75 5025 6000 5175 6000 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 2700 75 75 5025 2700 5175 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 8100 2700 75 75 8025 2700 8175 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 10500 2700 75 75 10425 2700 10575 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 10500 6000 75 75 10425 6000 10575 6000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 4500 3000 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 4500 4800 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 4500 6600 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 4500 8400 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 4500 10200 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 4500 12000 6300 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 4200 7200 4200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 4500 2100 4500 2100 4800 1200 4800 1200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 4500 3900 4500 3900 4800 3000 4800 3000 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 4500 5700 4500 5700 4800 4800 4800 4800 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 4500 7500 4500 7500 4800 6600 4800 6600 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 4500 9300 4500 9300 4800 8400 4800 8400 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 4500 11100 4500 11100 4800 10200 4800 10200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 4500 12900 4500 12900 4800 12000 4800 12000 4500 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 5700 5100 5700 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 4500 13800 4500 13800 6300 1200 6300 1200 4500 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 4125 5400 6000 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 7200 4125 7200 6000 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 4875 5700 5100 5700 5100 5475 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 5100 5325 5100 5100 5250 5100 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 1200 3000 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 1200 4800 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 1200 6600 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 1200 8400 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 1200 10200 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 1200 12000 3000 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 900 7200 900 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 1200 3900 1200 3900 1500 3000 1500 3000 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 1200 5700 1200 5700 1500 4800 1500 4800 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 1200 7500 1200 7500 1500 6600 1500 6600 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 1200 9300 1200 9300 1500 8400 1500 8400 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 1200 11100 1200 11100 1500 10200 1500 10200 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 1200 12900 1200 12900 1500 12000 1500 12000 1200 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 2400 12600 2400 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 1200 13800 1200 13800 3000 1200 3000 1200 1200 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 825 5400 2700 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 7200 825 7200 2700 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 5100 2700 5100 3600 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 10500 2700 10500 3600 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 2400 7200 2400 7425 2925 7425 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 1650 7200 1650 7725 2925 7725 +2 2 0 0 1 1 110 -1 36 2.000 0 0 -1 0 0 5 + 5100 4125 5400 4125 5400 6000 5100 6000 5100 4125 +2 2 0 0 1 1 110 -1 36 2.000 0 0 -1 0 0 5 + 7200 4125 7500 4125 7500 6000 7200 6000 7200 4125 +2 1 0 4 19 7 50 -1 -1 10.000 0 0 -1 0 0 5 + 5100 5700 5100 5100 11100 5100 11100 5700 12600 5700 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 10875 5100 11100 5100 11100 5250 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 11100 5475 11100 5700 11325 5700 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 600 300 14400 300 14400 8100 600 8100 600 300 +3 0 0 1 0 7 50 -1 -1 4.000 0 1 0 4 + 0 0 1.00 120.00 240.00 + 8100 2700 8700 2400 9900 3000 10500 2700 + 0.000 1.000 1.000 0.000 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 4725 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 4725 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 4725 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 4725 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 4725 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 4725 id:16\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 4725 id:10\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 6300 4050 interval\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 4725 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 4725 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 4725 d:7\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 1425 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 1425 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 1425 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 1425 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 1425 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 1425 id:16\001 +4 2 0 50 -1 12 14 0.0000 4 150 1800 5025 3600 iminconflict\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 6300 750 interval\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 1425 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 1425 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 1800 10575 3600 imaxconflict\001 +4 0 0 50 -1 14 14 0.0000 4 195 1950 3000 7500 GCell density\001 +4 0 0 50 -1 14 14 0.0000 4 150 1200 3000 7800 GCell id\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 12450 5550 (e)\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 5550 (a)\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 2250 (a)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 4800 5250 (b)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 6000 5325 (c)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 11400 5250 (d)\001 diff --git a/kite/doc/images/ManipulatorRelax-2.png b/kite/doc/images/ManipulatorRelax-2.png new file mode 100644 index 00000000..16c7bdf6 Binary files /dev/null and b/kite/doc/images/ManipulatorRelax-2.png differ diff --git a/kite/doc/images/ManipulatorRelax-3.fig b/kite/doc/images/ManipulatorRelax-3.fig new file mode 100644 index 00000000..759f7b33 --- /dev/null +++ b/kite/doc/images/ManipulatorRelax-3.fig @@ -0,0 +1,152 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1200 1200 2625 1500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 1200 2100 1200 2100 1500 1200 1500 1200 1200 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 1425 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 1425 d:7\001 +-6 +6 1200 6900 2625 7200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 6900 2100 6900 2100 7200 1200 7200 1200 6900 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 7125 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 7125 d:7\001 +-6 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 6000 75 75 5025 6000 5175 6000 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 5100 2700 75 75 5025 2700 5175 2700 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 4500 3000 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 4500 4800 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 4500 6600 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 4500 8400 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 4500 10200 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 4500 12000 6300 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 4200 13500 4200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 4500 2100 4500 2100 4800 1200 4800 1200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 4500 3900 4500 3900 4800 3000 4800 3000 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 4500 5700 4500 5700 4800 4800 4800 4800 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 4500 7500 4500 7500 4800 6600 4800 6600 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 4500 9300 4500 9300 4800 8400 4800 8400 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 4500 11100 4500 11100 4800 10200 4800 10200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 4500 12900 4500 12900 4800 12000 4800 12000 4500 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 5700 5100 5700 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 4500 13800 4500 13800 6300 1200 6300 1200 4500 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 4125 5400 6000 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 4875 5700 5100 5700 5100 5475 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 5100 5325 5100 5100 5250 5100 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 1200 3000 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 1200 4800 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 1200 6600 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 1200 8400 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 1200 10200 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 1200 12000 3000 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 5400 900 13500 900 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 1200 3900 1200 3900 1500 3000 1500 3000 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 1200 5700 1200 5700 1500 4800 1500 4800 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 1200 7500 1200 7500 1500 6600 1500 6600 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 1200 9300 1200 9300 1500 8400 1500 8400 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 1200 11100 1200 11100 1500 10200 1500 10200 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 1200 12900 1200 12900 1500 12000 1500 12000 1200 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 2400 11400 2400 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 1200 13800 1200 13800 3000 1200 3000 1200 1200 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 5400 825 5400 2700 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 5100 2700 5100 3600 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 10500 3300 10500 3600 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 2400 7200 2400 7425 2925 7425 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 1650 7200 1650 7725 2925 7725 +2 2 0 0 1 1 110 -1 36 2.000 0 0 -1 0 0 5 + 5100 4125 5400 4125 5400 6000 5100 6000 5100 4125 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 13500 825 13500 2700 +2 1 0 1 0 1 50 -1 36 0.000 0 0 -1 0 0 2 + 10500 3525 12375 3525 +2 1 0 4 19 7 50 -1 -1 10.000 0 0 -1 0 0 3 + 5100 5700 5100 5100 12600 5100 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 13500 4125 13500 6000 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 600 300 14400 300 14400 8100 600 8100 600 300 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 4725 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 4725 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 4725 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 4725 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 4725 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 4725 id:16\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 4725 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 4725 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 4725 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 4725 d:7\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 1425 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 1425 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 1425 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 1425 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 1425 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 1425 id:16\001 +4 2 0 50 -1 12 14 0.0000 4 150 1800 5025 3600 iminconflict\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 1425 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 1425 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 1800 10575 3600 imaxconflict\001 +4 0 0 50 -1 14 14 0.0000 4 195 1950 3000 7500 GCell density\001 +4 0 0 50 -1 14 14 0.0000 4 150 1200 3000 7800 GCell id\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 5550 (a)\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 2250 (a)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 4800 5250 (b)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 6000 5325 (c)\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 9600 825 interval\001 +4 0 0 50 -1 14 14 0.0000 4 195 6600 5700 7200 The only dogleg is the min, the axis must be\001 +4 0 0 50 -1 14 14 0.0000 4 195 7050 5700 7500 pushed to the left to stay clear of .\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 9600 4125 interval\001 diff --git a/kite/doc/images/ManipulatorRelax-3.png b/kite/doc/images/ManipulatorRelax-3.png new file mode 100644 index 00000000..5914e169 Binary files /dev/null and b/kite/doc/images/ManipulatorRelax-3.png differ diff --git a/kite/doc/images/ManipulatorRelax-4.fig b/kite/doc/images/ManipulatorRelax-4.fig new file mode 100644 index 00000000..3a6b3db7 --- /dev/null +++ b/kite/doc/images/ManipulatorRelax-4.fig @@ -0,0 +1,152 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1200 1200 2625 1500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 1200 2100 1200 2100 1500 1200 1500 1200 1200 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 1425 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 1425 d:7\001 +-6 +6 1200 6900 2625 7200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 6900 2100 6900 2100 7200 1200 7200 1200 6900 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 7125 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 7125 d:7\001 +-6 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 8700 2700 75 75 8625 2700 8775 2700 +1 4 0 0 0 7 50 -1 0 2.000 1 0.0000 8700 6000 75 75 8625 6000 8775 6000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 4500 3000 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 4500 4800 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 4500 6600 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 4500 8400 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 4500 10200 6300 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 4500 12000 6300 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 1200 4500 2100 4500 2100 4800 1200 4800 1200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 4500 3900 4500 3900 4800 3000 4800 3000 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 4500 5700 4500 5700 4800 4800 4800 4800 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 4500 7500 4500 7500 4800 6600 4800 6600 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 4500 9300 4500 9300 4800 8400 4800 8400 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 4500 11100 4500 11100 4800 10200 4800 10200 4500 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 4500 12900 4500 12900 4800 12000 4800 12000 4500 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 4500 13800 4500 13800 6300 1200 6300 1200 4500 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 3000 1200 3000 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 4800 1200 4800 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 6600 1200 6600 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 8400 1200 8400 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 10200 1200 10200 3000 +2 1 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 2 + 12000 1200 12000 3000 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 3000 1200 3900 1200 3900 1500 3000 1500 3000 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 4800 1200 5700 1200 5700 1500 4800 1500 4800 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 6600 1200 7500 1200 7500 1500 6600 1500 6600 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 8400 1200 9300 1200 9300 1500 8400 1500 8400 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 10200 1200 11100 1200 11100 1500 10200 1500 10200 1200 +2 2 0 1 0 7 100 -1 0 4.000 0 0 -1 0 0 5 + 12000 1200 12900 1200 12900 1500 12000 1500 12000 1200 +2 2 1 1 0 7 70 -1 -1 4.000 0 0 -1 0 0 5 + 1200 1200 13800 1200 13800 3000 1200 3000 1200 1200 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 5100 2700 5100 3600 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 2400 7200 2400 7425 2925 7425 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 3 + 1650 7200 1650 7725 2925 7725 +2 1 0 4 19 7 50 -1 -1 10.000 0 0 -1 0 0 3 + 9900 5700 9900 5100 12600 5100 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 3300 2400 12900 2400 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 1500 825 1500 2700 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1500 900 9600 900 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 9600 825 9600 2700 +2 1 0 2 0 7 80 -1 0 6.000 0 0 -1 0 0 2 + 8700 2700 8700 3600 +2 1 0 1 0 1 50 -1 36 0.000 0 0 -1 0 0 2 + 3300 3525 5175 3525 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 1500 4125 1500 6000 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1500 4200 9600 4200 +2 1 0 1 1 7 80 -1 0 4.000 0 0 -1 0 0 2 + 9600 4125 9600 6000 +2 2 0 0 1 1 110 -1 36 2.000 0 0 -1 0 0 5 + 9600 4125 9900 4125 9900 6000 9600 6000 9600 4125 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 9900 5325 9900 5100 10050 5100 +2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 1800 5700 9900 5700 +2 1 0 8 19 7 40 -1 -1 18.000 0 0 -1 0 0 3 + 9675 5700 9900 5700 9900 5475 +2 2 0 0 0 32 200 -1 20 0.000 0 0 -1 0 0 5 + 600 300 14400 300 14400 8100 600 8100 600 300 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 4725 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 4725 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 4725 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 4725 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 4725 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 4725 id:16\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 1275 4725 id:10\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 4725 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 2175 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 4725 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 4725 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 4725 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 4725 d:7\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 3075 1425 id:11\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 4875 1425 id:12\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 6675 1425 id:13\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 8475 1425 id:14\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 10275 1425 id:15\001 +4 0 7 50 -1 14 14 0.0000 4 150 750 12075 1425 id:16\001 +4 2 0 50 -1 12 14 0.0000 4 150 1800 5025 3600 iminconflict\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 5775 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 3975 1425 d:6\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 11175 1425 d:3\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 12975 1425 d:7\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 7575 1425 d:5\001 +4 0 0 50 -1 12 14 0.0000 4 150 450 9375 1425 d:7\001 +4 0 0 50 -1 14 14 0.0000 4 195 1950 3000 7500 GCell density\001 +4 0 0 50 -1 14 14 0.0000 4 150 1200 3000 7800 GCell id\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 1950 5550 (a)\001 +4 0 0 50 -1 14 14 0.0000 4 195 6600 5700 7200 The only dogleg is the max, the axis must be\001 +4 0 0 50 -1 14 14 0.0000 4 195 7200 5700 7500 pushed to the right to stay clear of .\001 +4 1 4 50 -1 14 14 0.0000 4 195 450 3525 2250 (a)\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 5100 825 interval\001 +4 0 0 50 -1 12 14 0.0000 4 150 1800 8775 3600 imaxconflict\001 +4 1 1 50 -1 12 14 0.0000 4 150 1200 5100 4125 interval\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 12450 5325 (c)\001 +4 1 19 50 -1 14 14 0.0000 4 195 450 9675 5250 (b)\001 diff --git a/kite/doc/images/ManipulatorRelax-4.png b/kite/doc/images/ManipulatorRelax-4.png new file mode 100644 index 00000000..9b7f1649 Binary files /dev/null and b/kite/doc/images/ManipulatorRelax-4.png differ diff --git a/kite/doc/images/RoutingEvent-1.fig b/kite/doc/images/RoutingEvent-1.fig deleted file mode 100644 index 4ea3e9df..00000000 --- a/kite/doc/images/RoutingEvent-1.fig +++ /dev/null @@ -1,66 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -6 900 0 2700 4800 -2 2 0 0 4 7 60 -1 45 0.000 0 0 7 0 0 5 - 1650 0 1950 0 1950 1800 1650 1800 1650 0 -2 2 0 0 4 7 60 -1 45 0.000 0 0 7 0 0 5 - 1650 3000 1950 3000 1950 4800 1650 4800 1650 3000 -2 2 0 0 7 4 60 -1 38 2.000 0 0 -1 0 0 5 - 1650 1800 1950 1800 1950 3000 1650 3000 1650 1800 -4 1 4 50 -1 14 12 0.0000 4 180 1785 1800 1725 right axis weight\001 -4 1 4 50 -1 14 12 0.0000 4 180 1680 1800 3225 left axis weight\001 --6 -6 375 0 675 4800 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 600 4800 600 3000 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 600 0 600 1800 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 600 1800 600 3000 -4 1 4 50 -1 14 12 1.5708 4 180 1470 525 4050 _perpandicular\001 --6 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 2400 6900 2400 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 900 6900 900 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 3300 6900 3300 -2 2 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 5 - 3000 900 6900 900 6900 3300 3000 3300 3000 900 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7050 3300 8400 3300 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7050 900 8400 900 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7050 1500 7800 1500 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7125 2700 7800 2700 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 - 3 1 1.00 60.00 120.00 - 3 1 1.00 60.00 120.00 - 7725 1500 7725 2700 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 - 3 1 1.00 60.00 120.00 - 3 1 1.00 60.00 120.00 - 8325 900 8325 3300 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 6900 3000 300 3000 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 6900 1800 300 1800 -2 2 0 0 0 7 55 -1 10 0.000 0 0 -1 0 0 5 - 3000 1500 6900 1500 6900 2700 3000 2700 3000 1500 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 2925 2325 3075 2325 3075 2475 2925 2475 2925 2325 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 6825 2325 6975 2325 6975 2475 6825 2475 6825 2325 -4 1 0 50 -1 14 12 1.5708 4 180 840 7950 2100 _optimal\001 -4 1 0 50 -1 14 12 1.5708 4 165 1155 8550 2100 _constraint\001 diff --git a/kite/doc/images/RoutingEvent-10.fig b/kite/doc/images/RoutingEvent-10.fig deleted file mode 100644 index 43f1abbf..00000000 --- a/kite/doc/images/RoutingEvent-10.fig +++ /dev/null @@ -1,46 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 3600 6600 3600 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 900 3600 2400 3600 2400 6300 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 6300 3600 4800 3600 4800 900 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 4 - 2700 900 2700 3600 4500 3600 4500 6300 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3300 1200 3300 1200 3600 900 3600 900 3300 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3300 6300 3300 6300 3600 6000 3600 6000 3300 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 2700 900 3000 900 3000 1200 2700 1200 2700 900 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 525 0 525 0 0 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 3150 0 3150 525 525 525 525 0 -2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2700 600 2700 6600 -2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 4500 600 4500 6600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 4800 600 4800 6600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2400 600 2400 6600 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 0 0 7200 0 7200 7200 0 7200 0 0 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 2400 3600 2400 3600 4800 1200 4800 1200 2400 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 2400 6000 2400 6000 4800 3600 4800 3600 2400 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 3525 a\001 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 3525 b\001 -4 1 4 50 -1 14 18 0.0000 4 135 165 2850 1125 c\001 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 1\001 -4 0 0 50 -1 14 24 0.0000 4 240 2250 675 375 Free Track\001 diff --git a/kite/doc/images/RoutingEvent-11.fig b/kite/doc/images/RoutingEvent-11.fig deleted file mode 100644 index 53a94c8e..00000000 --- a/kite/doc/images/RoutingEvent-11.fig +++ /dev/null @@ -1,124 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -60.00 -Single --2 -1200 2 -6 8925 825 9375 1275 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 9000 900 9300 900 9300 1200 9000 1200 9000 900 -4 1 4 50 -1 14 18 0.0000 4 135 165 9150 1125 c\001 --6 -6 825 3525 1275 3975 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3600 1200 3600 1200 3900 900 3900 900 3600 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 3825 a\001 --6 -6 5925 3525 6375 3975 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3600 6300 3600 6300 3900 6000 3900 6000 3600 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 3825 b\001 --6 -6 8025 3525 8475 3975 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 8100 3600 8400 3600 8400 3900 8100 3900 8100 3600 -4 1 0 50 -1 14 18 0.0000 4 135 165 8250 3825 a\001 --6 -6 13125 3525 13575 3975 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 13200 3600 13500 3600 13500 3900 13200 3900 13200 3600 -4 1 0 50 -1 14 18 0.0000 4 180 165 13350 3825 b\001 --6 -6 1725 825 2175 1275 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1800 900 2100 900 2100 1200 1800 1200 1800 900 -4 1 4 50 -1 14 18 0.0000 4 135 165 1950 1125 c\001 --6 -6 4425 2475 5175 2925 -1 4 0 2 0 7 45 -1 20 0.000 1 0.0000 4800 2700 75 75 4725 2700 4875 2700 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 4500 2550 5100 2850 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 5100 2550 4500 2850 --6 -1 4 0 2 0 7 45 -1 20 0.000 1 0.0000 2400 4800 75 75 2325 4800 2475 4800 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 3600 13800 3600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 3600 6600 3600 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 900 3600 2400 3600 2400 6300 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 2400 4800 1500 4800 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12600 600 12600 6600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12300 600 12300 6600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9300 6600 9300 600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5100 600 5100 6600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 2100 600 2100 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 4800 600 4800 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 2400 600 2400 6600 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 525 0 525 0 0 -2 1 0 4 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 12000 2775 12000 900 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9600 600 9600 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12000 600 12000 6600 -2 2 0 2 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 14400 0 14400 7800 0 7800 0 0 -2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 3525 0 3525 525 525 525 525 0 -2 1 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 3 - 12525 3600 12525 2775 12000 2775 -2 1 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 2 - 9525 3600 9525 6300 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 8100 3600 9525 3600 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 12525 3600 13500 3600 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 9300 900 9300 3675 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 5100 3675 5100 6300 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 12300 3675 12300 6300 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 2100 900 2100 3675 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 2100 3675 5100 3675 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9300 3675 12300 3675 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 6300 3600 4800 3600 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4800 3600 4800 900 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4725 900 4725 3600 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 8400 2400 10800 2400 10800 4800 8400 4800 8400 2400 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 10800 2400 13200 2400 13200 4800 10800 4800 10800 2400 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 2400 3600 2400 3600 4800 1200 4800 1200 2400 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 2400 6000 2400 6000 4800 3600 4800 3600 2400 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 11925 900 11925 2775 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 7800 2700 13800 2700 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 2\001 -4 0 0 45 -1 14 24 0.0000 4 315 2700 675 375 Soft Overlap\001 -4 0 0 50 -1 14 20 0.0000 4 255 5775 8400 6900 (a/vertical) is pushed to the left.\001 -4 0 0 50 -1 14 20 0.0000 4 240 3795 8400 7200 (b/vertical) is broken.\001 diff --git a/kite/doc/images/RoutingEvent-12.fig b/kite/doc/images/RoutingEvent-12.fig deleted file mode 100644 index d228bc30..00000000 --- a/kite/doc/images/RoutingEvent-12.fig +++ /dev/null @@ -1,127 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -60.00 -Single --2 -1200 2 -6 5925 3225 6375 3675 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3300 6300 3300 6300 3600 6000 3600 6000 3300 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 3525 b\001 --6 -6 13125 3600 13575 4050 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 13200 3675 13500 3675 13500 3975 13200 3975 13200 3675 -4 1 0 50 -1 14 18 0.0000 4 180 165 13350 3900 b\001 --6 -6 1725 825 2175 1275 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1800 900 2100 900 2100 1200 1800 1200 1800 900 -4 1 4 50 -1 14 18 0.0000 4 135 165 1950 1125 c\001 --6 -6 8925 825 9375 1275 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 9000 900 9300 900 9300 1200 9000 1200 9000 900 -4 1 4 50 -1 14 18 0.0000 4 135 165 9150 1125 c\001 --6 -6 825 3150 1275 3600 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3225 1200 3225 1200 3525 900 3525 900 3225 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 3450 a\001 --6 -6 1425 3225 1875 3975 -1 4 0 2 0 7 45 -1 20 0.000 1 0.0000 1650 3600 75 75 1575 3600 1725 3600 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 1500 3300 1800 3900 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 1500 3900 1800 3300 --6 -6 8025 3150 8475 3600 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 8100 3225 8400 3225 8400 3525 8100 3525 8100 3225 -4 1 0 50 -1 14 18 0.0000 4 135 165 8250 3450 a\001 --6 -1 4 0 2 0 7 45 -1 20 0.000 1 0.0000 5400 3600 75 75 5325 3600 5475 3600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 3600 13800 3600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 3600 6600 3600 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 6300 3600 4800 3600 4800 900 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12300 600 12300 6600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9300 6600 9300 600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5100 600 5100 6600 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 2100 600 2100 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 4800 600 4800 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 2400 600 2400 6600 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 525 0 525 0 0 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 5400 3300 5400 4200 -2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 5400 3900 5400 3000 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9600 600 9600 6600 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9000 600 9000 6600 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 4500 13500 4500 -2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 3525 0 3525 525 525 525 525 0 -2 2 0 2 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 14400 0 14400 7500 0 7500 0 0 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 12000 3675 12000 900 -2 1 1 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 12000 3675 13500 3675 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 8925 3600 8100 3600 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 2100 900 2100 3675 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9300 900 9300 3750 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 5100 3675 5100 6300 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 12300 3750 12300 6300 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 2100 3675 5100 3675 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9300 3750 12300 3750 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9600 4575 9600 6300 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 900 3525 2400 3525 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 900 3600 2400 3600 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 2400 3600 2400 6300 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12000 600 12000 6600 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 8100 3525 8925 3525 -2 1 1 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 3 - 8925 3600 8925 4575 9600 4575 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 2100 3600 2100 3600 4800 1200 4800 1200 2100 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 2100 6000 2100 6000 4800 3600 4800 3600 2100 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 8400 2100 10800 2100 10800 4800 8400 4800 8400 2100 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 10800 2100 13200 2100 13200 4800 10800 4800 10800 2100 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 3\001 -4 0 0 45 -1 14 24 0.0000 4 315 2700 675 375 Hard Overlap\001 -4 0 0 50 -1 14 20 0.0000 4 240 4125 8400 6900 (a/horizontal) is broken.\001 -4 0 0 50 -1 14 20 0.0000 4 255 4620 8400 7200 (b/horizontal) is dislodged.\001 diff --git a/kite/doc/images/RoutingEvent-13.fig b/kite/doc/images/RoutingEvent-13.fig deleted file mode 100644 index 81a5a518..00000000 --- a/kite/doc/images/RoutingEvent-13.fig +++ /dev/null @@ -1,108 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -6 825 3825 1275 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3900 1200 3900 1200 4200 900 4200 900 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 4125 a\001 --6 -6 5925 3825 6375 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3900 6300 3900 6300 4200 6000 4200 6000 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 4125 b\001 --6 -6 13125 3825 13575 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 13200 3900 13500 3900 13500 4200 13200 4200 13200 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 13350 4125 b\001 --6 -6 4125 1425 4575 1875 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 4200 1500 4500 1500 4500 1800 4200 1800 4200 1500 -4 1 4 50 -1 14 18 0.0000 4 135 165 4350 1725 c\001 --6 -6 4425 3900 4875 4650 -1 4 0 2 4 7 45 -1 20 0.000 1 0.0000 4650 4275 75 75 4575 4275 4725 4275 -2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 4500 3975 4800 4575 -2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 4500 4575 4800 3975 --6 -6 8025 3825 8475 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 8100 3900 8400 3900 8400 4200 8100 4200 8100 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 8250 4125 a\001 --6 -6 11325 1425 11775 1875 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 11400 1500 11700 1500 11700 1800 11400 1800 11400 1500 -4 1 4 50 -1 14 18 0.0000 4 135 165 11550 1725 c\001 --6 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 4200 13800 4200 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 4200 6600 4200 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 900 4200 3900 4200 3900 6900 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 6300 4200 5100 4200 5100 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 13575 4200 12300 4200 12300 1500 -2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 3525 0 3525 825 525 825 525 0 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 825 0 825 0 0 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 8100 4200 11100 4200 11100 6900 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 0 0 14400 0 14400 8100 0 8100 0 0 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 3000 3600 3000 3600 5400 1200 5400 1200 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 3000 6000 3000 6000 5400 3600 5400 3600 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 8400 3000 10800 3000 10800 5400 8400 5400 8400 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 10800 3000 13200 3000 13200 5400 10800 5400 10800 3000 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5400 1200 5400 7200 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 5400 4275 5400 6900 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5100 1200 5100 7200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 4200 1200 4200 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 3900 1200 3900 7200 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4200 1500 4200 4275 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4200 4275 5400 4275 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12600 1200 12600 7200 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 12600 5175 12600 6900 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 11400 4500 11400 1200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12000 1200 12000 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 11100 1200 11100 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12300 1200 12300 7200 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 4 - 11400 4275 11925 4275 11925 5175 12525 5175 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 11400 1500 11400 4275 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 7800 5100 13725 5100 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 4\001 -4 0 0 45 -1 14 24 0.0000 4 240 2250 675 375 Self Relax\001 -4 0 0 60 -1 12 18 0.0000 4 240 1650 675 675 Local only\001 -4 0 0 50 -1 14 20 0.0000 4 240 4125 8700 7800 (c/horizontal) is broken.\001 diff --git a/kite/doc/images/RoutingEvent-14.fig b/kite/doc/images/RoutingEvent-14.fig deleted file mode 100644 index c145c189..00000000 --- a/kite/doc/images/RoutingEvent-14.fig +++ /dev/null @@ -1,110 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -60.00 -Single --2 -1200 2 -6 825 3825 1275 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3900 1200 3900 1200 4200 900 4200 900 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 4125 a\001 --6 -6 5925 3825 6375 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3900 6300 3900 6300 4200 6000 4200 6000 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 4125 b\001 --6 -6 13125 3825 13575 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 13200 3900 13500 3900 13500 4200 13200 4200 13200 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 13350 4125 b\001 --6 -6 8025 3825 8475 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 8100 3900 8400 3900 8400 4200 8100 4200 8100 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 8250 4125 a\001 --6 -6 1725 1425 2175 1875 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1800 1500 2100 1500 2100 1800 1800 1800 1800 1500 -4 1 4 50 -1 14 18 0.0000 4 135 165 1950 1725 c\001 --6 -6 8925 1425 9375 1875 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 9000 1500 9300 1500 9300 1800 9000 1800 9000 1500 -4 1 4 50 -1 14 18 0.0000 4 135 165 9150 1725 c\001 --6 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 4200 13800 4200 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 900 4200 3900 4200 3900 6900 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 6300 4200 5100 4200 5100 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 13575 4200 12300 4200 12300 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 8100 4200 11100 4200 11100 6900 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 0 0 14400 0 14400 8100 0 8100 0 0 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 3000 3600 3000 3600 5400 1200 5400 1200 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 3000 6000 3000 6000 5400 3600 5400 3600 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 8400 3000 10800 3000 10800 5400 8400 5400 8400 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 10800 3000 13200 3000 13200 5400 10800 5400 10800 3000 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5100 1200 5100 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 11100 1200 11100 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12300 1200 12300 7200 -2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 4500 0 4500 600 525 600 525 0 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 600 0 600 0 0 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 3900 1200 3900 7200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 1800 1200 1800 7200 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 4200 6600 4200 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 1800 1500 1800 4275 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 4800 1200 4800 7200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 4200 1200 4200 7200 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 4800 4275 4800 6900 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 1800 4275 4800 4275 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4200 1500 4200 4275 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 4125 4200 4275 4200 4275 4350 4125 4350 4125 4200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 9000 7200 9000 1200 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 11400 1200 11400 7200 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 11400 1500 11400 4275 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9000 1500 9000 3975 -2 1 0 1 4 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12000 1200 12000 7200 -2 1 0 4 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 12000 4275 12000 6900 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 11400 4275 12000 4275 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9000 3975 11325 3975 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 11325 3825 11475 3825 11475 4350 11325 4350 11325 3825 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 5\001 -4 0 0 45 -1 14 24 0.0000 4 315 3600 675 375 Self Desalignate\001 -4 0 0 50 -1 14 20 0.0000 4 255 4950 8400 7800 (c/horizontal) is desalignate.\001 diff --git a/kite/doc/images/RoutingEvent-15.fig b/kite/doc/images/RoutingEvent-15.fig deleted file mode 100644 index 750401ee..00000000 --- a/kite/doc/images/RoutingEvent-15.fig +++ /dev/null @@ -1,96 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -60.00 -Single --2 -1200 2 -6 825 3825 1275 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 900 3900 1200 3900 1200 4200 900 4200 900 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 1050 4125 a\001 --6 -6 5925 3825 6375 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 6000 3900 6300 3900 6300 4200 6000 4200 6000 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 6150 4125 b\001 --6 -6 13125 3825 13575 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 13200 3900 13500 3900 13500 4200 13200 4200 13200 3900 -4 1 0 50 -1 14 18 0.0000 4 180 165 13350 4125 b\001 --6 -6 8025 3825 8475 4275 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 8100 3900 8400 3900 8400 4200 8100 4200 8100 3900 -4 1 0 50 -1 14 18 0.0000 4 135 165 8250 4125 a\001 --6 -6 1575 2325 2025 2775 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1650 2400 1950 2400 1950 2700 1650 2700 1650 2400 -4 1 4 50 -1 14 18 0.0000 4 135 165 1800 2625 c\001 --6 -6 8925 2325 9375 2775 -2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 9000 2400 9300 2400 9300 2700 9000 2700 9000 2400 -4 1 4 50 -1 14 18 0.0000 4 135 165 9150 2625 c\001 --6 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7800 4200 13800 4200 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 900 4200 3900 4200 3900 6900 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 6300 4200 5100 4200 5100 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 13575 4200 12300 4200 12300 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 3 - 8100 4200 11100 4200 11100 6900 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 0 0 14400 0 14400 8100 0 8100 0 0 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 1200 3000 3600 3000 3600 5400 1200 5400 1200 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 3600 3000 6000 3000 6000 5400 3600 5400 3600 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 8400 3000 10800 3000 10800 5400 8400 5400 8400 3000 -2 2 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 5 - 10800 3000 13200 3000 13200 5400 10800 5400 10800 3000 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 5100 1200 5100 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 11100 1200 11100 7200 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 12300 1200 12300 7200 -2 2 0 2 0 7 45 -1 -1 0.000 0 0 -1 0 0 5 - 525 0 4500 0 4500 600 525 600 525 0 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 0 525 0 525 600 0 600 0 0 -2 1 0 1 0 7 60 -1 20 0.000 0 0 -1 0 0 2 - 3900 1200 3900 7200 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 600 4200 6600 4200 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 1800 4275 4800 4275 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 4725 4125 4875 4125 4875 4875 4725 4875 4725 4125 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 1725 3225 1875 3225 1875 4350 1725 4350 1725 3225 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 8925 3225 9075 3225 9075 4350 8925 4350 8925 3225 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 11925 4125 12075 4125 12075 4875 11925 4875 11925 4125 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 6 - 9000 3675 9525 3675 9525 4275 11325 4275 11325 4575 12000 4575 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 9600 1200 9600 7200 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 11400 1200 11400 7200 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 7800 3600 13800 3600 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 7800 4500 13800 4500 -4 1 0 50 -1 14 24 0.0000 4 240 225 300 375 6\001 -4 0 0 45 -1 14 24 0.0000 4 240 2700 675 375 Self Slacken\001 -4 0 0 45 -1 14 20 0.0000 4 240 4620 9000 7800 [c/horizontal] is slackened.\001 diff --git a/kite/doc/images/RoutingEvent-2.fig b/kite/doc/images/RoutingEvent-2.fig deleted file mode 100644 index b554b66b..00000000 --- a/kite/doc/images/RoutingEvent-2.fig +++ /dev/null @@ -1,82 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -6 2100 7350 2325 8100 -4 1 4 50 -1 15 18 1.5708 4 165 660 2325 7725 Free\001 --6 -6 7500 3600 7725 4350 -4 1 4 50 -1 15 18 1.5708 4 165 660 7725 3975 Free\001 --6 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 8400 6600 1125 6600 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 6900 5400 1125 5400 -2 1 0 2 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 1800 1575 1800 9900 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 1800 1575 1800 5400 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 1200 4200 1200 5400 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 1200 5400 1200 6600 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 1200 8400 1200 6600 -2 4 0 2 0 7 45 -1 -1 6.000 0 0 7 0 0 5 - 3150 6150 3150 5850 1650 5850 1650 6150 3150 6150 -2 4 0 2 0 7 45 -1 -1 6.000 0 0 7 0 0 5 - 8325 6150 8325 5850 6750 5850 6750 6150 8325 6150 -2 2 1 0 4 7 60 -1 45 2.000 0 0 -1 0 0 5 - 2100 1500 2400 1500 2400 5400 2100 5400 2100 1500 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 8100 6000 8100 2700 -2 1 0 2 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 8100 1500 8100 9900 -2 1 1 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 8100 6675 8100 9900 -2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 4 - 1650 5325 1650 5400 1950 5400 1950 5325 -2 1 0 4 4 7 50 -1 -1 10.000 0 0 -1 0 0 4 - 7950 6675 7950 6600 8250 6600 8250 6675 -2 2 0 0 7 4 60 -1 38 2.000 0 0 -1 0 0 5 - 2100 5400 2400 5400 2400 9900 2100 9900 2100 5400 -2 2 0 0 7 4 60 -1 38 2.000 0 0 -1 0 0 5 - 7500 1500 7800 1500 7800 6600 7500 6600 7500 1500 -2 2 1 0 4 7 60 -1 45 2.000 0 0 -1 0 0 5 - 7500 6600 7800 6600 7800 9900 7500 9900 7500 6600 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 6000 6900 6000 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 4500 6900 4500 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3000 6900 6900 6900 -2 2 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 5 - 3000 4500 6900 4500 6900 6900 3000 6900 3000 4500 -2 2 0 0 0 7 55 -1 10 0.000 0 0 -1 0 0 5 - 3000 5100 6900 5100 6900 6300 3000 6300 3000 5100 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 1800 9300 1800 6000 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 2925 5925 3075 5925 3075 6075 2925 6075 2925 5925 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 1725 5925 1875 5925 1875 6075 1725 6075 1725 5925 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 1725 9225 1875 9225 1875 9375 1725 9375 1725 9225 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 6825 5925 6975 5925 6975 6075 6825 6075 6825 5925 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 8025 5925 8175 5925 8175 6075 8025 6075 8025 5925 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 8025 2625 8175 2625 8175 2775 8025 2775 8025 2625 -4 1 4 50 -1 14 12 1.5708 4 180 1470 1125 7575 _perpandicular\001 -4 1 0 45 -1 14 14 0.0000 4 135 270 7500 6075 AC\001 -4 1 0 45 -1 14 14 0.0000 4 135 270 2400 6075 AC\001 -4 1 4 45 -1 14 18 1.5708 4 180 825 1725 1950 Track\001 -4 1 4 45 -1 14 18 1.5708 4 180 825 8025 1950 Track\001 diff --git a/kite/doc/images/RoutingEvent-3.fig b/kite/doc/images/RoutingEvent-3.fig deleted file mode 100644 index c5be548e..00000000 --- a/kite/doc/images/RoutingEvent-3.fig +++ /dev/null @@ -1,98 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -6 1125 1425 1875 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 1200 1500 1800 1500 1800 2100 1200 2100 1200 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 1500 1875 RE\001 --6 -6 1800 1425 2550 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 1875 1500 2475 1500 2475 2100 1875 2100 1875 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 2175 1875 RE\001 --6 -6 2475 1425 3225 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 2550 1500 3150 1500 3150 2100 2550 2100 2550 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 2850 1875 RE\001 --6 -6 3150 1425 3900 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 3225 1500 3825 1500 3825 2100 3225 2100 3225 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 3525 1875 RE\001 --6 -6 5025 1425 5775 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 5100 1500 5700 1500 5700 2100 5100 2100 5100 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 5400 1875 RE\001 --6 -6 5700 1425 6450 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 5775 1500 6375 1500 6375 2100 5775 2100 5775 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 6075 1875 RE\001 --6 -6 6375 1425 7125 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 6450 1500 7050 1500 7050 2100 6450 2100 6450 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 6750 1875 RE\001 --6 -6 7050 1425 7800 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 7125 1500 7725 1500 7725 2100 7125 2100 7125 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 7425 1875 RE\001 --6 -6 7725 1425 8475 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 7800 1500 8400 1500 8400 2100 7800 2100 7800 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 8100 1875 RE\001 --6 -6 8400 1425 9150 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 8475 1500 9075 1500 9075 2100 8475 2100 8475 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 8775 1875 RE\001 --6 -6 9075 1425 9825 2175 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 9150 1500 9750 1500 9750 2100 9150 2100 9150 1500 -4 1 0 50 -1 14 18 0.0000 4 165 330 9450 1875 RE\001 --6 -2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 5400 2100 5400 3900 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 4425 3900 6375 3900 6375 4800 4425 4800 4425 3900 -2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 7 - 975 150 1125 0 2325 0 2475 -150 2625 0 3825 0 - 3975 150 -2 1 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 7 - 4950 150 5100 0 7200 0 7350 -150 7500 0 9600 0 - 9750 150 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 300 -900 10500 -900 10500 5100 300 5100 300 -900 -3 0 0 2 4 7 50 -1 -1 6.000 0 1 0 4 - 3 1 2.00 120.00 240.00 - 4425 4650 3300 4650 2100 3600 2100 2100 - 0.000 1.000 1.000 0.000 -3 0 0 2 4 7 50 -1 -1 6.000 0 1 0 4 - 3 1 2.00 120.00 240.00 - 6393 4502 6618 4502 6768 3302 6768 2102 - 0.000 1.000 1.000 0.000 -3 0 0 2 4 7 50 -1 -1 6.000 0 1 0 6 - 3 1 2.00 120.00 240.00 - 2100 1500 2100 1200 2700 600 5100 600 5700 1200 5700 1425 - 0.000 1.000 1.000 1.000 1.000 0.000 -4 1 0 50 -1 14 18 0.0000 4 240 1485 5475 4200 process()\001 -4 1 4 50 -1 14 18 0.0000 4 240 1815 5400 4650 _setAside()\001 -4 1 4 50 -1 14 12 0.0000 4 165 1470 2475 3900 setLeftBound()\001 -4 1 4 50 -1 14 12 0.0000 4 180 1575 6750 3450 setRightBound()\001 -4 1 4 50 -1 14 12 0.0000 4 165 2625 2475 4125 Session::addRemoveEvent()\001 -4 1 0 50 -1 18 18 0.0000 4 270 900 2550 -300 history\001 -4 1 0 50 -1 18 18 0.0000 4 210 840 7350 -300 queue\001 -4 1 4 50 -1 14 12 0.0000 4 165 1575 2175 1200 setEventLevel()\001 -4 1 4 50 -1 14 12 0.0000 4 180 945 2175 975 getFork()\001 diff --git a/kite/doc/images/RoutingPlane-1.fig b/kite/doc/images/RoutingPlane-1.fig new file mode 100644 index 00000000..105180ec --- /dev/null +++ b/kite/doc/images/RoutingPlane-1.fig @@ -0,0 +1,61 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +80.00 +Single +-2 +1200 2 +0 32 #ffffdd +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 4050 4650 4050 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 3450 4650 3450 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 2850 4650 2850 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 2250 4650 2250 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 1650 4650 1650 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 1050 4650 1050 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 300 450 4650 450 +2 2 1 2 26 7 60 -1 -1 6.000 0 0 -1 0 0 5 + 300 150 4650 150 4650 4350 300 4350 300 150 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4725 150 5550 150 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4725 4350 5550 4350 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 300 4425 300 5100 +2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 4650 4425 4650 5100 +2 1 0 3 0 7 50 -1 -1 8.000 0 0 -1 0 0 2 + 300 4800 300 5100 +2 1 0 3 0 7 50 -1 -1 8.000 0 0 -1 0 0 2 + 4650 4800 4650 5100 +2 1 0 3 0 7 50 -1 -1 8.000 0 0 -1 0 0 2 + 5250 150 5550 150 +2 1 0 3 0 7 50 -1 -1 8.000 0 0 -1 0 0 2 + 5250 4350 5550 4350 +2 1 0 4 1 7 50 -1 -1 10.000 0 0 -1 0 0 2 + 6450 300 7050 300 +2 1 1 2 25 7 50 -1 -1 6.000 0 0 -1 0 0 2 + 6450 600 7050 600 +2 2 1 0 32 32 100 -1 20 2.000 0 0 -1 0 0 5 + 0 -150 9450 -150 9450 5400 0 5400 0 -150 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 4125 [0]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 3525 [1]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 2925 [2]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 2325 [3]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 1725 [4]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 1125 [5]\001 +4 1 0 50 -1 14 12 0.0000 4 150 360 4875 525 [6]\001 +4 0 0 50 -1 14 12 1.5708 4 120 840 5550 4275 axisMin\001 +4 2 0 50 -1 14 12 1.5708 4 120 840 5550 225 axisMax\001 +4 0 0 50 -1 14 12 0.0000 4 120 600 7200 300 Track\001 +4 0 0 50 -1 14 12 0.0000 4 120 2040 7200 600 Cell abutment box\001 +4 2 0 50 -1 14 12 0.0000 4 120 960 4575 5100 trackMax\001 +4 0 0 50 -1 14 12 0.0000 4 120 960 375 5100 trackMin\001 diff --git a/kite/doc/images/RoutingPlane-1.png b/kite/doc/images/RoutingPlane-1.png new file mode 100644 index 00000000..4b19fa96 Binary files /dev/null and b/kite/doc/images/RoutingPlane-1.png differ diff --git a/kite/doc/images/Track-0.fig b/kite/doc/images/Track-0.fig new file mode 100644 index 00000000..b75e1aac --- /dev/null +++ b/kite/doc/images/Track-0.fig @@ -0,0 +1,212 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +90.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 3225 7725 6975 8475 +6 3450 7950 3750 8250 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3525 8025 3675 8175 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3675 8025 3525 8175 +-6 +6 6450 7950 6750 8250 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 6525 8025 6675 8175 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 6675 8025 6525 8175 +-6 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 3450 7800 3300 7950 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 3600 7800 3300 8100 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 3750 7800 3300 8250 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 3900 7800 3300 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4050 7800 3450 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4200 7800 3600 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4350 7800 3750 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4500 7800 3900 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4650 7800 4050 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4800 7800 4200 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 4950 7800 4350 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5100 7800 4500 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5250 7800 4650 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5400 7800 4800 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5550 7800 4950 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5700 7800 5100 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 5850 7800 5250 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6000 7800 5400 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6150 7800 5550 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6300 7800 5700 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6450 7800 5850 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6600 7800 6000 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6750 7800 6150 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6900 7800 6300 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6900 7950 6450 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6900 8100 6600 8400 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 7 0 0 2 + 6900 8250 6750 8400 +2 2 0 2 0 7 40 -1 -1 0.000 0 0 -1 0 0 5 + 3300 7800 6900 7800 6900 8400 3300 8400 3300 7800 +-6 +6 2400 10350 7950 11175 +4 0 0 50 -1 14 14 0.0000 4 135 450 2400 10500 TS:\001 +4 0 0 40 -1 14 14 0.0000 4 135 450 2400 10800 MD:\001 +4 0 0 40 -1 14 14 0.0000 4 105 300 2400 11100 e:\001 +4 0 0 40 -1 14 14 0.0000 4 195 1950 3000 10500 Track Spacing\001 +4 0 0 40 -1 14 14 0.0000 4 195 4950 3000 10800 Minimal Distance (layer to layer)\001 +4 0 0 40 -1 14 14 0.0000 4 195 3000 3000 11100 Extension (of layer)\001 +-6 +2 1 0 2 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 1200 3300 8400 3300 +2 1 0 2 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 1200 3900 8400 3900 +2 1 0 2 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 1200 4500 8400 4500 +2 1 0 2 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 1200 5100 8400 5100 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1500 3600 2100 3600 2100 4200 1500 4200 1500 3600 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3000 3600 3900 3600 3900 4200 3000 4200 3000 3600 +2 2 0 1 0 7 60 -1 15 0.000 0 0 -1 0 0 5 + 2100 3600 2700 3600 2700 4200 2100 4200 2100 3600 +2 2 0 1 4 4 60 -1 30 0.000 0 0 -1 0 0 5 + 4200 3600 5100 3600 5100 4200 4200 4200 4200 3600 +2 2 0 1 4 4 60 -1 35 0.000 0 0 -1 0 0 5 + 5100 3600 5700 3600 5700 4200 5100 4200 5100 3600 +2 2 0 1 4 4 60 -1 37 0.000 0 0 -1 0 0 5 + 5700 3600 6300 3600 6300 4200 5700 4200 5700 3600 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6900 3600 7800 3600 7800 4200 6900 4200 6900 3600 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1200 3000 2400 3000 2400 3600 1200 3600 1200 3000 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 2400 3000 3300 3000 3300 3600 2400 3600 2400 3000 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 4800 3000 6000 3000 6000 3600 4800 3600 4800 3000 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 4200 7500 4200 7500 4800 1800 4800 1800 4200 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1500 4800 2400 4800 2400 5400 1500 5400 1500 4800 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3000 4800 3900 4800 3900 5400 3000 5400 3000 4800 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3900 4800 4500 4800 4500 5400 3900 5400 3900 4800 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 5100 4800 6300 4800 6300 5400 5100 5400 5100 4800 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6300 4800 6900 4800 6900 5400 6300 5400 6300 4800 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7200 4800 8100 4800 8100 5400 7200 5400 7200 4800 +2 1 0 4 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 2700 8100 7500 8100 +2 1 0 4 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 2700 9300 7500 9300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7275 8700 7800 8700 8100 9300 8775 9300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7575 8100 8700 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7275 7500 7800 7500 8100 6900 8700 6900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2625 6900 1500 6900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2625 8100 900 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7200 8775 7200 9900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 3 1 1.00 60.00 120.00 + 3 1 1.00 60.00 120.00 + 8625 6900 8625 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 3 1 1.00 60.00 120.00 + 3 1 1.00 60.00 120.00 + 8625 8100 8625 9300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 1 2 + 3 1 1.00 60.00 120.00 + 3 1 1.00 60.00 120.00 + 1575 6900 1575 8100 +2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 900 8100 1200 8100 +2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 9600 3000 9900 +2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7200 9600 7200 9900 +2 1 0 4 0 32 50 -1 20 0.000 0 0 -1 0 0 2 + 2700 6900 7500 6900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 8775 3000 9900 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 8775 3600 9900 +2 1 0 3 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 9600 3600 9900 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 1.00 60.00 120.00 + 1500 8850 3000 8850 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 1.00 60.00 120.00 + 3525 8850 3300 8850 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3000 8850 3300 8850 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3225 9150 3600 9150 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 1.00 60.00 120.00 + 1500 9150 3300 9150 +2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 1.00 60.00 120.00 + 3825 9150 3600 9150 +2 2 0 1 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3000 7500 7200 7500 7200 8700 3000 8700 3000 7500 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 8475 3300 9225 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 300 2700 9300 2700 9300 13200 300 13200 300 2700 +4 1 0 50 -1 14 14 1.5708 4 195 600 8550 7500 TS/2\001 +4 1 0 50 -1 14 14 1.5708 4 195 600 8550 8700 TS/2\001 +4 1 0 50 -1 14 14 1.5708 4 135 300 1500 7500 TS\001 +4 1 0 50 -1 14 14 0.0000 4 105 450 7500 9900 max\001 +4 1 0 50 -1 14 14 0.0000 4 150 150 675 8175 y\001 +4 1 0 50 -1 18 16 0.0000 4 255 330 5100 6000 (a)\001 +4 0 0 40 -1 14 14 0.0000 4 105 150 1500 9075 e\001 +4 0 0 40 -1 14 14 0.0000 4 195 600 1500 8775 MD/2\001 +4 1 0 50 -1 14 14 0.0000 4 150 450 2700 9900 min\001 +4 0 0 40 -1 14 14 0.0000 4 150 300 3750 9900 x1\001 +4 1 0 50 -1 14 16 0.0000 4 255 7095 5100 11700 area(y,min,max) = (min,y-TS/2) (max,y+TS/2)\001 +4 1 0 50 -1 14 16 0.0000 4 225 3135 5100 12000 min = x1 - e - MD/2\001 +4 1 0 50 -1 14 16 0.0000 4 225 3135 5100 12300 max = x2 + e + MD/2\001 +4 1 0 50 -1 18 16 0.0000 4 255 345 5100 12900 (b)\001 +4 0 0 40 -1 14 16 0.0000 4 210 495 600 3375 [0]\001 +4 0 0 40 -1 14 16 0.0000 4 225 495 600 3975 [1]\001 +4 0 0 40 -1 14 16 0.0000 4 210 495 600 4575 [2]\001 +4 0 0 40 -1 14 16 0.0000 4 210 495 600 5175 [3]\001 diff --git a/kite/doc/images/Track-0.png b/kite/doc/images/Track-0.png new file mode 100644 index 00000000..39d9033c Binary files /dev/null and b/kite/doc/images/Track-0.png differ diff --git a/kite/doc/images/Track-1.fig b/kite/doc/images/Track-1.fig index 0bf2e96e..dd2f4681 100644 --- a/kite/doc/images/Track-1.fig +++ b/kite/doc/images/Track-1.fig @@ -1,87 +1,253 @@ -#FIG 3.2 +#FIG 3.2 Produced by xfig version 3.2.5a Landscape Center -Metric +Inches Letter 100.00 Single -2 1200 2 -6 495 405 4320 6120 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 1800 585 45 45 1755 585 1845 585 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 2250 585 45 45 2205 585 2295 585 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 2700 585 45 45 2655 585 2745 585 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 3150 585 45 45 3105 585 3195 585 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 3600 585 45 45 3555 585 3645 585 -1 4 0 1 0 7 50 -1 -1 4.000 1 0.0000 4050 585 45 45 4005 585 4095 585 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 2025 450 2025 675 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 2475 450 2475 675 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 2925 450 2925 675 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3375 450 3375 675 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 3825 450 3825 675 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 3600 630 3600 1755 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 3375 1755 3825 1755 3825 4680 3375 4680 3375 1755 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 3150 630 3150 1710 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 2925 1710 3375 1710 3375 4635 2925 4635 2925 1710 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 2700 630 2700 1665 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 2475 1665 2925 1665 2925 4590 2475 4590 2475 1665 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 2250 630 2250 1620 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 2025 1620 2475 1620 2475 4545 2025 4545 2025 1620 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 1800 630 1800 1575 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 3375 5175 3150 4680 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 3375 5175 3600 4725 +0 32 #ffffdd +6 1500 1725 2100 5325 2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1575 1575 2025 1575 2025 4500 1575 4500 1575 1575 -2 1 0 3 0 7 60 -1 10 0.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 1575 5850 4275 5850 -2 1 0 3 0 7 60 -1 10 0.000 0 0 -1 0 0 2 - 1575 5805 1575 5895 -2 1 0 1 0 7 50 -1 -1 4.000 0 0 -1 1 0 2 - 3 0 1.00 60.00 120.00 - 4050 630 4050 1800 -2 2 0 2 0 7 50 -1 -1 6.000 0 0 -1 0 0 5 - 3825 1800 4275 1800 4275 4725 3825 4725 3825 1800 -2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 1575 450 4275 450 4275 675 1575 675 1575 450 -4 2 0 50 -1 14 12 0.0000 4 165 945 1440 630 _segments\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 3555 4590 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 945 3645 3105 [32,35[\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 3105 4545 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 945 3195 3060 [31,38[\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 2655 4500 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 945 2745 3015 [12,30[\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 2205 4455 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 810 2295 2970 [8,10[\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 1755 4410 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 675 1845 2925 [5,8[\001 -4 1 0 50 -1 18 12 0.0000 4 135 825 3375 5400 same net\001 -4 0 0 50 -1 14 12 1.5708 4 180 1260 4005 4635 TrackSegment\001 -4 0 0 50 -1 14 14 1.5708 4 180 945 4095 3150 [40,45[\001 -4 1 0 50 -1 19 12 0.0000 4 180 1140 2925 6075 sorting order\001 + 1575 2250 2025 2250 2025 5250 1575 5250 1575 2250 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1575 3750 2025 3750 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 1575 2250 1575 1800 2025 1800 2025 2250 1575 2250 +4 0 0 50 -1 14 16 1.5708 4 165 990 1875 3450 net\001 +4 0 0 50 -1 14 16 1.5708 4 210 825 1875 4950 [5,8[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 1875 2025 TS\001 -6 -2 2 0 1 0 7 50 -1 -1 4.000 0 0 -1 0 0 5 - 0 0 4725 0 4725 6525 0 6525 0 0 +6 2100 1725 2700 5325 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2175 2250 2625 2250 2625 5250 2175 5250 2175 2250 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2175 3750 2625 3750 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 2175 2250 2175 1800 2625 1800 2625 2250 2175 2250 +4 0 0 50 -1 14 16 1.5708 4 165 990 2475 3450 net\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 2475 2025 TS\001 +4 0 0 50 -1 14 16 1.5708 4 225 990 2475 4950 [8,10[\001 +-6 +6 2700 1725 3300 5325 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 2775 2250 3225 2250 3225 5250 2775 5250 2775 2250 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2775 3750 3225 3750 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 2775 2250 2775 1800 3225 1800 3225 2250 2775 2250 +4 0 0 50 -1 14 16 1.5708 4 165 990 3075 3450 net\001 +4 0 0 50 -1 14 16 1.5708 4 225 1155 3075 4950 [12,30[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 3075 2025 TS\001 +-6 +6 3300 1725 3900 5325 +2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3375 2250 3375 5250 3825 5250 3825 2250 3375 2250 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3375 3750 3825 3750 +2 2 0 2 4 4 50 -1 20 0.000 0 0 -1 0 0 5 + 3375 2250 3375 1800 3825 1800 3825 2250 3375 2250 +4 0 4 50 -1 14 16 1.5708 4 165 990 3675 3450 net\001 +4 0 4 50 -1 14 16 1.5708 4 225 1155 3675 4950 [31,38[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 3675 2025 TS\001 +-6 +6 3900 1725 4500 5325 +2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 3975 2250 3975 5250 4425 5250 4425 2250 3975 2250 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3975 3750 4425 3750 +2 2 0 2 4 4 50 -1 20 0.000 0 0 -1 0 0 5 + 3975 2250 3975 1800 4425 1800 4425 2250 3975 2250 +4 0 4 50 -1 14 16 1.5708 4 165 990 4275 3450 net\001 +4 0 4 50 -1 14 16 1.5708 4 225 1155 4275 4950 [31,35[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 4275 2025 TS\001 +-6 +6 4500 1725 5100 5325 +2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 4575 2250 4575 5250 5025 5250 5025 2250 4575 2250 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4575 3750 5025 3750 +2 2 0 2 4 4 50 -1 20 0.000 0 0 -1 0 0 5 + 4575 2250 4575 1800 5025 1800 5025 2250 4575 2250 +4 0 4 50 -1 14 16 1.5708 4 165 990 4875 3450 net\001 +4 0 4 50 -1 14 16 1.5708 4 210 1155 4875 4950 [34,40[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 4875 2025 TS\001 +-6 +6 5100 1725 5700 5325 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5175 2250 5625 2250 5625 5250 5175 5250 5175 2250 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5175 3750 5625 3750 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 5175 2250 5175 1800 5625 1800 5625 2250 5175 2250 +4 0 0 50 -1 14 16 1.5708 4 165 990 5475 3450 net\001 +4 0 0 50 -1 14 16 1.5708 4 210 1155 5475 4950 [45,50[\001 +4 1 7 40 -1 14 16 1.5708 4 165 330 5475 2025 TS\001 +-6 +6 1350 6525 1575 7275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 6600 1425 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 6600 1500 7200 +-6 +6 8925 6525 9150 7275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 6600 9000 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 6600 9075 7200 +-6 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 3600 750 75 75 3525 750 3675 750 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 4200 750 75 75 4125 750 4275 750 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 4800 750 75 75 4725 750 4875 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 5400 750 75 75 5325 750 5475 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 3000 750 75 75 2925 750 3075 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 2400 750 75 75 2325 750 2475 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 1800 750 75 75 1725 750 1875 750 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 600 2100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 600 2700 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 600 3300 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 600 3900 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 600 4500 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 600 5100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 600 5700 900 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1500 600 6300 600 6300 900 1500 900 1500 600 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 1800 825 1800 1800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 2400 825 2400 1800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 3000 825 3000 1800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 5400 825 5400 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 4800 825 4800 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 4200 825 4200 1800 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 3600 825 3600 1800 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 1500 300 2700 300 2700 600 1500 600 1500 300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 6600 1800 6600 1800 7200 1875 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2475 6600 2400 6600 2400 7200 2475 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3075 6600 3000 6600 3000 7200 3075 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 6600 3300 6600 3300 7200 3375 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4275 6600 4200 6600 4200 7200 4275 7200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 6750 2400 6750 2400 7050 1800 7050 1800 6750 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 6750 4200 6750 4200 7050 3300 7050 3300 6750 +2 2 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 5 + 2400 6750 3000 6750 3000 7050 2400 7050 2400 6750 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 4575 6600 4500 6600 4500 7200 4575 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 4875 6600 4800 6600 4800 7200 4875 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 5475 6600 5400 6600 5400 7200 5475 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 6075 6600 6000 6600 6000 7200 6075 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 6675 6600 6600 6600 6600 7200 6675 7200 +2 2 0 0 4 4 61 -1 35 0.000 0 0 -1 0 0 5 + 4500 6750 6000 6750 6000 7050 4500 7050 4500 6750 +2 2 0 0 4 4 62 -1 30 0.000 0 0 -1 0 0 5 + 4500 6675 5400 6675 5400 7125 4500 7125 4500 6675 +2 2 0 0 4 4 60 -1 38 0.000 0 0 -1 0 0 5 + 4800 6825 6600 6825 6600 6975 4800 6975 4800 6825 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 6600 7500 6600 7500 7200 7575 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 6600 8400 6600 8400 7200 8475 7200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 6750 8400 6750 8400 7050 7500 7050 7500 6750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 6900 9300 6900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 1800 5250 1800 6600 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 2400 5250 2400 6600 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 3000 5250 3300 6600 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 5400 5250 7500 6600 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 3600 5250 4500 6600 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 4200 5250 4500 6600 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 3 1 2.00 120.00 240.00 + 4800 5250 4800 6600 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 7275 4500 8100 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4800 7275 4800 8100 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5400 7275 5400 8100 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 7275 6000 8100 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6600 7275 6600 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4200 7275 4200 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 7275 3300 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 7275 3000 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 7275 2400 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1800 7275 1800 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7500 7275 7500 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8400 7275 8400 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 7275 9000 8100 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 7275 1500 8100 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 300 0 9600 0 9600 8700 300 8700 300 0 +4 1 7 40 -1 14 16 0.0000 4 165 825 2100 525 Track\001 +4 0 0 50 -1 16 12 0.0000 4 135 105 1800 8250 5\001 +4 0 0 50 -1 16 12 0.0000 4 135 105 2400 8250 8\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 3000 8250 10\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 3300 8250 12\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 4200 8250 30\001 +4 0 4 50 -1 16 12 0.0000 4 135 210 4500 8250 31\001 +4 0 4 50 -1 16 12 0.0000 4 135 210 4800 8250 34\001 +4 0 4 50 -1 16 12 0.0000 4 135 210 5400 8250 35\001 +4 0 4 50 -1 16 12 0.0000 4 135 210 6000 8250 38\001 +4 0 4 50 -1 16 12 0.0000 4 135 210 6600 8250 40\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 7500 8250 45\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 8400 8250 50\001 +4 0 0 50 -1 16 12 0.0000 4 135 210 9000 8250 60\001 +4 0 0 50 -1 16 12 0.0000 4 135 105 1500 8250 0\001 +4 0 0 50 -1 18 16 0.0000 4 255 330 600 675 (a)\001 +4 0 0 50 -1 18 16 0.0000 4 255 345 600 6975 (b)\001 diff --git a/kite/doc/images/Track-1.png b/kite/doc/images/Track-1.png index 9cc6d7b9..f3810eab 100644 Binary files a/kite/doc/images/Track-1.png and b/kite/doc/images/Track-1.png differ diff --git a/kite/doc/images/Track-2.fig b/kite/doc/images/Track-2.fig index 0d1538f8..d396bc36 100644 --- a/kite/doc/images/Track-2.fig +++ b/kite/doc/images/Track-2.fig @@ -1,150 +1,198 @@ -#FIG 3.2 +#FIG 3.2 Produced by xfig version 3.2.5a Landscape Center -Metric +Inches Letter 100.00 Single -2 1200 2 -6 360 855 540 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 405 900 405 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 495 900 495 1350 +0 32 #ffffdd +6 600 -525 8175 3075 +6 3525 1275 7575 1875 +6 3525 1275 4125 1875 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 1350 4050 1350 4050 1800 3600 1800 3600 1350 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 1650 TS\001 -6 -6 7785 855 7965 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7830 900 7830 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7920 900 7920 1350 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 7275 1575 75 75 7200 1575 7350 1575 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 1350 5550 1800 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 1350 4050 1350 4050 1800 7500 1800 7500 1350 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 1350 7050 1800 +4 0 0 50 -1 14 16 0.0000 4 165 990 5850 1650 net\001 +4 0 0 50 -1 14 16 0.0000 4 210 825 4350 1650 [5,8[\001 -6 -6 0 0 135 720 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 113 22 68 68 68 135 68 248 68 315 23 360 - 0.000 1.000 1.000 1.000 1.000 0.000 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 113 698 68 653 68 585 68 473 68 405 23 360 - 0.000 1.000 1.000 1.000 1.000 0.000 +6 3525 1875 7575 2475 +6 3525 1875 4125 2475 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 1950 4050 1950 4050 2400 3600 2400 3600 1950 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 2250 TS\001 -6 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 1485 1935 135 135 1350 1935 1620 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 2160 1935 135 135 2025 1935 2295 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 3510 1935 135 135 3375 1935 3645 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 5310 1935 135 135 5175 1935 5445 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 6300 1935 135 135 6165 1935 6435 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 7335 1935 135 135 7200 1935 7470 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 2610 135 135 765 2610 1035 2610 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3060 135 135 765 3060 1035 3060 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3510 135 135 765 3510 1035 3510 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3960 135 135 765 3960 1035 3960 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 4410 135 135 765 4410 1035 4410 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 4860 135 135 765 4860 1035 4860 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 810 1935 135 135 675 1935 945 1935 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 315 1125 8010 1125 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 1125 1035 1800 1035 1800 1215 1125 1215 1125 1035 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 2475 1035 3600 1035 3600 1215 2475 1215 2475 1035 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 5850 1035 6750 1035 6750 1215 5850 1215 5850 1035 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 1125 0 1125 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 2475 0 2475 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 5850 0 5850 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 3375 0 3375 810 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 1125 540 1125 450 2250 450 2475 540 2250 630 1125 630 - 1125 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 2475 540 2475 450 3150 450 3375 540 3150 630 2475 630 - 2475 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 3375 540 3375 450 5625 450 5850 540 5625 630 3375 630 - 3375 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 5850 540 5850 450 7650 450 7875 540 7650 630 5850 630 - 5850 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 450 540 450 450 900 450 1125 540 900 630 450 630 - 450 540 -2 2 0 0 0 7 70 -1 19 0.000 0 0 -1 0 0 5 - 3375 990 4500 990 4500 1260 3375 1260 3375 990 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - -1575 -675 8325 -675 8325 5400 -1575 5400 -1575 -675 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 6795 945 6750 945 6750 1305 6795 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 5895 945 5850 945 5850 1305 5895 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 4545 855 4500 855 4500 1395 4545 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 3645 945 3600 945 3600 1305 3645 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 3420 855 3375 855 3375 1395 3420 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 2520 945 2475 945 2475 1305 2520 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1845 945 1800 945 1800 1305 1845 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1170 945 1125 945 1125 1305 1170 1305 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 675 2385 4410 2385 4410 5085 675 5085 675 2385 -4 1 0 50 -1 14 12 0.0000 4 135 105 1125 -45 3\001 -4 1 0 50 -1 14 12 0.0000 4 135 105 2475 -45 9\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 3375 -45 13\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 5850 -45 24\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 810 225 [0]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 1800 225 [1]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 2925 225 [2]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 4635 225 [3]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 6975 225 [4]\001 -4 0 0 50 -1 14 12 1.5708 4 120 420 7920 0 _max\001 -4 0 0 50 -1 14 12 1.5708 4 165 420 450 0 _min\001 -4 2 0 50 -1 18 12 0.0000 4 180 1125 -90 405 lower_bound\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 810 2025 1\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 1485 2025 2\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 2160 2025 3\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 3510 2025 2\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 5310 2025 3\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 6300 2025 4\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 7335 2025 5\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 4905 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 4455 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 4005 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 3555 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 3105 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 2655 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 3105 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 540 1395 2655 _min\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 3150 ,\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 2925 3105 max(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 1440 3105 min(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 2655 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 2925 2655 min(i)\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 2700 ,\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 3555 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 4005 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 4455 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 4905 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 2925 3555 min(i)\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 2925 4005 max(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 135 540 2925 4455 _max\001 -4 0 0 50 -1 14 14 0.0000 4 135 540 2925 4905 _max\001 -4 0 0 50 -1 14 14 0.0000 4 180 1215 1440 3555 _max(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 1440 4005 min(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 1440 4455 max(i-1)\001 -4 0 0 50 -1 14 14 0.0000 4 180 540 1440 4905 _min\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 3600 ,\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 4050 ,\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 4500 ,\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 4950 ,\001 -4 1 7 40 -1 10 14 0.0000 4 135 90 900 2700 1\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 3150 2\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 3600 3\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 4050 4\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 4500 5\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 4950 6\001 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 7275 2175 75 75 7200 2175 7350 2175 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 1950 5550 2400 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 1950 7500 2400 4050 2400 4050 1950 7500 1950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 1950 7050 2400 +4 0 0 50 -1 14 16 0.0000 4 165 990 5850 2250 net\001 +4 0 0 50 -1 14 16 0.0000 4 225 990 4350 2250 [8,10[\001 +-6 +6 3525 2475 7575 3075 +6 3525 2475 4125 3075 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 2550 4050 2550 4050 3000 3600 3000 3600 2550 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 2850 TS\001 +-6 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 7275 2775 75 75 7200 2775 7350 2775 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 2550 5550 3000 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 2550 7500 3000 4050 3000 4050 2550 7500 2550 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 2550 7050 3000 +4 0 0 50 -1 14 16 0.0000 4 165 990 5850 2850 net\001 +4 0 0 50 -1 14 16 0.0000 4 225 1155 4350 2850 [12,30[\001 +-6 +6 1425 225 6375 975 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 3000 750 75 75 2925 750 3075 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 2400 750 75 75 2325 750 2475 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 1800 750 75 75 1725 750 1875 750 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 600 2100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 600 2700 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 600 3300 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 600 3900 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 600 4500 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 600 5100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 600 5700 900 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1500 600 6300 600 6300 900 1500 900 1500 600 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 1500 300 2700 300 2700 600 1500 600 1500 300 +4 1 7 40 -1 14 16 0.0000 4 165 825 2100 525 Track\001 +-6 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 3000 825 3000 1425 3150 1575 3600 1575 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 2400 825 2400 2025 2550 2175 3600 2175 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 1800 825 1800 2625 1950 2775 3600 2775 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 1 8 + 3 1 2.00 120.00 240.00 + 2550 300 2550 0 2700 -150 7650 -150 7800 0 7800 1425 + 7650 1575 7350 1575 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 1 8 + 3 1 2.00 120.00 240.00 + 2400 300 2400 -150 2550 -300 7800 -300 7950 -150 7950 2025 + 7800 2175 7500 2175 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 1 8 + 3 1 2.00 120.00 240.00 + 2250 300 2250 -300 2400 -450 7950 -450 8100 -300 8100 2625 + 7950 2775 7500 2775 +2 1 0 4 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 7650 1950 7800 2400 +2 1 0 4 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 7800 1950 7650 2400 +4 0 0 50 -1 18 16 0.0000 4 255 330 600 675 (a)\001 +-6 +6 3525 6525 7575 7125 +6 3525 6525 4125 7125 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 6600 4050 6600 4050 7050 3600 7050 3600 6600 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 6900 TS\001 +-6 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 7275 6825 75 75 7200 6825 7350 6825 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 6600 5550 7050 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 6600 7500 7050 4050 7050 4050 6600 7500 6600 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 6600 7050 7050 +4 0 0 50 -1 14 16 0.0000 4 165 990 5850 6900 net\001 +4 0 0 50 -1 14 16 0.0000 4 225 1155 4350 6900 [12,30[\001 +-6 +6 3525 5325 7575 5925 +6 3525 5325 4125 5925 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 5400 4050 5400 4050 5850 3600 5850 3600 5400 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 5700 TS\001 +-6 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 7275 5625 75 75 7200 5625 7350 5625 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 5400 5550 5850 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 5400 4050 5400 4050 5850 7500 5850 7500 5400 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 5400 7050 5850 +4 0 0 50 -1 14 16 0.0000 4 165 990 5850 5700 net\001 +4 0 0 50 -1 14 16 0.0000 4 210 825 4350 5700 [5,8[\001 +-6 +6 3525 5925 7575 6525 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 6000 5550 6450 +2 2 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 7500 6000 4050 6000 4050 6450 7500 6450 7500 6000 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 6000 7050 6450 +2 2 0 2 4 4 50 -1 20 0.000 0 0 -1 0 0 5 + 3600 6000 4050 6000 4050 6450 3600 6450 3600 6000 +4 0 4 50 -1 14 16 0.0000 4 165 990 5850 6300 net\001 +4 0 4 50 -1 14 16 0.0000 4 225 990 4350 6300 [8,10[\001 +4 1 7 40 -1 14 16 0.0000 4 165 330 3825 6300 TS\001 +4 1 4 50 -1 14 10 0.0000 4 90 420 7275 6300 NULL\001 +-6 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 3000 4800 75 75 2925 4800 3075 4800 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 2400 4800 75 75 2325 4800 2475 4800 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 1800 4800 75 75 1725 4800 1875 4800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 3000 4875 3000 5475 3150 5625 3600 5625 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 2400 4875 2400 6075 2550 6225 3600 6225 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 3 1 2.00 120.00 240.00 + 1800 4875 1800 6675 1950 6825 3600 6825 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 1 8 + 3 1 2.00 120.00 240.00 + 2550 4350 2550 4050 2700 3900 7650 3900 7800 4050 7800 5475 + 7650 5625 7350 5625 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 1 8 + 3 1 2.00 120.00 240.00 + 2250 4350 2250 3750 2400 3600 7950 3600 8100 3750 8100 6675 + 7950 6825 7500 6825 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 4650 2100 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 4650 2700 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 4650 3300 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 4650 3900 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 4650 4500 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 4650 5100 4950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 4650 5700 4950 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1500 4650 6300 4650 6300 4950 1500 4950 1500 4650 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 1500 4350 2700 4350 2700 4650 1500 4650 1500 4350 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 450 -750 8400 -750 8400 7350 450 7350 450 -750 +4 0 0 50 -1 18 16 0.0000 4 255 345 600 4725 (b)\001 +4 1 7 40 -1 14 16 0.0000 4 165 825 2100 4575 Track\001 diff --git a/kite/doc/images/Track-2.png b/kite/doc/images/Track-2.png index d8677894..96699293 100644 Binary files a/kite/doc/images/Track-2.png and b/kite/doc/images/Track-2.png differ diff --git a/kite/doc/images/Track-3.fig b/kite/doc/images/Track-3.fig deleted file mode 100644 index 6808410d..00000000 --- a/kite/doc/images/Track-3.fig +++ /dev/null @@ -1,165 +0,0 @@ -#FIG 3.2 -Landscape -Center -Metric -Letter -100.00 -Single --2 -1200 2 -6 360 855 540 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 405 900 405 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 495 900 495 1350 --6 -6 7785 855 7965 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7830 900 7830 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7920 900 7920 1350 --6 -6 0 0 135 720 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 113 22 68 68 68 135 68 248 68 315 23 360 - 0.000 1.000 1.000 1.000 1.000 0.000 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 113 698 68 653 68 585 68 473 68 405 23 360 - 0.000 1.000 1.000 1.000 1.000 0.000 --6 -6 630 1755 990 2115 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 810 1935 135 135 675 1935 945 1935 -4 1 7 40 -1 18 14 0.0000 4 150 120 810 2025 1\001 --6 -6 1305 1755 1665 2115 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 1485 1935 135 135 1350 1935 1620 1935 -4 1 7 40 -1 18 14 0.0000 4 150 120 1485 2025 2\001 --6 -6 1980 1755 2340 2115 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 2160 1935 135 135 2025 1935 2295 1935 -4 1 7 40 -1 18 14 0.0000 4 150 120 2160 2025 3\001 --6 -6 3330 1755 3690 2115 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 3510 1935 135 135 3375 1935 3645 1935 -4 1 7 40 -1 18 14 0.0000 4 150 120 3510 2025 2\001 --6 -6 5130 1755 5490 2115 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 5310 1935 135 135 5175 1935 5445 1935 -4 1 7 40 -1 18 14 0.0000 4 150 120 5310 2025 3\001 --6 -6 675 2340 4410 4635 -6 720 2385 1080 2745 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 2565 135 135 765 2565 1035 2565 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 2655 1\001 --6 -6 720 2835 1080 3195 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3015 135 135 765 3015 1035 3015 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 3105 2\001 --6 -6 720 3285 1080 3645 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3465 135 135 765 3465 1035 3465 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 3555 3\001 --6 -6 720 3735 1080 4095 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 3915 135 135 765 3915 1035 3915 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 4005 4\001 --6 -6 720 4185 1080 4545 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 900 4365 135 135 765 4365 1035 4365 -4 1 7 40 -1 18 14 0.0000 4 150 120 900 4455 5\001 --6 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 675 2340 4410 2340 4410 4635 675 4635 675 2340 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 3960 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 3510 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 3060 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 2610 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 3060 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 540 1395 2610 _min\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 3105 ,\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 2925 3060 max(i)\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 1440 3060 min(i)\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 2610 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 2925 2610 min(i)\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 2655 ,\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 3510 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 3960 ]\001 -4 0 0 50 -1 14 14 0.0000 4 180 1080 2925 3510 min(i+1)\001 -4 0 0 50 -1 14 14 0.0000 4 135 540 2925 3960 _max\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 1440 3510 max(i)\001 -4 0 0 50 -1 14 14 0.0000 4 180 810 1440 3960 max(i)\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 3555 ,\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 4005 ,\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 1215 4410 [\001 -4 0 0 50 -1 14 14 0.0000 4 180 540 1440 4410 _min\001 -4 0 0 50 -1 14 14 0.0000 4 60 135 2700 4455 ,\001 -4 0 0 50 -1 14 14 0.0000 4 135 540 2925 4410 _max\001 -4 0 0 50 -1 14 14 0.0000 4 180 135 4140 4410 ]\001 --6 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 7335 1935 135 135 7200 1935 7470 1935 -1 4 0 1 0 7 50 -1 0 0.000 1 0.0000 6300 1935 135 135 6165 1935 6435 1935 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 315 1125 8010 1125 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 1125 1035 1800 1035 1800 1215 1125 1215 1125 1035 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 2475 1035 3600 1035 3600 1215 2475 1215 2475 1035 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 5850 1035 6750 1035 6750 1215 5850 1215 5850 1035 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 1125 0 1125 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 2475 0 2475 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 5850 0 5850 900 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 3375 0 3375 810 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 1125 540 1125 450 2250 450 2475 540 2250 630 1125 630 - 1125 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 2475 540 2475 450 3150 450 3375 540 3150 630 2475 630 - 2475 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 3375 540 3375 450 5625 450 5850 540 5625 630 3375 630 - 3375 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 5850 540 5850 450 7650 450 7875 540 7650 630 5850 630 - 5850 540 -2 1 0 0 0 7 60 -1 15 0.000 0 0 -1 0 0 7 - 450 540 450 450 900 450 1125 540 900 630 450 630 - 450 540 -2 2 0 0 0 7 70 -1 19 0.000 0 0 -1 0 0 5 - 3375 990 4500 990 4500 1260 3375 1260 3375 990 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - -1800 -675 8325 -675 8325 4950 -1800 4950 -1800 -675 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1170 945 1125 945 1125 1305 1170 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1845 945 1800 945 1800 1305 1845 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 2520 945 2475 945 2475 1305 2520 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 3420 855 3375 855 3375 1395 3420 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 3645 945 3600 945 3600 1305 3645 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 4545 855 4500 855 4500 1395 4545 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 5895 945 5850 945 5850 1305 5895 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 6795 945 6750 945 6750 1305 6795 1305 -4 1 0 50 -1 14 12 0.0000 4 135 105 1125 -45 3\001 -4 1 0 50 -1 14 12 0.0000 4 135 105 2475 -45 9\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 3375 -45 13\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 5850 -45 24\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 810 225 [0]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 1800 225 [0]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 2925 225 [1]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 4635 225 [2]\001 -4 1 0 50 -1 14 12 0.0000 4 165 315 6975 225 [3]\001 -4 0 0 50 -1 14 12 1.5708 4 120 420 7920 0 _max\001 -4 0 0 50 -1 14 12 1.5708 4 165 420 450 0 _min\001 -4 2 0 50 -1 18 12 0.0000 4 180 1425 -90 405 lower_bound - 1\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 6300 2025 2\001 -4 1 7 40 -1 18 14 0.0000 4 150 120 7335 2025 4\001 diff --git a/kite/doc/images/Track-4.fig b/kite/doc/images/Track-4.fig deleted file mode 100644 index 23c699f6..00000000 --- a/kite/doc/images/Track-4.fig +++ /dev/null @@ -1,83 +0,0 @@ -#FIG 3.2 -Landscape -Center -Metric -Letter -100.00 -Single --2 -1200 2 -6 360 855 540 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 405 900 405 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 495 900 495 1350 --6 -6 7785 855 7965 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7830 900 7830 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7920 900 7920 1350 --6 -1 4 0 1 0 7 50 -1 -1 0.000 1 0.0000 3600 1800 90 90 3510 1800 3690 1800 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 315 1125 8010 1125 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1395 855 1350 855 1350 1395 1395 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 2295 945 2250 945 2250 1305 2295 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 3195 945 3150 945 3150 1305 3195 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 4095 945 4050 945 4050 1305 4095 1305 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 4050 1035 4950 1035 4950 1215 4050 1215 4050 1035 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 2250 1035 3150 1035 3150 1215 2250 1215 2250 1035 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 7470 945 7425 945 7425 1305 7470 1305 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 6525 1035 7425 1035 7425 1215 6525 1215 6525 1035 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 6570 945 6525 945 6525 1305 6570 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 5895 855 5850 855 5850 1395 5895 1395 -2 2 0 0 0 7 70 -1 19 0.000 0 0 -1 0 0 5 - 1350 990 5850 990 5850 1260 1350 1260 1350 990 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 2250 0 2250 855 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 1350 0 1350 765 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 4050 0 4050 855 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 6525 0 6525 855 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 3600 2250 3600 1215 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 3510 1800 2295 1800 -2 1 3 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2 - 2250 1395 2250 2250 -2 1 3 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2 - 1350 1485 1350 2250 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 2250 2025 1350 2025 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 4995 945 4950 945 4950 1305 4995 1305 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 -675 8325 -675 8325 3375 0 3375 0 -675 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 1350 2475 1575 2700 1800 2700 3150 2700 3375 2700 3600 2925 - 0.000 1.000 1.000 1.000 1.000 0.000 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 5850 2475 5625 2700 5400 2700 4050 2700 3825 2700 3600 2925 - 0.000 1.000 1.000 1.000 1.000 0.000 -4 1 0 50 -1 14 12 0.0000 4 135 105 1350 -45 4\001 -4 1 0 50 -1 14 12 0.0000 4 135 105 2250 -45 8\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 4050 -45 16\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 6525 -45 27\001 -4 1 0 50 -1 14 12 0.0000 4 180 840 3600 2475 position\001 -4 1 0 50 -1 18 14 0.0000 4 210 2820 3600 3150 Overlaping TrackSegments\001 diff --git a/kite/doc/images/Track-5.fig b/kite/doc/images/Track-5.fig deleted file mode 100644 index 8a712345..00000000 --- a/kite/doc/images/Track-5.fig +++ /dev/null @@ -1,74 +0,0 @@ -#FIG 3.2 -Landscape -Center -Metric -Letter -100.00 -Single --2 -1200 2 -6 360 855 540 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 405 900 405 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 495 900 495 1350 --6 -6 7785 855 7965 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7830 900 7830 1350 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 7920 900 7920 1350 --6 -1 4 0 1 0 7 50 -1 -1 0.000 1 0.0000 3600 1800 90 90 3510 1800 3690 1800 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 - 315 1125 8010 1125 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 1395 855 1350 855 1350 1395 1395 1395 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 2295 945 2250 945 2250 1305 2295 1305 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 7470 945 7425 945 7425 1305 7470 1305 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 6525 1035 7425 1035 7425 1215 6525 1215 6525 1035 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 6570 945 6525 945 6525 1305 6570 1305 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 2250 0 2250 855 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 1350 0 1350 765 -2 1 0 2 0 7 50 -1 19 0.000 0 0 -1 0 0 2 - 6525 0 6525 855 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 3600 2250 3600 1215 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 3510 1800 2295 1800 -2 1 3 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2 - 2250 1395 2250 2250 -2 1 3 2 0 7 50 -1 -1 4.500 0 0 -1 0 0 2 - 1350 1485 1350 2250 -2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 - 3 1 1.00 60.00 120.00 - 2250 2025 1350 2025 -2 2 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 - 0 -675 8325 -675 8325 3375 0 3375 0 -675 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 4095 945 4050 945 4050 1305 4095 1305 -2 2 0 0 0 7 60 -1 16 0.000 0 0 -1 0 0 5 - 2250 1035 4050 1035 4050 1215 2250 1215 2250 1035 -2 1 0 4 0 7 50 -1 -1 0.000 0 0 7 0 0 4 - 2970 855 2925 855 2925 1395 2970 1395 -2 2 0 0 0 7 70 -1 19 0.000 0 0 -1 0 0 5 - 1350 990 2925 990 2925 1260 1350 1260 1350 990 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 4095 2475 3825 2700 3600 2700 3150 2700 2925 2700 2700 2925 - 0.000 1.000 1.000 1.000 1.000 0.000 -3 0 0 2 0 7 50 -1 -1 0.000 0 0 0 6 - 1350 2475 1575 2700 1800 2700 2250 2700 2475 2700 2700 2925 - 0.000 1.000 1.000 1.000 1.000 0.000 -4 1 0 50 -1 14 12 0.0000 4 135 105 1350 -45 4\001 -4 1 0 50 -1 14 12 0.0000 4 135 105 2250 -45 8\001 -4 1 0 50 -1 14 12 0.0000 4 135 210 6525 -45 27\001 -4 1 0 50 -1 14 12 0.0000 4 180 840 3600 2475 position\001 -4 1 0 50 -1 18 14 0.0000 4 210 2820 3600 3150 Overlaping TrackSegments\001 diff --git a/kite/doc/images/TrackBeginIndex-1.fig b/kite/doc/images/TrackBeginIndex-1.fig new file mode 100644 index 00000000..a50aa6fe --- /dev/null +++ b/kite/doc/images/TrackBeginIndex-1.fig @@ -0,0 +1,269 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1725 8325 2850 9075 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 8550 2700 8550 2700 8850 1800 8850 1800 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 8400 1800 8400 1800 9000 1875 9000 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2775 8400 2700 8400 2700 9000 2775 9000 +-6 +6 3225 8325 4050 9075 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3975 8400 3900 8400 3900 9000 3975 9000 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 8550 3900 8550 3900 8850 3300 8850 3300 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 8400 3300 8400 3300 9000 3375 9000 +-6 +6 6000 4200 6450 4800 +6 6000 4500 6450 4800 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6000 4500 6450 4500 6450 4800 6000 4800 6000 4500 +4 0 7 40 -1 14 14 0.0000 4 135 300 6075 4725 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 4200 6000 4800 +-6 +6 6000 6600 6450 7200 +6 6000 6900 6450 7200 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6000 6900 6450 6900 6450 7200 6000 7200 6000 6900 +4 0 7 40 -1 14 14 0.0000 4 135 300 6075 7125 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 6600 6000 7200 +-6 +6 9000 9000 9450 9600 +6 9000 9300 9450 9600 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 9000 9300 9450 9300 9450 9600 9000 9600 9000 9300 +4 0 7 40 -1 14 14 0.0000 4 135 300 9075 9525 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 9000 9000 9600 +-6 +6 9000 11400 9450 12000 +6 9000 11700 9450 12000 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 9000 11700 9450 11700 9450 12000 9000 12000 9000 11700 +4 0 7 40 -1 14 14 0.0000 4 135 300 9075 11925 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 11400 9000 12000 +-6 +6 3600 1200 4050 1800 +6 3600 1500 4050 1800 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 1500 4050 1500 4050 1800 3600 1800 3600 1500 +4 0 7 40 -1 14 14 0.0000 4 135 300 3675 1725 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 1200 3600 1800 +-6 +6 8925 525 9150 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 600 9000 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 600 9075 1200 +-6 +6 5925 525 6750 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 600 6600 600 6600 1200 6675 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 750 6600 750 6600 1050 6000 1050 6000 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 600 6000 600 6000 1200 6075 1200 +-6 +6 8925 3525 9150 4275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 3600 9000 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 3600 9075 4200 +-6 +6 5925 3525 6750 4275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 3600 6600 3600 6600 4200 6675 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 3750 6600 3750 6600 4050 6000 4050 6000 3750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 3600 6000 3600 6000 4200 6075 4200 +-6 +6 8925 5925 9150 6675 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 6000 9000 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 6000 9075 6600 +-6 +6 4125 6300 6000 7200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 7200 4200 6300 +4 0 0 50 -1 14 12 0.0000 4 120 1680 4275 7200 OutsideElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 4275 6975 Pos\001 +-6 +6 3300 5400 5475 6000 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 5400 3300 6000 +4 0 4 50 -1 12 14 0.0000 4 195 1050 3375 5550 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 3375 5775 BeginIsSegmentMax\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 2400 2400 900 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 10800 1500 11400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 11100 9300 11100 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 10800 1425 11400 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9000 10800 9000 11400 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9075 10800 9075 11400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6900 12000 6900 11100 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 10200 9000 10800 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 10200 1500 10800 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 8400 1500 9000 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 8700 9300 8700 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 8400 1425 9000 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 5775 8400 5700 8400 5700 9000 5775 9000 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 4800 8550 5700 8550 5700 8850 4800 8850 4800 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4875 8400 4800 8400 4800 9000 4875 9000 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9000 8400 9000 9000 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9075 8400 9075 9000 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6900 9600 6900 8700 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 7800 5700 8400 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 7800 9000 8400 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 600 1425 1200 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 600 1500 1200 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 0 1500 600 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3675 600 3600 600 3600 1200 3675 1200 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 0 3600 600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 9300 900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 600 8400 600 8400 1200 8475 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 750 8400 750 8400 1050 7500 1050 7500 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 600 7500 600 7500 1200 7575 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3600 750 4500 750 4500 1050 3600 1050 3600 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 600 4500 600 4500 1200 4575 1200 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 3600 1500 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 9300 3900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 3600 8400 3600 8400 4200 8475 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 3750 8400 3750 8400 4050 7500 4050 7500 3750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 3600 7500 3600 7500 4200 7575 4200 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 3600 1425 4200 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 2475 3600 2400 3600 2400 4200 2475 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 4800 3000 3900 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 3600 5100 3600 5100 4200 5175 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 2400 3750 5100 3750 5100 4050 2400 4050 2400 3750 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 3000 2400 3600 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 3000 5100 3600 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 6000 1500 6600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 6300 9300 6300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 6000 8400 6000 8400 6600 8475 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 6150 8400 6150 8400 6450 7500 6450 7500 6150 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 6000 7500 6000 7500 6600 7575 6600 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 6000 1425 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 6000 6600 6000 6600 6600 6675 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 6150 6600 6150 6600 6450 6000 6450 6000 6150 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 6000 6000 6000 6000 6600 6075 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 2400 6150 3300 6150 3300 6450 2400 6450 2400 6150 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 3375 6000 3300 6000 3300 6600 3375 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2475 6000 2400 6000 2400 6600 2475 6600 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 5400 6000 6000 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 900 -300 10800 -300 10800 12300 900 12300 900 -300 +4 0 0 50 -1 14 12 0.0000 4 120 2160 2475 2400 BeforeFirstElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 2475 2175 Pos\001 +4 0 0 50 -1 14 12 0.0000 4 165 1200 6975 12000 EmptyTrack\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 6975 11775 Pos\001 +4 0 1 50 -1 14 12 0.0000 4 120 1560 9075 10575 EndIsTrackMax\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 1575 10350 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 1800 1575 10575 BeginIsTrackMin\001 +4 0 0 50 -1 14 12 0.0000 4 120 1920 6975 9600 AfterLastElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 6975 9375 Pos\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 5775 7950 begin:2\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 5775 8175 BeginIsSegmentMax\001 +4 0 1 50 -1 14 12 0.0000 4 120 1560 9075 8175 EndIsTrackMax\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 4050 825 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 825 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 825 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 3750 3825 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 2850 6225 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 3825 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 6225 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 3825 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 6225 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 2250 8625 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 5250 8625 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 3600 8625 [1]\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 1575 150 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 1800 1575 375 BeginIsTrackMin\001 +4 0 1 50 -1 14 12 0.0000 4 165 1800 3675 375 EndIsSegmentMin\001 +4 0 0 50 -1 14 12 0.0000 4 120 1560 3075 4800 InsideElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 3075 4575 Pos\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 2475 3150 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 2475 3375 BeginIsSegmentMin\001 +4 0 1 50 -1 14 12 0.0000 4 165 1800 5175 3375 EndIsSegmentMax\001 +4 0 1 50 -1 14 12 0.0000 4 165 2280 6075 5775 EndIsNextSegmentMin\001 diff --git a/kite/doc/images/TrackBeginIndex-1.png b/kite/doc/images/TrackBeginIndex-1.png new file mode 100644 index 00000000..c171092a Binary files /dev/null and b/kite/doc/images/TrackBeginIndex-1.png differ diff --git a/kite/doc/images/TrackEnclosingBounds-1.fig b/kite/doc/images/TrackEnclosingBounds-1.fig new file mode 100644 index 00000000..a50aa6fe --- /dev/null +++ b/kite/doc/images/TrackEnclosingBounds-1.fig @@ -0,0 +1,269 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1725 8325 2850 9075 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 8550 2700 8550 2700 8850 1800 8850 1800 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 8400 1800 8400 1800 9000 1875 9000 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2775 8400 2700 8400 2700 9000 2775 9000 +-6 +6 3225 8325 4050 9075 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3975 8400 3900 8400 3900 9000 3975 9000 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3300 8550 3900 8550 3900 8850 3300 8850 3300 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3375 8400 3300 8400 3300 9000 3375 9000 +-6 +6 6000 4200 6450 4800 +6 6000 4500 6450 4800 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6000 4500 6450 4500 6450 4800 6000 4800 6000 4500 +4 0 7 40 -1 14 14 0.0000 4 135 300 6075 4725 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 4200 6000 4800 +-6 +6 6000 6600 6450 7200 +6 6000 6900 6450 7200 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6000 6900 6450 6900 6450 7200 6000 7200 6000 6900 +4 0 7 40 -1 14 14 0.0000 4 135 300 6075 7125 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 6600 6000 7200 +-6 +6 9000 9000 9450 9600 +6 9000 9300 9450 9600 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 9000 9300 9450 9300 9450 9600 9000 9600 9000 9300 +4 0 7 40 -1 14 14 0.0000 4 135 300 9075 9525 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 9000 9000 9600 +-6 +6 9000 11400 9450 12000 +6 9000 11700 9450 12000 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 9000 11700 9450 11700 9450 12000 9000 12000 9000 11700 +4 0 7 40 -1 14 14 0.0000 4 135 300 9075 11925 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 11400 9000 12000 +-6 +6 3600 1200 4050 1800 +6 3600 1500 4050 1800 +2 2 0 1 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3600 1500 4050 1500 4050 1800 3600 1800 3600 1500 +4 0 7 40 -1 14 14 0.0000 4 135 300 3675 1725 LB\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 1200 3600 1800 +-6 +6 8925 525 9150 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 600 9000 1200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 600 9075 1200 +-6 +6 5925 525 6750 1275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 600 6600 600 6600 1200 6675 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 750 6600 750 6600 1050 6000 1050 6000 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 600 6000 600 6000 1200 6075 1200 +-6 +6 8925 3525 9150 4275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 3600 9000 4200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 3600 9075 4200 +-6 +6 5925 3525 6750 4275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 3600 6600 3600 6600 4200 6675 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 3750 6600 3750 6600 4050 6000 4050 6000 3750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 3600 6000 3600 6000 4200 6075 4200 +-6 +6 8925 5925 9150 6675 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 6000 9000 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 6000 9075 6600 +-6 +6 4125 6300 6000 7200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 4200 7200 4200 6300 +4 0 0 50 -1 14 12 0.0000 4 120 1680 4275 7200 OutsideElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 4275 6975 Pos\001 +-6 +6 3300 5400 5475 6000 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 5400 3300 6000 +4 0 4 50 -1 12 14 0.0000 4 195 1050 3375 5550 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 3375 5775 BeginIsSegmentMax\001 +-6 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 2400 2400 2400 900 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 10800 1500 11400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 11100 9300 11100 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 10800 1425 11400 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9000 10800 9000 11400 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9075 10800 9075 11400 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6900 12000 6900 11100 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 10200 9000 10800 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 10200 1500 10800 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 8400 1500 9000 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 8700 9300 8700 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 8400 1425 9000 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 5775 8400 5700 8400 5700 9000 5775 9000 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 4800 8550 5700 8550 5700 8850 4800 8850 4800 8550 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4875 8400 4800 8400 4800 9000 4875 9000 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9000 8400 9000 9000 +2 1 0 4 1 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 9075 8400 9075 9000 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 6900 9600 6900 8700 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 7800 5700 8400 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 7800 9000 8400 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 600 1425 1200 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 600 1500 1200 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 0 1500 600 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3675 600 3600 600 3600 1200 3675 1200 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 0 3600 600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 900 9300 900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 600 8400 600 8400 1200 8475 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 750 8400 750 8400 1050 7500 1050 7500 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 600 7500 600 7500 1200 7575 1200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 3600 750 4500 750 4500 1050 3600 1050 3600 750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4575 600 4500 600 4500 1200 4575 1200 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 3600 1500 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 3900 9300 3900 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 3600 8400 3600 8400 4200 8475 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 3750 8400 3750 8400 4050 7500 4050 7500 3750 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 3600 7500 3600 7500 4200 7575 4200 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 3600 1425 4200 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 2475 3600 2400 3600 2400 4200 2475 4200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 0 0 1.00 60.00 120.00 + 3000 4800 3000 3900 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5175 3600 5100 3600 5100 4200 5175 4200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 2400 3750 5100 3750 5100 4050 2400 4050 2400 3750 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 3000 2400 3600 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 3000 5100 3600 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1500 6000 1500 6600 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 6300 9300 6300 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 8475 6000 8400 6000 8400 6600 8475 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 7500 6150 8400 6150 8400 6450 7500 6450 7500 6150 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 7575 6000 7500 6000 7500 6600 7575 6600 +2 1 0 4 0 7 51 -1 -1 0.000 0 0 -1 0 0 2 + 1425 6000 1425 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6675 6000 6600 6000 6600 6600 6675 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 6000 6150 6600 6150 6600 6450 6000 6450 6000 6150 +2 1 0 4 1 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 6075 6000 6000 6000 6000 6600 6075 6600 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 2400 6150 3300 6150 3300 6450 2400 6450 2400 6150 +2 1 0 4 4 7 51 -1 -1 0.000 0 0 -1 0 0 4 + 3375 6000 3300 6000 3300 6600 3375 6600 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2475 6000 2400 6000 2400 6600 2475 6600 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 5400 6000 6000 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 900 -300 10800 -300 10800 12300 900 12300 900 -300 +4 0 0 50 -1 14 12 0.0000 4 120 2160 2475 2400 BeforeFirstElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 2475 2175 Pos\001 +4 0 0 50 -1 14 12 0.0000 4 165 1200 6975 12000 EmptyTrack\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 6975 11775 Pos\001 +4 0 1 50 -1 14 12 0.0000 4 120 1560 9075 10575 EndIsTrackMax\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 1575 10350 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 1800 1575 10575 BeginIsTrackMin\001 +4 0 0 50 -1 14 12 0.0000 4 120 1920 6975 9600 AfterLastElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 6975 9375 Pos\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 5775 7950 begin:2\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 5775 8175 BeginIsSegmentMax\001 +4 0 1 50 -1 14 12 0.0000 4 120 1560 9075 8175 EndIsTrackMax\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 4050 825 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 825 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 825 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 3750 3825 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 2850 6225 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 3825 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 6300 6225 [1]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 3825 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 7950 6225 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 2250 8625 [0]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 5250 8625 [2]\001 +4 1 0 40 -1 14 14 0.0000 4 180 450 3600 8625 [1]\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 1575 150 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 1800 1575 375 BeginIsTrackMin\001 +4 0 1 50 -1 14 12 0.0000 4 165 1800 3675 375 EndIsSegmentMin\001 +4 0 0 50 -1 14 12 0.0000 4 120 1560 3075 4800 InsideElement\001 +4 0 0 50 -1 12 14 0.0000 4 135 450 3075 4575 Pos\001 +4 0 4 50 -1 12 14 0.0000 4 195 1050 2475 3150 begin:0\001 +4 0 4 50 -1 14 12 0.0000 4 165 2040 2475 3375 BeginIsSegmentMin\001 +4 0 1 50 -1 14 12 0.0000 4 165 1800 5175 3375 EndIsSegmentMax\001 +4 0 1 50 -1 14 12 0.0000 4 165 2280 6075 5775 EndIsNextSegmentMin\001 diff --git a/kite/doc/images/TrackOccupiedInterval-1.fig b/kite/doc/images/TrackOccupiedInterval-1.fig new file mode 100644 index 00000000..8235ff18 --- /dev/null +++ b/kite/doc/images/TrackOccupiedInterval-1.fig @@ -0,0 +1,69 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +90.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1350 6525 1575 7275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 6600 1425 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 6600 1500 7200 +-6 +6 8925 6525 9150 7275 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9000 6600 9000 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 9075 6600 9075 7200 +-6 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1875 6600 1800 6600 1800 7200 1875 7200 +2 1 0 4 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2475 6600 2400 6600 2400 7200 2475 7200 +2 2 0 0 0 7 60 -1 10 0.000 0 0 -1 0 0 5 + 1800 6750 2400 6750 2400 7050 1800 7050 1800 6750 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 3375 6600 3300 6600 3300 7200 3375 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 4575 6600 4500 6600 4500 7200 4575 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 7875 6600 7800 6600 7800 7200 7875 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 6675 6600 6600 6600 6600 7200 6675 7200 +2 1 0 4 4 7 55 -1 -1 0.000 0 0 -1 0 0 4 + 5775 6600 5700 6600 5700 7200 5775 7200 +2 2 0 0 4 4 62 -1 30 0.000 0 0 -1 0 0 5 + 5700 6975 7800 6975 7800 7050 5700 7050 5700 6975 +2 2 0 0 4 4 62 -1 30 0.000 0 0 -1 0 0 5 + 3300 6750 6600 6750 6600 6825 3300 6825 3300 6750 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1200 6900 9300 6900 +2 2 0 0 4 4 62 -1 30 0.000 0 0 -1 0 0 5 + 3300 6975 4500 6975 4500 7050 3300 7050 3300 6975 +2 1 0 1 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 5700 6000 5700 6600 +2 1 0 1 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3300 6000 3300 6600 +2 1 0 1 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 3300 7275 3300 7800 +2 1 0 1 4 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 7800 7275 7800 7800 +2 1 0 1 4 7 40 -1 -1 0.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 3300 7725 7800 7725 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 900 5700 9600 5700 9600 8400 900 8400 900 5700 +4 1 0 40 -1 14 14 0.0000 4 180 450 2100 6825 [0]\001 +4 1 4 40 -1 14 14 0.0000 4 180 450 3900 6750 [1]\001 +4 1 4 40 -1 14 14 0.0000 4 180 450 3900 7125 [2]\001 +4 1 4 40 -1 14 14 0.0000 4 180 450 6150 7125 [3]\001 +4 0 4 40 -1 14 14 0.0000 4 195 1050 3375 6150 begin:1\001 +4 0 4 40 -1 14 14 0.0000 4 195 1050 5775 6150 begin:3\001 +4 1 4 40 -1 14 14 0.0000 4 150 2550 5550 7950 returned interval\001 +4 0 4 40 -1 12 14 0.0000 4 180 1200 3300 6375 (return)\001 +4 0 4 40 -1 12 14 0.0000 4 180 900 5700 6375 (call)\001 diff --git a/kite/doc/images/TrackOccupiedInterval-1.png b/kite/doc/images/TrackOccupiedInterval-1.png new file mode 100644 index 00000000..98715f57 Binary files /dev/null and b/kite/doc/images/TrackOccupiedInterval-1.png differ diff --git a/kite/doc/images/TrackSegment-10.fig b/kite/doc/images/TrackSegment-10.fig new file mode 100644 index 00000000..428ed315 --- /dev/null +++ b/kite/doc/images/TrackSegment-10.fig @@ -0,0 +1,93 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +90.00 +Single +-2 +1200 2 +0 32 #ffffdd +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 3975 2400 75 75 3900 2400 4050 2400 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 3975 3300 75 75 3900 3300 4050 3300 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 3975 3600 75 75 3900 3600 4050 3600 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 3000 750 75 75 2925 750 3075 750 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 2400 750 75 75 2325 750 2475 750 +1 4 0 2 0 7 50 -1 -1 0.000 1 0.0000 1800 750 75 75 1725 750 1875 750 +1 4 0 2 4 7 50 -1 -1 0.000 1 0.0000 7125 5550 75 75 7050 5550 7200 5550 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 2550 5100 2550 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 2850 5100 2850 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 3150 5100 3150 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 3450 5100 3450 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 5100 1950 5100 3750 3000 3750 3000 1950 5100 1950 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 3000 1950 5100 1950 5100 2250 3000 2250 3000 1950 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6150 3750 8250 3750 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8250 3150 8250 4350 6150 4350 6150 3150 8250 3150 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6150 3150 8250 3150 8250 3450 6150 3450 6150 3150 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 9000 5400 11100 5400 11100 5700 9000 5700 9000 5400 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 11100 5400 11100 6000 9000 6000 9000 5400 11100 5400 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 4 + 1 1 1.00 60.00 120.00 + 2400 825 2400 1950 2550 2100 3000 2100 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 600 2100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 600 2700 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 600 3300 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 600 3900 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 600 4500 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 600 5100 900 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 600 5700 900 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1500 600 6300 600 6300 900 1500 900 1500 600 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 1500 300 2700 300 2700 600 1500 600 1500 300 +2 2 0 2 0 7 50 -1 0 0.000 0 0 -1 0 0 5 + 6150 4800 8250 4800 8250 5100 6150 5100 6150 4800 +2 1 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6150 5400 8250 5400 +2 2 0 2 0 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 8250 4800 8250 5700 6150 5700 6150 4800 8250 4800 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 8 + 1 1 1.00 60.00 120.00 + 4050 2400 6750 2400 6900 2250 6900 -150 6750 -300 2250 -300 + 2100 -150 2100 300 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 4050 3300 6150 3300 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 6 + 1 1 1.00 60.00 120.00 + 4050 3600 5250 3600 5400 3750 5400 4800 5550 4950 6150 4950 +2 1 0 1 4 7 50 -1 -1 0.000 0 0 -1 1 0 2 + 1 1 1.00 60.00 120.00 + 7200 5550 9000 5550 +2 2 0 0 0 32 100 -1 20 0.000 0 0 -1 0 0 5 + 1200 -450 11400 -450 11400 6150 1200 6150 1200 -450 +4 0 0 50 -1 14 14 0.0000 4 150 900 3075 2775 net\001 +4 0 0 50 -1 14 14 0.0000 4 195 900 3075 3075 [8,10[\001 +4 0 7 40 -1 14 14 0.0000 4 195 1800 3075 2175 TrackSegment\001 +4 0 7 40 -1 14 14 0.0000 4 180 1650 6225 3375 AutoSegment\001 +4 0 0 50 -1 14 14 0.0000 4 150 900 6225 3675 net\001 +4 0 0 50 -1 14 16 0.0000 4 225 990 6225 3975 _flags\001 +4 0 0 50 -1 14 12 0.0000 4 165 1440 6450 4200 SegCanonical\001 +4 0 7 40 -1 14 14 0.0000 4 195 1800 9075 5625 RoutingEvent\001 +4 0 0 50 -1 14 14 0.0000 4 150 900 9075 5925 net\001 +4 1 7 40 -1 14 16 0.0000 4 165 825 2100 525 Track\001 +4 0 7 40 -1 14 14 0.0000 4 195 1950 6225 5025 DataNegociate\001 +4 0 0 50 -1 14 14 0.0000 4 150 900 6225 5325 net\001 diff --git a/kite/doc/images/TrackSegment-10.png b/kite/doc/images/TrackSegment-10.png new file mode 100644 index 00000000..352837ca Binary files /dev/null and b/kite/doc/images/TrackSegment-10.png differ diff --git a/kite/doc/images/TrackSegment-11.fig b/kite/doc/images/TrackSegment-11.fig new file mode 100644 index 00000000..141e97ec --- /dev/null +++ b/kite/doc/images/TrackSegment-11.fig @@ -0,0 +1,432 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +90.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 1350 300 8700 600 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 450 1500 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 525 1575 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7500 525 7650 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8025 525 8175 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8100 525 8250 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8175 525 8325 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7800 525 7950 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7875 525 8025 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7950 525 8100 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7575 525 7725 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7650 525 7800 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7725 525 7875 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6750 525 6900 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7275 525 7425 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7350 525 7500 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7425 525 7575 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7050 525 7200 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7125 525 7275 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 7200 525 7350 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6825 525 6975 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6900 525 7050 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6975 525 7125 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6000 525 6150 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6525 525 6675 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6600 525 6750 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6675 525 6825 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6300 525 6450 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6375 525 6525 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6450 525 6600 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6075 525 6225 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6150 525 6300 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6225 525 6375 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5250 525 5400 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5775 525 5925 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5850 525 6000 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5925 525 6075 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5550 525 5700 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5625 525 5775 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5700 525 5850 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5325 525 5475 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5400 525 5550 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5475 525 5625 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4500 525 4650 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5025 525 5175 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5100 525 5250 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5175 525 5325 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4800 525 4950 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4875 525 5025 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4950 525 5100 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4575 525 4725 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4650 525 4800 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4725 525 4875 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3750 525 3900 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4275 525 4425 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4350 525 4500 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4425 525 4575 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4050 525 4200 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4125 525 4275 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4200 525 4350 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3825 525 3975 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3900 525 4050 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3975 525 4125 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 525 3150 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3525 525 3675 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3600 525 3750 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3675 525 3825 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3300 525 3450 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3375 525 3525 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3450 525 3600 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3075 525 3225 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3150 525 3300 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3225 525 3375 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2250 525 2400 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2775 525 2925 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 525 3000 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2925 525 3075 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 525 2700 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2625 525 2775 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 525 2850 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2325 525 2475 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 525 2550 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2475 525 2625 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 525 1650 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2025 525 2175 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 525 2250 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2175 525 2325 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1800 525 1950 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1875 525 2025 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1950 525 2100 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1575 525 1725 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1650 525 1800 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1725 525 1875 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8250 525 8400 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8325 525 8475 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8400 525 8550 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8475 525 8625 375 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 8550 525 8625 450 +2 2 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1425 375 8625 375 8625 525 1425 525 1425 375 +-6 +6 1350 1350 3300 1650 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2925 1575 3075 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3000 1575 3150 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3075 1575 3225 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2175 1575 2325 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2700 1575 2850 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2775 1575 2925 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2850 1575 3000 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2475 1575 2625 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 1575 2700 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2625 1575 2775 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2250 1575 2400 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2325 1575 2475 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2400 1575 2550 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 1575 1575 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1950 1575 2100 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2025 1575 2175 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2100 1575 2250 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1725 1575 1875 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1800 1575 1950 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1875 1575 2025 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1500 1575 1650 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1575 1575 1725 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1650 1575 1800 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1425 1500 1500 1425 +2 1 0 1 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3150 1575 3225 1500 +2 2 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 5 + 1425 1425 3225 1425 3225 1575 1425 1575 1425 1425 +-6 +6 3000 2250 8700 2550 +6 3075 2325 8625 2475 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8325 2475 8475 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8400 2475 8550 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8475 2475 8625 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7575 2475 7725 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8100 2475 8250 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8175 2475 8325 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8250 2475 8400 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7875 2475 8025 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7950 2475 8100 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8025 2475 8175 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7650 2475 7800 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7725 2475 7875 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7800 2475 7950 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6825 2475 6975 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7350 2475 7500 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7425 2475 7575 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7500 2475 7650 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7125 2475 7275 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7200 2475 7350 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7275 2475 7425 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6900 2475 7050 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6975 2475 7125 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 7050 2475 7200 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6075 2475 6225 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6600 2475 6750 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6675 2475 6825 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6750 2475 6900 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6375 2475 6525 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6450 2475 6600 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6525 2475 6675 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6150 2475 6300 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6225 2475 6375 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6300 2475 6450 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5325 2475 5475 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5850 2475 6000 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5925 2475 6075 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 6000 2475 6150 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5625 2475 5775 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5700 2475 5850 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5775 2475 5925 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5400 2475 5550 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5475 2475 5625 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5550 2475 5700 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4575 2475 4725 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5100 2475 5250 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5175 2475 5325 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5250 2475 5400 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4875 2475 5025 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4950 2475 5100 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 5025 2475 5175 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4650 2475 4800 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4725 2475 4875 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4800 2475 4950 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3825 2475 3975 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4350 2475 4500 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4425 2475 4575 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4500 2475 4650 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4125 2475 4275 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4200 2475 4350 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4275 2475 4425 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3900 2475 4050 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3975 2475 4125 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 4050 2475 4200 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3075 2475 3225 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3600 2475 3750 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3675 2475 3825 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3750 2475 3900 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3375 2475 3525 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3450 2475 3600 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3525 2475 3675 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3150 2475 3300 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3225 2475 3375 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3300 2475 3450 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 3075 2400 3150 2325 +2 1 0 1 8 7 50 -1 -1 0.000 0 0 7 0 0 2 + 8550 2475 8625 2400 +-6 +2 2 0 2 8 7 50 -1 -1 0.000 0 0 7 0 0 5 + 3075 2325 8625 2325 8625 2475 3075 2475 3075 2325 +-6 +2 1 0 4 8 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3150 1500 3150 2400 +2 1 3 1 0 7 40 -1 -1 4.000 0 0 -1 0 0 2 + 3150 150 3150 1500 +2 1 3 1 0 7 40 -1 -1 4.000 0 0 -1 0 0 1 + 1200 375 +2 2 3 0 32 32 100 -1 20 2.000 0 0 -1 0 0 5 + 1200 0 8850 0 8850 3300 1200 3300 1200 0 +4 2 8 50 -1 14 12 0.0000 4 120 1200 8625 2250 id:2 dll:0\001 +4 0 8 50 -1 14 12 0.0000 4 120 600 3300 2100 dll:1\001 +4 0 8 50 -1 14 12 0.0000 4 120 480 3300 1875 id:1\001 +4 0 1 50 -1 14 12 0.0000 4 120 1200 1425 300 id:0 dll:0\001 +4 0 1 50 -1 14 12 0.0000 4 120 1200 1425 1350 id:0 dll:0\001 +4 0 0 50 -1 14 12 0.0000 4 165 2160 1350 3150 dll = _dogLegLevel\001 diff --git a/kite/doc/images/TrackSegment-11.png b/kite/doc/images/TrackSegment-11.png new file mode 100644 index 00000000..7a5a06da Binary files /dev/null and b/kite/doc/images/TrackSegment-11.png differ diff --git a/kite/doc/images/TrackSegmentCost-1.fig b/kite/doc/images/TrackSegmentCost-1.fig deleted file mode 100644 index 9c50d7ff..00000000 --- a/kite/doc/images/TrackSegmentCost-1.fig +++ /dev/null @@ -1,57 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 3825 2625 3975 2625 3975 2775 3825 2775 3825 2625 -2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 - 3900 2700 11400 2700 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 5025 2625 5175 2625 5175 2775 5025 2775 5025 2625 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 11325 2625 11475 2625 11475 2775 11325 2775 11325 2625 -2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5 - 3600 2100 6300 2100 6300 3000 3600 3000 3600 2100 -2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5 - 3000 1200 4800 1200 4800 3600 3000 3600 3000 1200 -2 2 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 5 - 10800 2100 12000 2100 12000 3600 10800 3600 10800 2100 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 4800 3675 4800 4500 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 6300 3075 6300 4500 -2 1 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 10800 3675 10800 4500 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 7 1 0 2 - 3 1 4.00 60.00 120.00 - 12900 4800 10800 4800 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 4800 4800 10800 4800 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 4800 4500 4800 5100 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 10800 4500 10800 5100 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 7 1 0 2 - 3 1 4.00 60.00 120.00 - 2700 4800 4800 4800 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 2100 600 13500 600 13500 5400 2100 5400 2100 600 -3 0 0 1 0 7 60 -1 -1 0.000 0 0 0 3 - 3900 2700 3375 2025 3000 1200 - 0.000 1.000 0.000 -3 0 0 1 0 7 60 -1 -1 4.000 0 0 0 3 - 5025 2700 4350 2550 3600 2100 - 0.000 1.000 0.000 -3 0 0 1 0 7 60 -1 -1 4.000 0 0 0 3 - 11400 2700 11025 2475 10800 2100 - 0.000 1.000 0.000 -4 0 0 50 -1 14 12 1.5708 4 120 630 4725 4500 CBXMax\001 -4 0 0 50 -1 14 12 1.5708 4 120 630 6225 4500 CBXMax\001 -4 0 0 50 -1 14 12 1.5708 4 135 630 10725 4500 CBXmin\001 -4 2 4 50 -1 14 18 0.0000 4 180 1485 4500 5100 leftBound\001 -4 0 4 50 -1 14 18 0.0000 4 240 1650 11100 5100 rightBound\001 diff --git a/kite/doc/images/TrackSegmentCost-2.fig b/kite/doc/images/TrackSegmentCost-2.fig deleted file mode 100644 index ade66dcf..00000000 --- a/kite/doc/images/TrackSegmentCost-2.fig +++ /dev/null @@ -1,51 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 3825 2625 3975 2625 3975 2775 3825 2775 3825 2625 -2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 - 3900 2700 11400 2700 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 5025 2625 5175 2625 5175 2775 5025 2775 5025 2625 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 11325 2625 11475 2625 11475 2775 11325 2775 11325 2625 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 7 1 0 2 - 3 1 4.00 60.00 120.00 - 12900 4800 10800 4800 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 4800 4800 10800 4800 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 4800 4500 4800 5100 -2 1 0 1 4 7 50 -1 -1 4.000 0 0 7 0 0 2 - 10800 4500 10800 5100 -2 1 0 1 4 7 50 -1 -1 0.000 0 0 7 1 0 2 - 3 1 4.00 60.00 120.00 - 2700 4800 4800 4800 -2 1 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 2 - 4800 3900 10800 3900 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 10725 3825 10875 3825 10875 3975 10725 3975 10725 3825 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 7 0 0 5 - 4725 3825 4875 3825 4875 3975 4725 3975 4725 3825 -2 2 0 4 0 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 4650 3750 4950 3750 4950 4050 4650 4050 4650 3750 -2 1 3 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 - 3900 2700 4800 3900 -2 1 3 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 - 5100 2700 4800 3900 -2 1 3 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 2 - 11400 2700 10800 3900 -2 1 0 2 0 7 60 -1 -1 6.000 0 0 -1 1 0 2 - 3 1 2.00 120.00 240.00 - 3300 2100 3300 4500 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 2100 1500 13500 1500 13500 5400 2100 5400 2100 1500 -4 2 4 50 -1 14 18 0.0000 4 180 1485 4500 5100 leftBound\001 -4 0 4 50 -1 14 18 0.0000 4 240 1650 11100 5100 rightBound\001 -4 1 0 60 -1 14 14 1.5708 4 150 1890 3225 3150 maximal shrunk\001 diff --git a/kite/doc/images/TrackSegmentCost-3.fig b/kite/doc/images/TrackSegmentCost-3.fig deleted file mode 100644 index 02549997..00000000 --- a/kite/doc/images/TrackSegmentCost-3.fig +++ /dev/null @@ -1,105 +0,0 @@ -#FIG 3.2 -Landscape -Center -Inches -Letter -100.00 -Single --2 -1200 2 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 3525 3225 3675 3225 3675 3375 3525 3375 3525 3225 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 5025 3225 5175 3225 5175 3375 5025 3375 5025 3225 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 9825 3225 9975 3225 9975 3375 9825 3375 9825 3225 -2 1 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 2 - 3600 3300 9900 3300 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 3600 3300 3600 600 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 5100 4500 5100 1500 -2 1 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 2 - 9900 5100 9900 3300 -2 2 0 4 0 7 50 -1 -1 10.000 0 0 -1 0 0 5 - 7125 3225 7275 3225 7275 3375 7125 3375 7125 3225 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 7050 3000 7350 3000 7350 3600 7050 3600 7050 3000 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 3525 525 3675 525 3675 675 3525 675 3525 525 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 5025 1425 5175 1425 5175 1575 5025 1575 5025 1425 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 5025 4425 5175 4425 5175 4575 5025 4575 5025 4425 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 3525 2025 3675 2025 3675 2175 3525 2175 3525 2025 -2 2 0 4 4 7 60 -1 -1 10.000 0 0 -1 0 0 5 - 9825 5025 9975 5025 9975 5175 9825 5175 9825 5025 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 3750 600 11700 600 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 5250 1500 11700 1500 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 10050 3300 11700 3300 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 10050 5100 11700 5100 -2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 3600 3450 3600 6000 -2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 5100 4650 5100 6000 -2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 7200 3675 7200 6000 -2 1 0 1 0 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 9900 5250 9900 6000 -2 1 0 1 4 7 60 -1 -1 4.000 0 0 -1 0 0 2 - 5250 4500 11700 4500 -2 1 0 1 0 7 60 -1 -1 0.000 0 0 -1 1 0 2 - 1 0 1.00 120.00 240.00 - 2700 5700 10500 5700 -2 1 0 1 4 7 60 -1 -1 0.000 0 0 -1 1 0 2 - 1 0 1.00 120.00 240.00 - 3000 6000 3000 0 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 4500 3075 4500 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 5100 3075 5100 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 2100 3075 2100 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 3300 3075 3300 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 600 3075 600 -2 1 0 4 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 3600 5625 3600 5775 -2 1 0 4 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 5100 5625 5100 5775 -2 1 0 4 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 9900 5625 9900 5775 -2 1 0 4 0 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 7200 5625 7200 5775 -2 1 0 4 4 7 60 -1 -1 0.000 0 0 -1 0 0 2 - 2925 1500 3075 1500 -2 2 0 2 0 7 60 -1 -1 6.000 0 0 -1 0 0 5 - 2100 -600 12300 -600 12300 6600 2100 6600 2100 -600 -4 0 4 60 -1 18 14 0.0000 4 210 1260 10200 1425 right @7: 16\001 -4 0 4 60 -1 18 14 0.0000 4 210 1260 10200 525 right @2: 19\001 -4 0 4 60 -1 18 14 0.0000 4 210 1800 10200 3225 punctual @14: 10\001 -4 0 4 60 -1 18 14 0.0000 4 180 1080 10200 5025 left @23: 4\001 -4 0 4 60 -1 18 14 0.0000 4 180 960 10200 4425 left @7: 6\001 -4 1 4 60 -1 18 14 0.0000 4 165 150 3450 1725 A\001 -4 1 4 60 -1 18 14 0.0000 4 165 150 3750 2775 B\001 -4 1 4 60 -1 18 14 0.0000 4 165 165 5250 2475 C\001 -4 1 4 60 -1 18 14 0.0000 4 165 165 7500 3600 D\001 -4 1 4 60 -1 18 14 0.0000 4 165 135 9750 4200 E\001 -4 1 0 60 -1 18 14 0.0000 4 150 120 3600 6300 2\001 -4 1 0 60 -1 18 14 0.0000 4 150 120 5100 6300 7\001 -4 1 0 60 -1 18 14 0.0000 4 150 240 7200 6300 14\001 -4 1 0 60 -1 18 14 0.0000 4 150 240 9900 6300 23\001 -4 2 4 60 -1 18 14 0.0000 4 150 120 2850 5100 4\001 -4 2 4 60 -1 18 14 0.0000 4 150 120 2850 4500 6\001 -4 2 4 60 -1 18 14 0.0000 4 150 240 2850 3300 10\001 -4 2 4 60 -1 18 14 0.0000 4 150 240 2850 2100 14\001 -4 2 4 60 -1 18 14 0.0000 4 150 240 2850 600 19\001 -4 1 4 60 -1 14 14 0.0000 4 135 135 3000 -75 Y\001 -4 1 0 60 -1 14 14 0.0000 4 135 135 10650 5775 X\001 -4 2 4 60 -1 18 14 0.0000 4 150 240 2850 1500 16\001 diff --git a/kite/doc/images/_makeDogleg-10.fig b/kite/doc/images/_makeDogleg-10.fig new file mode 100644 index 00000000..3b0b0512 --- /dev/null +++ b/kite/doc/images/_makeDogleg-10.fig @@ -0,0 +1,271 @@ +#FIG 3.2 Produced by xfig version 3.2.5a +Landscape +Center +Inches +Letter +100.00 +Single +-2 +1200 2 +0 32 #ffffdd +6 450 3000 750 4350 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3225 675 3075 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3300 675 3150 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3375 675 3225 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3450 675 3300 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3525 675 3375 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3600 675 3450 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3675 675 3525 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3750 675 3600 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3825 675 3675 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3900 675 3750 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3975 675 3825 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 4050 675 3900 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 4125 675 3975 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 4200 675 4050 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 4275 675 4125 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 3150 600 3075 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 600 4275 675 4200 +2 2 0 2 1 32 50 -1 -1 6.000 0 0 -1 0 0 5 + 525 3075 675 3075 675 4275 525 4275 525 3075 +-6 +6 1425 3075 1875 3375 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 1500 3300 1800 3300 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 1650 3150 1650 3300 +-6 +6 2325 3225 2775 3525 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 2400 3300 2700 3300 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 2550 3450 2550 3300 +-6 +6 450 900 750 2250 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1125 675 975 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1200 675 1050 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1275 675 1125 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1350 675 1200 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1425 675 1275 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1500 675 1350 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1575 675 1425 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1650 675 1500 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1725 675 1575 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1800 675 1650 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1875 675 1725 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1950 675 1800 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 2025 675 1875 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 2100 675 1950 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 2175 675 2025 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 525 1050 600 975 +2 1 0 1 1 32 50 -1 -1 4.000 0 0 -1 0 0 2 + 600 2175 675 2100 +2 2 0 2 1 32 50 -1 -1 6.000 0 0 -1 0 0 5 + 525 975 675 975 675 2175 525 2175 525 975 +-6 +6 1425 975 1875 1275 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 1500 1200 1800 1200 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 1650 1050 1650 1200 +-6 +6 2325 1125 2775 1425 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 2400 1200 2700 1200 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 2550 1350 2550 1200 +-6 +6 -825 6450 7425 7575 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + -750 6525 -150 6525 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + -750 6825 -150 6825 +2 1 0 2 4 32 40 -1 -1 0.000 0 0 -1 0 0 2 + -750 7125 -150 7125 +2 2 0 0 0 0 60 -1 4 2.000 0 0 -1 0 0 5 + -750 7350 -150 7350 -150 7425 -750 7425 -750 7350 +4 0 0 60 -1 18 12 0.0000 4 195 2115 0 6600 parallel AutoSegments\001 +4 0 0 60 -1 18 12 0.0000 4 195 2715 0 6900 perpandicular AutoSegments\001 +4 0 0 60 -1 18 12 0.0000 4 195 2700 0 7200 newly created AutoSegments\001 +4 0 0 60 -1 18 12 0.0000 4 195 1440 0 7500 TrackSegments\001 +4 0 0 60 -1 14 12 0.0000 4 165 2880 4050 6600 dogleg[N+0] = 10 (paral)\001 +4 0 0 60 -1 14 12 0.0000 4 165 3120 4050 6900 dogleg[N+1] = 20 (perpand)\001 +4 0 0 60 -1 14 12 0.0000 4 165 3360 4050 7200 dogleg[N+2] = 21 (new paral)\001 +-6 +2 2 0 4 0 32 40 -1 -1 10.000 0 0 -1 0 0 5 + 525 3225 675 3225 675 3375 525 3375 525 3225 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1050 3300 1050 3000 1350 3000 1350 3300 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1650 3300 1650 2550 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 3300 2550 4050 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 1650 3300 2550 3300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1950 3300 1950 3000 2250 3000 2250 3300 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 2925 3300 2925 3000 3225 3000 3225 3300 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 2625 3300 3450 3300 +2 1 3 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 3450 5550 450 5550 +2 1 3 1 0 7 50 -1 -1 4.000 0 0 -1 1 1 2 + 0 0 1.00 60.00 120.00 + 0 0 1.00 60.00 120.00 + 6150 5550 3450 5550 +2 1 0 2 4 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 3450 3300 3450 4800 +2 1 0 4 4 32 40 -1 -1 0.000 0 0 -1 0 0 3 + 3300 3300 3450 3300 3450 3450 +2 1 0 2 4 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 3450 4800 4350 4800 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4350 4800 4350 4050 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5250 4800 5250 4050 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6150 4800 6150 5550 +2 1 0 4 0 32 40 -1 -1 0.000 0 0 -1 0 0 3 + 6000 4800 6150 4800 6150 4950 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 4200 4800 4500 4800 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 4350 4650 4350 4800 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 4350 4800 5250 4800 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4650 4800 4650 4500 4950 4500 4950 4800 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 5100 4800 5400 4800 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 5250 4650 5250 4800 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 5250 4800 6150 4800 +2 1 0 4 4 32 40 -1 -1 0.000 0 0 -1 0 0 3 + 3600 4800 3450 4800 3450 4650 +2 1 0 1 4 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 3450 4200 3150 4200 3150 3900 3450 3900 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 675 3300 1650 3300 +2 1 0 1 4 7 50 -1 -1 4.000 0 0 -1 0 0 4 + 3750 4800 3750 4500 4050 4500 4050 4800 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5550 4800 5550 4500 5850 4500 5850 4800 +2 2 0 4 0 32 40 -1 -1 10.000 0 0 -1 0 0 5 + 525 1125 675 1125 675 1275 525 1275 525 1125 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1050 1200 1050 900 1350 900 1350 1200 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 3450 1200 4350 1200 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 2550 1200 3450 1200 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 1650 1200 1650 450 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 2550 1200 2550 1950 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 4350 1200 4350 450 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 5250 1200 5250 450 +2 1 0 2 1 7 50 -1 -1 0.000 0 0 -1 0 0 2 + 6150 1200 6150 1950 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 675 1200 1650 1200 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 1650 1200 2550 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 1950 1200 1950 900 2250 900 2250 1200 +2 1 0 4 0 32 40 -1 -1 0.000 0 0 -1 0 0 3 + 6000 1200 6150 1200 6150 1350 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 4200 1200 4500 1200 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 4350 1050 4350 1200 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 4350 1200 5250 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 4650 1200 4650 900 4950 900 4950 1200 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 5100 1200 5400 1200 +2 1 0 4 0 7 40 -1 -1 0.000 0 0 -1 0 0 2 + 5250 1050 5250 1200 +2 1 0 2 0 32 40 -1 -1 0.000 0 0 -1 0 0 2 + 5250 1200 6150 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 5550 1200 5550 900 5850 900 5850 1200 +2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 0 0 4 + 3300 1200 3300 900 3600 900 3600 1200 +2 1 3 1 4 7 50 -1 -1 4.000 0 0 -1 0 0 2 + 3450 2700 3450 5700 +2 2 0 0 4 4 60 -1 35 2.000 0 0 -1 0 0 5 + 3600 3300 3675 3300 3675 4800 3600 4800 3600 3300 +2 2 0 0 0 0 60 -1 4 2.000 0 0 -1 0 0 5 + 3450 5025 6150 5025 6150 5100 3450 5100 3450 5025 +2 1 0 1 0 0 60 -1 -1 4.000 0 0 -1 0 0 2 + 2925 3300 2925 3525 +2 1 0 1 0 0 60 -1 -1 4.000 0 0 -1 0 0 2 + 5550 4800 5550 5100 +2 1 0 1 4 0 60 -1 -1 4.000 0 0 -1 0 0 2 + 3450 4200 3675 4200 +2 2 0 0 0 0 60 -1 4 2.000 0 0 -1 0 0 5 + 600 1500 6150 1500 6150 1425 600 1425 600 1500 +2 1 0 1 0 0 60 -1 -1 4.000 0 0 -1 0 0 2 + 5550 1200 5550 1500 +2 2 0 0 4 4 60 -1 35 2.000 0 0 -1 0 0 5 + 3450 3525 3450 3600 600 3600 600 3525 3450 3525 +2 2 0 0 0 32 70 -1 21 2.000 0 0 -1 0 0 5 + -900 300 7500 300 7500 7800 -900 7800 -900 300 +4 1 0 50 -1 14 12 0.0000 4 120 240 1200 3225 14\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 2100 3225 13\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 3075 3225 12\001 +4 1 0 50 -1 14 10 0.0000 4 105 945 1950 5700 left side\001 +4 1 0 50 -1 14 10 0.0000 4 135 1050 4800 5700 right side\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 4800 4725 11\001 +4 1 4 50 -1 14 12 0.0000 4 120 240 3300 4125 20\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 5700 4725 10\001 +4 1 4 50 -1 14 12 0.0000 4 120 240 3900 4725 21\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 1200 1125 14\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 2100 1125 13\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 4800 1125 11\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 5700 1125 10\001 +4 1 0 50 -1 14 12 0.0000 4 120 240 3450 1125 12\001 +4 1 0 50 -1 14 10 0.0000 4 90 105 5700 1350 C\001 +4 1 0 50 -1 14 10 0.0000 4 90 105 5700 4950 C\001 +4 1 4 50 -1 14 10 0.0000 4 90 105 3525 4125 C\001 +4 1 4 50 -1 14 10 0.0000 4 90 105 3075 3450 C\001 diff --git a/kite/doc/images/_makeDogleg-10.png b/kite/doc/images/_makeDogleg-10.png new file mode 100644 index 00000000..94781e61 Binary files /dev/null and b/kite/doc/images/_makeDogleg-10.png differ diff --git a/kite/src/BuildPowerRails.cpp b/kite/src/BuildPowerRails.cpp index f8b615b7..2f002ab8 100644 --- a/kite/src/BuildPowerRails.cpp +++ b/kite/src/BuildPowerRails.cpp @@ -1,8 +1,7 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,27 +14,26 @@ // +-----------------------------------------------------------------+ -#include -#include - -#include "hurricane/Error.h" -#include "hurricane/Warning.h" -#include "hurricane/DataBase.h" -#include "hurricane/Technology.h" -#include "hurricane/BasicLayer.h" -#include "hurricane/RegularLayer.h" -#include "hurricane/Horizontal.h" -#include "hurricane/Vertical.h" -#include "hurricane/NetExternalComponents.h" -#include "hurricane/Instance.h" -#include "hurricane/Plug.h" -#include "hurricane/Path.h" -#include "hurricane/Query.h" -#include "crlcore/AllianceFramework.h" -#include "kite/RoutingPlane.h" -#include "kite/TrackFixedSegment.h" -#include "kite/Track.h" -#include "kite/KiteEngine.h" +#include +#include +#include "hurricane/Error.h" +#include "hurricane/Warning.h" +#include "hurricane/DataBase.h" +#include "hurricane/Technology.h" +#include "hurricane/BasicLayer.h" +#include "hurricane/RegularLayer.h" +#include "hurricane/Horizontal.h" +#include "hurricane/Vertical.h" +#include "hurricane/NetExternalComponents.h" +#include "hurricane/Instance.h" +#include "hurricane/Plug.h" +#include "hurricane/Path.h" +#include "hurricane/Query.h" +#include "crlcore/AllianceFramework.h" +#include "kite/RoutingPlane.h" +#include "kite/TrackFixedSegment.h" +#include "kite/Track.h" +#include "kite/KiteEngine.h" namespace { @@ -43,6 +41,8 @@ namespace { using namespace std; using Hurricane::tab; using Hurricane::inltrace; + using Hurricane::ltracein; + using Hurricane::ltraceout; using Hurricane::ForEachIterator; using Hurricane::Warning; using Hurricane::Error; @@ -72,7 +72,6 @@ namespace { // ------------------------------------------------------------------- // Class : "::GlobalNetTable". - class GlobalNetTable { public: GlobalNetTable ( Cell* ); @@ -208,7 +207,7 @@ namespace { if ( _vddi == NULL ) cerr << Error("Missing / net at top level." ) << endl; if ( _vssi == NULL ) cerr << Error("Missing / net at top level." ) << endl; - if ( _ckc == NULL ) cerr << Warning("No net at top level." ) << endl; + if ( _ckc == NULL ) cparanoid << Warning("No net at top level." ) << endl; } @@ -257,23 +256,23 @@ namespace { // ------------------------------------------------------------------- // Class : "::PowerRailsPlanes". - class PowerRailsPlanes { - private: + public: class Rails; class Plane; class Rail { public: - Rail ( Rails*, DbU::Unit axis, DbU::Unit width ); - inline DbU::Unit getAxis () const; - inline DbU::Unit getWidth () const; - inline Rails* getRails () const; - inline RoutingPlane* getRoutingPlane () const; - inline Constant::Direction getDirection () const; - inline Net* getNet () const; - void merge ( DbU::Unit source, DbU::Unit target ); - void doLayout ( const Layer* ); + Rail ( Rails*, DbU::Unit axis, DbU::Unit width ); + inline DbU::Unit getAxis () const; + inline DbU::Unit getWidth () const; + inline Rails* getRails () const; + inline RoutingPlane* getRoutingPlane () const; + inline unsigned int getDirection () const; + inline Net* getNet () const; + void merge ( DbU::Unit source, DbU::Unit target ); + void doLayout ( const Layer* ); + string _getString () const; private: Rails* _rails; DbU::Unit _axis; @@ -297,41 +296,47 @@ namespace { DbU::Unit _width; }; - private: + public: class Rails { public: - Rails ( Plane*, Constant::Direction, Net* ); - ~Rails (); - inline Plane* getPlane (); - inline RoutingPlane* getRoutingPlane (); - inline Constant::Direction getDirection () const; - inline Net* getNet () const; - void merge ( const Box& ); - void doLayout ( const Layer* ); + Rails ( Plane*, unsigned int direction, Net* ); + ~Rails (); + inline Plane* getPlane (); + inline RoutingPlane* getRoutingPlane (); + inline unsigned int getDirection () const; + inline Net* getNet () const; + void merge ( const Box& ); + void doLayout ( const Layer* ); private: - Plane* _plane; - Constant::Direction _direction; - Net* _net; - vector _rails; + Plane* _plane; + unsigned int _direction; + Net* _net; + vector _rails; }; - private: + public: class Plane { public: - Plane ( const Layer*, RoutingPlane* ); - ~Plane (); - inline const Layer* getLayer () const; - inline RoutingPlane* getRoutingPlane (); - inline Constant::Direction getDirection () const; - void merge ( const Box&, Net* ); - void doLayout (); + typedef map RailsMap; + public: + Plane ( const Layer*, RoutingPlane* ); + ~Plane (); + inline const Layer* getLayer () const; + inline RoutingPlane* getRoutingPlane (); + inline unsigned int getDirection () const; + inline unsigned int getPowerDirection () const; + void merge ( const Box&, Net* ); + void doLayout (); private: const Layer* _layer; RoutingPlane* _routingPlane; - map _horizontalRails; - map _verticalRails; + RailsMap _horizontalRails; + RailsMap _verticalRails; + unsigned int _powerDirection; }; + public: + typedef map PlanesMap; public: PowerRailsPlanes ( KiteEngine* ); ~PowerRailsPlanes (); @@ -342,73 +347,104 @@ namespace { void merge ( const Box&, Net* ); void doLayout (); private: - KiteEngine* _kite; - GlobalNetTable _globalNets; - map _planes; - Plane* _activePlane; + KiteEngine* _kite; + GlobalNetTable _globalNets; + PlanesMap _planes; + Plane* _activePlane; }; +} // Anonymous namespace. + + +namespace { + + PowerRailsPlanes::Rail::Rail ( Rails* rails, DbU::Unit axis, DbU::Unit width ) : _rails (rails) , _axis (axis) , _width (width) , _chunks() { - ltrace(300) << " new Rail " << (void*)this + ltrace(300) << " new Rail " << " @" << DbU::getValueString(axis) << " " << getRoutingPlane()->getLayer()->getName() << " " << getRails()->getNet() - << " " << getString(getDirection()) << endl; + << " " << ((getDirection()==KbHorizontal) ? "Horizontal" : "Vertical")<< endl; } - inline DbU::Unit PowerRailsPlanes::Rail::getAxis () const { return _axis; } - inline DbU::Unit PowerRailsPlanes::Rail::getWidth () const { return _width; } - inline PowerRailsPlanes::Rails* PowerRailsPlanes::Rail::getRails () const { return _rails; } - inline RoutingPlane* PowerRailsPlanes::Rail::getRoutingPlane () const { return _rails->getRoutingPlane(); } - inline Constant::Direction PowerRailsPlanes::Rail::getDirection () const { return _rails->getDirection(); } - inline Net* PowerRailsPlanes::Rail::getNet () const { return _rails->getNet(); } + inline DbU::Unit PowerRailsPlanes::Rail::getAxis () const { return _axis; } + inline DbU::Unit PowerRailsPlanes::Rail::getWidth () const { return _width; } + inline PowerRailsPlanes::Rails* PowerRailsPlanes::Rail::getRails () const { return _rails; } + inline RoutingPlane* PowerRailsPlanes::Rail::getRoutingPlane () const { return _rails->getRoutingPlane(); } + inline unsigned int PowerRailsPlanes::Rail::getDirection () const { return _rails->getDirection(); } + inline Net* PowerRailsPlanes::Rail::getNet () const { return _rails->getNet(); } void PowerRailsPlanes::Rail::merge ( DbU::Unit source, DbU::Unit target ) { - Interval chunkMerge ( source, target ); - ltrace(300) << " Rail::merge() " << chunkMerge << endl; + Interval chunkToMerge ( source, target ); + ltrace(300) << " Rail::merge() " + << ((getDirection()==KbHorizontal) ? "Horizontal" : "Vertical") + << " " << chunkToMerge << endl; + ltrace(300) << " | " << _getString() << endl; list::iterator imerge = _chunks.end(); list::iterator ichunk = _chunks.begin(); while ( ichunk != _chunks.end() ) { - if ( chunkMerge.getVMax() < (*ichunk).getVMin() ) { - _chunks.insert ( ichunk, chunkMerge ); - break; + if (imerge == _chunks.end()) { + if (chunkToMerge.getVMax() < (*ichunk).getVMin()) { + ltrace(300) << " | Insert before " << *ichunk << endl; + imerge = _chunks.insert( ichunk, chunkToMerge ); + break; + } + + if (chunkToMerge.intersect(*ichunk)) { + ltrace(300) << " | Merge with " << *ichunk << endl; + imerge = ichunk; + (*imerge).merge( chunkToMerge ); + } + } else { + if (chunkToMerge.getVMax() >= (*ichunk).getVMin()) { + (*imerge).merge( *ichunk ); + ltrace(300) << " | Absorb (erase) " << *ichunk << endl; + ichunk = _chunks.erase( ichunk ); + continue; + } else + break; } - if ( chunkMerge.intersect(*ichunk) ) { - if ( imerge == _chunks.end() ) { - imerge = ichunk; - (*imerge).merge ( chunkMerge ); - } else { - (*imerge).merge ( *ichunk ); - ichunk = _chunks.erase ( ichunk ); - continue; - } - } - ichunk++; + // if (chunkToMerge.intersect(*ichunk)) { + // if (imerge == _chunks.end()) { + // ltrace(300) << " | Merge with " << *ichunk << endl; + // imerge = ichunk; + // (*imerge).merge( chunkToMerge ); + // } else { + // (*imerge).merge( *ichunk ); + // ltrace(300) << " | Absorb (erase) " << *ichunk << endl; + // ichunk = _chunks.erase( ichunk ); + // continue; + // } + // } + ++ichunk; } - if ( imerge == _chunks.end() ) { - _chunks.insert ( ichunk, chunkMerge ); - ltrace(300) << " | Add on " << DbU::getValueString(_axis) << " " << chunkMerge << endl; + if (imerge == _chunks.end()) { + _chunks.insert( ichunk, chunkToMerge ); + ltrace(300) << " | Insert at end " << DbU::getValueString(_axis) << " " << chunkToMerge << endl; + ltrace(300) << " | " << _getString() << endl; } } void PowerRailsPlanes::Rail::doLayout ( const Layer* layer ) { - ltrace(300) << "Doing layout of rail: " << (void*)this + ltrace(300) << "Doing layout of rail: " << " " << layer->getName() - << " " << getString(getDirection()) << " @" << DbU::getValueString(_axis) << endl; + << " " << ((getDirection()==KbHorizontal) ? "Horizontal" : "Vertical") + << " @" << DbU::getValueString(_axis) << endl; + ltrace(300) << _getString() << endl; Net* net = getNet(); RoutingPlane* plane = getRoutingPlane(); @@ -418,18 +454,33 @@ namespace { - DbU::lambda(0.1); DbU::Unit extension = layer->getExtentionCap(); //DbU::Unit extension = Session::getExtentionCap(); - unsigned int type = plane->getLayerGauge()->getType(); + //unsigned int type = plane->getLayerGauge()->getType(); DbU::Unit axisMin = 0; DbU::Unit axisMax = 0; - if ( type == Constant::PinOnly ) { - ltrace(300) << " Layer is PinOnly." << endl; - return; - } + // if ( type == Constant::PinOnly ) { + // ltrace(300) << " Layer is PinOnly." << endl; + // return; + // } - if ( getDirection() == Constant::Horizontal ) { - list::iterator ichunk = _chunks.begin(); - for ( ; ichunk != _chunks.end() ; ichunk++ ) { + if ( getDirection() == KbHorizontal ) { + list::iterator ichunk = _chunks.begin(); + list::iterator ichunknext = ichunk; + ++ichunknext; + + for ( ; ichunk != _chunks.end() ; ++ichunk, ++ichunknext ) { + + if (ichunknext != _chunks.end()) { + if ((*ichunk).intersect(*ichunknext)) + cerr << Error( "Overlaping consecutive chunks in %s %s Rail @%s:\n" + " %s" + , getString(layer->getName()).c_str() + , ((getDirection()==KbHorizontal) ? "Horizontal" : "Vertical") + , DbU::getValueString(_axis).c_str() + , _getString().c_str() + ) << endl; + } + ltrace(300) << " chunk: [" << DbU::getValueString((*ichunk).getVMin()) << ":" << DbU::getValueString((*ichunk).getVMax()) << "]" << endl; @@ -447,7 +498,7 @@ namespace { axisMax = _axis + _width/2 + delta; Track* track = plane->getTrackByPosition ( axisMin, Constant::Superior ); - for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNext() ) { + for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) { TrackElement* element = TrackFixedSegment::create ( track, segment ); ltrace(300) << " Insert in " << track << "+" << element << endl; } @@ -472,15 +523,32 @@ namespace { axisMax = _axis + _width/2 + delta; Track* track = plane->getTrackByPosition ( axisMin, Constant::Superior ); - for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNext() ) { + for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) { TrackElement* element = TrackFixedSegment::create ( track, segment ); - ltrace(300) << " Insert in " << track << "+" << (void*)element << ":" << element << endl; + ltrace(300) << " Insert in " << track << "+" << element << endl; } } } } + string PowerRailsPlanes::Rail::_getString () const + { + ostringstream os; + + os << "::const_iterator ichunk = _chunks.begin(); + for ( ; ichunk != _chunks.end() ; ++ichunk ) { + if (ichunk != _chunks.begin()) os << " "; + os << "[" << DbU::getValueString((*ichunk).getVMin()) + << " " << DbU::getValueString((*ichunk).getVMax()) << "]"; + } + os << ">"; + return os.str(); + } + + inline bool PowerRailsPlanes::RailCompare::operator() ( const Rail* lhs, const Rail* rhs ) { if ( lhs->getAxis () < rhs->getAxis () ) return true; @@ -499,16 +567,16 @@ namespace { { return (rail->getAxis() == _axis) and (rail->getWidth() == _width); } - PowerRailsPlanes::Rails::Rails ( PowerRailsPlanes::Plane* plane, Constant::Direction direction, Net* net ) - : _plane (plane) - , _direction(direction) - , _net (net) - , _rails () + PowerRailsPlanes::Rails::Rails ( PowerRailsPlanes::Plane* plane , unsigned int direction , Net* net ) + : _plane (plane) + , _direction (direction) + , _net (net) + , _rails () { ltrace(300) << " new Rails @" << " " << getRoutingPlane()->getLayer()->getName() << " " << net - << " " << getString(getDirection()) << endl; + << " " << ((getDirection()==KbHorizontal) ? "Horizontal": "Vertical") << endl; } @@ -521,10 +589,10 @@ namespace { } - inline PowerRailsPlanes::Plane* PowerRailsPlanes::Rails::getPlane () { return _plane; } - inline RoutingPlane* PowerRailsPlanes::Rails::getRoutingPlane () { return getPlane()->getRoutingPlane(); } - inline Constant::Direction PowerRailsPlanes::Rails::getDirection () const { return _direction; } - inline Net* PowerRailsPlanes::Rails::getNet () const { return _net; } + inline PowerRailsPlanes::Plane* PowerRailsPlanes::Rails::getPlane () { return _plane; } + inline RoutingPlane* PowerRailsPlanes::Rails::getRoutingPlane () { return getPlane()->getRoutingPlane(); } + inline unsigned int PowerRailsPlanes::Rails::getDirection () const { return _direction; } + inline Net* PowerRailsPlanes::Rails::getNet () const { return _net; } void PowerRailsPlanes::Rails::merge ( const Box& bb ) @@ -534,7 +602,7 @@ namespace { DbU::Unit sourceU; DbU::Unit targetU; - if ( getDirection() == Constant::Horizontal ) { + if (getDirection() == KbHorizontal) { axis = bb.getYCenter(); width = bb.getHeight(); sourceU = bb.getXMin(); @@ -564,7 +632,7 @@ namespace { void PowerRailsPlanes::Rails::doLayout ( const Layer* layer ) { ltrace(300) << "Doing layout of rails: " << layer->getName() - << " " << getString(_direction) + << " " << ((_direction==KbHorizontal) ? "Horizontal" : "Vertical") << " " << _net->getName() << endl; for ( size_t irail=0 ; irail<_rails.size() ; irail++ ) @@ -577,14 +645,18 @@ namespace { , _routingPlane (routingPlane) , _horizontalRails () , _verticalRails () + , _powerDirection (routingPlane->getDirection()) { ltrace(300) << "New Plane " << _layer->getName() << " " << _routingPlane << endl; + + // Hard-coded SxLib gauge. + if (_routingPlane->getDepth() == 0) _powerDirection = KbHorizontal; } PowerRailsPlanes::Plane::~Plane () { - map::iterator irail = _horizontalRails.begin(); + RailsMap::iterator irail = _horizontalRails.begin(); for ( ; irail != _horizontalRails.end() ; ++irail ) { delete (*irail).second; } @@ -595,30 +667,35 @@ namespace { } - inline const Layer* PowerRailsPlanes::Plane::getLayer () const { return _layer; } - inline RoutingPlane* PowerRailsPlanes::Plane::getRoutingPlane () { return _routingPlane; } - inline Constant::Direction PowerRailsPlanes::Plane::getDirection () const { return (Constant::Direction)_routingPlane->getDirection(); } + inline const Layer* PowerRailsPlanes::Plane::getLayer () const { return _layer; } + inline RoutingPlane* PowerRailsPlanes::Plane::getRoutingPlane () { return _routingPlane; } + inline unsigned int PowerRailsPlanes::Plane::getDirection () const { return _routingPlane->getDirection(); } + inline unsigned int PowerRailsPlanes::Plane::getPowerDirection () const { return _powerDirection; } void PowerRailsPlanes::Plane::merge ( const Box& bb, Net* net ) { Rails* rails = NULL; - ltrace(300) << " Plane::merge() " << net->getName() << " " << (void*)net << endl; + ltrace(300) << " Plane::merge() " << net->getName() << " " << bb << endl; - if ( getDirection() == Constant::Horizontal ) { - map::iterator irails = _horizontalRails.find(net); + unsigned int direction = getDirection(); + if ( (net->getType() == Net::Type::POWER) or (net->getType() == Net::Type::GROUND) ) + direction = getPowerDirection(); + + if (direction == KbHorizontal) { + RailsMap::iterator irails = _horizontalRails.find(net); if ( irails == _horizontalRails.end() ) { - rails = new Rails(this,Constant::Horizontal,net); + rails = new Rails(this,KbHorizontal,net); _horizontalRails.insert ( make_pair(net,rails) ); } else rails = (*irails).second; rails->merge ( bb ); } else { - map::iterator irails = _verticalRails.find(net); + RailsMap::iterator irails = _verticalRails.find(net); if ( irails == _verticalRails.end() ) { - rails = new Rails(this,Constant::Vertical,net); + rails = new Rails(this,KbVertical,net); _verticalRails.insert ( make_pair(net,rails) ); } else rails = (*irails).second; @@ -633,7 +710,7 @@ namespace { { ltrace(300) << "Doing layout of plane: " << _layer->getName() << endl; - map::iterator irails = _horizontalRails.begin(); + RailsMap::iterator irails = _horizontalRails.begin(); for ( ; irails != _horizontalRails.end() ; ++irails ) { (*irails).second->doLayout(_layer); } @@ -650,7 +727,7 @@ namespace { , _planes () , _activePlane(NULL) { - _globalNets.setBlockage ( kite->getBlockageNet() ); + _globalNets.setBlockage( kite->getBlockageNet() ); Technology* technology = DataBase::getDB()->getTechnology(); RoutingGauge* rg = _kite->getConfiguration()->getRoutingGauge(); @@ -668,14 +745,12 @@ namespace { RoutingPlane* rp = _kite->getRoutingPlaneByIndex(lg->getDepth()); ltrace(300) << "Plane:" << rp << endl; - _planes.insert ( make_pair(regular->getBasicLayer(),new Plane(regular,rp)) ); + _planes.insert( make_pair(regular->getBasicLayer(),new Plane(regular,rp)) ); const BasicLayer* blockageLayer = regular->getBasicLayer()->getBlockageLayer(); - if ( not blockageLayer ) continue; + if (not blockageLayer) continue; - _planes.insert ( make_pair(blockageLayer,new Plane(blockageLayer,rp)) ); - - ltrace(300) << "OK" << endl; + _planes.insert( make_pair(blockageLayer,new Plane(blockageLayer,rp)) ); } } @@ -699,7 +774,7 @@ namespace { bool PowerRailsPlanes::setActivePlane ( const BasicLayer* layer ) { - map::iterator iplane = _planes.find(layer); + PlanesMap::iterator iplane = _planes.find(layer); if ( iplane == _planes.end() ) return false; _activePlane = iplane->second; @@ -727,7 +802,7 @@ namespace { void PowerRailsPlanes::doLayout () { - map::iterator iplane = _planes.begin(); + PlanesMap::iterator iplane = _planes.begin(); for ( ; iplane != _planes.end() ; iplane++ ) iplane->second->doLayout (); } @@ -737,7 +812,6 @@ namespace { // ------------------------------------------------------------------- // Class : "::QueryPowerRails". - class QueryPowerRails : public Query { public: QueryPowerRails ( KiteEngine* ); @@ -811,8 +885,16 @@ namespace { void QueryPowerRails::doQuery () { - if ( not _powerRailsPlanes.getActivePlane() ) return; - Query::doQuery (); + PowerRailsPlanes::Plane* activePlane = _powerRailsPlanes.getActivePlane(); + + if (not activePlane) return; + // if (activePlane->getRoutingPlane()->getLayerGauge()->getType() == Constant::PinOnly) { + // cmess1 << " - PowerRails in " << activePlane->getLayer()->getName() << " - Skipped (PinOnly layer)." << endl; + // return; + // } + + cmess1 << " - PowerRails in " << activePlane->getLayer()->getName() << " ..." << endl; + Query::doQuery(); } @@ -827,6 +909,8 @@ namespace { void QueryPowerRails::goCallback ( Go* go ) { + //ltrace(80) << "QueryPowerRails::goCallback() " << go->getId() << ":" << go + // << " " << getPath().getName() << endl; addToPowerRail ( go, getBasicLayer(), getArea(), getTransformation() ); } @@ -961,10 +1045,10 @@ namespace Kite { { cmess1 << " o Building power rails." << endl; - if ( not _blockageNet ) { + if (not _blockageNet) { _blockageNet = getCell()->getNet("blockagenet"); - if ( not _blockageNet ) - _blockageNet = Net::create ( getCell(), "blockagenet" ); + if (not _blockageNet) + _blockageNet = Net::create( getCell(), "blockagenet" ); } QueryPowerRails query ( this ); @@ -974,21 +1058,18 @@ namespace Kite { if ( (iLayer->getMaterial() != BasicLayer::Material::metal) and (iLayer->getMaterial() != BasicLayer::Material::blockage) ) continue; - if ( _configuration->isGMetal(*iLayer) ) continue; + if (_configuration->isGMetal(*iLayer)) continue; + if (not query.hasBasicLayer(*iLayer)) continue; - cmess1 << " - PowerRails in " << iLayer->getName() << " ..." << endl; - - if ( not query.hasBasicLayer(*iLayer) ) continue; - - query.setBasicLayer ( *iLayer ); - query.doQuery (); + query.setBasicLayer( *iLayer ); + query.doQuery (); } - query.ringAddToPowerRails (); - query.doLayout (); + query.ringAddToPowerRails(); + query.doLayout(); cmess1 << " - " << query.getGoMatchCount() << " power rails elements found." << endl; Session::revalidate (); } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt index 7b6668e6..9c2ebdcd 100644 --- a/kite/src/CMakeLists.txt +++ b/kite/src/CMakeLists.txt @@ -1,3 +1,4 @@ +# -*- explicit-buffer-name: "CMakeLists.txt" -*- include ( ${QT_USE_FILE} ) @@ -8,7 +9,7 @@ ${Boost_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ) - set ( includes kite/TrackSegmentCost.h + set ( includes kite/Constants.h kite/TrackCost.h kite/DataNegociate.h kite/TrackElement.h kite/TrackElements.h @@ -19,12 +20,14 @@ kite/Tracks.h kite/HorizontalTrack.h kite/VerticalTrack.h + kite/RoutingPlane.h kite/Session.h + kite/Manipulator.h + kite/SegmentFsm.h kite/RoutingEvent.h kite/RoutingEventQueue.h kite/RoutingEventHistory.h kite/RoutingEventLoop.h - kite/RoutingPlane.h kite/NegociateWindow.h kite/Configuration.h kite/KiteEngine.h @@ -34,8 +37,7 @@ kite/PyGraphicKiteEngine.h ) set ( mocIncludes kite/GraphicKiteEngine.h ) - set ( cpps TrackSegmentCost.cpp - TrackCost.cpp + set ( cpps TrackCost.cpp DataNegociate.cpp TrackElement.cpp TrackElements.cpp @@ -46,16 +48,18 @@ Tracks.cpp HorizontalTrack.cpp VerticalTrack.cpp + RoutingPlane.cpp Session.cpp + Manipulator.cpp + SegmentFsm.cpp RoutingEvent.cpp RoutingEventQueue.cpp RoutingEventHistory.cpp RoutingEventLoop.cpp - RoutingPlane.cpp + NegociateWindow.cpp BuildPowerRails.cpp ProtectRoutingPads.cpp PreProcess.cpp - NegociateWindow.cpp Configuration.cpp KiteEngine.cpp GraphicKiteEngine.cpp @@ -68,42 +72,42 @@ qt4_wrap_cpp ( mocCpps ${mocIncludes} ) - add_library ( kite ${cpps} ${mocCpps} ${pyCpps} ) - set_target_properties ( kite PROPERTIES VERSION 1.0 SOVERSION 1 ) - target_link_libraries ( kite ${KATABATIC_LIBRARIES} - ${KNIK_LIBRARIES} - ${NIMBUS_LIBRARIES} - ${CORIOLIS_LIBRARIES} - ${HURRICANE_PYTHON_LIBRARIES} - ${HURRICANE_GRAPHICAL_LIBRARIES} - ${HURRICANE_LIBRARIES} - ${CONFIGURATION_LIBRARY} - ${BOOKSHELF_LIBRARY} - ${CIF_LIBRARY} - ${AGDS_LIBRARY} - ${LEFDEF_LIBRARIES} - ${OA_LIBRARIES} - ${QT_LIBRARIES} - ${Boost_LIBRARIES} - ${LIBXML2_LIBRARIES} - ${PYTHON_LIBRARIES} -lutil - ${LIBEXECINFO_LIBRARIES} + add_library ( kite ${cpps} ${mocCpps} ${pyCpps} ) + set_target_properties ( kite PROPERTIES VERSION 1.0 SOVERSION 1 ) + target_link_libraries ( kite ${KATABATIC_LIBRARIES} + ${KNIK_LIBRARIES} + ${NIMBUS_LIBRARIES} + ${CORIOLIS_LIBRARIES} + ${HURRICANE_PYTHON_LIBRARIES} + ${HURRICANE_GRAPHICAL_LIBRARIES} + ${HURRICANE_LIBRARIES} + ${CONFIGURATION_LIBRARY} + ${BOOKSHELF_LIBRARY} + ${CIF_LIBRARY} + ${AGDS_LIBRARY} + ${LEFDEF_LIBRARIES} + ${OA_LIBRARIES} + ${QT_LIBRARIES} + ${Boost_LIBRARIES} + ${LIBXML2_LIBRARIES} + ${PYTHON_LIBRARIES} -lutil + ${LIBEXECINFO_LIBRARIES} ) - add_library ( pyKite MODULE ${pyCpps} ) - set_target_properties ( pyKite PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1" + add_library ( pyKite MODULE ${pyCpps} ) + set_target_properties ( pyKite PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -D__PYTHON_MODULE__=1" PREFIX "" OUTPUT_NAME "Kite" ) - add_executable ( kite.bin ${kitecpps} ) - target_link_libraries ( kite.bin kite ) - target_link_libraries ( pyKite kite +# add_executable ( kite.bin ${kitecpps} ) +#target_link_libraries ( kite.bin kite ) + target_link_libraries ( pyKite kite ${CORIOLIS_PYTHON_LIBRARIES} ) - install ( TARGETS kite DESTINATION lib${LIB_SUFFIX} ) - install ( TARGETS kite.bin DESTINATION bin ) - install ( TARGETS pyKite DESTINATION ${PYTHON_SITE_PACKAGES} ) + install ( TARGETS kite DESTINATION lib${LIB_SUFFIX} ) +# install ( TARGETS kite.bin DESTINATION bin ) + install ( TARGETS pyKite DESTINATION ${PYTHON_SITE_PACKAGES} ) install ( FILES ${includes} ${mocIncludes} diff --git a/kite/src/Configuration.cpp b/kite/src/Configuration.cpp index d82dd6f1..8d8e8472 100644 --- a/kite/src/Configuration.cpp +++ b/kite/src/Configuration.cpp @@ -1,15 +1,9 @@ - -// -*- C++ -*- +// -*- mode: C++; explicit-buffer-name: "Configuration.cpp" -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,25 +11,19 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./Configuration.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include - -#include "vlsisapd/configuration/Configuration.h" -#include "hurricane/Cell.h" -#include "crlcore/Utilities.h" -#include "kite/Configuration.h" -#include "kite/KiteEngine.h" - +#include +#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/Cell.h" +#include "crlcore/Utilities.h" +#include "kite/Configuration.h" +#include "kite/KiteEngine.h" namespace Kite { - using std::cout; using std::cerr; using std::endl; @@ -123,6 +111,10 @@ namespace Kite { { return _base->isGMetal(layer); } + bool Configuration::isGContact ( const Layer* layer ) const + { return _base->isGContact(layer); } + + size_t Configuration::getDepth () const { return _base->getDepth(); } @@ -281,4 +273,4 @@ namespace Kite { -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/DataNegociate.cpp b/kite/src/DataNegociate.cpp index a410e7f4..33907dff 100644 --- a/kite/src/DataNegociate.cpp +++ b/kite/src/DataNegociate.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,14 +15,31 @@ // +-----------------------------------------------------------------+ -#include -#include -#include "kite/DataNegociate.h" +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/DebugSession.h" +#include "katabatic/AutoSegment.h" +#include "kite/DataNegociate.h" +#include "kite/RoutingEvent.h" namespace Kite { + using std::cerr; + using std::endl; + using std::map; + using std::multimap; + using std::make_pair; using std::ostringstream; + using Hurricane::Bug; + using Hurricane::DebugSession; + using Hurricane::inltrace; + using Hurricane::ltracein; + using Hurricane::ltraceout; + using Hurricane::tab; + using Katabatic::KbHorizontal; + using Katabatic::KbPropagate; // ------------------------------------------------------------------- @@ -30,12 +47,19 @@ namespace Kite { DataNegociate::DataNegociate ( TrackElement* trackSegment ) - : _routingEvent(NULL) - , _trackSegment(trackSegment) - , _cost (trackSegment) - , _state (RipupPerpandiculars) - , _stateCount (1) - //, _z (RoutingGauge::getLayerDepth(trackSegment->getLayer())) + : _trackSegment (trackSegment) + , _childSegment (NULL) + , _routingEvent (NULL) + , _net (trackSegment->getNet()) + , _state (RipupPerpandiculars) + , _stateCount (1) + , _terminals (0) + , _ripupCount (0) + , _leftMinExtend (DbU::Max) + , _rightMinExtend (DbU::Min) + , _attractors () + , _perpandiculars () + , _perpandicularFree(false) { } @@ -43,25 +67,164 @@ namespace Kite { { } + DbU::Unit DataNegociate::getWiringDelta ( DbU::Unit axis ) const + { + DbU::Unit attraction = 0; + for ( size_t i=0 ; i < _attractors.size() ; i++ ) { + if ( _attractors[i] > axis ) attraction += _attractors[i] - axis; + else attraction += axis - _attractors[i]; + } + return attraction; + } + + void DataNegociate::update () - { _cost.update ( _trackSegment ); } + { + DebugSession::open( _trackSegment->getNet(), 148 ); + + ltrace(148) << "DataNegociate::update() - " << _trackSegment << endl; + ltracein(148); + + vector collapseds; + vector perpandiculars; + map attractorSpins; + + _perpandiculars.clear(); + AutoSegment::getTopologicalInfos( _trackSegment->base() + , collapseds + , perpandiculars + , _leftMinExtend + , _rightMinExtend + ); + + _terminals = AutoSegment::getTerminalCount( _trackSegment->base(), collapseds ); + _attractors.clear(); + _perpandiculars.clear(); + _perpandicularFree = Interval(false); + + ltrace(148) << "Extracting attractors from perpandiculars." << endl; + for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) { + Interval interval; + TrackElement* perpandicular; + + if (perpandiculars[i]->isCanonical()) { + perpandicular = Session::lookup( perpandiculars[i]->base() ); + if (perpandicular) perpandicular->getCanonical( interval ); + } else { + perpandicular = Session::lookup( perpandiculars[i]->getCanonical(interval)->base() ); + } + if (not perpandicular) { + cerr << Bug( "Not a TrackSegment: %s\n (perpandicular: %s)" + //, getString((void*)perpandiculars[i]->getCanonical(interval)->base()).c_str() + , getString(perpandiculars[i]->getCanonical(interval)).c_str() + //, getString((void*)perpandiculars[i]->base()).c_str() + , getString(perpandiculars[i]).c_str() + ) << endl; + continue; + } + + if (RoutingEvent::getStage() == RoutingEvent::Repair) + perpandicular->base()->setFlagsOnAligneds( Katabatic::SegUnbound ); + + interval.inflate( DbU::lambda(-0.5) ); + + ltrace(148) << "| perpandicular: " << perpandiculars[i] << endl; + ltrace(148) << "| canonical: " << perpandicular << endl; + ltracein(148); + ltrace(148) << "Canonical // interval: " << interval << endl; + + _perpandiculars.push_back( perpandicular ); + if (perpandicular->getTrack()) { + Interval trackFree = perpandicular->getFreeInterval(); + ltrace(148) << "Track Perpandicular Free: " << trackFree << endl; + + _perpandicularFree.intersection( trackFree ); + } else { + ltrace(148) << "Not in any track " << perpandicular << endl; + } + + if (interval.isPonctual()) { + ltrace(148) << "Punctual attractor @" << DbU::getValueString(interval.getVMin()) << endl; + _attractors.push_back( interval.getVMin() ); + ltraceout(148); + continue; + } + + if ( (interval.getVMin() != _trackSegment->getAxis()) + or AutoSegment::isTopologicalBound(perpandiculars[i] + ,perpandicular->isHorizontal() ? KbHorizontal : 0 + ) ) { + map::iterator iattractor = attractorSpins.find( interval.getVMin() ); + if (iattractor == attractorSpins.end()) { + attractorSpins.insert( make_pair(interval.getVMin(),-1) ); + } else { + iattractor->second -= 1; + } + ltrace(148) << "Left attractor @" << DbU::getValueString(interval.getVMin()) << endl; + } + + if ( (interval.getVMax() != _trackSegment->getAxis()) + or AutoSegment::isTopologicalBound(perpandiculars[i] + ,KbPropagate | (perpandicular->isHorizontal() ? KbHorizontal : 0) + ) ) { + map::iterator iattractor = attractorSpins.find( interval.getVMax() ); + if (iattractor == attractorSpins.end()) { + attractorSpins.insert( make_pair(interval.getVMax(),1) ); + } else { + iattractor->second += 1; + } + ltrace(148) << "Right attractor @" << DbU::getValueString(interval.getVMax()) << endl; + } + + ltraceout(148); + } + if ( not _trackSegment->isTerminal() and (_perpandiculars.size() < 2) ) + cerr << Bug( "Less than two perpandiculars on %s.", getString(_trackSegment).c_str() ) << endl; + + map::iterator iattractor = attractorSpins.begin(); + for ( ; iattractor != attractorSpins.end() ; iattractor++ ) { + if (iattractor->second != 0) + _attractors.push_back( iattractor->first ); + } + + ostringstream s; + s << "Attractors ["; + for ( size_t i=0 ; i<_attractors.size() ; i++ ) { + if ( i ) s << ", "; + s << DbU::getValueString( _attractors[i] ); + } + s << "]"; + ltrace(148) << s.str() << endl; + ltrace(200) << "Perpandicular Free: " << _perpandicularFree << endl; + + + ltraceout(148); + DebugSession::close(); + } string DataNegociate::_getString () const { return "<" + _getTypeName() + " " - + getString(_trackSegment) - + ">"; + + getString(_trackSegment) + " " + + getString(_terminals) + + " [" + DbU::getValueString(_leftMinExtend) + + ":" + DbU::getValueString(_rightMinExtend) + + "]>"; } Record* DataNegociate::_getRecord () const { Record* record = new Record ( getString(this) ); - record->add ( getSlot ( "_routingEvent", _routingEvent ) ); - record->add ( getSlot ( "_trackSegment", _trackSegment ) ); - record->add ( getSlot ( "_cost" , &_cost ) ); - //record->add ( getSlot ( "_z" , _z ) ); + record->add( getSlot ( "_routingEvent" , _routingEvent ) ); + record->add( getSlot ( "_trackSegment" , _trackSegment ) ); + record->add( getSlot ( "_childSegment" , _childSegment ) ); + record->add( getSlot ( "_terminals" , _terminals ) ); + record->add( getSlot ( "_ripupCount" , _ripupCount ) ); + record->add( DbU::getValueSlot( "_leftMinExtend" , &_leftMinExtend ) ); + record->add( DbU::getValueSlot( "_rightMinExtend", &_rightMinExtend ) ); + record->add( getSlot ( "_net" , _net ) ); return record; } @@ -71,18 +234,17 @@ namespace Kite { { ostringstream s; switch ( data->_state ) { - case RipupPerpandiculars: s << "RipupPerpandiculars"; break; - case Minimize: s << "Minimize"; break; - case DogLeg: s << "DogLeg"; break; - case Desalignate: s << "Desalignate"; break; - case Slacken: s << "Slacken"; break; - case ConflictSolve1: s << "ConflictSolve1"; break; - case ConflictSolve2: s << "ConflictSolve2"; break; - case LocalVsGlobal: s << "LocalVsGlobal"; break; - case MoveUp: s << "MoveUp"; break; - case MaximumSlack: s << "MaximumSlack"; break; - case Unimplemented: s << "Unimplemented"; break; - case Repair: s << "REPAIR"; break; + case RipupPerpandiculars: s << "RipupPerpandiculars"; break; + case Minimize: s << "Minimize"; break; + case Dogleg: s << "Dogleg"; break; + case Slacken: s << "Slacken"; break; + case ConflictSolveByHistory: s << "ConflictSolveByHistory1"; break; + case ConflictSolveByPlaceds: s << "ConflictSolveByPlaceds"; break; + case LocalVsGlobal: s << "LocalVsGlobal"; break; + case MoveUp: s << "MoveUp"; break; + case MaximumSlack: s << "MaximumSlack"; break; + case Unimplemented: s << "Unimplemented"; break; + case Repair: s << "REPAIR"; break; default: s << "Unknown(" << data->_state << ")"; break; } @@ -91,4 +253,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/GraphicKiteEngine.cpp b/kite/src/GraphicKiteEngine.cpp index 6aef6d2e..2065e339 100644 --- a/kite/src/GraphicKiteEngine.cpp +++ b/kite/src/GraphicKiteEngine.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,46 +12,41 @@ // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | // | C++ Header : "./GraphicKiteEngine.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +//#include namespace Kite { - using namespace std; using Hurricane::Error; using Hurricane::Warning; @@ -79,9 +69,7 @@ namespace Kite { void GraphicKiteEngine::initKatabaticAc ( CellWidget* widget ) - { - //cerr << "GraphicKatabaticEngine::initKatabaticGo()" << endl; - } + { } void GraphicKiteEngine::drawKatabaticAc ( CellWidget* widget @@ -95,11 +83,11 @@ namespace Kite { void GraphicKiteEngine::initKatabaticGCell ( CellWidget* widget ) { - widget->getDrawingPlanes().setPen ( Qt::NoPen ); + widget->getDrawingPlanes().setPen( Qt::NoPen ); - KiteEngine* kite = KiteEngine::get ( widget->getCell() ); + KiteEngine* kite = KiteEngine::get( widget->getCell() ); if ( kite ) { - kite->getGCellGrid()->setDensityMode ( Katabatic::GCellGrid::MaxDensity ); + kite->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxDensity ); } } @@ -115,7 +103,7 @@ namespace Kite { QPainter& painter = widget->getPainter(); size_t density = (size_t)( gcell->getDensity() * 255.0 ); - if ( density > 255 ) density = 255; + if (density > 255) density = 255; painter.setBrush ( Graphics::getColorScale(ColorScale::Fire).getBrush(density,widget->getDarkening()) ); @@ -131,12 +119,12 @@ namespace Kite { { Cell* cell = getCell (); - KiteEngine* kite = KiteEngine::get ( cell ); - if ( not kite ) { - kite = KiteEngine::create ( cell ); - kite->setPostEventCb ( boost::bind(&GraphicKiteEngine::postEvent,this) ); + KiteEngine* kite = KiteEngine::get( cell ); + if (not kite) { + kite = KiteEngine::create( cell ); + kite->setPostEventCb( boost::bind(&GraphicKiteEngine::postEvent,this) ); } else - cerr << Warning("%s already has a Kite engine.",getString(cell).c_str()) << endl; + cerr << Warning( "%s already has a Kite engine.", getString(cell).c_str() ) << endl; return kite; } @@ -146,13 +134,13 @@ namespace Kite { { // Currently, only one framework is avalaible: Alliance. - KiteEngine* kite = KiteEngine::get ( getCell() ); - if ( kite ) return kite; + KiteEngine* kite = KiteEngine::get( getCell() ); + if (kite) return kite; - kite = createEngine (); + kite = createEngine(); - if ( not kite ) - throw Error("Failed to create Kite engine on %s.",getString(getCell()).c_str()); + if (not kite) + throw Error( "Failed to create Kite engine on %s.", getString(getCell()).c_str() ); return kite; } @@ -160,28 +148,28 @@ namespace Kite { void GraphicKiteEngine::saveGlobalSolution () { - KiteEngine* kite = KiteEngine::get ( getCell() ); - if ( kite ) kite->saveGlobalSolution (); + KiteEngine* kite = KiteEngine::get( getCell() ); + if (kite) kite->saveGlobalSolution (); } void GraphicKiteEngine::loadGlobalSolution () { - KiteEngine* kite = getForFramework (); + KiteEngine* kite = getForFramework(); - emit cellPreModificated (); - kite->runGlobalRouter ( LoadGlobalSolution ); - emit cellPostModificated (); + emit cellPreModificated(); + kite->runGlobalRouter( KtLoadGlobalRouting ); + emit cellPostModificated(); } void GraphicKiteEngine::globalRoute () { - KiteEngine* kite = getForFramework (); + KiteEngine* kite = getForFramework(); - emit cellPreModificated (); - kite->runGlobalRouter ( BuildGlobalSolution ); - emit cellPostModificated (); + emit cellPreModificated(); + kite->runGlobalRouter( KtBuildGlobalRouting ); + emit cellPostModificated(); } @@ -189,73 +177,61 @@ namespace Kite { { static KatabaticEngine::NetSet routingNets; - KiteEngine* kite = KiteEngine::get ( getCell() ); - if ( not kite ) { - throw Error("KiteEngine not created yet, run the global router first."); + KiteEngine* kite = KiteEngine::get( getCell() ); + if (not kite) { + throw Error( "KiteEngine not created yet, run the global router first." ); } - if ( cmess1.enabled() ) - kite->printConfiguration (); + if (cmess1.enabled()) kite->printConfiguration(); + emit cellPreModificated(); + _viewer->clearToolInterrupt(); + kite->loadGlobalRouting( Katabatic::EngineLoadGrByNet, routingNets ); + emit cellPostModificated(); emit cellPreModificated (); - - _viewer->clearToolInterrupt (); - - kite->loadGlobalRouting ( Katabatic::LoadGrByNet, routingNets ); - emit cellPostModificated (); - - //Breakpoint::stop ( 0, "Point d'arret:
      LayerAssingByTrunk()
    " - // "Assignment des layers, methode globale." ); - emit cellPreModificated (); - kite->layerAssign ( Katabatic::NoNetLayerAssign ); - emit cellPostModificated (); - - //Breakpoint::stop ( 0, "Point d'arret:
      runNegociate()
    " - // "Routage par Negociation." ); - emit cellPreModificated (); - kite->runNegociate (); - emit cellPostModificated (); + kite->balanceGlobalDensity (); + kite->layerAssign ( Katabatic::EngineNoNetLayerAssign ); + emit cellPostModificated(); + emit cellPreModificated(); + kite->runNegociate(); + emit cellPostModificated(); } void GraphicKiteEngine::finalize () { - emit cellPreModificated (); - KiteEngine* kite = KiteEngine::get ( getCell() ); - if ( kite ) { - kite->finalizeLayout (); - //kite->dumpMeasures (); - kite->destroy (); + emit cellPreModificated(); + KiteEngine* kite = KiteEngine::get( getCell() ); + if (kite) { + kite->finalizeLayout(); + kite->destroy(); } - emit cellPostModificated (); + emit cellPostModificated(); } void GraphicKiteEngine::save () { - //KiteEngine* kite = KiteEngine::get ( getCell() ); - //if ( kite ) { - Cell* cell = getCell(); - AllianceFramework* af = AllianceFramework::get (); + Cell* cell = getCell(); + AllianceFramework* af = AllianceFramework::get(); - string name = getString(cell->getName()) + "_kite"; - cell->setName ( name ); - af->saveCell ( cell, Catalog::State::Physical ); - //} + string name = getString(cell->getName()) + "_kite"; + cell->setName( name ); + af->saveCell( cell, Catalog::State::Physical ); } void GraphicKiteEngine::route () { - globalRoute (); - detailRoute (); - finalize (); + globalRoute(); + detailRoute(); + finalize (); } void GraphicKiteEngine::dumpMeasures () { - KiteEngine* kite = getForFramework (); - if ( kite ) kite->dumpMeasures (); + KiteEngine* kite = getForFramework(); + if (kite) kite->dumpMeasures(); } @@ -263,19 +239,13 @@ namespace Kite { { static unsigned int count = 0; - if ( not (count++ % 500) ) { - //UpdateSession::close (); + if (not (count++ % 500)) { + QApplication::processEvents(); - //_viewer->getCellWidget()->refresh (); - QApplication::processEvents (); - - //UpdateSession::open (); - - if ( _viewer->isToolInterrupted() ) { - KiteEngine* kite = KiteEngine::get ( getCell() ); - if ( kite ) kite->setInterrupt ( true ); - - _viewer->clearToolInterrupt (); + if (_viewer->isToolInterrupted()) { + KiteEngine* kite = KiteEngine::get( getCell() ); + if (kite) kite->setInterrupt( true ); + _viewer->clearToolInterrupt(); } } } @@ -283,122 +253,109 @@ namespace Kite { void GraphicKiteEngine::addToMenu ( CellViewer* viewer ) { - assert ( _viewer == NULL ); + assert( _viewer == NULL ); _viewer = viewer; QMenu* prMenu = _viewer->findChild("viewer.menuBar.placeAndRoute"); QMenu* stepMenu = _viewer->findChild("viewer.menuBar.placeAndRoute.stepByStep"); - if ( !prMenu ) { + if (prMenu == NULL) { QMenuBar* menuBar = _viewer->findChild("viewer.menuBar"); - if ( !menuBar ) { - cerr << Warning("GraphicKiteEngine::addToMenu() - No MenuBar in parent widget.") << endl; + if (menuBar == NULL) { + cerr << Warning( "GraphicKiteEngine::addToMenu() - No MenuBar in parent widget." ) << endl; return; } - prMenu = menuBar->addMenu ( tr("P&&R") ); - prMenu->setObjectName ( "viewer.menuBar.placeAndRoute" ); + prMenu = menuBar->addMenu( tr("P&&R") ); + prMenu->setObjectName( "viewer.menuBar.placeAndRoute" ); - stepMenu = prMenu->addMenu ( tr("&Step by Step") ); - stepMenu->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep" ); + stepMenu = prMenu->addMenu( tr("&Step by Step") ); + stepMenu->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep" ); - prMenu->addSeparator (); + prMenu->addSeparator(); } QAction* dRouteAction = _viewer->findChild("viewer.menuBar.placeAndRoute.detailedRoute"); - if ( dRouteAction ) - cerr << Warning("GraphicKiteEngine::addToMenu() - Kite detailed router already hooked in.") << endl; + if (dRouteAction) + cerr << Warning( "GraphicKiteEngine::addToMenu() - Kite detailed router already hooked in." ) << endl; else { - stepMenu->addSeparator (); + stepMenu->addSeparator(); - QAction* gRouteAction = new QAction ( tr("Kite - &Global Route"), _viewer ); - gRouteAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepBystep.globalRoute" ); - gRouteAction->setStatusTip ( tr("Run the Knik global router") ); - gRouteAction->setVisible ( true ); - stepMenu->addAction ( gRouteAction ); + QAction* gRouteAction = new QAction ( tr("Kite - &Global Route"), _viewer ); + gRouteAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.globalRoute" ); + gRouteAction->setStatusTip ( tr("Run the Knik global router") ); + gRouteAction->setVisible ( true ); + stepMenu->addAction( gRouteAction ); - QAction* gLoadSolutionAction = new QAction ( tr("Kite - &Load Global Routing"), _viewer ); - gLoadSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.loadGlobalRouting" ); - gLoadSolutionAction->setStatusTip ( tr("Load a solution for the global routing (.kgr)") ); - gLoadSolutionAction->setVisible ( true ); - stepMenu->addAction ( gLoadSolutionAction ); + QAction* gLoadSolutionAction = new QAction ( tr("Kite - &Load Global Routing"), _viewer ); + gLoadSolutionAction->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep.loadGlobalRouting" ); + gLoadSolutionAction->setStatusTip ( tr("Load a solution for the global routing (.kgr)") ); + gLoadSolutionAction->setVisible ( true ); + stepMenu->addAction( gLoadSolutionAction ); - QAction* gSaveSolutionAction = new QAction ( tr("Kite - &Save Global Routing"), _viewer ); - gSaveSolutionAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepByStep.saveGlobalRouting" ); - gSaveSolutionAction->setStatusTip ( tr("Save a global router solution (.kgr)") ); - gSaveSolutionAction->setVisible ( true ); - stepMenu->addAction ( gSaveSolutionAction ); + QAction* gSaveSolutionAction = new QAction ( tr("Kite - &Save Global Routing"), _viewer ); + gSaveSolutionAction->setObjectName( "viewer.menuBar.placeAndRoute.stepByStep.saveGlobalRouting" ); + gSaveSolutionAction->setStatusTip ( tr("Save a global router solution (.kgr)") ); + gSaveSolutionAction->setVisible ( true ); + stepMenu->addAction( gSaveSolutionAction ); - dRouteAction = new QAction ( tr("Kite - &Detailed Route"), _viewer ); - dRouteAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepBystep.detailedRoute" ); - dRouteAction->setStatusTip ( tr("Run the Kite detailed router") ); - dRouteAction->setVisible ( true ); - stepMenu->addAction ( dRouteAction ); + dRouteAction = new QAction ( tr("Kite - &Detailed Route"), _viewer ); + dRouteAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.detailedRoute" ); + dRouteAction->setStatusTip ( tr("Run the Kite detailed router") ); + dRouteAction->setVisible ( true ); + stepMenu->addAction( dRouteAction ); - QAction* dFinalizeAction = new QAction ( tr("Kite - &Finalize Routing"), _viewer ); - dFinalizeAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepBystep.finalize" ); - dFinalizeAction->setStatusTip ( tr("Closing Routing") ); - dFinalizeAction->setVisible ( true ); - stepMenu->addAction ( dFinalizeAction ); + QAction* dFinalizeAction = new QAction( tr("Kite - &Finalize Routing"), _viewer ); + dFinalizeAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.finalize" ); + dFinalizeAction->setStatusTip ( tr("Closing Routing") ); + dFinalizeAction->setVisible ( true ); + stepMenu->addAction( dFinalizeAction ); QAction* dDumpMeasuresAction = new QAction ( tr("Kite - Dump &Measures"), _viewer ); - dDumpMeasuresAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepBystep.dumpMeasures" ); - dDumpMeasuresAction->setStatusTip ( tr("Dumping Measurements on the disk") ); - dDumpMeasuresAction->setVisible ( true ); - stepMenu->addAction ( dDumpMeasuresAction ); + dDumpMeasuresAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.dumpMeasures" ); + dDumpMeasuresAction->setStatusTip ( tr("Dumping Measurements on the disk") ); + dDumpMeasuresAction->setVisible ( true ); + stepMenu->addAction( dDumpMeasuresAction ); QAction* dSaveAction = new QAction ( tr("Kite - &Save Design"), _viewer ); - dSaveAction->setObjectName ( "viewer.menuBar.placeAndRoute.stepBystep.save" ); - dSaveAction->setStatusTip ( tr("Save routed design (temporary hack)") ); - dSaveAction->setVisible ( true ); - stepMenu->addAction ( dSaveAction ); + dSaveAction->setObjectName( "viewer.menuBar.placeAndRoute.stepBystep.save" ); + dSaveAction->setStatusTip ( tr("Save routed design (temporary hack)") ); + dSaveAction->setVisible ( true ); + stepMenu->addAction( dSaveAction ); - QAction* routeAction = new QAction ( tr("Kite - &Route"), _viewer ); - routeAction->setObjectName ( "viewer.menuBar.placeAndRoute.route" ); - routeAction->setStatusTip ( tr("Route the design (global & detailed)") ); - routeAction->setVisible ( true ); - prMenu->addAction ( routeAction ); + QAction* routeAction = new QAction ( tr("Kite - &Route"), _viewer ); + routeAction->setObjectName( "viewer.menuBar.placeAndRoute.route" ); + routeAction->setStatusTip ( tr("Route the design (global & detailed)") ); + routeAction->setVisible ( true ); + prMenu->addAction( routeAction ); - connect ( gLoadSolutionAction, SIGNAL(triggered()), this, SLOT(loadGlobalSolution()) ); - connect ( gSaveSolutionAction, SIGNAL(triggered()), this, SLOT(saveGlobalSolution()) ); - connect ( gRouteAction , SIGNAL(triggered()), this, SLOT(globalRoute ()) ); - connect ( dRouteAction , SIGNAL(triggered()), this, SLOT(detailRoute ()) ); - connect ( dFinalizeAction , SIGNAL(triggered()), this, SLOT(finalize ()) ); - connect ( dSaveAction , SIGNAL(triggered()), this, SLOT(save ()) ); - connect ( dDumpMeasuresAction, SIGNAL(triggered()), this, SLOT(dumpMeasures ()) ); - connect ( routeAction , SIGNAL(triggered()), this, SLOT(route ()) ); + connect( gLoadSolutionAction, SIGNAL(triggered()), this, SLOT(loadGlobalSolution()) ); + connect( gSaveSolutionAction, SIGNAL(triggered()), this, SLOT(saveGlobalSolution()) ); + connect( gRouteAction , SIGNAL(triggered()), this, SLOT(globalRoute ()) ); + connect( dRouteAction , SIGNAL(triggered()), this, SLOT(detailRoute ()) ); + connect( dFinalizeAction , SIGNAL(triggered()), this, SLOT(finalize ()) ); + connect( dSaveAction , SIGNAL(triggered()), this, SLOT(save ()) ); + connect( dDumpMeasuresAction, SIGNAL(triggered()), this, SLOT(dumpMeasures ()) ); + connect( routeAction , SIGNAL(triggered()), this, SLOT(route ()) ); } - connect ( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) ); - connect ( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) ); - - // ControllerWidget* controller = _viewer->getControllerWidget(); - // ConfigurationWidget* setting = controller->getSettings() - // ->findChild("controller.tabSettings.setting.kite"); - - // if ( setting == NULL ) { - // setting = new ConfigurationWidget (); - // setting->setObjectName ( "controller.tabSettings.setting.kite" ); - // setting->setConfiguration ( Configuration::getDefault() ); - // controller->addSetting ( setting, "Kite" ); - // } + connect( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) ); + connect( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) ); } const Name& GraphicKiteEngine::getName () const - { - return KiteEngine::staticGetName (); - } + { return KiteEngine::staticGetName(); } Cell* GraphicKiteEngine::getCell () { - if ( !_viewer ) { - throw Error ( "Kite: GraphicKiteEngine not bound to any Viewer." ); + if (_viewer == NULL) { + throw Error( "Kite: GraphicKiteEngine not bound to any Viewer." ); return NULL; } - if ( !_viewer->getCell() ) { - throw Error ( "Kite: No Cell is loaded into the Viewer." ); + if (_viewer->getCell() == NULL) { + throw Error( "Kite: No Cell is loaded into the Viewer." ); return NULL; } @@ -408,7 +365,7 @@ namespace Kite { GraphicKiteEngine* GraphicKiteEngine::grab () { - if ( !_references ) { + if (not _references) { _singleton = new GraphicKiteEngine (); } _references++; @@ -419,8 +376,8 @@ namespace Kite { size_t GraphicKiteEngine::release () { - _references--; - if ( !_references ) { + --_references; + if (not _references) { delete _singleton; _singleton = NULL; } @@ -430,12 +387,12 @@ namespace Kite { GraphicKiteEngine::GraphicKiteEngine () : GraphicTool() - , _viewer(NULL) + , _viewer (NULL) { - addDrawGo ( "Knik::Edge" , GraphicKnikEngine::initKnikEdges , GraphicKnikEngine::drawKnikEdges ); - addDrawGo ( "Knik::Vertex" , GraphicKnikEngine::initKnikVertex, GraphicKnikEngine::drawKnikVertex ); - addDrawGo ( "Katabatic::Ac" , initKatabaticAc , drawKatabaticAc ); - addDrawGo ( "Katabatic::GCell", initKatabaticGCell, drawKatabaticGCell ); + addDrawGo( "Knik::Edge" , GraphicKnikEngine::initKnikEdges , GraphicKnikEngine::drawKnikEdges ); + addDrawGo( "Knik::Vertex" , GraphicKnikEngine::initKnikVertex, GraphicKnikEngine::drawKnikVertex ); + addDrawGo( "Katabatic::Ac" , initKatabaticAc , drawKatabaticAc ); + addDrawGo( "Katabatic::GCell", initKatabaticGCell, drawKatabaticGCell ); } @@ -443,4 +400,4 @@ namespace Kite { { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/HorizontalTrack.cpp b/kite/src/HorizontalTrack.cpp index 70ea05da..dd45b9d5 100644 --- a/kite/src/HorizontalTrack.cpp +++ b/kite/src/HorizontalTrack.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,13 +12,10 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./HorizontalTrack.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "kite/HorizontalTrack.h" +#include "kite/HorizontalTrack.h" namespace Kite { @@ -61,7 +53,7 @@ namespace Kite { bool HorizontalTrack::isHorizontal () const { return true; } bool HorizontalTrack::isVertical () const { return false; } - unsigned int HorizontalTrack::getDirection () const { return Constant::Horizontal; } + unsigned int HorizontalTrack::getDirection () const { return KbHorizontal; } Point HorizontalTrack::getPosition ( DbU::Unit coordinate ) const @@ -81,4 +73,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/KiteEngine.cpp b/kite/src/KiteEngine.cpp index b1586d29..d90cdbc2 100644 --- a/kite/src/KiteEngine.cpp +++ b/kite/src/KiteEngine.cpp @@ -1,8 +1,7 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,49 +14,49 @@ // +-----------------------------------------------------------------+ -#include -#include -#include - -#include "hurricane/DebugSession.h" -#include "hurricane/Bug.h" -#include "hurricane/Error.h" -#include "hurricane/Warning.h" -#include "hurricane/Breakpoint.h" -#include "hurricane/Layer.h" -#include "hurricane/Net.h" -#include "hurricane/Pad.h" -#include "hurricane/Plug.h" -#include "hurricane/Cell.h" -#include "hurricane/Instance.h" -#include "hurricane/Vertical.h" -#include "hurricane/Horizontal.h" -#include "hurricane/UpdateSession.h" -#include "crlcore/Measures.h" -#include "knik/Vertex.h" -#include "knik/Edge.h" -#include "knik/Graph.h" -#include "knik/KnikEngine.h" -#include "katabatic/AutoContact.h" -#include "katabatic/GCellGrid.h" -#include "kite/DataNegociate.h" -#include "kite/RoutingPlane.h" -#include "kite/Session.h" -#include "kite/NegociateWindow.h" -#include "kite/KiteEngine.h" +#include +#include +#include +#include "hurricane/DebugSession.h" +#include "hurricane/Bug.h" +#include "hurricane/Error.h" +#include "hurricane/Warning.h" +#include "hurricane/Breakpoint.h" +#include "hurricane/Layer.h" +#include "hurricane/Net.h" +#include "hurricane/Pad.h" +#include "hurricane/Plug.h" +#include "hurricane/Cell.h" +#include "hurricane/Instance.h" +#include "hurricane/Vertical.h" +#include "hurricane/Horizontal.h" +#include "hurricane/UpdateSession.h" +#include "crlcore/Measures.h" +#include "knik/Vertex.h" +#include "knik/Edge.h" +#include "knik/Graph.h" +#include "knik/KnikEngine.h" +#include "katabatic/AutoContact.h" +#include "katabatic/GCellGrid.h" +#include "kite/DataNegociate.h" +#include "kite/RoutingPlane.h" +#include "kite/Session.h" +#include "kite/NegociateWindow.h" +#include "kite/KiteEngine.h" namespace Kite { - using std::cout; using std::cerr; using std::endl; using std::setw; using std::left; + using std::ostream; using std::ofstream; using std::ostringstream; using std::setprecision; + using std::vector; using Hurricane::DebugSession; using Hurricane::tab; using Hurricane::inltrace; @@ -68,6 +67,7 @@ namespace Kite { using Hurricane::Error; using Hurricane::Warning; using Hurricane::Breakpoint; + using Hurricane::Box; using Hurricane::Torus; using Hurricane::Layer; using Hurricane::Cell; @@ -76,6 +76,7 @@ namespace Kite { using CRL::MeasuresSet; using Knik::KnikEngine; using Katabatic::AutoContact; + using Katabatic::AutoSegmentLut; using Katabatic::ChipTools; @@ -87,7 +88,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Kite::KiteEngine". - Name KiteEngine::_toolName = "Kite"; @@ -96,24 +96,19 @@ namespace Kite { KiteEngine* KiteEngine::get ( const Cell* cell ) - { - return static_cast(ToolEngine::get(cell,staticGetName())); - } + { return static_cast(ToolEngine::get(cell,staticGetName())); } KiteEngine::KiteEngine ( Cell* cell ) - : KatabaticEngine (cell) - , _knik (NULL) - , _blockageNet (NULL) - , _configuration (new Configuration(getKatabaticConfiguration())) - , _routingPlanes () - , _negociateWindow (NULL) - , _trackSegmentLut () - , _minimumWL (0.0) - , _toolSuccess (false) - { - //_configuration->setAllowedDepth ( 3 ); - } + : KatabaticEngine (cell) + , _knik (NULL) + , _blockageNet (NULL) + , _configuration (new Configuration(getKatabaticConfiguration())) + , _routingPlanes () + , _negociateWindow(NULL) + , _minimumWL (0.0) + , _toolSuccess (false) + { } void KiteEngine::_postCreate () @@ -123,9 +118,9 @@ namespace Kite { #ifdef KNIK_NOT_EMBEDDED size_t maxDepth = getRoutingGauge()->getDepth(); - _routingPlanes.reserve ( maxDepth ); + _routingPlanes.reserve( maxDepth ); for ( size_t depth=0 ; depth < maxDepth ; depth++ ) { - _routingPlanes.push_back ( RoutingPlane::create ( this, depth ) ); + _routingPlanes.push_back( RoutingPlane::create( this, depth ) ); } #endif } @@ -135,37 +130,45 @@ namespace Kite { { KiteEngine* kite = new KiteEngine ( cell ); - kite->_postCreate (); + kite->_postCreate(); return kite; } void KiteEngine::_preDestroy () { - ltrace(90) << "KiteEngine::_preDestroy ()" << endl; + ltrace(90) << "KiteEngine::_preDestroy()" << endl; ltracein(90); cmess1 << " o Deleting ToolEngine<" << getName() << "> from Cell <" << _cell->getName() << ">" << endl; - if ( getState() < Katabatic::StateGutted ) - setState ( Katabatic::StatePreDestroying ); + if (getState() < Katabatic::EngineGutted) + setState( Katabatic::EnginePreDestroying ); - _gutKite (); - KatabaticEngine::_preDestroy (); + _gutKite(); + KatabaticEngine::_preDestroy(); cmess2 << " - RoutingEvents := " << RoutingEvent::getAllocateds() << endl; - _knik->destroy (); + if (not ToolEngine::inDestroyAll()) { + KnikEngine* attachedKnik = KnikEngine::get( getCell() ); + + if (_knik != attachedKnik) { + cerr << Error("Knik attribute differs from the Cell attached one (must be the same)\n" + " On: <%s>." + ,getString(getCell()->getName()).c_str()) << endl; + _knik = attachedKnik; + } + _knik->destroy(); + } ltraceout(90); } KiteEngine::~KiteEngine () - { - delete _configuration; - } + { delete _configuration; } const Name& KiteEngine::getName () const @@ -178,24 +181,23 @@ namespace Kite { unsigned int KiteEngine::getRipupLimit ( const TrackElement* segment ) const { - if ( segment->isBlockage() ) return 0; + if (segment->isBlockage()) return 0; - if ( segment->isStrap () ) return _configuration->getRipupLimit(Configuration::StrapRipupLimit); - if ( segment->isGlobal() ) { + if (segment->isStrap ()) return _configuration->getRipupLimit( Configuration::StrapRipupLimit ); + if (segment->isGlobal()) { Katabatic::GCellVector gcells; - segment->getGCells(gcells); - if ( gcells.size() > 2 ) - return _configuration->getRipupLimit(Configuration::LongGlobalRipupLimit); - return _configuration->getRipupLimit(Configuration::GlobalRipupLimit); + segment->getGCells( gcells ); + if (gcells.size() > 2) + return _configuration->getRipupLimit( Configuration::LongGlobalRipupLimit ); + return _configuration->getRipupLimit( Configuration::GlobalRipupLimit ); } - return _configuration->getRipupLimit(Configuration::LocalRipupLimit); + return _configuration->getRipupLimit( Configuration::LocalRipupLimit ); } RoutingPlane* KiteEngine::getRoutingPlaneByIndex ( size_t index ) const { - if ( index >= getRoutingPlanesSize() ) return NULL; - + if (index >= getRoutingPlanesSize() ) return NULL; return _routingPlanes[index]; } @@ -203,7 +205,7 @@ namespace Kite { RoutingPlane* KiteEngine::getRoutingPlaneByLayer ( const Layer* layer ) const { for ( size_t index=0 ; index < getRoutingPlanesSize() ; index++ ) { - if ( _routingPlanes[index]->getLayer() == layer ) + if (_routingPlanes[index]->getLayer() == layer) return _routingPlanes[index]; } return NULL; @@ -212,17 +214,17 @@ namespace Kite { Track* KiteEngine::getTrackByPosition ( const Layer* layer, DbU::Unit axis, unsigned int mode ) const { - RoutingPlane* plane = getRoutingPlaneByLayer ( layer ); - if ( !plane ) return NULL; + RoutingPlane* plane = getRoutingPlaneByLayer( layer ); + if (not plane) return NULL; - return plane->getTrackByPosition ( axis, mode ); + return plane->getTrackByPosition( axis, mode ); } void KiteEngine::setInterrupt ( bool state ) { - if ( _negociateWindow ) { - _negociateWindow->setInterrupt ( state ); + if (_negociateWindow) { + _negociateWindow->setInterrupt( state ); cerr << "Interrupt [CRTL+C] of " << this << endl; } } @@ -232,67 +234,62 @@ namespace Kite { { Cell* cell = getCell(); Box cellBb = cell->getBoundingBox(); - if ( not _knik ) { - //if ( cell->getRubbers().getFirst() == NULL ) - cell->flattenNets ( (mode==BuildGlobalSolution) ); - - //Breakpoint::stop ( 0, "Point d'arret:
      createGlobalGraph() " - // "after net virtual flattening." ); - - KatabaticEngine::chipPrep (); - - KnikEngine::setEdgeCapacityPercent ( 1.0 ); - _knik = KnikEngine::create ( cell - , 1 // _congestion - , 2 // _preCongestion - , false // _benchMode - , true // _useSegments - , 2.5 // _edgeCost - ); - //if ( mode == LoadGlobalSolution ) - _knik->createRoutingGraph (); - KnikEngine::setEdgeCapacityPercent ( getEdgeCapacityPercent() ); - + if (not _knik) { + cell->flattenNets( mode & KtBuildGlobalRouting ); + + KatabaticEngine::chipPrep(); + + KnikEngine::setEdgeCapacityPercent( 1.0 ); + _knik = KnikEngine::create( cell + , 1 // _congestion + , 2 // _preCongestion + , false // _benchMode + , true // _useSegments + , 2.5 // _edgeCost + ); + _knik->createRoutingGraph(); + KnikEngine::setEdgeCapacityPercent( getEdgeCapacityPercent() ); + // Decrease the edge's capacity only under the core area. const ChipTools& chipTools = getChipTools(); float corePercent = getEdgeCapacityPercent(); float coronaPercent = 0.80; - + forEach ( Knik::Vertex*, ivertex, _knik->getRoutingGraph()->getVertexes() ) { for ( int i=0 ; i<2 ; ++i ) { Knik::Edge* edge = NULL; bool isVEdge = false; - - if ( i==0 ) { + + if (i==0) { edge = ivertex->getHEdgeOut(); - if ( not edge ) continue; - - if ( chipTools.intersectHPads(edge->getBoundingBox()) ) { - edge->setCapacity ( 0 ); + if (not edge) continue; + + if (chipTools.intersectHPads(edge->getBoundingBox())) { + edge->setCapacity( 0 ); continue; } isVEdge = false; } else { edge = ivertex->getVEdgeOut(); - if ( not edge ) continue; - - if ( chipTools.intersectVPads(edge->getBoundingBox()) ) { - edge->setCapacity ( 0 ); + if (not edge) continue; + + if (chipTools.intersectVPads(edge->getBoundingBox())) { + edge->setCapacity( 0 ); continue; } isVEdge = true; } - + float edgePercent = 1.00; - if ( chipTools.getCorona().getInnerBox().contains(edge->getBoundingBox()) ) { + if (chipTools.getCorona().getInnerBox().contains(edge->getBoundingBox())) { edgePercent = corePercent; - } else if ( chipTools.getCorona().getOuterBox().contains(edge->getBoundingBox()) ) { + } else if (chipTools.getCorona().getOuterBox().contains(edge->getBoundingBox())) { edgePercent = coronaPercent; isVEdge = false; } - + unsigned int capacity = (unsigned int)(edge->getCapacity() * edgePercent ) - ((isVEdge) ? 1 : 0); - edge->setCapacity ( capacity ); + edge->setCapacity( capacity ); } } } @@ -301,26 +298,26 @@ namespace Kite { void KiteEngine::createDetailedGrid () { - KatabaticEngine::createDetailedGrid (); + KatabaticEngine::createDetailedGrid(); size_t maxDepth = getRoutingGauge()->getDepth(); - _routingPlanes.reserve ( maxDepth ); + _routingPlanes.reserve( maxDepth ); for ( size_t depth=0 ; depth < maxDepth ; depth++ ) { - _routingPlanes.push_back ( RoutingPlane::create ( this, depth ) ); + _routingPlanes.push_back( RoutingPlane::create ( this, depth ) ); } } void KiteEngine::saveGlobalSolution () { - if ( getState() < Katabatic::StateGlobalLoaded ) - throw Error ("KiteEngine::saveGlobalSolution() : global routing not present yet."); + if (getState() < Katabatic::EngineGlobalLoaded) + throw Error ("KiteEngine::saveGlobalSolution(): Global routing not present yet."); - if ( getState() > Katabatic::StateGlobalLoaded ) - throw Error ("KiteEngine::saveGlobalSolution() : cannot save after detailed routing."); + if (getState() > Katabatic::EngineGlobalLoaded) + throw Error ("KiteEngine::saveGlobalSolution(): Cannot save after detailed routing."); - _knik->saveSolution (); + _knik->saveSolution(); } @@ -334,28 +331,27 @@ namespace Kite { int vEdgeCapacity = 0; for ( size_t depth=0 ; depth<_routingPlanes.size() ; ++depth ) { RoutingPlane* rp = _routingPlanes[depth]; - if ( rp->getLayerGauge()->getType() == Constant::PinOnly ) continue; + if (rp->getLayerGauge()->getType() == Constant::PinOnly ) continue; - if ( rp->getDirection() == Constant::Horizontal ) ++hEdgeCapacity; + if (rp->getDirection() == KbHorizontal) ++hEdgeCapacity; else ++vEdgeCapacity; } for ( size_t depth=0 ; depth<_routingPlanes.size() ; ++depth ) { RoutingPlane* rp = _routingPlanes[depth]; - if ( rp->getLayerGauge()->getType() == Constant::PinOnly ) continue; + if (rp->getLayerGauge()->getType() == Constant::PinOnly ) continue; size_t tracksSize = rp->getTracksSize(); for ( size_t itrack=0 ; itrackgetTrackByIndex ( itrack ); - //Knik::Edge* edge = NULL; ltrace(300) << "Capacity from: " << track << endl; - if ( track->getDirection() == Constant::Horizontal ) { + if (track->getDirection() == KbHorizontal) { for ( size_t ielement=0 ; ielementgetSize() ; ++ielement ) { - TrackElement* element = track->getSegment ( ielement ); - - if ( element->getNet() == NULL ) { + TrackElement* element = track->getSegment( ielement ); + + if (element->getNet() == NULL) { ltrace(300) << "Reject capacity from (not Net): " << (void*)element << ":" << element << endl; continue; } @@ -370,35 +366,30 @@ namespace Kite { ltrace(300) << "Capacity from: " << (void*)element << ":" << element << ":" << elementCapacity << endl; - Katabatic::GCell* gcell = getGCellGrid()->getGCell ( Point(element->getSourceU(),track->getAxis()) ); - Katabatic::GCell* end = getGCellGrid()->getGCell ( Point(element->getTargetU(),track->getAxis()) ); + Katabatic::GCell* gcell = getGCellGrid()->getGCell( Point(element->getSourceU(),track->getAxis()) ); + Katabatic::GCell* end = getGCellGrid()->getGCell( Point(element->getTargetU(),track->getAxis()) ); Katabatic::GCell* right = NULL; - if ( not gcell ) { + if (not gcell) { cerr << Warning("annotageGlobalGraph(): TrackElement outside GCell grid.") << endl; continue; } while ( gcell and (gcell != end) ) { right = gcell->getRight(); - if ( right == NULL ) break; - _knik->increaseEdgeCapacity ( gcell->getColumn() - , gcell->getRow() - , right->getColumn() - , right->getRow() - , elementCapacity ); - // edge = _knik->getEdge ( gcell->getColumn() - // , gcell->getRow() - // , right->getColumn() - // , right->getRow() - // ); + if (right == NULL) break; + _knik->increaseEdgeCapacity( gcell->getColumn() + , gcell->getRow() + , right->getColumn() + , right->getRow() + , elementCapacity ); gcell = right; } } } else { for ( size_t ielement=0 ; ielementgetSize() ; ++ielement ) { - TrackElement* element = track->getSegment ( ielement ); + TrackElement* element = track->getSegment( ielement ); - if ( element->getNet() == NULL ) { + if (element->getNet() == NULL) { ltrace(300) << "Reject capacity from (not Net): " << (void*)element << ":" << element << endl; continue; } @@ -413,26 +404,21 @@ namespace Kite { ltrace(300) << "Capacity from: " << (void*)element << ":" << element << ":" << elementCapacity << endl; - Katabatic::GCell* gcell = getGCellGrid()->getGCell ( Point(track->getAxis(),element->getSourceU()) ); - Katabatic::GCell* end = getGCellGrid()->getGCell ( Point(track->getAxis(),element->getTargetU()) ); + Katabatic::GCell* gcell = getGCellGrid()->getGCell( Point(track->getAxis(),element->getSourceU()) ); + Katabatic::GCell* end = getGCellGrid()->getGCell( Point(track->getAxis(),element->getTargetU()) ); Katabatic::GCell* up = NULL; - if ( not gcell ) { + if (not gcell) { cerr << Warning("annotageGlobalGraph(): TrackElement outside GCell grid.") << endl; continue; } while ( gcell and (gcell != end) ) { up = gcell->getUp(); - if ( up == NULL ) break; - _knik->increaseEdgeCapacity ( gcell->getColumn() - , gcell->getRow() - , up->getColumn() - , up->getRow() - , elementCapacity ); - // edge = _knik->getEdge ( gcell->getColumn() - // , gcell->getRow() - // , up->getColumn() - // , up->getRow() - // ); + if (up == NULL) break; + _knik->increaseEdgeCapacity( gcell->getColumn() + , gcell->getRow() + , up->getColumn() + , up->getRow() + , elementCapacity ); gcell = up; } } @@ -444,167 +430,142 @@ namespace Kite { void KiteEngine::runGlobalRouter ( unsigned int mode ) { - if ( getState() >= Katabatic::StateGlobalLoaded ) - throw Error ("KiteEngine::runGlobalRouter() : global routing already done or loaded."); + if (getState() >= Katabatic::EngineGlobalLoaded) + throw Error ("KiteEngine::runGlobalRouter(): Global routing already done or loaded."); - Session::open ( this ); + Session::open( this ); - createGlobalGraph ( mode ); + createGlobalGraph( mode ); - //DebugSession::addToTrace ( getCell(), "nb(0)" ); - //DebugSession::addToTrace ( getCell(), "ram_adri(0)" ); - //DebugSession::addToTrace ( getCell(), "rsdnbr_sd(9)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_res_re(21)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_soper_se(20)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_res_re(20)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_gi_1_29" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instaddbracry_sd.gi_1_29" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instseqadr_sd.pi_2_18" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instseqadr_sd.gi_0_18" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instseqadr_sd.gi_2_18" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.instseqadr_sd.gi_1_17" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_dp_res_se(28)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.etat32_otheri_sd_2.enx" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.yoper_se(31)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.toper_se(5)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.toper_rd(24)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.soper_se(20)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.shift32_rshift_se.muxoutput(67)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.shift32_rshift_se.muxoutput(71)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.imdsgn_sd0" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.res_re(12)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.res_re(20)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.nextpc_rd(21)" ); - //DebugSession::addToTrace ( getCell(), "addr_i(1)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.otheri_sd(29)" ); - //DebugSession::addToTrace ( getCell(), "d_in_i(22)" ); - //DebugSession::addToTrace ( getCell(), "ng_i" ); - //DebugSession::addToTrace ( getCell(), "d_out_i(14)" ); - //DebugSession::addToTrace ( getCell(), "d_out_i(19)" ); - //DebugSession::addToTrace ( getCell(), "dout_e_i(1)" ); - //DebugSession::addToTrace ( getCell(), "dout_e_i(2)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux78" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.nxr2_x1_2_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.na4_x1_23_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.ao22_x2_38_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.ao22_x2_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.rsdnbr_sd(25)" ); - //DebugSession::addToTrace ( getCell(), "d_out_i(28)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_1m_ct_mbk_buf_opcod_sd_0" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.break_re" ); - //DebugSession::addToTrace ( getCell(), "d_atype_i(0)" ); - //DebugSession::addToTrace ( getCell(), "addr_i(7)" ); - //DebugSession::addToTrace ( getCell(), "addr_i(8)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.break_re" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_sd_2" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_sd_1" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_rd(1)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.i_write_sm" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_i_ri(29)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_rd(0)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_sd_3" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.opcod_sd_5" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.no4_x1_7_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.on12_x1_15_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.na3_x1_46_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.o2_x2_11_sig" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.nextsr_rx(27)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_wsr_sm" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.i_ri(5)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_aux144" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_aux143" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_aux61" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.aux4" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_hold_si" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_i_ri(30)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.data_rm(0)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.toper_se(0)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.res_se(17)" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_2_22" ); - //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_2_23" ); - // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_4_24" ); - // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.pi_4_28" ); - // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_1_25" ); - // //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_2_23" ); - // //DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_0_28" ); - // // NO MOVE UP FOR IT... - // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_3_23" ); - // DebugSession::addToTrace ( getCell(), "mips_r3000_core.mips_r3000_1m_dp.addsub32_carith_se.gi_3_28" ); - //DebugSession::addToTrace ( getCell(), "cout_to_pads" ); - //DebugSession::addToTrace ( getCell(), "mux_5.sel0" ); - //DebugSession::addToTrace ( getCell(), "wm_rf.nandr0" ); - //DebugSession::addToTrace ( getCell(), "adder_sub.gi_2_18" ); - //DebugSession::addToTrace ( getCell(), "adder_sub.pi_3_20" ); - //DebugSession::addToTrace ( getCell(), "core.iram.na4_x1_2_sig" ); - //DebugSession::addToTrace ( getCell(), "core.ialu.mx3_x2_4_sig" ); + // Test signals from . + //DebugSession::addToTrace( getCell(), "auxsc37" ); + // Test signals from . + //DebugSession::addToTrace( getCell(), "acc_reg_ckx" ); + //DebugSession::addToTrace( getCell(), "acc_reg_nckx" ); + //DebugSession::addToTrace( getCell(), "i(0)" ); + //DebugSession::addToTrace( getCell(), "ram_adrb_14" ); + //DebugSession::addToTrace( getCell(), "ram_adrb_9" ); + //DebugSession::addToTrace( getCell(), "ram_adra(11)" ); + //DebugSession::addToTrace( getCell(), "ram_adra(7)" ); + //DebugSession::addToTrace( getCell(), "ram_adrb(8)" ); + //DebugSession::addToTrace( getCell(), "alu_carry(1)" ); + //DebugSession::addToTrace( getCell(), "alu_np(0)" ); + //DebugSession::addToTrace( getCell(), "ram_d(3)" ); + //DebugSession::addToTrace( getCell(), "ram_q1(0)" ); + //DebugSession::addToTrace( getCell(), "ram_i_up" ); + // Test signals from (M1-VLSI). + //DebugSession::addToTrace( getCell(), "zero_to_pads" ); + //DebugSession::addToTrace( getCell(), "shift_r" ); + // Test signals from (R3000,micro-programmed). + //DebugSession::addToTrace( getCell(), "scout" ); + //DebugSession::addToTrace( getCell(), "adr_1_n" ); + //DebugSession::addToTrace( getCell(), "codop_18" ); + //DebugSession::addToTrace( getCell(), "frz_ctl(10)" ); + //DebugSession::addToTrace( getCell(), "ctl_seq_mbk_not_ep_80" ); + //DebugSession::addToTrace( getCell(), "ctl_sts_mbk_not_ctlrw_in_2" ); + //DebugSession::addToTrace( getCell(), "dpt_wm_rf_adr4x" ); + //DebugSession::addToTrace( getCell(), "crsrin_1" ); + //DebugSession::addToTrace( getCell(), "ctl_seq_oa2ao222_x2_2" ); + //DebugSession::addToTrace( getCell(), "dpt_ishifter_muxoutput_81" ); + //DebugSession::addToTrace( getCell(), "ctl_seq_mbk_not_ep_7" ); + //DebugSession::addToTrace( getCell(), "ctl_sts_mbk_not_adel_r" ); + //DebugSession::addToTrace( getCell(), "ctl_seq_no2_x1_88" ); + //DebugSession::addToTrace( getCell(), "ctl_seq_ep_31" ); + //DebugSession::addToTrace( getCell(), "dpt_opyir16ins_mxn1" ); + //DebugSession::addToTrace( getCell(), "dpt_ishifter_muxoutput_132" ); + // Test signals from (R3000,pipeline). + //DebugSession::addToTrace( getCell(), "nb(0)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_data_e_sm_sel0" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_lo_rw(16)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_hi_rw(27)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_data_e_sm(25)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_nul_s_eq_z_sd_nul_3" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_shift32_rshift_se_muxoutput(143)" ); + //DebugSession::addToTrace( getCell(), "rsdnbr_sd(19)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_res_se(14)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_res_re(0)" ); + //DebugSession::addToTrace( getCell(), "wreg_sw(1)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_shift32_rshift_se_msb" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_ct_mx2_x2_2_sig" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_s_mw_se_sel0" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_mux32_badr_sd_sel1" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_1m_dp_addsub32_carith_se_pi_3_21" ); + //Test signals from (R3000,pipeline+chip). + //DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_dp.banc.reada0" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_ct.i_ri(29)" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_ct.not_opcod_re(4)" ); + //DebugSession::addToTrace( getCell(), "d_out_i(10)" ); + //DebugSession::addToTrace( getCell(), "dout_e_i(0)" ); + //DebugSession::addToTrace( getCell(), "dout_e_i(1)" ); + //DebugSession::addToTrace( getCell(), "dout_e_i(2)" ); + //DebugSession::addToTrace( getCell(), "i_ack_i" ); + //DebugSession::addToTrace( getCell(), "mips_r3000_core.mips_r3000_1m_dp.data_rm(7)" ); - createDetailedGrid (); - buildPowerRails (); - protectRoutingPads (); + createDetailedGrid(); + buildPowerRails(); + protectRoutingPads(); - Session::revalidate (); + Session::revalidate(); - if ( mode == LoadGlobalSolution ) { - _knik->loadSolution (); + if (mode & KtLoadGlobalRouting) { + _knik->loadSolution(); } else { - annotateGlobalGraph (); - _knik->run (); + annotateGlobalGraph(); + _knik->run(); } - setState ( Katabatic::StateGlobalLoaded ); + setState( Katabatic::EngineGlobalLoaded ); - Session::close (); + Session::close(); } - + void KiteEngine::loadGlobalRouting ( unsigned int method, KatabaticEngine::NetSet& nets ) { - KatabaticEngine::loadGlobalRouting ( method, nets ); + KatabaticEngine::loadGlobalRouting( method, nets ); - Session::open ( this ); - //KatabaticEngine::chipPrep (); - getGCellGrid()->checkEdgeSaturation ( getEdgeCapacityPercent() ); - Session::close (); + Session::open( this ); + getGCellGrid()->checkEdgeSaturation( getEdgeCapacityPercent() ); + Session::close(); } void KiteEngine::runNegociate ( unsigned int slowMotion ) { - if ( _negociateWindow ) return; + if (_negociateWindow) return; - startMeasures (); + startMeasures(); - Session::open ( this ); + Session::open( this ); - _negociateWindow = NegociateWindow::create ( this ); - _negociateWindow->setGCells ( *(getGCellGrid()->getGCellVector()) ); - preProcess (); - _computeCagedConstraints (); - _negociateWindow->run ( slowMotion ); - _negociateWindow->printStatistics (); - _negociateWindow->destroy (); + _negociateWindow = NegociateWindow::create( this ); + _negociateWindow->setGCells( *(getGCellGrid()->getGCellVector()) ); + _computeCagedConstraints(); + _negociateWindow->run( slowMotion ); + _negociateWindow->printStatistics(); + _negociateWindow->destroy(); _negociateWindow = NULL; - Session::close (); + Session::close(); //if ( _editor ) _editor->refresh (); - stopMeasures (); - printMeasures ( "algo" ); - printCompletion (); + stopMeasures(); + printMeasures( "algo" ); - Session::open ( this ); + Session::open( this ); unsigned int overlaps = 0; float edgeCapacity = 1.0; - KnikEngine* knik = KnikEngine::get ( getCell() ); + KnikEngine* knik = KnikEngine::get( getCell() ); - if ( knik ) - edgeCapacity = knik->getEdgeCapacityPercent(); + if (knik) edgeCapacity = knik->getEdgeCapacityPercent(); - cmess2 << " o Post-checking Knik capacity overload " << (edgeCapacity*100.0) << "%." << endl; + if (cparanoid.enabled()) { + cparanoid << " o Post-checking Knik capacity overload " << (edgeCapacity*100.0) << "%." << endl; + getGCellGrid()->checkEdgeSaturation( edgeCapacity ); + } - getGCellGrid()->checkEdgeSaturation ( edgeCapacity ); - _check ( overlaps ); - Session::close (); + _check( overlaps ); + Session::close(); _toolSuccess = _toolSuccess and (overlaps == 0); } @@ -612,94 +573,106 @@ namespace Kite { void KiteEngine::printCompletion () const { - cmess1 << " o Computing Completion ratios." << endl; - cmess1 << " - Unrouted segments :" << endl; + size_t routeds = 0; + unsigned long long totalWireLength = 0; + unsigned long long routedWireLength = 0; + vector unrouteds; + ostringstream result; - size_t routeds = 0; - size_t unrouteds = 0; - unsigned long long totalWireLength = 0; - unsigned long long routedWireLength = 0; + AutoSegmentLut::const_iterator ilut = _getAutoSegmentLut().begin(); + for ( ; ilut != _getAutoSegmentLut().end() ; ilut++ ) { + TrackElement* segment = _lookup( ilut->second ); + if (segment == NULL) continue; - TrackElementLut::const_iterator ilut = _trackSegmentLut.begin(); - for ( ; ilut != _trackSegmentLut.end() ; ilut++ ) { - unsigned long long wl = (unsigned long long)DbU::getLambda(ilut->second->getLength()); - if ( wl > 100000 ) { + unsigned long long wl = (unsigned long long)DbU::getLambda( segment->getLength() ); + if (wl > 100000) { cerr << Error("KiteEngine::printCompletion(): Suspiciously long wire: %llu for %p:%s" - ,wl,ilut->first,getString(ilut->second).c_str()) << endl; + ,wl,ilut->first,getString(segment).c_str()) << endl; continue; } + + if (segment->isFixed() or segment->isBlockage()) continue; + totalWireLength += wl; - if ( ilut->second->getTrack() != NULL ) { + if (segment->getTrack() != NULL) { routeds++; routedWireLength += wl; } else { - cout << " " << setw(4) << ++unrouteds << "| " << ilut->second << endl; + unrouteds.push_back( segment ); } } - float segmentRatio = (float)(routeds) / (float)(_trackSegmentLut.size()) * 100.0; - float wireLengthRatio = (float)(routedWireLength) / (float)(totalWireLength) * 100.0; + float segmentRatio = (float)(routeds) / (float)(routeds+unrouteds.size()) * 100.0; + float wireLengthRatio = (float)(routedWireLength) / (float)(totalWireLength) * 100.0; - cmess1 << " - Track Segment Completion Ratio := " - << setprecision(4) << segmentRatio - << "% [" << routeds << "/" << _trackSegmentLut.size() << "] " - << (_trackSegmentLut.size() - routeds) << " remains." << endl; - cmess1 << " - Wire Length Completion Ratio := " - << setprecision(4) << wireLengthRatio - << "% [" << totalWireLength << "] " - << (totalWireLength - routedWireLength) << " remains." << endl; + result << setprecision(4) << segmentRatio + << "% [" << routeds << "+" << unrouteds.size() << "]"; + cmess1 << Dots::asString( " - Track Segment Completion Ratio", result.str() ) << endl; + + result.str(""); + result << setprecision(4) << wireLengthRatio + << "% [" << totalWireLength << "+" + << (totalWireLength - routedWireLength) << "]"; + cmess1 << Dots::asString( " - Wire Length Completion Ratio", result.str() ) << endl; float expandRatio = 1.0; - if ( _minimumWL != 0.0 ) { + if (_minimumWL != 0.0) { expandRatio = ((totalWireLength-_minimumWL) / _minimumWL) * 100.0; - cmess1 << " - Wire Length Expand Ratio := " - << setprecision(3) << expandRatio - << "% [min:" << setprecision(9) << _minimumWL << "] " - << endl; + + result.str(""); + result << setprecision(3) << expandRatio << "% [min:" << setprecision(9) << _minimumWL << "]"; + cmess1 << Dots::asString( " - Wire Length Expand Ratio", result.str() ) << endl; } - _toolSuccess = (unrouteds == 0); + _toolSuccess = (unrouteds.empty()); - addMeasure ( getCell(), "Segs" , routeds+unrouteds ); - addMeasure ( getCell(), "DWL(l)" , totalWireLength , 12 ); - addMeasure ( getCell(), "fWL(l)" , totalWireLength-routedWireLength , 12); - addMeasure ( getCell(), "WLER(%)", (expandRatio-1.0)*100.0 ); - } + if (not unrouteds.empty()) { + cerr << " o Routing did not complete, unrouted segments:" << endl; + for ( size_t i=0; i ( getCell(), "Segs" , routeds+unrouteds.size() ); + addMeasure( getCell(), "DWL(l)" , totalWireLength , 12 ); + addMeasure( getCell(), "fWL(l)" , totalWireLength-routedWireLength , 12 ); + addMeasure ( getCell(), "WLER(%)", (expandRatio-1.0)*100.0 ); +} void KiteEngine::dumpMeasures ( ostream& out ) const { vector measuresLabels; - measuresLabels.push_back ( "Gates" ); - measuresLabels.push_back ( "GCells" ); - measuresLabels.push_back ( "knikT" ); - measuresLabels.push_back ( "knikS" ); - measuresLabels.push_back ( "GWL(l)" ); - measuresLabels.push_back ( "Area(l2)"); - measuresLabels.push_back ( "Sat." ); - measuresLabels.push_back ( "loadT" ); - measuresLabels.push_back ( "loadS" ); - measuresLabels.push_back ( "Globals" ); - measuresLabels.push_back ( "Edges" ); - measuresLabels.push_back ( "assignT" ); - measuresLabels.push_back ( "algoT" ); - measuresLabels.push_back ( "algoS" ); - measuresLabels.push_back ( "finT" ); - measuresLabels.push_back ( "Segs" ); - measuresLabels.push_back ( "DWL(l)" ); - measuresLabels.push_back ( "fWL(l)" ); - measuresLabels.push_back ( "WLER(%)" ); - measuresLabels.push_back ( "Events" ); - measuresLabels.push_back ( "UEvents" ); + measuresLabels.push_back( "Gates" ); + measuresLabels.push_back( "GCells" ); + measuresLabels.push_back( "knikT" ); + measuresLabels.push_back( "knikS" ); + measuresLabels.push_back( "GWL(l)" ); + measuresLabels.push_back( "Area(l2)"); + measuresLabels.push_back( "Sat." ); + measuresLabels.push_back( "loadT" ); + measuresLabels.push_back( "loadS" ); + measuresLabels.push_back( "Globals" ); + measuresLabels.push_back( "Edges" ); + measuresLabels.push_back( "assignT" ); + measuresLabels.push_back( "algoT" ); + measuresLabels.push_back( "algoS" ); + measuresLabels.push_back( "finT" ); + measuresLabels.push_back( "Segs" ); + measuresLabels.push_back( "DWL(l)" ); + measuresLabels.push_back( "fWL(l)" ); + measuresLabels.push_back( "WLER(%)" ); + measuresLabels.push_back( "Events" ); + measuresLabels.push_back( "UEvents" ); - const MeasuresSet* measures = Measures::get(getCell()); + const MeasuresSet* measures = Measures::get( getCell() ); out << "#" << endl; out << "# " << getCell()->getName() << endl; out << measures->toStringHeaders(measuresLabels) << endl; out << measures->toStringDatas (measuresLabels) << endl; - measures->toGnuplot ( "GCells Density Histogram", getString(getCell()->getName()) ); + measures->toGnuplot( "GCells Density Histogram", getString(getCell()->getName()) ); } @@ -709,8 +682,8 @@ namespace Kite { path << getCell()->getName() << ".knik-kite.dat"; ofstream sfile ( path.str().c_str() ); - dumpMeasures ( sfile ); - sfile.close (); + dumpMeasures( sfile ); + sfile.close(); } @@ -719,33 +692,28 @@ namespace Kite { cmess1 << " o Checking Kite Database coherency." << endl; bool coherency = true; - coherency = coherency && KatabaticEngine::_check ( message ); + coherency = coherency and KatabaticEngine::_check( message ); for ( size_t i=0 ; i<_routingPlanes.size() ; i++ ) coherency = _routingPlanes[i]->_check(overlap) and coherency; Katabatic::Session* ktbtSession = Session::base (); forEach ( Net*, inet, getCell()->getNets() ) { forEach ( Segment*, isegment, inet->getComponents().getSubSet() ) { - AutoSegment* autoSegment = ktbtSession->lookup ( *isegment ); - if ( not autoSegment ) continue; - if ( not autoSegment->isCanonical() ) continue; + AutoSegment* autoSegment = ktbtSession->lookup( *isegment ); + if (not autoSegment) continue; + if (not autoSegment->isCanonical()) continue; - TrackElement* trackSegment = Session::lookup ( *isegment ); - if ( not trackSegment ) { + TrackElement* trackSegment = Session::lookup( *isegment ); + if (not trackSegment) { coherency = false; - cerr << Bug("%p %s without Track Segment" - ,autoSegment - ,getString(autoSegment).c_str() - ) << endl; + cerr << Bug( "%p %s without Track Segment" + , autoSegment + , getString(autoSegment).c_str() ) << endl; } else - trackSegment->_check (); + trackSegment->_check(); } } -#if defined(CHECK_DATABASE) - //Session::getKiteEngine()->setInterrupt ( not coherency ); -#endif - return coherency; } @@ -753,14 +721,14 @@ namespace Kite { void KiteEngine::finalizeLayout () { ltrace(90) << "KiteEngine::finalizeLayout()" << endl; - if ( getState() > Katabatic::StateDriving ) return; + if (getState() > Katabatic::EngineDriving) return; ltracein(90); - setState ( Katabatic::StateDriving ); - _gutKite (); + setState( Katabatic::EngineDriving ); + _gutKite(); - KatabaticEngine::finalizeLayout (); + KatabaticEngine::finalizeLayout(); ltrace(90) << "State: " << getState() << endl; ltraceout(90); @@ -773,15 +741,15 @@ namespace Kite { ltracein(90); ltrace(90) << "State: " << getState() << endl; - if ( getState() < Katabatic::StateGutted ) { - Session::open ( this ); + if (getState() < Katabatic::EngineGutted) { + Session::open( this ); size_t maxDepth = getRoutingGauge()->getDepth(); for ( size_t depth=0 ; depth < maxDepth ; depth++ ) { - _routingPlanes[depth]->destroy (); + _routingPlanes[depth]->destroy(); } - Session::close (); + Session::close(); } ltraceout(90); @@ -790,52 +758,10 @@ namespace Kite { TrackElement* KiteEngine::_lookup ( Segment* segment ) const { - TrackElementLut::const_iterator it = _trackSegmentLut.find ( segment ); - if ( it == _trackSegmentLut.end() ) { - AutoSegment* autoSegment = KatabaticEngine::_lookup ( segment ); - if ( not autoSegment or autoSegment->isCanonical() ) return NULL; + AutoSegment* autoSegment = KatabaticEngine::_lookup( segment ); + if (not autoSegment or not autoSegment->isCanonical()) return NULL; - Interval dummy; - autoSegment = autoSegment->getCanonical ( dummy ); - it = _trackSegmentLut.find ( autoSegment->base() ); - - if ( it == _trackSegmentLut.end() ) return NULL; - } - return (*it).second; - } - - - void KiteEngine::_link ( TrackElement* trackSegment ) - { - if ( getState() > Katabatic::StateActive ) return; - - if ( !trackSegment ) { - cerr << Bug("KiteEngine::_link(): Rejecting NULL TrackElement.") << endl; - return; - } - - _trackSegmentLut [ trackSegment->base()->base() ] = trackSegment; - // Not needed: Canonical search is done before lookup. -// forEach ( AutoSegment*, isegment, trackSegment->base()->getCollapseds() ) { -// _trackSegmentLut [ isegment->base() ] = trackSegment; -// } - } - - - void KiteEngine::_unlink ( TrackElement* trackSegment ) - { - if ( getState() > Katabatic::StateActive ) return; - - TrackElementLut::iterator it = _trackSegmentLut.find ( trackSegment->base()->base() ); - if ( it != _trackSegmentLut.end() ) - _trackSegmentLut.erase ( it ); - - // Not needed: Canonical search is done before lookup. -// forEach ( AutoSegment*, isegment, trackSegment->base()->getCollapseds() ) { -// TrackElementLut::iterator it = _trackSegmentLut.find ( isegment->base() ); -// if ( it != _trackSegmentLut.end() ) -// _trackSegmentLut.erase ( it ); -// } + return _lookup( autoSegment ); } @@ -844,15 +770,15 @@ namespace Kite { cerr << " o Checking " << net << endl; forEach ( Segment*, isegment, net->getComponents().getSubSet() ) { - TrackElement* trackSegment = _lookup ( *isegment ); - if ( trackSegment ) { - trackSegment->_check (); + TrackElement* trackSegment = _lookup( *isegment ); + if (trackSegment) { + trackSegment->_check(); AutoContact* autoContact = trackSegment->base()->getAutoSource(); - if ( autoContact ) autoContact->checkTopology (); + if (autoContact) autoContact->checkTopology (); autoContact = trackSegment->base()->getAutoTarget(); - if ( autoContact ) autoContact->checkTopology (); + if (autoContact) autoContact->checkTopology (); } } } @@ -865,12 +791,7 @@ namespace Kite { string KiteEngine::_getString () const { ostringstream os; - - os << "<" << "KiteEngine " - << _cell->getName () << " " - // << getString(_rg->getName()) - << ">"; - + os << "<" << "KiteEngine " << _cell->getName () << ">"; return os.str(); } @@ -879,12 +800,12 @@ namespace Kite { { Record* record = KatabaticEngine::_getRecord (); - if ( record ) { - record->add ( getSlot ( "_routingPlanes", &_routingPlanes ) ); - record->add ( getSlot ( "_configuration", _configuration ) ); + if (record) { + record->add( getSlot( "_routingPlanes", &_routingPlanes ) ); + record->add( getSlot( "_configuration", _configuration ) ); } return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/KiteMain.cpp b/kite/src/KiteMain.cpp index ecce5b83..57e37802 100644 --- a/kite/src/KiteMain.cpp +++ b/kite/src/KiteMain.cpp @@ -1,8 +1,7 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,31 +14,31 @@ // +-----------------------------------------------------------------+ -#include +#include using namespace std; -#include +#include namespace bopts = boost::program_options; -#include "vlsisapd/configuration/Configuration.h" -#include "hurricane/DebugSession.h" -#include "hurricane/DataBase.h" -#include "hurricane/Cell.h" -#include "hurricane/Warning.h" -#include "hurricane/UpdateSession.h" +#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/DebugSession.h" +#include "hurricane/DataBase.h" +#include "hurricane/Cell.h" +#include "hurricane/Warning.h" +#include "hurricane/UpdateSession.h" using namespace Hurricane; -#include "crlcore/Utilities.h" -#include "crlcore/Banner.h" -#include "crlcore/AllianceFramework.h" -#include "crlcore/Hierarchy.h" -#include "crlcore/ToolBox.h" +#include "crlcore/Utilities.h" +#include "crlcore/Banner.h" +#include "crlcore/AllianceFramework.h" +#include "crlcore/Hierarchy.h" +#include "crlcore/ToolBox.h" using namespace CRL; -#include "knik/KnikEngine.h" +#include "knik/KnikEngine.h" using namespace Knik; -#include "kite/KiteEngine.h" +#include "kite/KiteEngine.h" using namespace Kite; @@ -145,8 +144,8 @@ int main ( int argc, char *argv[] ) } KatabaticEngine::NetSet routingNets; - unsigned int globalFlags = (loadGlobal) ? Kite::LoadGlobalSolution - : Kite::BuildGlobalSolution; + unsigned int globalFlags = (loadGlobal) ? Kite::KtLoadGlobalRouting + : Kite::KtBuildGlobalRouting; KiteEngine* kite = KiteEngine::create( cell ); if (showConf) kite->printConfiguration(); @@ -154,9 +153,10 @@ int main ( int argc, char *argv[] ) kite->runGlobalRouter( globalFlags ); if (saveGlobal) kite->saveGlobalSolution (); - kite->loadGlobalRouting( Katabatic::LoadGrByNet, routingNets ); - kite->layerAssign ( Katabatic::NoNetLayerAssign ); - kite->runNegociate (); + kite->loadGlobalRouting ( Katabatic::EngineLoadGrByNet, routingNets ); + kite->balanceGlobalDensity(); + kite->layerAssign ( Katabatic::EngineNoNetLayerAssign ); + kite->runNegociate (); kiteSuccess = kite->getToolSuccess(); kite->finalizeLayout (); diff --git a/kite/src/Manipulator.cpp b/kite/src/Manipulator.cpp new file mode 100644 index 00000000..b8a39f2f --- /dev/null +++ b/kite/src/Manipulator.cpp @@ -0,0 +1,1412 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2013, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Module : "./Manipulator.cpp" | +// +-----------------------------------------------------------------+ + + +#include "hurricane/DebugSession.h" +#include "hurricane/Bug.h" +#include "kite/TrackSegment.h" +#include "kite/Track.h" +#include "kite/Tracks.h" +#include "kite/DataNegociate.h" +#include "kite/RoutingPlane.h" +#include "kite/RoutingEvent.h" +#include "kite/SegmentFsm.h" +#include "kite/Manipulator.h" +#include "kite/KiteEngine.h" + + +namespace { + + using namespace std; + using namespace Hurricane; + using namespace Kite; + using Katabatic::GCell; + + +// ------------------------------------------------------------------- +// Class : "LvGCandidate". + + class LvGCandidate { + public: + struct Compare : public binary_function { + inline bool operator() ( const LvGCandidate& lhs, const LvGCandidate& rhs ) const; + }; + public: + inline LvGCandidate ( TrackElement* segment=NULL, Interval overlap=Interval(), size_t terminals=0 ); + inline TrackElement* getSegment () const; + inline const Interval& getOverlap () const; + inline size_t getTerminals () const; + private: + TrackElement* _segment; + Interval _overlap; + size_t _terminals; + }; + + inline LvGCandidate::LvGCandidate ( TrackElement* segment, Interval overlap, size_t terminals ) + : _segment (segment) + , _overlap (overlap) + , _terminals(terminals) + { } + + inline TrackElement* LvGCandidate::getSegment () const { return _segment; } + inline const Interval& LvGCandidate::getOverlap () const { return _overlap; } + inline size_t LvGCandidate::getTerminals () const { return _terminals; } + + inline bool LvGCandidate::Compare::operator() ( const LvGCandidate& lhs, const LvGCandidate& rhs ) const + { + if ( lhs.getTerminals() != rhs.getTerminals() ) + return lhs.getTerminals() < rhs.getTerminals(); + + if ( lhs.getOverlap() != rhs.getOverlap() ) + return lhs.getOverlap().getSize() > rhs.getOverlap().getSize(); + + return lhs.getSegment()->getAxis() < rhs.getSegment()->getAxis(); + } + + +} // Anonymous namespace. + + +namespace Kite { + + using Hurricane::Bug; + +// ------------------------------------------------------------------- +// Class : "Manipulator". + + Manipulator::Manipulator ( TrackElement* segment, SegmentFsm& S ) + : _segment(segment) + , _data (NULL) + , _event (NULL) + , _fsm (S) + { + if (not _segment) + throw Error( "Manipulator::Manipulator(): cannot build upon a NULL TrackElement." ); + + DebugSession::open( _segment->getNet(), 200 ); + + _data = _segment->getDataNegociate(); + if (_data) _event = _data->getRoutingEvent(); + } + + + Manipulator::~Manipulator () + { DebugSession::close(); } + + + bool Manipulator::canRipup ( unsigned int flags ) const + { + if (_data) { + if (not _event or _event->isUnimplemented()) return false; + + unsigned int limit = Session::getKiteEngine()->getRipupLimit(_segment); + unsigned int count = _data->getRipupCount() + ((flags & NotOnLastRipup) ? 1 : 0); + + return (count < limit); + } + return false; + } + + + bool Manipulator::isCaged ( DbU::Unit axis ) const + { + Track* track = _segment->getTrack(); + if ( not track ) return false; + + TrackElement* neighbor = _segment->getPrevious(); + if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) { + if (abs(axis - neighbor->getTargetU()) < DbU::lambda(10.0)) + return true; + } + + neighbor = _segment->getNext(); + if (neighbor and (neighbor->isFixed() or neighbor->isBlockage())) { + if (abs(axis - neighbor->getSourceU()) < DbU::lambda(10.0)) + return true; + } + + return false; + } + + + bool Manipulator::ripup ( unsigned int type, DbU::Unit axisHint ) + { + ltrace(200) << "Manipulator::ripup() " << endl; + + if (not canRipup()) return false; + + if (_segment->isFixed()) return false; + if (_data == NULL) return true; + + _fsm.addAction( _segment, type, axisHint ); + return true; + } + + + bool Manipulator::ripupPerpandiculars ( unsigned int flags ) + { + ltrace(200) << "Manipulator::ripupPerpandiculars() - " << flags << endl; + + bool success = true; + bool cagedPerpandiculars = false; + Interval constraints ( _event->getConstraints() ); + Interval perpandicularConstraints ( constraints ); + size_t placedPerpandiculars = 0; + unsigned int parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4; + unsigned int perpandicularActionFlags = SegmentAction::SelfRipupPerpand; + + if (flags & Manipulator::PerpandicularsFirst) { + parallelActionFlags &= ~SegmentAction::EventLevel4; + perpandicularActionFlags |= SegmentAction::EventLevel4; + if (flags & Manipulator::ToRipupLimit) + perpandicularActionFlags |= SegmentAction::ToRipupLimit; + } else { + if (flags & Manipulator::ToRipupLimit) + parallelActionFlags |= SegmentAction::ToRipupLimit; + } + + ltrace(200) << "Pure constraints: " << constraints << endl; + + Track* track = NULL; + const vector& perpandiculars = _event->getPerpandiculars(); + + for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) { + track = perpandiculars[i]->getTrack(); + if (not track) { + // The perpandicular is not placed yet. + if (flags & Manipulator::PerpandicularsFirst) { + _fsm.addAction( perpandiculars[i], perpandicularActionFlags ); + } + continue; + } + + bool dislodgeCaged = false; + if (Manipulator(perpandiculars[i],_fsm).isCaged(_event->getSegment()->getAxis())) { + cagedPerpandiculars = true; + dislodgeCaged = true; + } + + placedPerpandiculars++; + + // Try to ripup the perpandicular. + DataNegociate* data2 = perpandiculars[i]->getDataNegociate(); + ltrace(200) << "| " << perpandiculars[i] << endl; + + if ( (flags & Manipulator::ToMoveUp) and (data2->getState() < DataNegociate::MoveUp) ) + data2->setState( DataNegociate::MoveUp ); + + if (Manipulator(perpandiculars[i],_fsm).ripup(perpandicularActionFlags)) { + if (dislodgeCaged) { + // Ugly: hard-coded uses of pitch. + _event->setAxisHint( _event->getSegment()->getAxis() + DbU::lambda(5.0) ); + } + continue; + } + + // Cannot ripup the perpandicular, try to ripup it's neigbors. + size_t begin; + size_t end; + track->getOverlapBounds( constraints, begin, end ); + + for ( ; (begin < end) ; begin++ ) { + TrackElement* other = track->getSegment(begin); + + if (other->getNet() == _event->getSegment()->getNet()) continue; + + Interval otherCanonical ( other->getCanonicalInterval() ); + if (not otherCanonical.intersect(constraints)) continue; + + // Try to ripup conflicting neighbor. + if (Manipulator(other,_fsm).canRipup()) { + ltrace(200) << " | Ripup: " << begin << " " << other << endl; + _fsm.addAction( other, SegmentAction::OtherRipup ); + } else { + ltrace(200) << "Aborted ripup of perpandiculars, fixed or blocked." << endl; + return false; + } + } + } + + if (cagedPerpandiculars and not placedPerpandiculars) { + ltrace(200) << "Aborted ripup of perpandiculars, constraints are due to fixed/blockage." << endl; + _fsm.addAction( _segment, SegmentAction::SelfRipup ); + return true; + } + + if (_segment->isLocal() and not placedPerpandiculars) { + ltrace(200) << "No placed perpandiculars, tight native constraints, place perpandiculars FIRST." << endl; + for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) { + _fsm.addAction( perpandiculars[i], perpandicularActionFlags|SegmentAction::EventLevel4 ); + } + _fsm.addAction( _segment, parallelActionFlags ); + return true; + } + + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); + size_t tracksNb = 0; + + track = plane->getTrackByPosition(constraints.getVMin()); + + if (track and (track->getAxis() < constraints.getVMin())) track = track->getNextTrack(); + for ( ; track && (track->getAxis() <= constraints.getVMax()) + ; track = track->getNextTrack(), tracksNb++ ); + + if (_segment->isLocal() and (tracksNb < 2)) success = ripple(); + + _fsm.addAction( _segment, parallelActionFlags ); + return success; + } + + + bool Manipulator::relax ( Interval interval, unsigned int flags ) + { + interval.inflate( - Session::getExtensionCap() /*+ DbU::lambda(5.0)*/ ); // Ugly. + ltrace(200) << "Manipulator::relax() of: " << _segment << " " << interval << endl; + + if (_segment->isFixed()) return false; + if (not interval.intersect(_segment->getCanonicalInterval())) return false; + if (not _data) return false; + + if ( _segment->isTerminal() + and (_segment->getLayer() == Session::getRoutingGauge()->getRoutingLayer(1)) ) { + if (interval.contains(_segment->base()->getAutoSource()->getX())) return false; + if (interval.contains(_segment->base()->getAutoTarget()->getX())) return false; + } + + ltracein(200); + bool success = true; + bool expand = _segment->isGlobal() and (flags&AllowExpand); + ltrace(200) << "Expand:" << expand << endl; + + Katabatic::GCellVector gcells; + _segment->getGCells( gcells ); + + if (gcells.size() < 2 ){ + cerr << Bug( "relax() Cannot break %s,\n only in %s." + , getString(_segment).c_str() + , getString(gcells[0]).c_str() + ) << endl; + ltraceout(200); + return false; + } + + unsigned int depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer()); + Interval uside; + size_t dogLegCount = 0; + size_t iminconflict = gcells.size(); + size_t imaxconflict = gcells.size(); + size_t igcell; + + // Look for closest enclosing min & max GCells indexes. + for ( igcell=0 ; igcellgetSide(_segment->getDirection()); + ltrace(200) << "| " << setw(3) << igcell << " " << gcells[igcell] << " uside: " << uside << endl; + + if (uside.contains(interval.getVMin())) { + iminconflict = igcell; + ltrace(200) << "> Min conflict: " << iminconflict << endl; + } + if (uside.contains(interval.getVMax())) { + imaxconflict = igcell; + ltrace(200) << "> Max conflict: " << imaxconflict << endl; + } + } + + // Expand min & max to enclose GCells of greatest or equal order + // (i.e. less saturateds) + bool minExpanded = false; + bool maxExpanded = false; + if (expand) { + if (iminconflict < gcells.size()) { + //ltrace(200) << "Expand min" << endl; + + size_t imindensity = 0; + for ( size_t iexpand=1 ; iexpandcanDogleg(gcells[iexpand],KtAllowDoglegReuse)) continue; + + // ltrace(200) << " Density " + // << "Density " << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() + // << " min. dens.:" << gcells[imindensity]->getDensity(depth) + // << " exp. dens.:" << gcells[iexpand ]->getDensity(depth) + // << endl; + + if (gcells[imindensity]->getDensity(depth) - gcells[iexpand]->getDensity(depth) > 1e-3) { + imindensity = iexpand; + //ltrace(200) << "Accepted expand " << imindensity << endl; + } + } + + if (iminconflict != imindensity) minExpanded = true; + iminconflict = (imindensity>0) ? imindensity : gcells.size(); + } + + if (imaxconflict < gcells.size()) { + //ltrace(200) << "Expand max" << endl; + + size_t imindensity = imaxconflict; + for ( size_t iexpand=imaxconflict+1 ; iexpandcanDogleg(gcells[iexpand],KtAllowDoglegReuse)) continue; + + // ltrace(200) << " Density " + // << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() + // << " min. dens.:" << gcells[imindensity]->getDensity(depth) + // << " exp. dens.:" << gcells[iexpand ]->getDensity(depth) + // << endl; + + if (gcells[imindensity]->getDensity(depth) - gcells[iexpand]->getDensity(depth) > 1e-3) { + imindensity = iexpand; + //ltrace(200) << "Accepted expand " << imindensity << endl; + } + } + + if (imindensity != imaxconflict) maxExpanded = true; + imaxconflict = (imindensity < gcells.size()) ? imindensity : gcells.size(); + } + } + ltrace(200) << "minExpanded:" << minExpanded << " (" << iminconflict + << ") maxExpanded:" << maxExpanded << " (" << imaxconflict << ")" << endl; + + // Check for full enclosure. + if ( ( (iminconflict == gcells.size()) and (imaxconflict == gcells.size() ) ) + or ( (iminconflict == 0) and (imaxconflict == gcells.size()-1) )) { + cinfo << "[INFO] Manipulator::relax(): Segment fully enclosed in interval." << endl; + ltraceout(200); + return false; + } + + // Suppress min/max if it's the first/last. + if ((iminconflict < gcells.size()) and (imaxconflict == gcells.size()-1)) imaxconflict = gcells.size(); + if ((imaxconflict < gcells.size()) and (iminconflict == 0)) iminconflict = gcells.size(); + + // Compute number of doglegs and nature of the *first* dogleg. + // (first can be min or max, second can only be max) + bool firstDoglegIsMin = false; + if (iminconflict < gcells.size()) { dogLegCount++; firstDoglegIsMin = true; } + if (imaxconflict < gcells.size()) dogLegCount++; + + switch ( dogLegCount ) { + case 2: + // Compact only if the double dogleg is at beginning or end. + if (iminconflict == imaxconflict) { + if (iminconflict == 0) { + // First dogleg is max. + dogLegCount--; + } else if (iminconflict == gcells.size()-1) { + dogLegCount--; + firstDoglegIsMin = true; + } + } + break; + case 1: break; + case 0: + cerr << Bug( "Manipulator::relax() Can't find a GCell suitable for making dogleg." + , getString(interval).c_str() ) << endl; + ltraceout(200); + return false; + } + + ltrace(200) << "| Has to do " << dogLegCount << " doglegs." << endl; + + // Check of "min is less than one track close the edge" (while not expanded). + // AND we are on the first GCell AND there's one dogleg only. + if (not minExpanded and (iminconflict == 0) and (imaxconflict == gcells.size())) { + ltrace(200) << "Cannot break in first GCell only." << endl; + ltraceout(200); + return false; + } + + // Check of "min is less than one track close the edge" (while not expanded). + if ( /*not minExpanded and*/ (iminconflict > 0) and (iminconflict < gcells.size()) ) { + uside = gcells[iminconflict-1]->getSide(_segment->getDirection()); + ltrace(200) << "GCell Edge Comparison (min): " << uside + << " vs. " << DbU::getValueString(interval.getVMin()) << endl; + // Ugly: One lambda shrink. + if (interval.getVMin()-DbU::lambda(1.0) <= uside.getVMax()) { + ltrace(200) << "Using previous GCell." << endl; + iminconflict--; + } + } + + // Check if there is only one dogleg AND it's the last one. + if (not maxExpanded and (iminconflict == gcells.size()) and (imaxconflict == gcells.size()-1)) { + ltrace(200) << "Cannot break in last GCell only." << endl; + ltraceout(200); + return false; + } + + // Check of "max is less than one track close the edge" (while not expanded). + if ((imaxconflict < gcells.size()-1)) { + uside = gcells[imaxconflict+1]->getSide( _segment->getDirection() ); + ltrace(200) << "GCell Edge Comparison (max): " << uside + << " vs. " << DbU::getValueString(interval.getVMax()) << endl; + // Ugly: Direct uses of routing pitch. + if (interval.getVMax()+DbU::lambda(5.0) >= uside.getVMin()) { + interval.inflate( 0, DbU::fromLambda(5.0) ); + ltrace(200) << "Using next GCell " << interval << endl; + imaxconflict++; + } + } + + size_t ifirstDogleg = gcells.size(); + size_t isecondDogleg = gcells.size(); + if (not firstDoglegIsMin) { + ifirstDogleg = imaxconflict; + } else { + ifirstDogleg = iminconflict; + isecondDogleg = imaxconflict; + } + + // Making first dogleg. + ltrace(200) << "Making FIRST dogleg at " << ifirstDogleg << endl; + TrackElement* segment1 = NULL; + TrackElement* segment2 = NULL; + Track* track = _segment->getTrack(); + Katabatic::GCell* dogLegGCell = gcells[ifirstDogleg]; + TrackElement* dogleg = NULL; + DbU::Unit doglegAxis; + bool doglegReuse1 = false; + bool doglegReuse2 = false; + + // Try to reuse existing dogleg if broken at either end. + if (ifirstDogleg == 0) dogleg = _segment->getSourceDogleg(); + if (ifirstDogleg == gcells.size()-1) dogleg = _segment->getTargetDogleg(); + if (dogleg) { + ltrace(200) << "Reusing dogleg." << endl; + doglegReuse1 = true; + segment1 = _segment; + } else { + // Try to create a new dogleg. + if (not _segment->canDogleg(dogLegGCell)) { + ltrace(200) << "Cannot create FIRST dogleg." << endl; + ltraceout(200); + return false; + } + _segment->makeDogleg( dogLegGCell, dogleg, segment1 ); + } + + if (firstDoglegIsMin) { + if (minExpanded) { + doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getCenter(); + //ltrace(200) << "MARK 1 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; + } else { + // Ugly: hardcoded pitch. + doglegAxis = interval.getVMin() - DbU::lambda(5.0); + //ltrace(200) << "MARK 2 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; + } + } else { + if (maxExpanded) { + doglegAxis = dogLegGCell->getSide( _segment->getDirection() ).getVMin(); + //ltrace(200) << "MARK 3 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; + } else { + // Ugly: hardcoded pitch (5.0 - 1.0). + doglegAxis = interval.getVMax() + DbU::lambda(4.0); + //ltrace(200) << "MARK 4 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; + } + } + if (doglegReuse1) _fsm.addAction( dogleg, SegmentAction::OtherRipup ); + else dogleg->setAxis( doglegAxis ); + + // If event is present, the dogleg is in the current RoutingSet. + RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); + if (event) { + ltrace(200) << "Set Axis Hint: @" << DbU::getValueString(doglegAxis) << " " << dogleg << endl; + event->setAxisHint( doglegAxis ); + } else { + ltrace(200) << "Dogleg has no RoutingEvent yet." << endl; + } + + // Making second dogleg. + if (dogLegCount > 1) { + ltrace(200) << "Making SECOND dogleg at " << isecondDogleg + << " on " << segment1 << endl; + + dogleg = NULL; + dogLegGCell = gcells[isecondDogleg]; + + if (ifirstDogleg == isecondDogleg) { + ltrace(200) << "Double break in same GCell." << endl; + segment1->setFlags( TElemSourceDogleg ); + } + + if (isecondDogleg == gcells.size()-1) dogleg = segment1->getTargetDogleg(); + if (dogleg) { + ltrace(200) << "Reusing dogleg." << endl; + doglegReuse2 = true; + segment2 = segment1; + } else { + // Try to create a new dogleg. + if (not segment1->canDogleg(dogLegGCell)) { + ltrace(200) << "Cannot create SECOND dogleg." << endl; + ltraceout(200); + return false; + } + segment1->makeDogleg( dogLegGCell, dogleg, segment2 ); + } + + if (maxExpanded) { + doglegAxis = dogLegGCell->getSide(segment1->getDirection()/*,false*/).getCenter(); + } else { + // Ugly: hardcoded pitch. + doglegAxis = interval.getVMax() + DbU::lambda(5.0); + } + if (doglegReuse2) _fsm.addAction( dogleg, SegmentAction::OtherRipup ); + else dogleg->setAxis( doglegAxis ); + + // If event is present, the dogleg is in the current RoutingSet. + RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); + if (event) { + ltrace(200) << "Set Axis Hint: @" << DbU::getValueString(doglegAxis) << " " << dogleg << endl; + event->setAxisHint( doglegAxis ); + } else { + ltrace(200) << "Dogleg has no RoutingEvent yet." << endl; + } + + // This cases seems never to occurs. + const vector& doglegs = Session::getDoglegs(); + for ( size_t i=0 ; igetTrack() and track) { + ltrace(200) << "Direct Track insert of: " << segment << endl; + Session::addInsertEvent( segment, track ); + } + } + } + + switch ( dogLegCount ) { + case 1: + if (not doglegReuse1) { + if (firstDoglegIsMin) + _segment->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + else + segment1->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + } + if ((flags & NoDoglegReuse) and (doglegReuse1 or doglegReuse2 )) + success = false; + break; + case 2: + if (not doglegReuse1) + _segment->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + if ( not doglegReuse2 ) + segment2->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + break; + } + + if (_segment->isLocal()) { + ltrace(200) << "Reset state of: " << _segment << endl; + _segment->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + } else { + ltrace(200) << "No state reset: " << _segment << endl; + } + + if ((not doglegReuse1) and segment1 and segment1->isLocal()) { + ltrace(200) << "Reset state of: " << segment1 << endl; + segment1->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + } + + if ((not doglegReuse2) and segment2 and segment2->isLocal()) { + ltrace(200) << "Reset state of: " << segment2 << endl; + segment2->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars, true ); + } + + ltraceout(200); + return success; + } + + + bool Manipulator::insertInTrack ( size_t itrack ) + { + Track* track = _fsm.getTrack(itrack); + size_t begin = _fsm.getBegin(itrack); + size_t end = _fsm.getEnd (itrack); + Net* ownerNet = _segment->getNet(); + Interval toFree (_segment->getCanonicalInterval()); + Net* ripupNet = NULL; + set canonicals; + DbU::Unit rightAxisHint = 0; + DbU::Unit leftAxisHint = 0; + bool leftIntrication = false; + bool rightIntrication = false; + bool success = true; + unsigned long maxId = AutoSegment::getMaxId(); + + ltrace(200) << "Manipulator::insertInTrack() - " << toFree << endl; + + for ( size_t i = begin ; success && (i < end) ; i++ ) { + TrackElement* segment2 = track->getSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if ( segment2->getNet() == ownerNet ) continue; + if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; + if ( segment2->isBlockage() or segment2->isFixed() ) { + success = false; + continue; + } + if ( segment2->getId() >= maxId ) continue; + ripupNet = segment2->getNet(); + + DataNegociate* data2 = segment2->getDataNegociate(); + if ( !data2 ) { + ltrace(200) << "No DataNegociate, ignoring." << endl; + continue; + } + + if ( data2->getState() == DataNegociate::MaximumSlack ) { + ltrace(200) << "At " << DataNegociate::getStateString(data2) + << " for " << segment2 << endl; + success = false; + continue; + } + + bool shrinkLeft = false; + bool shrinkRight = false; + + if ( data2->getRightMinExtend() < toFree.getVMin() ) { + ltrace(200) << "- Shrink right edge (push left) " << segment2 << endl; + shrinkRight = true; + TrackElement* rightNeighbor2 = track->getSegment(i+1); + if ( rightNeighbor2 && (rightNeighbor2->getNet() == segment2->getNet()) ) { + Interval interval1 = segment2->getCanonicalInterval(); + Interval interval2 = rightNeighbor2->getCanonicalInterval(); + + if ( interval1.intersect(interval2) && (interval2.getVMax() > interval1.getVMax()) ) + shrinkLeft = true; + } + } + + if ( data2->getLeftMinExtend() > toFree.getVMax() ) { + ltrace(200) << "- Shrink left edge (push right) " << segment2 << endl; + shrinkLeft = true; + if ( i > 0 ) { + TrackElement* leftNeighbor2 = track->getSegment(i-1); + if ( leftNeighbor2 && (leftNeighbor2->getNet() == segment2->getNet()) ) { + Interval interval1 = segment2->getCanonicalInterval(); + Interval interval2 = leftNeighbor2->getCanonicalInterval(); + + if ( interval1.intersect(interval2) && (interval2.getVMin() < interval1.getVMin()) ) + shrinkRight = true; + } + } + } + + if ( _segment->isLocal() and segment2->isLocal() ) { + if ( shrinkLeft and shrinkRight ) { + Interval interval1 = segment2->getCanonicalInterval(); + if ( toFree.getCenter() < interval1.getCenter() ) shrinkRight = false; + else shrinkLeft = false; + } + } + + ltrace(200) << "- Hard overlap/enclosure/shrink " << segment2 << endl; + if ( _segment->isStrap() and segment2->isGlobal() ) continue; + if ( not (success = Manipulator(segment2,_fsm).ripup(SegmentAction::OtherRipup)) ) + continue; + + canonicals.clear (); + forEach ( TrackElement*, isegment3 + , segment2->getPerpandiculars().getSubSet(TrackElements_UniqCanonical(canonicals)) ) { + DataNegociate* data3 = isegment3->getDataNegociate(); + if ( not data3 ) continue; + + RoutingEvent* event3 = data3->getRoutingEvent(); + if ( not event3 ) continue; + + if ( not toFree.intersect(event3->getConstraints()) ) { + ltrace(200) << " . " << *isegment3 << endl; + continue; + } + + ltrace(200) << " | " << *isegment3 << endl; + + if ( shrinkRight xor shrinkLeft ) { + if ( shrinkRight ) { + if ( not (success=Manipulator(*isegment3,_fsm) + .ripup( SegmentAction::OtherRipupPerpandAndPushAside + , toFree.getVMin() - DbU::lambda(2.5) + )) ) + break; + + if ( event3->getTracksFree() == 1 ) { + ltrace(200) << "Potential left intrication with other perpandicular." << endl; + if ( isegment3->getAxis() == segment2->getTargetU() - Session::getExtensionCap() ) { + leftIntrication = true; + leftAxisHint = isegment3->getAxis(); + } + } + } + if ( shrinkLeft ) { + if ( not (success=Manipulator(*isegment3,_fsm) + .ripup( SegmentAction::OtherRipupPerpandAndPushAside + , toFree.getVMax() + DbU::lambda(2.5) + )) ) + break; + if ( event3->getTracksFree() == 1 ) { + ltrace(200) << "Potential right intrication with other perpandicular." << endl; + if ( isegment3->getAxis() == segment2->getSourceU() + Session::getExtensionCap() ) { + rightIntrication = true; + rightAxisHint = isegment3->getAxis(); + } + } + } + } else { + if ( not (success=Manipulator(*isegment3,_fsm).ripup( SegmentAction::OtherRipup + | SegmentAction::EventLevel3 + )) ) + break; + } + } + if ( not success ) break; + } + + if ( success ) { + ltrace(200) << "Manipulator::insertInTrack() success" << endl; + + _fsm.setState ( SegmentFsm::OtherRipup ); + _fsm.addAction ( _segment + , SegmentAction::SelfInsert|SegmentAction::MoveToAxis|SegmentAction::EventLevel4 + , _fsm.getCost(itrack).getTrack()->getAxis() ); + + unsigned int flags = 0; + if ( rightIntrication ) flags |= RightAxisHint; + if ( leftIntrication ) flags |= LeftAxisHint; + if ( flags ) + Manipulator(_segment,_fsm).shrinkToTrack(itrack,flags,leftAxisHint,rightAxisHint); + } else + _fsm.clearActions (); + + return success; + } + + + bool Manipulator::forceToTrack ( size_t itrack ) + { + Track* track = _fsm.getTrack(itrack); + size_t begin = _fsm.getBegin(itrack); + size_t end = _fsm.getEnd (itrack); + Net* ownerNet = _segment->getNet(); + Interval toFree (_segment->getCanonicalInterval()); + Net* ripupNet = NULL; + set canonicals; + bool success = true; + + ltrace(200) << "Manipulator::forceToTrack() - " << toFree << endl; + + for ( size_t i=begin ; success and (i < end) ; ++i ) { + TrackElement* segment2 = track->getSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if (segment2->getNet() == ownerNet) continue; + if (not toFree.intersect(segment2->getCanonicalInterval())) continue; + if (segment2->isFixed()) { + success = false; + continue; + } + ripupNet = segment2->getNet(); + + DataNegociate* data2 = segment2->getDataNegociate(); + if (not data2 ) { + ltrace(200) << "No DataNegociate, ignoring." << endl; + continue; + } + + ltrace(200) << "- Forced ripup " << segment2 << endl; + if (not (success=Manipulator(segment2,_fsm).ripup(SegmentAction::OtherRipup))) + continue; + + canonicals.clear(); + forEach ( TrackElement*, isegment3 + , segment2->getPerpandiculars().getSubSet(TrackElements_UniqCanonical(canonicals)) ) { + DataNegociate* data3 = isegment3->getDataNegociate(); + if (not data3) continue; + + RoutingEvent* event3 = data3->getRoutingEvent(); + if (not event3) continue; + + if (Manipulator(*isegment3,_fsm).canRipup()) + _fsm.addAction( *isegment3, SegmentAction::OtherRipup ); + } + } + + if (success) { + _fsm.setState ( SegmentFsm::OtherRipup ); + _fsm.addAction( _segment + , SegmentAction::SelfInsert|SegmentAction::MoveToAxis + , _fsm.getCost(itrack).getTrack()->getAxis() ); + } + + return success; + } + + + bool Manipulator::shrinkToTrack ( size_t i, unsigned int flags, DbU::Unit leftAxisHint, DbU::Unit rightAxisHint ) + { +#if THIS_IS_DISABLED + Track* track = _fsm.getTrack(i); + size_t begin = _fsm.getBegin(i); + size_t end = _fsm.getEnd (i); + Net* ownerNet = _segment->getNet(); + set canonicals; + bool success = true; + DbU::Unit leftExtend = _segment->getSourceU() + Session::getExtensionCap(); + DbU::Unit rightExtend = _segment->getSourceU() - Session::getExtensionCap(); + + ltrace(200) << "Manipulator::shrinkToTrack()" << endl; + + if (_segment->isLocal()) return false; + Interval shrunkFree = _segment->base()->getMinSpanU(); + + ltrace(200) << "* " << shrunkFree << endl; + + for ( size_t i = begin ; success and (i < end) ; ++i ) { + TrackElement* segment2 = track->getSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if (segment2->getNet() == ownerNet) continue; + if (segment2->isFixed()) { success = false; continue; } + if (not shrunkFree.intersect(segment2->getCanonicalInterval())) continue; + + success = false; + } + + if (success) { + set perpandiculars; + set::iterator iperpand; + + DbU::Unit axisHint; + if (not (flags & LeftAxisHint )) leftAxisHint = shrunkFree.getCenter(); + if (not (flags & RightAxisHint)) rightAxisHint = shrunkFree.getCenter(); + + _segment->getPerpandicularsBound( perpandiculars ); + for ( iperpand = perpandiculars.begin() ; iperpand != perpandiculars.end() ; ++iperpand ) { + DataNegociate* data2 = (*iperpand)->getDataNegociate(); + if (data2) { + ltrace(200) << "| perpandicular bound:" << *iperpand << endl; + success = Manipulator(*iperpand,_fsm).ripup( SegmentAction::SelfRipupPerpandWithAxisHint ); + if (success) { + if ((*iperpand)->getAxis() == leftExtend ) axisHint = leftAxisHint; + else if ((*iperpand)->getAxis() == rightExtend) axisHint = rightAxisHint; + else { + cinfo << "[INFO] Bound Axis is neither left nor right\n " << (*iperpand) << endl; + axisHint = shrunkFree.getCenter(); + } + + _fsm.getActions()[_fsm.getActions().size()-1].setAxisHint( axisHint ); + } + } + } + + _fsm.addAction( _segment, SegmentAction::SelfInsert ); + _fsm.setState ( SegmentFsm::OtherRipup ); + + ltrace(200) << "Successful shrinkToTrack." << endl; + return true; + } +#endif + + return false; + } + + + bool Manipulator::forceOverLocals () + { + ltrace(200) << "Manipulator::forceOverLocals()" << endl; + ltracein(200); + + vector& costs = _fsm.getCosts(); + size_t itrack = 0; + for ( ; itrackgetNet(); + Interval toFree (_segment->getCanonicalInterval()); + + for ( size_t i = begin ; success and (i < end) ; i++ ) { + TrackElement* segment2 = track->getSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if ( segment2->getNet() == ownerNet ) continue; + if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; + if ( segment2->isFixed() ) { + success = false; + continue; + } + + DataNegociate* data2 = segment2->getDataNegociate(); + if ( not data2 ) { + ltrace(200) << "No DataNegociate, ignoring." << endl; + success = false; + continue; + } + + ltrace(200) << "- Forced ripup " << segment2 << endl; + if ( not (success=Manipulator(segment2,_fsm).ripup(SegmentAction::OtherRipup)) ) { + continue; + } + } + + if (success) { + _fsm.setState ( SegmentFsm::OtherRipup ); + _fsm.addAction( _segment + , SegmentAction::SelfInsert|SegmentAction::MoveToAxis + , _fsm.getCost(itrack).getTrack()->getAxis() + ); + break; + } + } + + ltraceout(200); + return (itrack < costs.size()); + } + + + bool Manipulator::slacken ( unsigned int flags ) + { + ltrace(200) << "Manipulator::slacken() " << _segment << endl; + + if ( _segment->isFixed ()) return false; + if (not _segment->canSlacken()) return false; + + return _segment->slacken( flags ); + } + + + bool Manipulator::ripple () + { + ltrace(200) << "Manipulator::ripple() from " << _segment << endl; + + //if (not _segment->canRipple()) return false; + if (not _segment->isLocal()) return false; + + Net* net = _segment->getNet(); + Interval uside = _segment->base()->getAutoSource()->getGCell()->getSide ( Katabatic::perpandicularTo(_segment->getDirection())/*, false*/ ); + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); + + ltracein(200); + forEach ( Track*, itrack, Tracks_Range::get(plane,uside)) { + size_t begin; + size_t end; + + itrack->getOverlapBounds( _segment->getCanonicalInterval(), begin, end ); + for ( ; begin < end ; begin++ ) { + TrackElement* other = itrack->getSegment(begin); + ltrace(200) << "| " << other << endl; + + if (other->getNet() == net) continue; + if (not other->canRipple()) continue; + + DataNegociate* otherData = other->getDataNegociate(); + if (not otherData) continue; + + DbU::Unit shiftedAxisHint; + RoutingEvent* otherEvent = otherData->getRoutingEvent(); + + if (other->getAxis() < _segment->getAxis()) { + // Ugly: routing pitch. + shiftedAxisHint = otherEvent->getAxisHint() - DbU::lambda(5.0); + if (shiftedAxisHint < uside.getVMin()) + shiftedAxisHint = uside.getVMin(); + } else { + // Ugly: routing pitch. + shiftedAxisHint = otherEvent->getAxisHint() + DbU::lambda(5.0); + if (shiftedAxisHint > uside.getVMax()) + shiftedAxisHint = uside.getVMax(); + } + + otherEvent->setAxisHint( shiftedAxisHint ); + _fsm.addAction( other, SegmentAction::OtherRipup ); + } + } + ltraceout(200); + + return true; + } + + + bool Manipulator::pivotUp () + { + ltrace(200) << "Manipulator::pivotUp() " << _segment << endl; + return false; + + if (_segment->isFixed()) return false; + if (_segment->isStrap()) return false; + + float reserve = (_segment->isLocal()) ? 0.5 : 1.0; + if (not _segment->canMoveUp(reserve)) return false; + + return _segment->moveUp( Katabatic::KbNoFlags ); + } + + + bool Manipulator::pivotDown () + { + ltrace(200) << "Manipulator::pivotDown() " << _segment << endl; + return false; + + if ( _segment->isFixed () ) return false; + if ( _segment->isStrap () ) return false; + if (not _segment->canPivotDown(2.0)) return false; + + return _segment->moveDown( Katabatic::KbNoFlags ); + } + + + bool Manipulator::moveUp ( unsigned int flags ) + { + ltrace(200) << "Manipulator::moveUp() " << _segment << endl; + + unsigned int kflags = Katabatic::KbWithNeighbors; + //kflags |= (flags & AllowLocalMoveUp ) ? Katabatic::AutoSegment::AllowLocal : 0; + kflags |= (flags & AllowTerminalMoveUp) ? Katabatic::KbAllowTerminal : 0; + + if (_segment->isFixed()) return false; + if (not (flags & AllowLocalMoveUp)) { + if (_segment->isLocal()) { + if (not _segment->canPivotUp(0.5)) return false; + } else { + if (_segment->getLength() < DbU::lambda(100.0)) { + if (not (flags & AllowShortPivotUp)) return false; + if (not _segment->canPivotUp(1.0)) return false; + } + if (not _segment->canMoveUp(0.5,kflags)) return false; + } + } else { + if (not _segment->canMoveUp(0.5,kflags)) return false; + } + return _segment->moveUp( kflags ); + } + + + bool Manipulator::makeDogleg () + { + ltrace(200) << "Manipulator::makeDogleg() " << _segment << endl; + + if ( _segment->isFixed()) return false; + if (not _segment->isLocal()) return false; + if (_segment->getLength() < 5*DbU::lambda(5.0)) return false; + + if (_fsm.getCosts().size()) { + Track* track = _fsm.getTrack(0); + size_t begin = _fsm.getBegin(0); + size_t end = _fsm.getEnd (0); + Net* ownerNet = _segment->getNet(); + Interval toFree (_segment->getCanonicalInterval()); + Interval overlap; + + for ( size_t i=begin ; igetSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if ( segment2->getNet() == ownerNet) continue; + if (not toFree.intersect(segment2->getCanonicalInterval())) continue; + + if (overlap.isEmpty()) + overlap = segment2->getCanonicalInterval(); + else + overlap.merge( segment2->getCanonicalInterval() ); + } + + if (not overlap.isEmpty() and makeDogleg(overlap)) return true; + } + + if (not _segment->canDogleg()) return false; + _segment->makeDogleg(); + + return true; + } + + + bool Manipulator::makeDogleg ( Interval overlap ) + { + ltrace(200) << "Manipulator::makeDogleg(Interval) " << _segment << endl; + ltrace(200) << overlap << endl; + + if ( _segment->isFixed () ) return false; + if (not _segment->canDogleg(overlap)) return false; + + unsigned int flags = 0; + TrackElement* dogleg = _segment->makeDogleg(overlap,flags); + if (dogleg) { + ltrace(200) << "Manipulator::makeDogleg(Interval) - Push dogleg to the " + << ((flags&Katabatic::KbDoglegOnLeft)?"left":"right") << endl; + if (_segment->isTerminal()) { + Katabatic::AutoContact* contact = + (flags&Katabatic::KbDoglegOnLeft) ? _segment->base()->getAutoSource() + : _segment->base()->getAutoTarget(); + DbU::Unit axisHint = (_segment->isHorizontal()) ? contact->getX() : contact->getY(); + RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); + if (event) { + event->setAxisHint ( axisHint ); + event->setForcedToHint( true ); + ltrace(200) << "Forced to axis hint @" << DbU::getValueString(axisHint) << endl; + } + } + return true; + } + + return false; + } + + + bool Manipulator::makeDogleg ( DbU::Unit position ) + { + ltrace(200) << "Manipulator::makeDogleg(position) " << _segment << endl; + ltrace(200) << "Breaking position: " << DbU::getValueString(position) << endl; + + if (_segment->isFixed()) return false; + + Katabatic::GCellVector gcells; + _segment->getGCells( gcells ); + + size_t igcell = 0; + for ( ; igcellgetSide(_segment->getDirection()).contains(position)) + break; + } + if (igcell == gcells.size()) return false; + if (not _segment->canDogleg(gcells[igcell])) return false; + + TrackElement* dogleg = NULL; + TrackElement* parallel = NULL; + _segment->makeDogleg( gcells[igcell], dogleg, parallel ); + return (dogleg != NULL); + } + + + bool Manipulator::minimize () + { + ltrace(200) << "Manipulator::minimize() " << _segment << endl; + + if (_segment->isFixed()) return false; + if (not _event->canMinimize()) return false; + + DbU::Unit minSpan = DbU::Max; + DbU::Unit maxSpan = DbU::Min; + Interval punctualSpan ( false ); + + if (_segment->base()->getAutoSource()->getAnchor()) { + ltrace(200) << " | " << _segment->base()->getAutoSource() << endl; + Interval constraints ( _segment->base()->getAutoSource()->getUConstraints + (perpandicularTo(_segment->getDirection())) ); + ltrace(200) << " | Constraints: " << constraints << endl; + + minSpan = min( minSpan, constraints.getVMax() ); + maxSpan = max( maxSpan, constraints.getVMin() ); + punctualSpan.intersection( constraints ); + } + + if (_segment->base()->getAutoTarget()->getAnchor()) { + ltrace(200) << " | " << _segment->base()->getAutoTarget() << endl; + Interval constraints ( _segment->base()->getAutoTarget()->getUConstraints + (perpandicularTo(_segment->getDirection())) ); + ltrace(200) << " | Constraints: " << constraints << endl; + + minSpan = min( minSpan, constraints.getVMax() ); + maxSpan = max( maxSpan, constraints.getVMin() ); + punctualSpan.intersection( constraints ); + } + + const vector& perpandiculars = _event->getPerpandiculars(); + for ( size_t i=0 ; igetDataNegociate(); + if (not data2) continue; + + ltrace(200) << " | " << perpandiculars[i] << endl; + + RoutingEvent* event2 = data2->getRoutingEvent(); + if (not event2) continue; + + ltrace(200) << " | Constraints: " << event2->getConstraints() << endl; + + minSpan = min( minSpan, event2->getConstraints().getVMax() ); + maxSpan = max( maxSpan, event2->getConstraints().getVMin() ); + punctualSpan.intersection( event2->getConstraints() ); + } + if (minSpan > maxSpan) swap( minSpan, maxSpan ); + + ltrace(200) << "punctualSpan: " << punctualSpan + << " min/max span: [" << DbU::getValueString(minSpan) + << ":" << DbU::getValueString(maxSpan) << "]" + << " long: [" << minSpan + << ":" << maxSpan << "]" << endl; + + vector holes; + for ( size_t itrack=0 ; itrack<_fsm.getCosts().size() ; itrack++ ) { + size_t begin = _fsm.getBegin(itrack); + size_t end = _fsm.getEnd (itrack); + Track* track = _fsm.getTrack(itrack); + + if (end < track->getSize()) end++; + + ltrace(200) << "Looking for holes in " << _fsm.getCost(itrack) << endl; + + TrackElement* otherPrevious = NULL; + // ToDo: Manage disjoint but subsequent segment of a Net. + // (currently, that hole will not be found). + for ( ; begin < end ; begin++ ) { + TrackElement* otherSegment = track->getSegment(begin); + if (otherSegment->getNet() == _segment->getNet()) continue; + if (not otherPrevious) { + holes.push_back( Interval(track->getMin() + ,otherSegment->getSourceU()) ); + ltrace(200) << "| First hole: " << holes.back() << " " << otherSegment << endl; + } else { + if (otherSegment->getNet() == otherPrevious->getNet()) continue; + + holes.push_back( Interval(otherPrevious->getTargetU() + ,otherSegment ->getSourceU()) ); + ltrace(200) << "| Found hole: " << holes.back() + << " " << otherPrevious << " <-> " << " " << otherSegment << endl; + } + otherPrevious = otherSegment; + } + } + + if (holes.empty()) { + ltrace(200) << "No holes found to minimize into." << endl; + return false; + } + + Interval currentSpan = _segment->getCanonicalInterval(); + Interval biggestHole; + for ( size_t i=0 ; i currentSpan.getIntersection(biggestHole).getSize() ) + biggestHole = holes[i]; + } + + DbU::Unit axisHint = 0; + if (not punctualSpan.isEmpty()) { + bool success = false; + + if (biggestHole.intersect(punctualSpan)) { + ltrace(200) << "Go as punctual into biggest hole: " << biggestHole << endl; + axisHint = biggestHole.intersection(punctualSpan).getCenter(); + success = true; + } else { + for ( size_t i=0 ; igetDataNegociate(); + if (not data2) continue; + + ltrace(200) << " | " << perpandiculars[i] << endl; + + RoutingEvent* event2 = data2->getRoutingEvent(); + if (not event2) continue; + + _fsm.addAction( perpandiculars[i], SegmentAction::SelfRipupPerpandWithAxisHint, axisHint ); + } + + _event->setMinimized(); + + return true; + } + + + void Manipulator::reprocessPerpandiculars () + { + if ( _event->getAxisHistory() == _event->getAxisHint() ) return; + + bool moveLeft = (_event->getAxisHistory() > _event->getAxisHint()); + + const vector& perpandiculars = _event->getPerpandiculars(); + for ( size_t iperpand=0 ; iperpandgetDataNegociate(); + + if ( perpandicular->isFixed() ) continue; + if ( not data ) continue; + if ( not perpandicular->getTrack() ) continue; + if ( not Manipulator(perpandicular,_fsm).canRipup() + or (data->getState() >= DataNegociate::MaximumSlack) ) continue; + + // Ugly: ExtensionCap usage. + if ( moveLeft ) { + if ( perpandicular->getTargetU()-Session::getExtensionCap() == _event->getAxisHistory() ) + _fsm.addAction ( perpandicular, SegmentAction::OtherRipupPerpandAndPacking ); + } else { + if ( perpandicular->getSourceU()+Session::getExtensionCap() == _event->getAxisHistory() ) + _fsm.addAction ( perpandicular, SegmentAction::OtherRipupPerpandAndPacking ); + } + } + } + + + void Manipulator::repackPerpandiculars () + { + ltrace(200) << "Manipulator::repackPerpandiculars()" << endl; + + const vector& perpandiculars = _event->getPerpandiculars(); + for ( size_t iperpand=0 ; iperpandgetDataNegociate(); + + if (perpandicular->isFixed ()) continue; + if (perpandicular->isGlobal()) continue; + if (not data) continue; + + if (RoutingEvent::getStage() == RoutingEvent::Repair) { + data->setState( DataNegociate::Repair ); + if (data->getStateCount() > 1) data->resetStateCount(); + } + _fsm.addAction( perpandicular, SegmentAction::SelfRipupPerpand ); + } + _fsm.addAction( _segment, SegmentAction::SelfRipup|SegmentAction::EventLevel4 ); + } + + +} // Kite namespace. diff --git a/kite/src/NegociateWindow.cpp b/kite/src/NegociateWindow.cpp index 915385a5..64929ff2 100644 --- a/kite/src/NegociateWindow.cpp +++ b/kite/src/NegociateWindow.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,34 +15,32 @@ // +-----------------------------------------------------------------+ -#include -#include -#include - -#include "hurricane/Warning.h" -#include "hurricane/Bug.h" -#include "hurricane/RoutingPad.h" -#include "hurricane/Net.h" -#include "hurricane/Cell.h" -#include "crlcore/Utilities.h" -#include "crlcore/AllianceFramework.h" -#include "crlcore/Measures.h" -#include "crlcore/Histogram.h" -#include "katabatic/AutoContact.h" -#include "katabatic/GCellGrid.h" - -#include "kite/DataNegociate.h" -#include "kite/TrackElement.h" -#include "kite/TrackMarker.h" -#include "kite/TrackCost.h" -#include "kite/Track.h" -#include "kite/TrackSegment.h" -#include "kite/RoutingPlane.h" -#include "kite/RoutingEventQueue.h" -#include "kite/RoutingEventHistory.h" -#include "kite/RoutingEventLoop.h" -#include "kite/NegociateWindow.h" -#include "kite/KiteEngine.h" +#include +#include +#include +#include "hurricane/Warning.h" +#include "hurricane/Bug.h" +#include "hurricane/RoutingPad.h" +#include "hurricane/Net.h" +#include "hurricane/Cell.h" +#include "crlcore/Utilities.h" +#include "crlcore/AllianceFramework.h" +#include "crlcore/Measures.h" +#include "crlcore/Histogram.h" +#include "katabatic/AutoContact.h" +#include "katabatic/GCellGrid.h" +#include "kite/DataNegociate.h" +#include "kite/TrackElement.h" +#include "kite/TrackMarker.h" +#include "kite/TrackCost.h" +#include "kite/Track.h" +#include "kite/TrackSegment.h" +#include "kite/RoutingPlane.h" +#include "kite/RoutingEventQueue.h" +#include "kite/RoutingEventHistory.h" +#include "kite/RoutingEventLoop.h" +#include "kite/NegociateWindow.h" +#include "kite/KiteEngine.h" namespace { @@ -57,69 +55,56 @@ namespace { { Interval intersect = segment->getCanonicalInterval(); - if ( not intersect.intersect(cost.getInterval()) ) return; + if (not intersect.intersect(cost.getInterval())) return; - if ( segment->isBlockage() or segment->isFixed() ) { + if (segment->isBlockage() or segment->isFixed()) { ltrace(200) << "Infinite cost from: " << segment << endl; - cost.setInfinite (); - cost.setOverlap (); - cost.setHardOverlap (); - cost.setBlockage (); + cost.setInfinite (); + cost.setOverlap (); + cost.setHardOverlap(); + cost.setBlockage (); return; } - if ( cost.getInterval().getVMax() > intersect.getVMax() ) cost.setLeftOverlap(); - if ( cost.getInterval().getVMin() < intersect.getVMin() ) cost.setRightOverlap(); + if (cost.getInterval().getVMax() > intersect.getVMax()) cost.setLeftOverlap(); + if (cost.getInterval().getVMin() < intersect.getVMin()) cost.setRightOverlap(); - //cost.setLonguestOverlap ( intersect.getSize() ); - //intersect.intersection ( cost.getInterval() ); - - if ( not intersect.contains(cost.getInterval()) ) - intersect.intersection ( cost.getInterval() ); + if (not intersect.contains(cost.getInterval())) + intersect.intersection( cost.getInterval() ); else { - cost.setLonguestOverlap ( intersect.getSize() ); - cost.setGlobalEnclosed (); + cost.setLonguestOverlap( intersect.getSize() ); + cost.setGlobalEnclosed(); } - DataNegociate* data = segment->getDataNegociate (); - if ( not data ) return; + DataNegociate* data = segment->getDataNegociate(); + if (not data) return; - cost.mergeRipupCount ( data->getRipupCount() ); + cost.mergeRipupCount( data->getRipupCount() ); if ( segment->isLocal() ) { - cost.mergeDataState ( data->getState() ); - if ( data->getState() >= DataNegociate::LocalVsGlobal ) { + cost.mergeDataState( data->getState() ); + if (data->getState() >= DataNegociate::LocalVsGlobal) { ltrace(200) << "MaximumSlack/LocalVsGlobal for " << segment << endl; } } - if ( segment->isGlobal() ) { - //if ( data->getState() >= DataNegociate::ConflictSolve1 ) { - cost.setOverlapGlobal(); - //} - if ( (cost.getFlags() & TrackCost::LocalAndTopDepth) - and (data->getState() >= DataNegociate::MoveUp) ) { - cost.setInfinite (); - cost.setOverlap (); - cost.setHardOverlap (); - return; - } + if (segment->isGlobal()) { + cost.setOverlapGlobal(); + if ( (cost.getFlags() & TrackCost::LocalAndTopDepth) + and (data->getState() >= DataNegociate::MoveUp) ) { + cost.setInfinite (); + cost.setOverlap (); + cost.setHardOverlap(); + return; + } } - // if ( data->getRipupCount() > 3 ) { - // ltrace(200) << "Infinite cost from: " << segment << endl; - // cost.setFixed (); - // cost.setInfinite (); - // cost.setOverlap (); - // cost.setHardOverlap (); - // return; - // } - - cost.setOverlap (); - if ( segment->isLocal() or (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3) ) - cost.incTerminals ( data->getCost().getTerminals()*100 ); + cost.setOverlap(); + if ( segment->isLocal() + or (cost.isForGlobal() and (Session::getRoutingGauge()->getLayerDepth(segment->getLayer()) < 3)) ) + cost.incTerminals( data->getTerminals()*100 ); ltrace(200) << "| Increment Delta: " << DbU::getValueString(intersect.getSize()) << endl; - cost.incDelta ( intersect.getSize() ); + cost.incDelta( intersect.getSize() ); } @@ -129,24 +114,22 @@ namespace { RoutingGauge* rg = nw->getKiteEngine()->getRoutingGauge(); forEach ( Net*, inet, nw->getCell()->getNets() ) { - if ( inet->getType() == Net::Type::POWER ) continue; - if ( inet->getType() == Net::Type::GROUND ) continue; - if ( inet->getType() == Net::Type::CLOCK ) continue; - if ( af->isBLOCKAGE(inet->getName()) ) continue; + if (inet->getType() == Net::Type::POWER ) continue; + if (inet->getType() == Net::Type::GROUND) continue; + if (inet->getType() == Net::Type::CLOCK ) continue; + if (af->isBLOCKAGE(inet->getName())) continue; forEach ( RoutingPad*, irp, inet->getRoutingPads() ) { size_t depth = rg->getLayerDepth(irp->getLayer()); - if ( depth > 0 ) continue; - if ( depth == 0 ) { - TrackMarker::create ( *irp, 1 ); - //TrackMarker::create ( *irp, 2 ); - } + if (depth > 0) continue; + if (depth == 0) + TrackMarker::create( *irp, 1 ); } } } -} // End of local namespace. +} // Anonymous namespace. namespace Kite { @@ -167,6 +150,8 @@ namespace Kite { using CRL::Histogram; using CRL::addMeasure; using Katabatic::AutoContact; + using Katabatic::AutoSegmentLut; + using Katabatic::perpandicularTo; // ------------------------------------------------------------------- @@ -207,111 +192,115 @@ namespace Kite { void NegociateWindow::setGCells ( const Katabatic::GCellVector& gcells ) { _gcells = gcells; - //sort ( _gcells.begin(), _gcells.end(), Katabatic::GCell::CompareGCellById() ); - loadRoutingPads ( this ); - Session::revalidate (); + loadRoutingPads( this ); + Session::revalidate(); - TrackElement* segment; - TrackElementLut lut = Session::getKiteEngine()->_getTrackElementLut(); - TrackElementLut::iterator it = lut.begin (); + TrackElement* segment; + AutoSegmentLut lut = Session::getKiteEngine()->_getAutoSegmentLut(); + AutoSegmentLut::iterator it = lut.begin (); for ( ; it != lut.end() ; it++ ) { - segment = it->second; - segment->getDataNegociate()->update(); + segment = Session::lookup( it->second ); + if (segment) segment->getDataNegociate()->update(); } - _statistics.setGCellsCount ( _gcells.size() ); + _statistics.setGCellsCount( _gcells.size() ); } - void NegociateWindow::addInsertEvent ( TrackElement* segment, unsigned int level ) + void NegociateWindow::addRoutingEvent ( TrackElement* segment, unsigned int level ) { DataNegociate* data = segment->getDataNegociate(); - if ( not data or not data->hasRoutingEvent() ) - _eventQueue.add ( segment, level ); + if (not data or not data->hasRoutingEvent()) + _eventQueue.add( segment, level ); else - cerr << Bug("NegociateWidow::addInsertEvent(): Try to adds twice the same TrackElement event." - "\n %p:%s." - ,(void*)segment->base()->base() - ,getString(segment).c_str() + cerr << Bug( "NegociateWidow::addRoutingEvent(): Try to adds twice the same TrackElement event." + "\n %p:%s." + , (void*)segment->base()->base() + , getString(segment).c_str() ) << endl; } - TrackElement* NegociateWindow::addTrackSegment ( AutoSegment* autoSegment, bool loading ) + TrackElement* NegociateWindow::createTrackSegment ( AutoSegment* autoSegment, unsigned int flags ) { - ltrace(200) << "NegociateWindow::addTrackSegment() - " << autoSegment << endl; + ltrace(200) << "NegociateWindow::createTrackSegment() - " << autoSegment << endl; ltracein(159); // Special case: fixed AutoSegments must not interfere with blockages. // Ugly: uses of getExtensionCap(). - if ( autoSegment->isFixed() ) { + if (autoSegment->isFixed()) { RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer()); - Track* track = plane->getTrackByPosition ( autoSegment->getAxis() ); + Track* track = plane->getTrackByPosition( autoSegment->getAxis() ); size_t begin; size_t end; Interval fixedSpan; Interval blockageSpan; - autoSegment->getCanonical ( fixedSpan ); - fixedSpan.inflate ( Session::getExtensionCap()-1 ); + autoSegment->getCanonical( fixedSpan ); + fixedSpan.inflate( Session::getExtensionCap()-1 ); - track->getOverlapBounds ( fixedSpan, begin, end ); + track->getOverlapBounds( fixedSpan, begin, end ); for ( ; (begin < end) ; begin++ ) { TrackElement* other = track->getSegment(begin); ltrace(200) << "| overlap: " << other << endl; - if ( not other->isBlockage() ) continue; + if (not other->isBlockage()) continue; - other->getCanonical ( blockageSpan ); - blockageSpan.inflate(Session::getExtensionCap()); + other->getCanonical( blockageSpan ); + blockageSpan.inflate( Session::getExtensionCap() ); ltrace(200) << " fixed:" << fixedSpan << " vs. blockage:" << blockageSpan << endl; - if ( not fixedSpan.intersect(blockageSpan) ) continue; + if (not fixedSpan.intersect(blockageSpan)) continue; // Overlap between fixed & blockage. ltrace(200) << "* Blockage overlap: " << autoSegment << endl; - Session::destroyRequest ( autoSegment ); - - cerr << Warning("Overlap between fixed %s and blockage at %s." - ,getString(autoSegment).c_str(),getString(blockageSpan).c_str()) << endl; + Session::destroyRequest( autoSegment ); + cerr << Warning( "Overlap between fixed %s and blockage at %s." + , getString(autoSegment).c_str() + , getString(blockageSpan).c_str() ) << endl; + ltraceout(159); return NULL; } } Interval span; - autoSegment = autoSegment->getCanonical ( span ); + autoSegment = autoSegment->getCanonical( span ); bool created; - TrackElement* trackSegment = TrackSegment::create ( autoSegment, NULL, created ); + TrackElement* trackSegment = TrackSegment::create( autoSegment, NULL, created ); - if ( not loading ) + if (not (flags & KtLoadingStage)) ltrace(159) << "* lookup: " << autoSegment << endl; - if ( created ) { + if (created) { ltrace(159) << "* " << trackSegment << endl; RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(autoSegment->getLayer()); Track* track = plane->getTrackByPosition ( autoSegment->getAxis() ); - Interval uside = autoSegment->getAutoSource()->getGCell()->getUSide ( Constant::perpandicular(autoSegment->getDirection())/*, false */); + Interval uside = autoSegment->getAutoSource()->getGCell()->getSide( perpandicularTo(autoSegment->getDirection()) ); - if ( track->getAxis() > uside.getVMax() ) track = track->getPrevious(); - if ( track->getAxis() < uside.getVMin() ) track = track->getNext(); + if (track->getAxis() > uside.getVMax()) track = track->getPreviousTrack(); + if (track->getAxis() < uside.getVMin()) track = track->getNextTrack(); - trackSegment->setAxis ( track->getAxis(), Katabatic::Realignate|Katabatic::AxisSet ); - trackSegment->invalidate (); + ltrace(159) << "* GCell U-side " << uside << endl; + ltrace(159) << "* " << plane << endl; + ltrace(159) << "* " << track << endl; - if ( trackSegment->isFixed() ) { - Session::addInsertEvent ( trackSegment, track ); + trackSegment->setAxis( track->getAxis(), Katabatic::SegAxisSet ); + trackSegment->invalidate(); + + if (trackSegment->isFixed()) { + Session::addInsertEvent( trackSegment, track ); } else { - _segments.push_back ( trackSegment ); + _segments.push_back( trackSegment ); } } - if ( not created and not loading ) { + if (not created and not (flags & KtLoadingStage)) { ltrace(200) << "TrackSegment already exists (and not in loading stage)." << endl; } @@ -331,19 +320,19 @@ namespace Kite { Segment* segment; TrackElement* trackSegment; - vector* contacts = _gcells[igcell]->getContacts(); - for ( size_t i=0 ; isize() ; i++ ) { - forEach ( Hook*, ihook, (*contacts)[i]->getBodyHook()->getSlaveHooks() ) { + const vector& contacts = _gcells[igcell]->getContacts(); + for ( size_t i=0 ; igetBodyHook()->getSlaveHooks() ) { Hook* sourceHook = dynamic_cast(*ihook); - if ( not sourceHook ) continue; + if (not sourceHook) continue; segment = dynamic_cast(sourceHook->getComponent()); - trackSegment = Session::lookup ( segment ); - if ( trackSegment ) { - if ( accounteds.find(trackSegment) != accounteds.end() ) continue; + trackSegment = Session::lookup( segment ); + if (trackSegment) { + if (accounteds.find(trackSegment) != accounteds.end()) continue; - accounteds.insert ( trackSegment ); - gcellWL += DbU::getLambda ( trackSegment->getLength() ); + accounteds.insert( trackSegment ); + gcellWL += DbU::getLambda( trackSegment->getLength() ); } } } @@ -365,14 +354,14 @@ namespace Kite { AutoSegment* autoSegment; ltrace(149) << "AutoSegments from AutoContacts" << endl; - vector* contacts = gcell->getContacts(); - for ( size_t i=0 ; isize() ; i++ ) { - forEach ( Component*, component, (*contacts)[i]->getSlaveComponents() ) { + const vector& contacts = gcell->getContacts(); + for ( size_t i=0 ; igetSlaveComponents() ) { segment = dynamic_cast(*component); - autoSegment = Session::base()->lookup ( segment ); + autoSegment = Session::base()->lookup( segment ); ltrace(149) << autoSegment << endl; - if ( autoSegment and autoSegment->isCanonical() ) { - addTrackSegment ( autoSegment, true ); + if (autoSegment and autoSegment->isCanonical()) { + createTrackSegment( autoSegment, KtLoadingStage ); } } } @@ -384,21 +373,21 @@ namespace Kite { size_t NegociateWindow::_negociate () { + ltrace(500) << "Deter| NegociateWindow::_negociate()" << endl; ltrace(150) << "NegociateWindow::_negociate() - " << _segments.size() << endl; ltracein(149); cmess1 << " o Negociation Stage." << endl; unsigned long limit = _kite->getEventsLimit(); - //unsigned long limit = 25586; _eventHistory.clear(); - _eventQueue.load ( _segments ); + _eventQueue.load( _segments ); size_t count = 0; - RoutingEvent::setStage ( RoutingEvent::Negociate ); + RoutingEvent::setStage( RoutingEvent::Negociate ); while ( not _eventQueue.empty() and not isInterrupted() ) { - RoutingEvent* event = _eventQueue.pop (); + RoutingEvent* event = _eventQueue.pop(); if (tty::enabled()) { cmess2 << " getEventLevel() << ":" << event->getPriority() << "> " << event->getSegment() - //<< "> @" << DbU::getValueString(event->getSegment()->getAxis()) - //<< " id:" << event->getSegment()->getId() - //<< " " << event->getSegment()->getNet()->getName() << endl; cmess2.flush(); } - event->process ( _eventQueue, _eventHistory, _eventLoop ); + event->process( _eventQueue, _eventHistory, _eventLoop ); count++; - if ( RoutingEvent::getProcesseds() >= limit ) setInterrupt ( true ); + if (RoutingEvent::getProcesseds() >= limit) setInterrupt( true ); } - if (count and tty::enabled()) cmess1 << endl; + if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl; + ltrace(500) << "Deter| Repair Stage" << endl; cmess1 << " o Repair Stage." << endl; ltrace(200) << "Loadind Repair queue." << endl; - RoutingEvent::setStage ( RoutingEvent::Repair ); + RoutingEvent::setStage( RoutingEvent::Repair ); for ( size_t i=0 ; (i<_eventHistory.size()) and not isInterrupted() ; i++ ) { RoutingEvent* event = _eventHistory.getNth(i); - if ( not event->isCloned() and event->isUnimplemented() ) { - event->reschedule ( _eventQueue, 0 ); + if (not event->isCloned() and event->isUnimplemented()) { + event->reschedule( _eventQueue, 0 ); } } - _eventQueue.commit (); + _eventQueue.commit(); count = 0; + //_eventQueue.prepareRepair(); while ( not _eventQueue.empty() and not isInterrupted() ) { - RoutingEvent* event = _eventQueue.pop (); + RoutingEvent* event = _eventQueue.pop(); if (tty::enabled()) { cmess2 << " " << tty::cr; - cmess2.flush (); + cmess2.flush(); } else { cmess2 << " getEventLevel() << ":" << event->getPriority() << "> " << event->getSegment() - //<< "> @" << DbU::getValueString(event->getSegment()->getAxis()) - //<< " id:" << event->getSegment()->getId() - //<< " " << event->getSegment()->getNet()->getName() << endl; cmess2.flush(); } - event->process ( _eventQueue, _eventHistory, _eventLoop ); + event->process( _eventQueue, _eventHistory, _eventLoop ); count++; - if ( RoutingEvent::getProcesseds() >= limit ) setInterrupt ( true ); + if (RoutingEvent::getProcesseds() >= limit ) setInterrupt( true ); } - // { - // ltrace(200) << (void*)event << " [" - // << (event->isCloned ()?"C":"-") - // << (event->isDisabled ()?"d":"-") - // << (event->isUnimplemented()?"u":"-") << "] " - // << event->getSegment() << endl; - // if ( not event->isCloned() and event->isUnimplemented() ) { - // count++; - // event->setProcessed ( false ); - // event->setMode ( RoutingEvent::Repair ); - // event->process ( _eventQueue, _eventHistory, _eventLoop ); - - // if (tty::enabled()) { - // cmess1 << " " << tty::cr; - // cmess1.flush (); - // } else { - // cmess1 << " " << endl; - // } - // } - // } - if (count and tty::enabled()) cmess1 << endl; + if (count and cmess2.enabled() and tty::enabled()) cmess1 << endl; size_t eventsCount = _eventHistory.size(); _eventHistory.clear(); _eventQueue.clear(); - if ( RoutingEvent::getAllocateds() > 0 ) { - cerr << Bug("%d events remains after clear.",RoutingEvent::getAllocateds()) << endl; + if (RoutingEvent::getAllocateds() > 0) { + cerr << Bug( "%d events remains after clear.", RoutingEvent::getAllocateds() ) << endl; } - // if ( _slowMotion && getCellWidget() ) { - // Session::close (); - // getCellWidget()->refresh(); - // Session::open ( _kiteEngine ); - // } - - _statistics.setEventsCount ( eventsCount ); + _statistics.setEventsCount( eventsCount ); ltraceout(149); return eventsCount; @@ -516,28 +472,30 @@ namespace Kite { cmess1 << " o Running Negociate Algorithm" << endl; - TrackElement::setOverlapCostCB ( NegociateOverlapCost ); - RoutingEvent::resetProcesseds (); + TrackElement::setOverlapCostCB( NegociateOverlapCost ); + RoutingEvent::resetProcesseds(); for ( size_t igcell=0 ; igcell<_gcells.size() ; ++igcell ) { - _createRouting ( _gcells[igcell] ); + _createRouting( _gcells[igcell] ); } - Session::revalidate (); + Session::revalidate(); + _kite->preProcess(); + Session::revalidate(); - getKiteEngine()->setMinimumWL ( computeWirelength() ); + getKiteEngine()->setMinimumWL( computeWirelength() ); #if defined(CHECK_DATABASE) unsigned int overlaps = 0; - Session::getKiteEngine()->_check(overlaps,"after _createRouting(GCell*)"); + Session::getKiteEngine()->_check( overlaps, "after _createRouting(GCell*)" ); #endif _slowMotion = slowMotion; - _negociate (); + _negociate(); Session::get()->isEmpty(); # if defined(CHECK_DATABASE) - _kite->_check ( overlaps, "after negociation" ); + _kite->_check( overlaps, "after negociation" ); # endif ltraceout(149); @@ -551,6 +509,7 @@ namespace Kite { cmess1 << Dots::asSizet(" - Unique Events Total" ,(RoutingEvent::getProcesseds() - RoutingEvent::getCloneds())) << endl; cmess1 << Dots::asSizet(" - # of GCells",_statistics.getGCellsCount()) << endl; + _kite->printCompletion(); addMeasure( getCell(), "Events" , RoutingEvent::getProcesseds(), 12 ); addMeasure( getCell(), "UEvents", RoutingEvent::getProcesseds()-RoutingEvent::getCloneds(), 12 ); @@ -558,27 +517,27 @@ namespace Kite { Histogram* densityHistogram = new Histogram ( 1.0, 0.1, 2 ); addMeasure( getCell(), "GCells Density Histogram", densityHistogram ); - densityHistogram->setFileExtension ( ".density.histogram" ); - densityHistogram->setMainTitle ( "GCell Densities" ); - densityHistogram->setTitle ( "Avg. Density", 0 ); - densityHistogram->setTitle ( "Peak Density", 1 ); - densityHistogram->setColor ( "green", 0 ); - densityHistogram->setColor ( "red" , 1 ); + densityHistogram->setFileExtension( ".density.histogram" ); + densityHistogram->setMainTitle ( "GCell Densities" ); + densityHistogram->setTitle ( "Avg. Density", 0 ); + densityHistogram->setTitle ( "Peak Density", 1 ); + densityHistogram->setColor ( "green", 0 ); + densityHistogram->setColor ( "red" , 1 ); const Katabatic::GCellVector* gcells = getKiteEngine()->getGCellGrid()->getGCellVector(); - getKiteEngine()->getGCellGrid()->setDensityMode ( Katabatic::GCellGrid::MaxHVDensity ); + getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxHVDensity ); for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) { - densityHistogram->addSample ( (*gcells)[igcell]->getDensity(), 0 ); + densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 0 ); } - getKiteEngine()->getGCellGrid()->setDensityMode ( Katabatic::GCellGrid::MaxDensity ); + getKiteEngine()->getGCellGrid()->setDensityMode( Katabatic::GCellGrid::MaxDensity ); for ( size_t igcell=0 ; igcell<(*gcells).size() ; ++igcell ) { - densityHistogram->addSample ( (*gcells)[igcell]->getDensity(), 1 ); + densityHistogram->addSample( (*gcells)[igcell]->getDensity(), 1 ); } - densityHistogram->normalize ( 0 ); - densityHistogram->normalize ( 1 ); + densityHistogram->normalize( 0 ); + densityHistogram->normalize( 1 ); } @@ -587,7 +546,7 @@ namespace Kite { ostringstream os; os << "<" << _getTypeName() << ">"; - return ( os.str() ); + return os.str(); } @@ -595,9 +554,9 @@ namespace Kite { { Record* record = new Record ( _getString() ); - record->add ( getSlot ( "_gcells", _gcells ) ); - return ( record ); + record->add( getSlot( "_gcells", _gcells ) ); + return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/PreProcess.cpp b/kite/src/PreProcess.cpp index 12d6bc33..3afe513a 100644 --- a/kite/src/PreProcess.cpp +++ b/kite/src/PreProcess.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,39 +12,35 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./PreProcess.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ - - -#include - -#include "hurricane/Bug.h" -#include "hurricane/Warning.h" -#include "hurricane/Net.h" -#include "hurricane/Name.h" -#include "hurricane/RoutingPad.h" -#include "katabatic/AutoContact.h" -#include "kite/DataNegociate.h" -#include "kite/TrackElement.h" -#include "kite/Track.h" -#include "kite/RoutingPlane.h" -#include "kite/NegociateWindow.h" -#include "kite/Session.h" -#include "kite/KiteEngine.h" - +#include +#include "hurricane/DebugSession.h" +#include "hurricane/Bug.h" +#include "hurricane/Warning.h" +#include "hurricane/Net.h" +#include "hurricane/Name.h" +#include "hurricane/RoutingPad.h" +#include "hurricane/Horizontal.h" +#include "katabatic/AutoContactTerminal.h" +#include "kite/DataNegociate.h" +#include "kite/TrackElement.h" +#include "kite/Track.h" +#include "kite/RoutingPlane.h" +#include "kite/NegociateWindow.h" +#include "kite/Session.h" +#include "kite/KiteEngine.h" namespace { - using namespace std; using namespace Hurricane; using namespace CRL; using namespace Kite; + using Katabatic::perpandicularTo; + using Katabatic::AutoContactTerminal; void getPerpandiculars ( TrackElement* segment @@ -58,9 +49,6 @@ namespace { , vector& perpandiculars ) { - //AutoContact* to = segment->base()->getAutoSource(); - //to = (to != from) ? to : segment->base()->getAutoTarget(); - TrackElement* perpandicular; forEach ( Segment*, isegment, segment->base()->getAutoSource()->getSlaveComponents().getSubSet() ) { perpandicular = Session::lookup ( *isegment ); @@ -108,21 +96,22 @@ namespace { void propagateCagedConstraints ( TrackElement* segment, set& faileds ) { - if ( not segment->isFixed() ) return; + if (not segment->isFixed()) return; ltrace(200) << "Propagate caging: " << segment << endl; Track* track = segment->getTrack(); - unsigned int direction = Session::getRoutingGauge()->getLayerDirection(segment->getLayer()); + //unsigned int direction = Session::getRoutingGauge()->getLayerDirection(segment->getLayer()); + unsigned int direction = segment->getDirection(); Katabatic::AutoContact* source = segment->base()->getAutoSource(); RoutingPad* rp = NULL; - Interval uside = source->getGCell()->getUSide(direction); + Interval uside = source->getGCell()->getSide(direction); DbU::Unit minConstraint = DbU::Min; DbU::Unit maxConstraint = DbU::Max; vector perpandiculars; if ( not track ) { - cerr << Bug("%s is not inserted in a ",getString(segment).c_str()) << endl; + cerr << Bug( "%s is not inserted in a ", getString(segment).c_str() ) << endl; return; } @@ -130,30 +119,30 @@ namespace { TrackElement* parallel; size_t i = segment->getIndex(); while ( i > 0 ) { - parallel = track->getSegment(--i); - if ( not parallel ) continue; - if ( parallel->getTargetU() < uside.getVMin() ) break; - if ( parallel->getNet() == segment->getNet() ) continue; - if ( not parallel->isFixed() ) continue; + parallel = track->getSegment( --i ); + if (not parallel) continue; + if (parallel->getTargetU() < uside.getVMin()) break; + if (parallel->getNet() == segment->getNet()) continue; + if (not parallel->isFixed()) continue; ltrace(200) << "Min Constraint from: " << parallel << endl; - minConstraint = max ( minConstraint, parallel->getTargetU() ); + minConstraint = max( minConstraint, parallel->getTargetU() ); } i = segment->getIndex(); while ( i < track->getSize()-1 ) { - parallel = track->getSegment(++i); - if ( not parallel ) continue; - if ( parallel->getSourceU() > uside.getVMax() ) break; - if ( parallel->getNet() == segment->getNet() ) continue; - if ( not parallel->isFixed() ) continue; + parallel = track->getSegment( ++i ); + if (not parallel) continue; + if (parallel->getSourceU() > uside.getVMax()) break; + if (parallel->getNet() == segment->getNet()) continue; + if (not parallel->isFixed()) continue; ltrace(200) << "Max Constraint from: " << parallel << endl; - maxConstraint = min ( maxConstraint, parallel->getSourceU() ); + maxConstraint = min( maxConstraint, parallel->getSourceU() ); } - if ( minConstraint > maxConstraint ) { - cerr << Bug("%s have too tight caging constraints.",getString(segment).c_str()) << endl; + if (minConstraint > maxConstraint) { + cerr << Bug( "%s have too tight caging constraints.", getString(segment).c_str() ) << endl; return; } if ( (minConstraint <= uside.getVMin()) and (maxConstraint >= uside.getVMax()) ) { @@ -164,29 +153,29 @@ namespace { } // Finding perpandiculars, by way of the source & target RoutingPad. - if ( source->getAnchor() ) { + if (source->getAnchor()) { rp = dynamic_cast(source->getAnchor()); - if ( rp ) { + if (rp) { TrackElement* parallel; forEach ( Segment*, isegment, rp->getSlaveComponents().getSubSet() ) { - parallel = Session::lookup ( *isegment ); + parallel = Session::lookup( *isegment ); ltrace(200) << "* " << parallel << endl; - if ( parallel->isFixed () ) continue; - if ( parallel->isGlobal() ) continue; - getPerpandiculars ( parallel, source, direction, perpandiculars ); - getPerpandiculars ( parallel, segment->base()->getAutoTarget(), direction, perpandiculars ); + if (parallel->isFixed ()) continue; + if (parallel->isGlobal()) continue; + getPerpandiculars( parallel, source, direction, perpandiculars ); + getPerpandiculars( parallel, segment->base()->getAutoTarget(), direction, perpandiculars ); } } else { - cerr << Bug("%s is not anchored on a \n (%s)" - ,getString(source).c_str() - ,getString(source->getAnchor()).c_str()) << endl; + cerr << Bug( "%s is not anchored on a \n (%s)" + , getString(source).c_str() + , getString(source->getAnchor()).c_str() ) << endl; } } // Apply caging constraints to perpandiculars. ltracein(200); - if ( perpandiculars.size() == 0 ) { + if (perpandiculars.size() == 0) { ltrace(200) << "No perpandiculars to " << segment << endl; ltraceout(200); return; @@ -195,10 +184,10 @@ namespace { Interval constraints ( minConstraint, maxConstraint ); for ( size_t iperpand=0 ; iperpandbase()->mergeUserConstraints ( constraints ); - if ( perpandiculars[iperpand]->base()->getUserConstraints().isEmpty() ) { + perpandiculars[iperpand]->base()->mergeUserConstraints( constraints ); + if (perpandiculars[iperpand]->base()->getUserConstraints().isEmpty()) { ltrace(200) << "Cumulative caged constraints are too tight on " << perpandiculars[iperpand] << endl; - findFailedPerpandiculars ( rp, direction, faileds ); + findFailedPerpandiculars( rp, direction, faileds ); } } @@ -206,81 +195,108 @@ namespace { } + void moveUpCaged ( TrackElement* segment ) + { + DebugSession::open( segment->getNet(), 150 ); + ltrace(150) << "::moveUpCaged() " << segment << endl; + ltracein(150); + + //Configuration* configuration = Session::getConfiguration(); + //const Layer* metal2 = configuration->getRoutingLayer( 1 ); + //const Layer* metal3 = configuration->getRoutingLayer( 2 ); + + Katabatic::AutoContact* support = segment->base()->getAutoSource(); + RoutingPad* rp = dynamic_cast(support->getAnchor()); + + forEach( Component*, icomponent, rp->getSlaveComponents() ) { + Horizontal* baseSegment = dynamic_cast( *icomponent ); + TrackElement* accessSegment = Session::lookup( baseSegment ); + + if (accessSegment and not accessSegment->isFixed()) { + accessSegment->moveUp( Katabatic::KbNoFlags ); + } + } + + ltraceout(150); + DebugSession::close(); + } + + void protectCagedTerminals ( Track* track ) { - Configuration* configuration = Session::getConfiguration (); - const Layer* metal2 = configuration->getRoutingLayer ( 1 ); - const Layer* metal3 = configuration->getRoutingLayer ( 2 ); + ltrace(150) << "protectCagedTerminals() " << track << endl; + ltracein(150); - for ( size_t i=0 ; igetSize() ; i++ ) { - TrackElement* segment = track->getSegment ( i ); + DbU::Unit lastMovedUp = track->getMin(); + unsigned int moveUpCount = 0; + + Configuration* configuration = Session::getConfiguration(); + const Layer* metal2 = configuration->getRoutingLayer( 1 ); + const Layer* metal3 = configuration->getRoutingLayer( 2 ); + Net* neighborNet = NULL; + + if (track->getLayer() != metal2) { + ltraceout(150); + return; + } + + for ( size_t i=0 ; igetSize() ; ++i ) { + TrackElement* segment = track->getSegment(i); if ( segment and segment->isFixed() and segment->isTerminal() ) { - Interval freeInterval = track->getFreeInterval ( segment->getSourceU(), segment->getNet() ); + Interval freeInterval = track->getFreeInterval( segment->getSourceU(), segment->getNet() ); - if ( freeInterval.getSize() < DbU::lambda(30.0) ) { + //if (freeInterval.getSize() < DbU::lambda(5.0)*6) { + if ( (segment->getSourceU() - freeInterval.getVMin() < DbU::lambda(5.0)*3) + or (freeInterval.getVMax() - segment->getTargetU() < DbU::lambda(5.0)*3) ) { cinfo << "Caged terminal: " << segment << endl; - if ( segment->getLayer() != metal2 ) continue; - if ( segment->getLength() >= DbU::lambda(5.0) ) continue; + if ( (segment->getLayer() != metal2) + or (segment->getLength() >= DbU::lambda(5.0)) + or (segment->getNet() == neighborNet) ) { + neighborNet = segment->getNet(); + continue; + } + + if (segment->getSourceU() - lastMovedUp < DbU::lambda(5.0)*4) { + ++moveUpCount; + if (moveUpCount % 2 == 0) { + moveUpCaged( segment ); + } + } else { + moveUpCount = 0; + } + lastMovedUp = segment->getSourceU(); Katabatic::AutoContact* support = segment->base()->getAutoSource(); RoutingPad* rp = dynamic_cast(support->getAnchor()); - + Katabatic::AutoContact* source - = Katabatic::AutoContact::fromRp ( support->getGCell() - , rp - , metal3 - , rp->getSourcePosition() - , DbU::lambda(1.0), DbU::lambda(1.0) - , true - ); - + = Katabatic::AutoContactTerminal::create( support->getGCell() + , rp + , metal3 + , rp->getSourcePosition() + , DbU::lambda(1.0), DbU::lambda(1.0) + ); + source->setFlags( Katabatic::CntIgnoreAnchor ); + Katabatic::AutoContact* target = - Katabatic::AutoContact::fromRp ( support->getGCell() - , rp - , metal3 - , rp->getSourcePosition() - , DbU::lambda(1.0), DbU::lambda(1.0) - , true - ); - - AutoSegment* segment = AutoSegment::create ( source - , target - , Constant::Vertical - , AutoSegment::Local - , true - , false - ); - segment->setFixed ( true ); - Session::getNegociateWindow()->addTrackSegment ( segment, true ); - -#if DISABLED - // Force slackening. - bool breakFlag = false; - forEach ( Contact*, icontact, rp->getSlaveComponents().getSubSet() ) { - forEach ( Segment*, isegment, icontact->getSlaveComponents().getSubSet() ) { - TrackElement* trackSegment = Session::lookup(*isegment); - if ( not trackSegment or trackSegment->isFixed() ) continue; - - if ( trackSegment->isHorizontal() ) { - ltrace(200) << "M2 to slacken for " << rp << endl; - breakFlag = true; - - const vector& dogLegs = Session::getDogLegs(); - - trackSegment->base()->makeDogLeg ( gcell->base(), true ); - GCell::addTrackSegment ( gcell, dogLegs[1], true ); - GCell::addTrackSegment ( gcell, dogLegs[2], true ); - Session::revalidate (); - } - - if ( breakFlag ) break; - } - if ( breakFlag ) break; - } -#endif + Katabatic::AutoContactTerminal::create( support->getGCell() + , rp + , metal3 + , rp->getSourcePosition() + , DbU::lambda(1.0), DbU::lambda(1.0) + ); + target->setFlags( Katabatic::CntIgnoreAnchor ); + + AutoSegment* fixedSegment = AutoSegment::create( source, target, Katabatic::KbVertical ); + fixedSegment->setFlags( Katabatic::SegFixed ); + Session::getNegociateWindow()->createTrackSegment( fixedSegment, KtLoadingStage ); } + + neighborNet = segment->getNet(); } } + + ltraceout(150); } @@ -293,17 +309,18 @@ namespace Kite { using Hurricane::Bug; using Hurricane::Net; using Hurricane::Name; + using Katabatic::AutoSegmentLut; void KiteEngine::preProcess () { - for ( size_t i=0 ; i<_routingPlanes.size() ; i++ ) { + for ( size_t i=0 ; i<_routingPlanes.size() ; ++i ) { RoutingPlane* plane = _routingPlanes[i]; - Track* track = plane->getTrackByIndex ( 0 ); + Track* track = plane->getTrackByIndex( 0 ); while ( track ) { - protectCagedTerminals ( track ); - track = track->getNext (); + protectCagedTerminals( track ); + track = track->getNextTrack(); } } Session::revalidate (); @@ -314,32 +331,17 @@ namespace Kite { { set faileds; - TrackElementLut::iterator isegment = _trackSegmentLut.begin(); - for ( ; isegment != _trackSegmentLut.end() ; isegment++ ) { - if ( not isegment->second->isFixed() ) continue; - propagateCagedConstraints ( isegment->second, faileds ); + TrackElement* segment = NULL; + AutoSegmentLut::const_iterator isegment = _getAutoSegmentLut().begin(); + for ( ; isegment != _getAutoSegmentLut().end() ; isegment++ ) { + segment = _lookup( isegment->second ); + if (not segment or not segment->isFixed()) continue; + + DebugSession::open( segment->getNet() ); + propagateCagedConstraints( segment, faileds ); + DebugSession::close(); } } - void KiteEngine::_computeCagedConstraints ( Net* net, set& faileds ) - { - TrackElement* segment = NULL; - - forEach ( Segment*, isegment, net->getComponents().getSubSet() ) { - segment = Session::lookup ( *isegment ); - if ( not segment ) continue; - - segment->base()->resetUserConstraints(); - } - - forEach ( Segment*, isegment, net->getComponents().getSubSet() ) { - segment = Session::lookup ( *isegment ); - if ( not segment ) continue; - - propagateCagedConstraints ( segment, faileds ); - } - } - - -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/ProtectRoutingPads.cpp b/kite/src/ProtectRoutingPads.cpp index b1e8eee5..90926c42 100644 --- a/kite/src/ProtectRoutingPads.cpp +++ b/kite/src/ProtectRoutingPads.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,36 +12,32 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./ProtectRoutingPads.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include -#include - -#include "hurricane/DataBase.h" -#include "hurricane/Technology.h" -#include "hurricane/BasicLayer.h" -#include "hurricane/RegularLayer.h" -#include "hurricane/Horizontal.h" -#include "hurricane/Vertical.h" -#include "hurricane/RoutingPad.h" -#include "hurricane/Occurrence.h" -#include "hurricane/Cell.h" -#include "hurricane/NetExternalComponents.h" -#include "crlcore/Catalog.h" -#include "katabatic/AutoContact.h" -#include "katabatic/AutoSegment.h" -#include "katabatic/GCell.h" -#include "katabatic/GCellGrid.h" -#include "katabatic/KatabaticEngine.h" -#include "kite/RoutingPlane.h" -#include "kite/TrackSegment.h" -#include "kite/TrackFixedSegment.h" -#include "kite/Track.h" -#include "kite/KiteEngine.h" +#include +#include +#include "hurricane/DataBase.h" +#include "hurricane/Technology.h" +#include "hurricane/BasicLayer.h" +#include "hurricane/RegularLayer.h" +#include "hurricane/Horizontal.h" +#include "hurricane/Vertical.h" +#include "hurricane/RoutingPad.h" +#include "hurricane/Occurrence.h" +#include "hurricane/Cell.h" +#include "hurricane/NetExternalComponents.h" +#include "crlcore/Catalog.h" +#include "katabatic/AutoContact.h" +#include "katabatic/AutoSegment.h" +#include "katabatic/GCell.h" +#include "katabatic/GCellGrid.h" +#include "katabatic/KatabaticEngine.h" +#include "kite/RoutingPlane.h" +#include "kite/TrackSegment.h" +#include "kite/TrackFixedSegment.h" +#include "kite/Track.h" +#include "kite/KiteEngine.h" namespace { @@ -114,12 +105,12 @@ namespace { transformation.applyOn ( bb ); //cinfo << "bb: " << bb << endl; - if ( direction == Constant::Horizontal ) { + if ( direction == KbHorizontal ) { DbU::Unit axisMin = bb.getYMin() - delta; DbU::Unit axisMax = bb.getYMax() + delta; Track* track = plane->getTrackByPosition ( axisMin, Constant::Superior ); - for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNext() ) { + for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) { Horizontal* segment = Horizontal::create ( rp->getNet() , segments[i]->getLayer() , track->getAxis() @@ -134,7 +125,7 @@ namespace { DbU::Unit axisMax = bb.getXMax() + delta; Track* track = plane->getTrackByPosition ( axisMin, Constant::Superior ); - for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNext() ) { + for ( ; track and (track->getAxis() <= axisMax) ; track = track->getNextTrack() ) { Vertical* segment = Vertical::create ( rp->getNet() , segments[i]->getLayer() , track->getAxis() @@ -167,9 +158,6 @@ namespace Kite { cmess1 << " o Protect external components not useds as RoutingPads." << endl; forEach ( Net*, inet, getCell()->getNets() ) { - // cerr << *inet << " isSupply():" << (*inet)->isSupply() - // << " " << (*inet)->getType() - // << endl; if ( (*inet)->isSupply() ) continue; vector rps; @@ -185,4 +173,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/PyGraphicKiteEngine.cpp b/kite/src/PyGraphicKiteEngine.cpp index 41bf4bee..15f29db6 100644 --- a/kite/src/PyGraphicKiteEngine.cpp +++ b/kite/src/PyGraphicKiteEngine.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | diff --git a/kite/src/PyKite.cpp b/kite/src/PyKite.cpp index 5c3dc9ab..f884b2a3 100644 --- a/kite/src/PyKite.cpp +++ b/kite/src/PyKite.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2012-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -68,30 +68,30 @@ extern "C" { DL_EXPORT(void) initKite () { trace << "initKite()" << endl; - PyKiteEngine_LinkPyType (); - PyGraphicKiteEngine_LinkPyType (); + PyKiteEngine_LinkPyType(); + PyGraphicKiteEngine_LinkPyType(); - PYTYPE_READY_SUB ( KiteEngine , ToolEngine ); - PYTYPE_READY_SUB ( GraphicKiteEngine, GraphicTool ); + PYTYPE_READY_SUB( KiteEngine , ToolEngine ); + PYTYPE_READY_SUB( GraphicKiteEngine, GraphicTool ); - PyObject* module = Py_InitModule ( "Kite", PyKite_Methods ); - if ( module == NULL ) { + PyObject* module = Py_InitModule( "Kite", PyKite_Methods ); + if (module == NULL) { cerr << "[ERROR]\n" << " Failed to initialize Kite module." << endl; return; } - Py_INCREF ( &PyTypeKiteEngine ); - PyModule_AddObject ( module, "KiteEngine", (PyObject*)&PyTypeKiteEngine ); - Py_INCREF ( &PyTypeGraphicKiteEngine ); - PyModule_AddObject ( module, "GraphicKiteEngine", (PyObject*)&PyTypeGraphicKiteEngine ); + Py_INCREF( &PyTypeKiteEngine ); + PyModule_AddObject( module, "KiteEngine", (PyObject*)&PyTypeKiteEngine ); + Py_INCREF( &PyTypeGraphicKiteEngine ); + PyModule_AddObject( module, "GraphicKiteEngine", (PyObject*)&PyTypeGraphicKiteEngine ); - PyObject* dictionnary = PyModule_GetDict(module); + PyObject* dictionnary = PyModule_GetDict( module ); PyObject* constant; - LoadObjectConstant(dictionnary,BuildGlobalSolution,"BuildGlobalSolution"); - LoadObjectConstant(dictionnary,LoadGlobalSolution ,"LoadGlobalSolution" ); + LoadObjectConstant( dictionnary, KtBuildGlobalRouting, "KtBuildGlobalRouting" ); + LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" ); } diff --git a/kite/src/PyKiteEngine.cpp b/kite/src/PyKiteEngine.cpp index 0c28bf1d..ef247664 100644 --- a/kite/src/PyKiteEngine.cpp +++ b/kite/src/PyKiteEngine.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2010-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2010-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index 09e56fc0..b9c9d89b 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,3497 +15,52 @@ // +-----------------------------------------------------------------+ -#include -#include -#include -#include "vlsisapd/configuration/Configuration.h" -#include "hurricane/Bug.h" -#include "hurricane/DebugSession.h" -#include "hurricane/Breakpoint.h" -#include "hurricane/Net.h" -#include "hurricane/Layer.h" -#include "katabatic/AutoContact.h" -#include "kite/DataNegociate.h" -#include "kite/TrackElement.h" -#include "kite/Track.h" -#include "kite/Tracks.h" -#include "kite/RoutingPlane.h" -#include "kite/RoutingEvent.h" -#include "kite/RoutingEventHistory.h" -#include "kite/RoutingEventQueue.h" -#include "kite/RoutingEventLoop.h" -#include "kite/NegociateWindow.h" -#include "kite/Session.h" -#include "kite/KiteEngine.h" - - -namespace { - - /*! \defgroup ClassManipulator Manipulator Class - */ - - //! \addtogroup ClassManipulator - //! \{ - - /*! \class Manipulator - * \brief Handle \TrackElement ripup & topological modifications. - * - * Handles all \TrackElement modifications. - */ - - /*! \function Manipulator::Manipulator ( TrackElement* segment, State& state ); - * \param segment The \TrackElement to manipulate. - * \param state The \RoutingEvent state. - */ - - /*! \function TrackElement* Manipulator::getSegment () const; - * \Return The working \TrackElement. - */ - - /*! \function DataNegociate* Manipulator::getData () const; - * \Return The DataNegociate of the \TrackElement. - */ - - /*! \function RoutingEvent* Manipulator::getEvent () const; - * \Return The \RoutingEvent associated to the \TrackElement. May be - * \NULL if it belongs to a more prioritary GCell RoutingSet. - */ - - /*! \function bool Manipulator::canRipup () const; - * \return \true if the maximum ripup & reset count has not been reached. - */ - - /*! \function bool Manipulator::ripup ( Interval overlap, unsigned int type, DbU::Unit axisHint ); - * \param overlap The Interval that should be cleared. - * \param type The type of ripup action. - * \param axisHint An indication as where to move the riped up segment. - * \return \True if the operation has succedeed. - * - * If the \TrackElement cannot be riped up (it cames from a more - * prioritary GCell RoutingSet), then it tries to relax it. - */ - - /*! \function bool Manipulator::ripup ( DbU::Unit point, unsigned int type, DbU::Unit axisHint ); - * \param point The point around which the \Track should be cleared. - * \param type The type of ripup action. - * \param axisHint An indication as where to move the riped up segment. - * \return \True if the operation has succedeed. - * - * \see The other ripup method. - */ - - /*! \function bool Manipulator::relax ( Interval overlap ); - * \param overlap The overlaping interval to free. - * \return \true if the operation has succeeded. - * - * Finds the appropriate dogleg GCells to break the \TrackElement. - * There could be one or two breaks whether the overlap is fully - * enclosed or not. - */ - - /*! \function bool Manipulator::modifyTopology (); - * \return \true if the operation has succeeded. - * - * Try to changes the \TrackElement topology. - */ - - /*! \function bool Manipulator::insertInTrack ( size_t i ); - * \param i The index of \Track into which insert. - * \return \true if the operation has succeeded. - * - * Try to insert the \TrackElement into the \Track i. - * The index is relative to the State's \Track vector. - */ - - /*! \function bool Manipulator::desalignate (); - * \return \true if the operation has succeeded. - * - * Try to desalignate the \TrackElement. - */ - - /*! \function bool Manipulator::slacken (); - * \return \true if the operation has succeeded. - * - * Try to slacken the \TrackElement. - */ - - /*! \function bool Manipulator::moveUp (); - * \return \true if the operation has succeeded. - * - * Try to move up the \TrackElement. - */ - - /*! \function bool Manipulator::makeDogLeg (); - * \return \true if the operation has succeeded. - * - * Try to make a dog leg on the \TrackElement. - * This method is restricted to local \TrackElement only. - */ - - /*! \function bool Manipulator::minimize (); - * \return \true if the operation has succeeded. - * - * Try to mimize the wirelength of the \TrackElement. - * This operation can only be done once. - */ - - /*! \function bool Manipulator::relax ( size_t i ); - * \param i The index of the selected \Track. - * \return \true if the operation has succeeded. - * - * Try to make a dog leg on the \TrackElement. - * This method is restricted to local \TrackElement only. - */ - - //! \} - - - using namespace std; - using namespace Hurricane; - using namespace Kite; - using Katabatic::GCell; - - -// ------------------------------------------------------------------- -// Class : "LvGCandidate". - - - class LvGCandidate { - public: - struct Compare : public binary_function { - inline bool operator() ( const LvGCandidate& lhs, const LvGCandidate& rhs ) const; - }; - public: - inline LvGCandidate ( TrackElement* segment=NULL, Interval overlap=Interval(), size_t terminals=0 ); - inline TrackElement* getSegment () const; - inline const Interval& getOverlap () const; - inline size_t getTerminals () const; - private: - TrackElement* _segment; - Interval _overlap; - size_t _terminals; - }; - - inline LvGCandidate::LvGCandidate ( TrackElement* segment, Interval overlap, size_t terminals ) - : _segment (segment) - , _overlap (overlap) - , _terminals(terminals) - { } - - inline TrackElement* LvGCandidate::getSegment () const { return _segment; } - inline const Interval& LvGCandidate::getOverlap () const { return _overlap; } - inline size_t LvGCandidate::getTerminals () const { return _terminals; } - - inline bool LvGCandidate::Compare::operator() ( const LvGCandidate& lhs, const LvGCandidate& rhs ) const - { - if ( lhs.getTerminals() != rhs.getTerminals() ) - return lhs.getTerminals() < rhs.getTerminals(); - - if ( lhs.getOverlap() != rhs.getOverlap() ) - return lhs.getOverlap().getSize() > rhs.getOverlap().getSize(); - - return lhs.getSegment()->getAxis() < rhs.getSegment()->getAxis(); - } - - -// ------------------------------------------------------------------- -// Class : "Cs1Candidate". - - - class Cs1Candidate { - public: - inline Cs1Candidate ( Track* track=NULL ); - inline Track* getTrack () const; - inline size_t getBegin () const; - inline size_t getEnd () const; - inline size_t getLength () const; - inline Interval getConflict ( size_t ); - inline Interval getLongestConflict () const; - inline DbU::Unit getBreakPos () const; - inline DbU::Unit getConflictLength () const; - inline void setBegin ( size_t ); - inline void setEnd ( size_t ); - inline void addConflict ( const Interval& ); - void consolidate (); - public: - friend inline bool operator< ( const Cs1Candidate&, const Cs1Candidate& ); - private: - Track* _track; - size_t _begin; - size_t _end; - vector _conflicts; - Interval _longestConflict; - DbU::Unit _breakPos; - DbU::Unit _conflictLength; - }; - - - inline Cs1Candidate::Cs1Candidate ( Track* track ) - : _track (track) - , _begin (0) - , _end (0) - , _conflicts () - , _longestConflict() - , _breakPos (0) - , _conflictLength (0) - { } - - inline Track* Cs1Candidate::getTrack () const { return _track; } - inline size_t Cs1Candidate::getBegin () const { return _begin; } - inline size_t Cs1Candidate::getEnd () const { return _end; } - inline size_t Cs1Candidate::getLength () const { return _conflicts.size(); } - inline Interval Cs1Candidate::getLongestConflict () const { return _longestConflict; } - inline DbU::Unit Cs1Candidate::getBreakPos () const { return _breakPos; } - inline void Cs1Candidate::setBegin ( size_t i ) { _begin=i; } - inline void Cs1Candidate::setEnd ( size_t i ) { _end=i; } - - inline void Cs1Candidate::addConflict ( const Interval& conflict ) - { - _conflicts.push_back(conflict); - _conflictLength += conflict.getSize(); - - if ( conflict.getSize() > _longestConflict.getSize() ) - _longestConflict = conflict; - } - - inline Interval Cs1Candidate::getConflict ( size_t i ) - { - if (i >= _conflicts.size()) return Interval(); - return _conflicts[i]; - } - - inline bool operator< ( const Cs1Candidate& lhs, const Cs1Candidate& rhs ) - { - //DbU::Unit delta = lhs._conflicts.size() - rhs._conflicts.size(); - DbU::Unit delta = lhs._longestConflict.getSize() - rhs._longestConflict.getSize(); - if ( delta < 0 ) return true; - if ( delta > 0 ) return false; - - return lhs._conflictLength < rhs._conflictLength; - } -//{ return lhs._conflictLength < rhs._conflictLength; } - - void Cs1Candidate::consolidate () - { - if ( _conflicts.size() > 0 ) { - DbU::Unit halfConflict = 0; - size_t i = 0; - for ( ; i<_conflicts.size()-1 ; ++i ) { - halfConflict += _conflicts.size(); - if ( halfConflict > _conflictLength/2 ) - break; - } - - // Ugly: hard-coded pitch. - _breakPos = _conflicts[i].getVMin() - DbU::lambda(5.0); - } - } - - -// ------------------------------------------------------------------- -// Class : "FindPath". - - - class PathElement { - public: - class UniqCompare { - public: - inline bool operator () ( const PathElement*, const PathElement* ); - }; - public: - class QueueCompare { - public: - inline bool operator() ( const PathElement*, const PathElement* ); - }; - public: - PathElement ( PathElement*, Track*, const Interval& span ); - inline PathElement* getBack () const; - inline Track* getTrack () const; - inline const Interval& getSpan () const; - private: - PathElement* _back; - Track* _track; - Interval _span; - }; - - - typedef priority_queue< PathElement*, vector, PathElement::QueueCompare > PathElementQueue; - typedef set< PathElement*, PathElement::UniqCompare > UniqPathElement; - - - PathElement::PathElement ( PathElement* back, Track* track, const Interval& span ) - : _back (back) - , _track(track) - , _span (span) - { } - - - inline PathElement* PathElement::getBack () const { return _back; } - inline Track* PathElement::getTrack () const { return _track; } - inline const Interval& PathElement::getSpan () const { return _span; } - - - bool PathElement::QueueCompare::operator() ( const PathElement* lhs, const PathElement* rhs ) - { - DbU::Unit delta = lhs->getSpan().getSize() - rhs->getSpan().getSize(); - if ( delta < 0 ) return true; - if ( delta > 0 ) return false; - - delta = lhs->getSpan().getVMax() - rhs->getSpan().getVMax(); - if ( delta < 0 ) return true; - - delta = lhs->getTrack()->getAxis() - rhs->getTrack()->getAxis(); - if ( delta > 0 ) return true; - - return false; - } - - - inline bool PathElement::UniqCompare::operator () ( const PathElement* lhs, const PathElement* rhs ) - { - DbU::Unit delta = lhs->getTrack()->getAxis() - rhs->getTrack()->getAxis(); - if ( delta < 0 ) return true; - if ( delta > 0 ) return false; - - delta = lhs->getSpan().getVMin() - rhs->getSpan().getVMin(); - if ( delta < 0 ) return true; - - return false; - } - - - class FindPath { - public: - FindPath ( const vector& - , Net* - , DbU::Unit from - , DbU::Unit to - ); - inline Net* getNet () const; - inline DbU::Unit getFrom () const; - inline DbU::Unit getTo () const; - inline const vector& getTracks () const; - const vector& computeDoglegPos ( DbU::Unit allowedGap ); - private: - Net* _net; - vector _tracks; - DbU::Unit _from; - DbU::Unit _to; - vector _doglegPos; - }; - - - FindPath::FindPath ( const vector& tracks, Net* net, DbU::Unit from, DbU::Unit to ) - : _net (net) - , _tracks (tracks) - , _from (from) - , _to (to) - , _doglegPos() - { } - - - inline Net* FindPath::getNet () const { return _net; } - inline DbU::Unit FindPath::getFrom () const { return _from; } - inline DbU::Unit FindPath::getTo () const { return _to; } - inline const vector& FindPath::getTracks () const { return _tracks; } - - const vector& FindPath::computeDoglegPos ( DbU::Unit allowedGap ) - { - PathElementQueue peQueue; - UniqPathElement peUniq; - - ltrace(200) << "FindPath::computeDoglegPos()" << endl; - ltracein(200); - - allowedGap /= 2; - - // Initial loading of the queue. - for ( size_t itrack=0; itrack < _tracks.size() ; ++itrack ) { - Interval span ( _tracks[itrack]->getFreeInterval(_from,_net)); - span.inflate ( allowedGap ); - - if ( not span.contains(_from) ) continue; - if ( span.contains(_to) ) continue; - - PathElement* pe = new PathElement(NULL,_tracks[itrack],span); - if ( peUniq.find(pe) != peUniq.end() ) { delete pe; continue; } - - ltrace(200) << "| Start Push: " << pe->getSpan() << " " << pe->getTrack() << endl; - - peUniq.insert ( pe ); - peQueue.push ( pe ); - } - - // Queue exploration. - while ( not peQueue.empty() ) { - PathElement* pe = peQueue.top (); - peQueue.pop (); - - ltrace(200) << "| Pop: " << pe->getSpan() << " " << pe->getTrack() << endl; - - // Ugly: hard-coded pitch. - DbU::Unit fromPos = pe->getSpan().getVMax() - DbU::lambda(5.0); - - for ( size_t itrack=0; itrack < _tracks.size() ; ++itrack ) { - ltrace(200) << "| Looking: " << _tracks[itrack] << endl; - - Interval toSpan ( _tracks[itrack]->getFreeInterval(fromPos,_net) ); - toSpan.inflate ( allowedGap ); - if ( not toSpan.contains(fromPos) or (pe->getSpan().getVMax() >= toSpan.getVMax()) ) - continue; - - // <_to> position reached, backtrack. - if ( toSpan.contains(_to) ) { - ltrace(200) << "| NoPush: " << toSpan << " " << _tracks[itrack] << endl; - - vector doglegPos; - - PathElement* fromPe = pe; - while ( fromPe ) { - doglegPos.insert ( doglegPos.begin(), fromPe->getSpan().getVMax()-DbU::lambda(5.0) ); - fromPe = fromPe->getBack(); - } - ltrace(200) << "| Path found (" << doglegPos.size() << " doglegs)" << endl; - for ( size_t ipos=0 ; iposgetSpan() << " " << toPe->getTrack() << endl; - } - } - - UniqPathElement::iterator ipe = peUniq.begin(); - for ( ; ipe != peUniq.end() ; ++ipe ) delete (*ipe); - - ltraceout(200); - return _doglegPos; - } - - -// ------------------------------------------------------------------- -// Class : "UnionItervals". - - - class UnionIntervals { - public: - inline UnionIntervals (); - void addInterval ( Interval& ); - inline size_t size () const; - inline bool empty () const; - inline list::const_iterator begin () const; - inline list::const_iterator end () const; - inline DbU::Unit getVMin () const; - inline DbU::Unit getVMax () const; - string _getString (); - private: - list _intervals; - }; - - - inline UnionIntervals::UnionIntervals () : _intervals() { } - inline list::const_iterator UnionIntervals::begin () const { return _intervals.begin(); } - inline list::const_iterator UnionIntervals::end () const { return _intervals.end(); } - inline size_t UnionIntervals::size () const { return _intervals.size(); } - inline bool UnionIntervals::empty () const { return _intervals.empty(); } - inline DbU::Unit UnionIntervals::getVMin () const { return (empty()) ? DbU::Max : (*begin()).getVMin(); } - inline DbU::Unit UnionIntervals::getVMax () const { return (empty()) ? DbU::Min : (*begin()).getVMax(); } - - - void UnionIntervals::addInterval ( Interval& interval ) - { - ltrace(200) << "UnionInterval::addInterval() - " << interval << endl; - - list::iterator iintv = _intervals.begin (); - - bool merged = false; - while ( iintv != _intervals.end() ) { - if ( !merged ) { - if ( interval.getVMax() < (*iintv).getVMin() ) { _intervals.insert ( iintv, interval ); return; } - if ( interval.getVMin() > (*iintv).getVMax() ) { iintv++; continue; } - - merged = true; - interval = (*iintv).merge ( interval ); - iintv++; - } else { - if ( (*iintv).intersect ( interval ) ) { - interval = (*iintv).merge ( interval ); - iintv = _intervals.erase ( iintv ); - continue; - } else - break; - } - } - - if ( !merged ) _intervals.push_back ( interval ); - } - - - string UnionIntervals::_getString () - { - ostringstream s; - - list::iterator iintv = _intervals.begin(); - for ( ; iintv != _intervals.end() ; iintv++ ) { - s << " [" << DbU::getValueString((*iintv).getVMin()) - << ":" << DbU::getValueString((*iintv).getVMax()) << "]"; - } - return s.str(); - } - - -// ------------------------------------------------------------------- -// Class : "RipupHistory". - - - class RipupHistory { - public: - RipupHistory ( RoutingEvent* ); - inline bool isDislodger ( RoutingEvent* ) const; - inline size_t size () const; - inline size_t getDislodgersCount () const; - void addAxis ( DbU::Unit ); - void addAxis ( RoutingEvent* ); - bool hasAxis ( DbU::Unit ) const; - UnionIntervals* getUnionIntervals ( DbU::Unit ); - void addDislodger ( RoutingEvent* ); - void addDislodger ( TrackElement* ); - void print ( ostream& ); - private: - RoutingEvent* _masterEvent; - map _dislodgers; - size_t _dislodgersCount; - }; - - - RipupHistory::RipupHistory ( RoutingEvent* event ) - : _masterEvent(event) - , _dislodgers() - , _dislodgersCount(0) - { - const Interval& perpandicular = _masterEvent->getPerpandicular(); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_masterEvent->getSegment()->getLayer()); - Track* track; - if ( !perpandicular.isEmpty() ) { - track = plane->getTrackByPosition(perpandicular.getVMin()); - - if ( track && (track->getAxis() < perpandicular.getVMin()) ) track = track->getNext(); - for ( ; track && (track->getAxis() <= perpandicular.getVMax()) - ; track = track->getNext() ) - addAxis ( track->getAxis() ); - } - - track = plane->getTrackByPosition(_masterEvent->getSegment()->getAxis()); - if ( track ) { - size_t begin; - size_t end; - Interval interval = _masterEvent->getSegment()->getCanonicalInterval(); - track->getOverlapBounds ( interval, begin, end ); - - if ( begin != Track::NPOS ) { - for ( ; begin < end ; begin++ ) { - TrackElement* other = track->getSegment(begin); - if ( other->getNet() == _masterEvent->getSegment()->getNet() ) continue; - if ( !interval.intersect(other->getCanonicalInterval()) ) continue; - - addDislodger ( other ); - } - } - } - } - - - inline bool RipupHistory::isDislodger ( RoutingEvent* event ) const { return hasAxis(event->getSegment()->getAxis()); } - inline size_t RipupHistory::size () const { return _dislodgers.size(); } - inline size_t RipupHistory::getDislodgersCount () const { return _dislodgersCount; } - - - void RipupHistory::addAxis ( DbU::Unit axis ) - { - if ( hasAxis(axis) ) return; - _dislodgers.insert ( make_pair(axis,UnionIntervals()) ); - } - - - void RipupHistory::addAxis ( RoutingEvent* event ) - { - addAxis ( event->getAxisHistory() ); - } - - - bool RipupHistory::hasAxis ( DbU::Unit axis ) const - { - return _dislodgers.find(axis) != _dislodgers.end(); - } - - - UnionIntervals* RipupHistory::getUnionIntervals ( DbU::Unit axis ) - { - map::iterator iunion = _dislodgers.find ( axis ); - if ( iunion == _dislodgers.end() ) return NULL; - - return &(iunion->second); - } - - - void RipupHistory::addDislodger ( RoutingEvent* event ) - { - if ( event->getSegment() == _masterEvent->getSegment() ) return; - if ( event->getSegment()->getLayer() != _masterEvent->getSegment()->getLayer() ) return; - - UnionIntervals* intervals = getUnionIntervals ( event->getAxisHistory() ); - if ( !intervals ) return; - - Interval canonical = event->getSegment()->getCanonicalInterval(); - intervals->addInterval ( canonical ); - - _dislodgersCount++; - } - - - void RipupHistory::addDislodger ( TrackElement* segment ) - { - if ( _masterEvent->getSegment()->getNet() == segment->getNet() ) return; - - UnionIntervals* intervals = getUnionIntervals ( segment->getAxis() ); - if ( !intervals ) return; - - Interval canonical = segment->getCanonicalInterval(); - intervals->addInterval ( canonical ); - - _dislodgersCount++; - } - - - void RipupHistory::print ( ostream& o ) - { - o << "[HISTORY] " << _masterEvent << endl; - - map::iterator iunion = _dislodgers.begin(); - for ( ; iunion != _dislodgers.end() ; iunion++ ) - o << " @" << DbU::getValueString(iunion->first) - << " " << (iunion->second)._getString() << endl; - } - - -// ------------------------------------------------------------------- -// Class : "::SegmentAction". - - - class SegmentAction { - public: - enum Type { Self = (1<< 0) - , Other = (1<< 1) - , Ripup = (1<< 2) - , Insert = (1<< 3) - , ResetRipup = (1<< 4) - , AxisHint = (1<< 5) - , Perpandicular = (1<< 6) - , EventLevel1 = (1<< 7) - , EventLevel2 = (1<< 8) - , EventLevel3 = (1<< 9) - , EventLevel4 = (1<<10) - , EventLevel5 = (1<<11) - , PackingMode = (1<<12) - , ToState = (1<<13) - , ToRipupLimit = (1<<14) - , RipedByLocal = (1<<15) - , SelfInsert = Self |Insert - , SelfRipup = Self |Ripup - , SelfRipupPerpand = Self |Ripup | Perpandicular - , SelfRipupAndReset = Self |Ripup | Perpandicular - , SelfShrinkPerpand = Self |Ripup | Perpandicular|EventLevel4 - , SelfRipupAndAxisHint = Self |Ripup | Perpandicular|EventLevel4| AxisHint - , OtherRipup = Other|Ripup - , OtherPushAside = Other|Ripup | Perpandicular|EventLevel3 - , OtherPacking = Other|Ripup | Perpandicular|EventLevel4|PackingMode - }; - public: - SegmentAction ( TrackElement* - , unsigned int type - , DbU::Unit axisHint=0 - , unsigned int toState =0 - ); - inline TrackElement* getSegment () const; - inline unsigned int getType () const; - inline void setAxisHint ( DbU::Unit ); - inline unsigned int setFlag ( unsigned int ); - bool doAction ( RoutingEventQueue& ); - private: - TrackElement* _segment; - unsigned int _type; - DbU::Unit _axisHint; - unsigned int _toState; - }; - - - inline TrackElement* SegmentAction::getSegment () const { return _segment; } - inline unsigned int SegmentAction::getType () const { return _type; } - inline void SegmentAction::setAxisHint ( DbU::Unit axis ) { _axisHint = axis; } - inline unsigned int SegmentAction::setFlag ( unsigned int flag ) { _type |= flag; return _type; } - - - SegmentAction::SegmentAction ( TrackElement* segment - , unsigned int type - , DbU::Unit axisHint - , unsigned int toState - ) - : _segment (segment) - , _type (type) - , _axisHint(axisHint) - , _toState (toState) - { } - - - bool SegmentAction::doAction ( RoutingEventQueue& queue ) - { - // Note: - // "_immediate" ripup flags was associated with "perpandicular", as they - // must be re-inserted *before* any parallel. Must look to solve the redundancy. - - DebugSession::open ( _segment->getNet(), 200 ); - - if ( _type & Perpandicular ) { - ltrace(200) << "* Riping Pp " << _segment << endl; - } else { - ltrace(200) << "* Riping // " << _segment << endl; - } - - if ( _segment->isFixed() ) { DebugSession::close(); return true; } - - DataNegociate* data = _segment->getDataNegociate(); - if ( data == NULL ) { DebugSession::close(); return true; } - - if ( _type & ResetRipup ) data->resetRipupCount (); - - if ( _type & ToState ) { - data->setState ( _toState ); - data->setRipupCount ( Session::getKiteEngine()->getRipupLimit(_segment) ); - } - - if ( _segment->getTrack() ) Session::addRemoveEvent ( _segment ); - - RoutingEvent* event = data->getRoutingEvent(); - if ( event == NULL ) { - cerr << Bug("Missing Event on %p:%s" - ,_segment->base()->base(),getString(_segment).c_str()) << endl; - DebugSession::close(); - return true; - } - - if ( (_type & AxisHint) /*and not _segment->isSlackenDogLeg()*/ ) { - ltrace(200) << "Setting Axis Hint: @" << DbU::getValueString(_axisHint) << endl; - event->setAxisHint ( _axisHint ); - } - - if ( _type & ToRipupLimit ) { - unsigned int limit = Session::getKiteEngine()->getRipupLimit(_segment); - if ( limit > data->getRipupCount() ) - data->setRipupCount ( limit ); - } - - unsigned int eventLevel = 0; - if ( _type & EventLevel1 ) eventLevel = 1; - if ( _type & EventLevel2 ) eventLevel = 2; - if ( _type & EventLevel3 ) eventLevel = 3; - if ( _type & EventLevel4 ) eventLevel = 4; - if ( _type & EventLevel5 ) eventLevel = 5; - event->setRipedByLocal ( _type&RipedByLocal ); - - RoutingEvent* fork = event->reschedule ( queue, eventLevel ); - - if ( fork ) { - unsigned int mode = RoutingEvent::Repair; - if ( RoutingEvent::getStage() < RoutingEvent::Repair ) - mode = (_type&PackingMode) ? RoutingEvent::Pack : RoutingEvent::Negociate; - fork->setMode ( mode ); - } - - DebugSession::close (); - return true; - } - - -// ------------------------------------------------------------------- -// Class Declaration : "::State". - - - class State { - - public: - enum StateValues { MissingData = (1<<0) - , EmptyTrackList = (1<<1) - , Inserted = (1<<2) - , Self = (1<<3) - , Other = (1<<4) - , Ripup = (1<<5) - , MaximumRipup = (1<<6) - , TopologyModificated = (1<<7) - , SelfInserted = Self | Inserted - , SelfMaximumRipup = Self | MaximumRipup - , OtherRipup = Other | Ripup - , OtherTopologyModificated = Other | TopologyModificated - , SelfTopologyModificated = Self | TopologyModificated - }; - enum SlackenFlags { NoRecursive = (1<<0) - , NoTransition = (1<<1) - }; - - public: - State ( RoutingEvent* - , RoutingEventQueue& - , RoutingEventHistory& - ); - inline bool isFullBlocked () const; - inline RoutingEvent* getEvent (); - inline RoutingEventQueue& getQueue (); - inline RoutingEventHistory& getHistory (); - inline unsigned int getState (); - inline DataNegociate* getData (); - inline Interval& getConstraint (); - inline Interval& getOptimal (); - inline vector& getCosts (); - inline TrackCost& getCost ( size_t ); - inline Track* getTrack ( size_t ); - inline size_t getBegin ( size_t ); - inline size_t getEnd ( size_t ); - inline void setState ( unsigned int ); - inline void addAction ( TrackElement* - , unsigned int type - , DbU::Unit axisHint=0 - , unsigned int toState =0 - ); - inline vector& getActions (); - bool doActions (); - inline void clearActions (); - bool insertInTrack ( size_t ); - bool conflictSolve1_v1a (); - bool conflictSolve1_v1b (); - bool conflictSolve1_v2 (); - bool conflictSolve2 (); - bool desaturate (); - bool slackenTopology ( unsigned int flags=0 ); - bool solveFullBlockages (); - - private: - RoutingEvent* _event; - RoutingEventQueue& _queue; - RoutingEventHistory& _history; - unsigned int _state; - DataNegociate* _data; - Interval _constraint; - Interval _optimal; - vector _costs; - vector _actions; - bool _fullBlocked; - }; - - -// ------------------------------------------------------------------- -// Class Declaration : "::Manipulator". - - - class Manipulator { - public: - enum { ToRipupLimit = 0x001 - , AllowExpand = 0x002 - , NoExpand = 0x004 - , PerpandicularsFirst = 0x008 - , ToMoveUp = 0x010 - , AllowLocalMoveUp = 0x020 - , AllowTerminalMoveUp = 0x040 - , AllowShortPivotUp = 0x080 - , NoDoglegReuse = 0x100 - }; - enum { LeftAxisHint=1, RightAxisHint=2 }; - enum { HasNextRipup=0x2 }; - public: - Manipulator ( TrackElement*, State& ); - ~Manipulator (); - inline TrackElement* getSegment () const; - inline DataNegociate* getData () const; - inline RoutingEvent* getEvent () const; - bool canRipup ( unsigned int flags=0 ) const; - bool isCaged ( DbU::Unit ) const; - bool ripup ( Interval overlap - , unsigned int type - , DbU::Unit axisHint=0 - , unsigned int toState =0 - ); - bool ripup ( DbU::Unit point - , unsigned int type - , DbU::Unit axisHint=0 - ); - bool ripupPerpandiculars ( unsigned int flags=0 ); - void repackPerpandiculars ( bool ripInserted=true ); - bool ripple (); - bool goOutsideGCell (); - bool minimize (); - bool desalignate (); - bool slacken (); - bool pivotUp (); - bool pivotDown (); - bool moveUp ( unsigned int flags=0 ); - bool makeDogLeg (); - bool makeDogLeg ( DbU::Unit ); - bool makeDogLeg ( Interval ); - bool relax ( Interval, unsigned int flags=AllowExpand ); - bool relax ( size_t ); - bool insertInTrack ( size_t ); - bool shrinkToTrack ( size_t - , unsigned int flags=0 - , DbU::Unit leftAxisHint=0 - , DbU::Unit rightAxisHint=0 - ); - bool forceToTrack ( size_t ); - bool forceOverLocals (); - void reprocessPerpandiculars (); - private: - TrackElement* _segment; - DataNegociate* _data; - RoutingEvent* _event; - State& _S; - }; - - -// ------------------------------------------------------------------- -// Class Definition : "::State". - - - State::State ( RoutingEvent* event, RoutingEventQueue& queue, RoutingEventHistory& history ) - : _event (event) - , _queue (queue) - , _history (history) - , _state (0) - , _data (NULL) - , _constraint () - , _optimal () - , _costs () - , _actions () - , _fullBlocked (true) - { - TrackElement* segment = _event->getSegment(); - unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment->getLayer()); - _event->setTracksFree ( 0 ); - - _data = segment->getDataNegociate(); - if ( !_data ) { - _state = MissingData; - return; - } - - _data->update (); - _event->invalidate ( true ); // Optimizable. - _event->revalidate ( true ); - - _constraint = _event->getConstraints(); - _optimal = _event->getOptimal(); - - const Interval& perpandicular = _event->getPerpandicular (); - - ltrace(148) << "Katabatic intervals:" << endl; - ltrace(148) << "* Optimal: " << _optimal << endl; - ltrace(148) << "* Constraints: " << _constraint << endl; - ltrace(148) << "* Perpandicular: " << perpandicular << endl; - ltrace(148) << "* OptimalAxis: " << _event->getOptimalAxis() << endl; - ltrace(148) << "* AxisHint: " << DbU::getValueString(_event->getAxisHint()) << endl; - - if ( _event->getTracksNb() ) { - if ( _constraint.getIntersection(perpandicular).isEmpty() ) { - ltrace(200) << "Perpandicular free is too tight." << endl; - _state = EmptyTrackList; - } else - _constraint.intersection ( perpandicular ); - } else { - ltrace(200) << "No Track in perpandicular free." << endl; - _state = EmptyTrackList; - } - - if ( _state == EmptyTrackList ) return; - - ltrace(148) << "Negociate intervals:" << endl; - ltrace(148) << "* Optimal: " << _optimal << endl; - ltrace(148) << "* Constraints: " << _constraint << endl; - ltracein(148); - - // if ( segment->isLocal() and (_data->getState() >= DataNegociate::MaximumSlack) ) - // _constraint.inflate ( 0, DbU::lambda(1.0) ); - - bool inLocalDepth = (depth < 3); - bool isOneLocalTrack = (segment->isLocal()) - and (segment->base()->getAutoSource()->getGCell()->getGlobalsCount(depth) >= 9.0); - - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); - forEach ( Track*, itrack, Tracks_Range::get(plane,_constraint)) { - unsigned int costflags = 0; - costflags |= (segment->isLocal() and (depth >= 3)) ? TrackCost::LocalAndTopDepth : 0; - - _costs.push_back ( itrack->getOverlapCost(segment,costflags) ); - _costs.back().setAxisWeight ( _event->getAxisWeight(itrack->getAxis()) ); - _costs.back().incDeltaPerpand ( _data->getCost().getWiringDelta(itrack->getAxis()) ); - - if ( inLocalDepth and (_costs.back().getDataState() == DataNegociate::MaximumSlack) ) - _costs.back().setInfinite (); - - if ( isOneLocalTrack - and _costs.back().isOverlapGlobal() - and (_costs.back().getDataState() >= DataNegociate::ConflictSolve1) ) - _costs.back().setInfinite (); - - _costs.back().consolidate (); - if ( _fullBlocked and (not _costs.back().isBlockage() and not _costs.back().isFixed()) ) - _fullBlocked = false; - - ltrace(149) << "| " << (*itrack) << " - " << _costs.back() << endl; - } - ltraceout(148); - - if ( _costs.empty() ) { - Track* nearest = plane->getTrackByPosition(_constraint.getCenter()); - - if ( (nearest->getAxis() < _constraint.getVMin()) - or (nearest->getAxis() > _constraint.getVMax()) ) { - //setUnimplemented (); - //cerr << "[UNIMPLEMENTED] " << segment << " no Track in constraint interval " - // << _constraint << " " << "." << endl; - } else { - cerr << Bug(" %s Track_Range() failed to find Tracks in %s (they exists)." - ,getString(segment).c_str() - ,getString(_constraint).c_str() - ) << endl; - } - _state = EmptyTrackList; - } - - unsigned int flags = 0; - flags |= (segment->isStrap()) ? TrackCost::IgnoreAxisWeight : 0; - flags |= (segment->isLocal() - and (_data->getState() < DataNegociate::Minimize) - and (_data->getRipupCount() < 5)) - ? TrackCost::DiscardGlobals : 0; - flags |= (RoutingEvent::getStage() == RoutingEvent::Repair) ? TrackCost::IgnoreSharedLength : 0; - - if ( flags & TrackCost::DiscardGlobals ) { - ltrace(200) << "TrackCost::Compare() - DiscardGlobals" << endl; - } - - sort ( _costs.begin(), _costs.end(), TrackCost::Compare(flags) ); - - size_t i=0; - for ( ; (i<_costs.size()) and _costs[i].isFree() ; i++ ); - _event->setTracksFree ( i ); - } - - - inline bool State::isFullBlocked () const { return _fullBlocked and _costs.size(); } - inline RoutingEvent* State::getEvent () { return _event; } - inline RoutingEventQueue& State::getQueue () { return _queue; } - inline RoutingEventHistory& State::getHistory () { return _history; } - inline unsigned int State::getState () { return _state; } - inline DataNegociate* State::getData () { return _data; } - inline Interval& State::getConstraint () { return _constraint; } - inline Interval& State::getOptimal () { return _optimal; } - inline vector& State::getCosts () { return _costs; } - inline TrackCost& State::getCost ( size_t i ) { return _costs[i]; } - inline Track* State::getTrack ( size_t i ) { return _costs[i].getTrack(); } - inline size_t State::getBegin ( size_t i ) { return _costs[i].getBegin(); } - inline size_t State::getEnd ( size_t i ) { return _costs[i].getEnd(); } - inline vector& State::getActions () { return _actions; } - inline void State::setState ( unsigned int state ) { _state = state; } - inline void State::clearActions () { _actions.clear(); } - - - void State::addAction ( TrackElement* segment - , unsigned int type - , DbU::Unit axisHint - , unsigned int toState ) - { - if ( not segment->isFixed() ) { - _actions.push_back ( SegmentAction(segment,type,axisHint,toState) ); - ltrace(200) << "State::addAction(): " << segment << endl; - } - } - - - bool State::doActions () - { - ltrace(200) << "State::doActions() - " << _actions.size() << endl; - - bool ripupOthersParallel = false; - bool ripedByLocal = getEvent()->getSegment()->isLocal(); - - for ( size_t i=0 ; i<_actions.size() ; i++ ) { - if ( ripedByLocal ) _actions[i].setFlag ( SegmentAction::RipedByLocal ); - if ( _actions[i].getType() & SegmentAction::OtherRipup ) { - ripupOthersParallel = true; - } - } - - for ( size_t i=0 ; i<_actions.size() ; i++ ) { - if ( (_actions[i].getType() & SegmentAction::SelfInsert) and ripupOthersParallel ) - _actions[i].setFlag ( SegmentAction::EventLevel3 ); - - DebugSession::open ( _actions[i].getSegment()->getNet(), 200 ); - if ( not _actions[i].doAction(_queue) ) { - cinfo << "[INFO] Failed action on " << _actions[i].getSegment() << endl; - } - DebugSession::close (); - } - - _actions.clear (); - return true; - } - - - bool State::insertInTrack ( size_t i ) - { - ltrace(200) << "State::insertInTrack() istate:" << _event->getInsertState() - << " track:" << i << endl; - - _event->incInsertState(); - switch ( _event->getInsertState() ) { - case 1: - if ( Manipulator(_event->getSegment(),*this).insertInTrack(i) ) return true; - _event->incInsertState(); - case 2: - if ( Manipulator(_event->getSegment(),*this).shrinkToTrack(i) ) return true; - _event->incInsertState(); - case 3: - if ( Manipulator(_event->getSegment(),*this).forceToTrack(i) ) return true; - _event->incInsertState(); - } - return false; - } - - - bool State::conflictSolve2 () - { - bool success = false; - RipupHistory ripupHistory ( _event ); - RoutingEvent* event; - TrackElement* segment = _event->getSegment(); - - ltrace(200) << "State::conflictSolve2()" << endl; - - size_t maxDepth = min ( getHistory().size(), (size_t)300 ); - size_t depth = 0; - while ( (ripupHistory.getDislodgersCount() < 3) and (depth < maxDepth) ) { - event = getHistory().getRNth(depth++); - if ( !event ) continue; - if ( (event->getSegment() != segment) and ripupHistory.isDislodger(event) ) - ripupHistory.addDislodger ( event ); - } - - //ripupHistory.print ( cout ); - - UnionIntervals* intervals = ripupHistory.getUnionIntervals ( segment->getAxis() ); - if ( intervals && !intervals->empty() ) { - - DbU::Unit minConflict = intervals->getVMin(); - DbU::Unit maxConflict = intervals->getVMax(); - Interval canonical = segment->getCanonicalInterval(); - bool sourceDogLeg = canonical.contains(minConflict); - bool targetDogLeg = canonical.contains(maxConflict); - - if ( sourceDogLeg || targetDogLeg ) { - Point breakPoint; - if ( segment->isHorizontal() ) - breakPoint = Point ( (sourceDogLeg)?minConflict:maxConflict ,segment->getAxis() ); - else - breakPoint = Point ( segment->getAxis(), (sourceDogLeg)?minConflict:maxConflict ); - - Katabatic::GCell* dogLegGCell = Session::getGCellUnder ( breakPoint.getX(), breakPoint.getY() ); - if ( dogLegGCell ) { - if ( segment->canDogLegAt(dogLegGCell) ) { - if ( segment->makeDogLeg(dogLegGCell) ) - success = true; - } - } else { - cerr << Bug("No GCell under %s.",getString(breakPoint).c_str()) << endl; - } - - if ( !success ) { - if ( segment->isHorizontal() ) - breakPoint = Point ( (targetDogLeg)?maxConflict:minConflict ,segment->getAxis() ); - else - breakPoint = Point ( segment->getAxis(), (targetDogLeg)?maxConflict:minConflict ); - - Katabatic::GCell* dogLegGCell = Session::getGCellUnder ( breakPoint.getX(), breakPoint.getY() ); - if ( dogLegGCell ) { - if ( segment->canDogLegAt(dogLegGCell) ) { - if ( segment->makeDogLeg(dogLegGCell) ) - success = true; - } - } else { - cerr << Bug("No GCell under %s.",getString(breakPoint).c_str()) << endl; - } - } - } - } else { - ltrace(200) << "No disloggers found @" << DbU::getValueString(segment->getAxis()) << endl; - - Interval freeSpan = Session::getKiteEngine()-> - getTrackByPosition(segment->getLayer(),segment->getAxis())-> - getFreeInterval(segment->getSourceU(),segment->getNet()); - - if ( freeSpan.contains(segment->getCanonicalInterval()) ) { - ltrace(200) << "Disloggers vanished, Segment can be re-inserted." << endl; - success = true; - } - } - - return success; - } - - - bool State::conflictSolve1_v2 () - { - ltrace(200) << "State::conflictSolve1_v2()" << endl; - ltracein(200); - - Interval constraints; - vector candidates; - TrackElement* segment = _event->getSegment(); - - segment->base()->getConstraints ( constraints ); - Interval overlap = segment->getCanonicalInterval(); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); - Track* track = plane->getTrackByPosition(constraints.getVMin(),Constant::Superior); - - for ( ; track->getAxis() <= constraints.getVMax() ; track = track->getNext() ) { - candidates.push_back ( track ); - } - - FindPath findPath ( candidates, segment->getNet(), overlap.getVMin(), overlap.getVMax() ); - vector doglegs = findPath.computeDoglegPos( 0 ); - - if ( doglegs.empty() ) { - ltrace(200) << "Cannot find a path." << endl; - - DbU::Unit gap = DbU::lambda(50.0); - FindPath findPath ( candidates, segment->getNet(), overlap.getVMin(), overlap.getVMax() ); - doglegs = findPath.computeDoglegPos(gap); - - if ( doglegs.empty() ) { - ltrace(200) << "Cannot find a path with gap " << DbU::getValueString(gap) << "." << endl; - return false; - } - return false; - } - - - ltrace(200) << "Dogleg positions:" << endl; - for ( size_t ipos=0 ; ipos gcells; - vector doglegGCells; - segment->getGCells ( gcells ); - - Interval uside; - size_t idogleg = 0; - for ( size_t igcell=0 ; igcellgetUSide(segment->getDirection()); - ltrace(200) << "| " << gcells[igcell] << " uside: " << uside << endl; - - if ( uside.contains(doglegs[idogleg]) ) { - ltrace(200) << "> Dogleg: " << idogleg << endl; - doglegGCells.push_back ( gcells[igcell] ); - - idogleg++; - } - } - - for ( size_t igcell=0 ; igcellcanDogLegAt(doglegGCells[igcell]) ) { - ltrace(200) << "Cannot create dogleg " << igcell << "." << endl; - ltraceout(200); - return false; - } - } - - TrackElement* remainder = segment; - remainder->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - - for ( size_t igcell=0 ; igcellmakeDogLeg ( doglegGCells[igcell] ); - dogleg->setAxis ( doglegs[igcell] ); - - remainder = Session::lookup ( Session::getDogLegs()[2] ); - remainder->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - } - - ltraceout(200); - return true; - } - - - bool State::conflictSolve1_v1a () - { - bool success = false; - Interval constraints; - vector candidates; - TrackElement* segment = _event->getSegment(); - bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(0.5) : segment->canMoveUp(1.0); // MARK 1 - unsigned int relaxFlags = Manipulator::NoDoglegReuse - | ((_data and (_data->getStateCount() < 2)) ? Manipulator::AllowExpand - : Manipulator::NoExpand); - - ltrace(200) << "State::conflictSolve1_v1a()" << endl; - ltrace(200) << "| Candidates Tracks: " << endl; - - segment->base()->getConstraints ( constraints ); - Interval overlap = segment->getCanonicalInterval(); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); - Track* track = plane->getTrackByPosition(constraints.getVMin(),Constant::Superior); - - for ( ; track->getAxis() <= constraints.getVMax() ; track = track->getNext() ) { - candidates.push_back ( Cs1Candidate(track) ); - - size_t begin; - size_t end; - TrackElement* other; - Net* otherNet = NULL; - Interval otherOverlap; - - track->getOverlapBounds ( overlap, begin, end ); - candidates.back().setBegin ( begin ); - candidates.back().setEnd ( end ); - - ltrace(200) << "* " << track << " [" << begin << ":" << end << "]" << endl; - - for ( ; (begin < end) ; begin++ ) { - other = track->getSegment(begin); - - if ( other->getNet() == segment->getNet() ) { - ltrace(200) << " | " << begin << " Same net: " << " " << other << endl; - continue; - } - if ( not other->getCanonicalInterval().intersect(overlap) ) { - ltrace(200) << " | " << begin << " No Conflict: " << " " << other << endl; - if ( otherNet == NULL ) candidates.back().setBegin ( begin+1 ); - continue; - } - ltrace(200) << " | " << begin << " Conflict: " << " " << other << endl; - - if ( otherNet != other->getNet() ) { - if ( otherNet != NULL ) { - candidates.back().addConflict ( otherOverlap ); - ltrace(200) << " | Other overlap: " << otherOverlap << endl; - } - otherNet = other->getNet(); - otherOverlap = other->getCanonicalInterval(); - } else { - otherOverlap.merge(other->getCanonicalInterval()); - } - } - if ( not otherOverlap.isEmpty() ) { - candidates.back().addConflict ( otherOverlap ); - ltrace(200) << " | Other overlap: " << otherOverlap << endl; - } - - candidates.back().consolidate(); - } - - sort ( candidates.begin(), candidates.end() ); - - for ( size_t icandidate=0 ; icandidate 2 ) break; - - Interval overlap0 = candidates[icandidate].getConflict(0); - ltrace(200) << "overlap0: " << overlap0 << endl; - - if ( candidates[icandidate].getLength() == 1 ) { - Track* track = candidates[icandidate].getTrack(); - TrackElement* other = track->getSegment(candidates[icandidate].getBegin()); - - // if ( other->isGlobal() and other->canMoveUp(1.0) ) { - // ltrace(200) << "conflictSolve1_v1a() - One conflict, other move up [" - // << candidates[icandidate].getBegin() << "]" << endl; - // if ( (success = other->moveUp()) ) break; - // } - if ( other->isGlobal() ) { - ltrace(200) << "conflictSolve1_v1a() - One conflict, other move up [" - << candidates[icandidate].getBegin() << "]" << endl; - if ( (success = Manipulator(other,*this).moveUp()) ) break; - } - - ltrace(200) << "conflictSolve1_v1a() - One conflict, relaxing self" << endl; - - if ( Manipulator(segment,*this).relax(overlap0,relaxFlags) ) { - success = true; - break; - } else { - if ( not canMoveUp - and (relaxFlags != Manipulator::NoExpand) - and Manipulator(segment,*this).relax(overlap0,Manipulator::NoExpand|Manipulator::NoDoglegReuse) ) { - ltrace(200) << "Cannot move up but successful narrow breaking." << endl; - success = true; - break; - } - } - } - - if ( candidates[icandidate].getLength() == 2 ) { - ltrace(200) << "conflictSolve1_v1a() - Two conflict, relaxing self" << endl; - - Interval overlap1 = candidates[icandidate].getConflict(1); - // Ugly: hard-coded half GCell side. - if ( overlap1.getVMin() - overlap0.getVMax() < DbU::lambda(5.0) ) { - ltrace(200) << "conflictSolve1_v1a() - Too narrow spacing: " - << DbU::getValueString(overlap1.getVMin() - overlap0.getVMax()) << endl; - continue; - } - - if ( Manipulator(segment,*this).relax(overlap0,relaxFlags) ) { - success = true; - break; - } else { - if ( not canMoveUp - and (relaxFlags != Manipulator::NoExpand) - and Manipulator(segment,*this).relax(overlap0,Manipulator::NoExpand) ) { - ltrace(200) << "Cannot move up but successful narrow breaking." << endl; - success = true; - break; - } - } - } - } - - //if ( track && (track->getAxis() < constraints.getVMin()) ) track = track->getNext(); - //for ( ; !success && track && (track->getAxis() <= constraints.getVMax()) ; track = track->getNext() ) - - unsigned int depth = Session::getConfiguration()->getRoutingGauge()->getLayerDepth(segment->getLayer()); - if ( not success ) { - ltrace(200) << "Try to break " - << DbU::getValueString(segment->getLength()) - << " >= " << DbU::getValueString(Session::getConfiguration()->getGlobalMinBreak(depth)) - << endl; - if ( (segment->getLength() >= Session::getConfiguration()->getGlobalMinBreak(depth)) ) { - ltrace(200) << "Long global wire, break in the middle." << endl; - Interval span; - segment->getCanonical ( span ); - - success = Manipulator(segment,*this).makeDogLeg ( span.getCenter() ); - if ( success ) { - TrackElement* segment1 = Session::lookup ( Session::getDogLegs()[2] ); - if ( segment1 ) Manipulator(segment1,*this).pivotDown (); - Manipulator(segment,*this).pivotDown (); - } - } - } - - return success; - } - - - bool State::conflictSolve1_v1b () - { - bool success = false; - Interval constraints; - vector candidates; - TrackElement* segment = _event->getSegment(); - bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(0.5) : segment->canMoveUp(1.0); // MARK 1 - unsigned int relaxFlags = Manipulator::NoDoglegReuse - | ((_data and (_data->getStateCount() < 2)) ? Manipulator::AllowExpand - : Manipulator::NoExpand); - - ltrace(200) << "State::conflictSolve1_v1b()" << endl; - ltrace(200) << "| Candidates Tracks: " << endl; - - segment->base()->getConstraints ( constraints ); - Interval overlap = segment->getCanonicalInterval(); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); - Track* track = plane->getTrackByPosition(constraints.getVMin(),Constant::Superior); - - for ( ; track->getAxis() <= constraints.getVMax() ; track = track->getNext() ) { - candidates.push_back ( Cs1Candidate(track) ); - - size_t begin; - size_t end; - TrackElement* other; - Net* otherNet = NULL; - Interval otherOverlap; - bool otherIsGlobal = false; - - track->getOverlapBounds ( overlap, begin, end ); - candidates.back().setBegin ( begin ); - candidates.back().setEnd ( end ); - - ltrace(200) << "* " << track << " [" << begin << ":" << end << "]" << endl; - - for ( ; (begin < end) ; begin++ ) { - other = track->getSegment(begin); - - if ( other->getNet() == segment->getNet() ) { - ltrace(200) << " | " << begin << " Same net: " << " " << other << endl; - continue; - } - if ( not other->getCanonicalInterval().intersect(overlap) ) { - ltrace(200) << " | " << begin << " No Conflict: " << " " << other << endl; - if ( otherNet == NULL ) candidates.back().setBegin ( begin+1 ); - continue; - } - ltrace(200) << " | " << begin << " Conflict: " << " " << other << endl; - - if ( otherNet != other->getNet() ) { - if ( otherNet ) { - if ( otherIsGlobal ) { - candidates.back().addConflict ( otherOverlap ); - ltrace(200) << " | Other overlap G: " << otherOverlap << endl; - } else { - ltrace(200) << " | Other overlap L: " << otherOverlap << " ignored." << endl; - } - } - otherNet = other->getNet(); - otherOverlap = other->getCanonicalInterval(); - otherIsGlobal = other->isGlobal() or other->isBlockage(); - } else { - otherOverlap.merge(other->getCanonicalInterval()); - otherIsGlobal = otherIsGlobal or other->isGlobal() or other->isBlockage(); - } - } - if ( not otherOverlap.isEmpty() ) { - if ( otherIsGlobal ) { - candidates.back().addConflict ( otherOverlap ); - ltrace(200) << " | Other overlap G: " << otherOverlap << endl; - } else { - ltrace(200) << " | Other overlap L: " << otherOverlap << " ignored." << endl; - } - } - - candidates.back().consolidate(); - } - - sort ( candidates.begin(), candidates.end() ); - - for ( size_t icandidate=0 ; icandidategetSegment(overlap.getCenter()); - if ( not other ) { - cbug << Error("conflictSolve1_v1b(): No segment under overlap center.") << endl; - continue; - } - - if ( other->isGlobal() ) { - ltrace(200) << "conflictSolve1_v1b() - Conflict with global, other move up" << endl; - if ( (success = Manipulator(other,*this).moveUp()) ) break; - } - - ltrace(200) << "conflictSolve1_v1b() - Relaxing self" << endl; - - if ( Manipulator(segment,*this).relax(overlap0,relaxFlags) ) { - success = true; - break; - } else { - if ( not canMoveUp - and (relaxFlags != Manipulator::NoExpand) - and Manipulator(segment,*this).relax(overlap0,Manipulator::NoExpand|Manipulator::NoDoglegReuse) ) { - ltrace(200) << "Cannot move up but successful narrow breaking." << endl; - success = true; - break; - } - } - } - - if ( not success and segment->isGlobal() and (_costs.size() <= 1) ) { - ltrace(200) << "Overconstrained perpandiculars, rip them up. On track:" << endl; - ltrace(200) << " " << track << endl; - Manipulator(segment,*this).ripupPerpandiculars (); - success = true; - } - - return success; - } - - - bool State::solveFullBlockages () - { - bool success = false; - TrackElement* segment = getEvent()->getSegment(); - - ltrace(200) << "State::solveFullBlockages: " << " " << segment << endl; - ltracein(200); - - if ( segment->isLocal() ) { - success = Manipulator(segment,*this).pivotUp(); - if ( not success ) { - ltrace(200) << "Tightly constrained local segment overlapping a blockage, move up." << endl; - ltrace(200) << segment << endl; - success = Manipulator(segment,*this).moveUp - (Manipulator::AllowLocalMoveUp|Manipulator::AllowTerminalMoveUp); - } - } else { - Interval overlap = segment->getCanonicalInterval(); - size_t begin; - size_t end; - - getCost(0).getTrack()->getOverlapBounds ( overlap, begin, end ); - for ( ; begingetSegment(begin); - Interval otherOverlap = other->getCanonicalInterval(); - - if ( other->getNet() == segment->getNet() ) continue; - if ( not otherOverlap.intersect(overlap) ) continue; - - ltrace(200) << "| " << begin << " Blockage conflict: " << " " << other << endl; - if ( (success = Manipulator(segment,*this).relax - (otherOverlap,Manipulator::NoDoglegReuse|Manipulator::NoExpand)) ) { - break; - } - } - } - if ( not success ) { - cerr << "[ERROR] Tighly constrained segment overlapping a blockage." << endl; - ltrace(200) << "Segment is hard blocked, bypass to Unimplemented." << endl; - } - - ltraceout(200); - return success; - } - - - bool State::desaturate () - { - ltrace(200) << "State::desaturate()" << endl; - ltracein(200); - - TrackElement* segment = _event->getSegment(); - size_t itrack = 0; - - for ( ; itrackgetNet(); - Interval toFree (segment->getCanonicalInterval()); - bool success = true; - - for ( size_t i = begin ; success and (i < end) ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; - if ( segment2->isFixed() or not segment2->isBipoint() ) { - success = false; - continue; - } - - DataNegociate* data2 = segment2->getDataNegociate(); - if ( not data2 ) { - ltrace(200) << "No DataNegociate, ignoring." << endl; - success = false; - continue; - } - - ltrace(200) << "- Forced moveUp " << segment2 << endl; - if ( not (success=Manipulator(segment2,*this).moveUp(Manipulator::AllowTerminalMoveUp)) ) { - continue; - } - } - - if ( success ) { - setState ( State::OtherRipup ); - addAction ( segment, SegmentAction::SelfInsert ); - segment->setAxis ( getCost(itrack).getTrack()->getAxis() ); - break; - } - } - } - - ltraceout(200); - return (itrack < _costs.size()); - -#if DESATURATE_V1 - TrackElement* segment = _event->getSegment(); - unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment->getLayer()); - - ltrace(200) << "State::desaturate()" << segment << endl; - ltracein(200); - - // if ( segment->getLength() > DbU::lambda(75.0) ) { - // ltraceout(200); - // return false; - // } - - vector gcells; - segment->getGCells ( gcells ); - - AutoSegment::DepthLengthSet globals; - for ( size_t i=0 ; i* gcellGlobals = (segment->isHorizontal()) - ? gcells[i]->getHSegments() : gcells[i]->getVSegments(); - for ( size_t i=0 ; i<(*gcellGlobals).size() ; ++i ) { - size_t gdepth = Session::getRoutingGauge()->getLayerDepth((*gcellGlobals)[i]->getLayer()); - if ( gdepth != depth ) continue; - if ( (*gcellGlobals)[i] == segment->base() ) continue; - - globals.insert ( (*gcellGlobals)[i] ); - } - } - - AutoSegment::DepthLengthSet::iterator iglobal = globals.begin(); - for ( ; iglobal != globals.end() ; ++iglobal ) { - TrackElement* gsegment = Session::lookup ( *iglobal ); - ltrace(200) << "| " << gsegment << endl; - - if ( Manipulator(gsegment,*this).moveUp() ) { - ltraceout(200); - return true; - } - } - - ltraceout(200); - return false; -#endif // DESTURATE_V1 - } - - bool State::slackenTopology ( unsigned int flags ) - { - TrackElement* segment = getEvent()->getSegment(); - bool success = false; - bool blocked = false; - bool repush = true; - DataNegociate* data = segment->getDataNegociate (); - unsigned int nextState = data->getState(); - unsigned int actionFlags = SegmentAction::SelfInsert|SegmentAction::EventLevel5; - - DebugSession::open ( segment->getNet(), 200 ); - ltrace(200) << "Slacken Topology for " << segment->getNet() - << " " << segment << endl; - ltracein(200); - - if ( (not segment) or (not data) ) { ltraceout(200); DebugSession::close(); return false; } - - _event->resetInsertState(); - data->resetRipupCount (); - - // Normal cases. - if ( not blocked and not success ) { - if ( segment->isStrap() ) { - ltrace(200) << "Strap segment FSM." << endl; - switch ( data->getState() ) { - case DataNegociate::RipupPerpandiculars: - nextState = DataNegociate::Desalignate; - success = Manipulator(segment,*this).ripupPerpandiculars(); - if ( success ) break; - case DataNegociate::Desalignate: - case DataNegociate::Minimize: - if ( data->getStateCount() >= 2 ) { - nextState = DataNegociate::MaximumSlack; - } - success = Manipulator(segment,*this).minimize(); - if ( success ) break; - case DataNegociate::DogLeg: - case DataNegociate::Slacken: - case DataNegociate::ConflictSolve1: - case DataNegociate::ConflictSolve2: - case DataNegociate::MoveUp: - case DataNegociate::MaximumSlack: - case DataNegociate::Unimplemented: - nextState = DataNegociate::Unimplemented; - break; - } - - if ( not success and (nextState != DataNegociate::Unimplemented) ) { - success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); - } - } else if ( segment->isLocal() ) { - // Local TrackElement State Machine. - ltrace(200) << "Local segment FSM." << endl; - switch ( data->getState() ) { - case DataNegociate::RipupPerpandiculars: - nextState = DataNegociate::Desalignate; - success = Manipulator(segment,*this).ripupPerpandiculars(); - if ( success ) break; - case DataNegociate::Desalignate: - nextState = DataNegociate::Minimize; - success = Manipulator(segment,*this).desalignate(); - break; - case DataNegociate::Minimize: - if ( isFullBlocked() and not segment->isTerminal() ) { - ltrace(200) << "Is Fully blocked." << endl; - nextState = DataNegociate::Unimplemented; - break; - } - nextState = DataNegociate::DogLeg; - success = Manipulator(segment,*this).minimize(); - if ( success ) break; - case DataNegociate::DogLeg: - nextState = DataNegociate::Slacken; - success = Manipulator(segment,*this).makeDogLeg(); - if ( success ) break; - case DataNegociate::Slacken: - nextState = DataNegociate::ConflictSolve2; - success = Manipulator(segment,*this).slacken(); - if ( success ) break; - case DataNegociate::ConflictSolve1: - case DataNegociate::ConflictSolve2: - if ( not (flags & NoRecursive) ) { - nextState = DataNegociate::MoveUp; - success = conflictSolve2 (); - break; - } - case DataNegociate::MoveUp: - //if ( (success = desaturate()) ) break; - nextState = DataNegociate::MaximumSlack; - success = Manipulator(segment,*this).moveUp(); - if ( success ) break; - case DataNegociate::MaximumSlack: - if ( segment->isSlackenStrap() ) { - if ( (nextState < DataNegociate::MaximumSlack) or (data->getStateCount() < 2) ) { - nextState = DataNegociate::MaximumSlack; - success = conflictSolve1_v1b (); - if ( success ) break; - } - } - case DataNegociate::Unimplemented: - nextState = DataNegociate::Unimplemented; - break; - } - - if ( not success and (nextState != DataNegociate::Unimplemented) ) { - if ( data->getStateCount() < 6 ) - success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); - } - - if ( not success - and (nextState == DataNegociate::Unimplemented) - and segment->isSlackened() - and isFullBlocked() ) { - if ( solveFullBlockages () ) nextState = DataNegociate::MoveUp; - } - } else { - // Global TrackElement State Machine. - switch ( data->getState() ) { - ltrace(200) << "Global segment FSM." << endl; - case DataNegociate::RipupPerpandiculars: - ltrace(200) << "Global, State: RipupPerpandiculars." << endl; - // if ( isFullBlocked() ) { - // actionFlags &= ~SegmentAction::EventLevel5; - // success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::PerpandicularsFirst); - // if ( success ) break; - // } - nextState = DataNegociate::Desalignate; - break; - case DataNegociate::Minimize: - case DataNegociate::DogLeg: - case DataNegociate::Desalignate: - ltrace(200) << "Global, State: Minimize, DogLeg or Desalignate." << endl; - if ( (success = Manipulator(segment,*this).desalignate()) ) { - break; - } - nextState = DataNegociate::Slacken; - case DataNegociate::Slacken: - ltrace(200) << "Global, State: Slacken." << endl; - if ( (success = Manipulator(segment,*this).slacken()) ) { - break; - } - nextState = DataNegociate::MoveUp; - case DataNegociate::MoveUp: - ltrace(200) << "Global, State: MoveUp." << endl; - //if ( (success = desaturate()) ) break; - if ( (success = Manipulator(segment,*this).moveUp(Manipulator::AllowShortPivotUp)) ) { - break; - } - nextState = DataNegociate::ConflictSolve1; - break; - case DataNegociate::ConflictSolve1: - case DataNegociate::ConflictSolve2: - ltrace(200) << "Global, State: ConflictSolve1 or ConflictSolve2." << endl; - if ( not (flags & NoRecursive) ) { - if ( (success = conflictSolve1_v1b()) ) { - if ( segment->canMoveUp(1.0) ) // MARK 1 - nextState = DataNegociate::MoveUp; - else { - if ( data->getStateCount() > 3 ) - nextState = DataNegociate::MaximumSlack; - } - if ( segment->getDataNegociate()->getState() < DataNegociate::ConflictSolve1 ) - nextState = segment->getDataNegociate()->getState(); - break; - } - } - case DataNegociate::MaximumSlack: - if ( (success=Manipulator(segment,*this).forceOverLocals()) ) { - break; - } - case DataNegociate::Unimplemented: - ltrace(200) << "Global, State: MaximumSlack or Unimplemented." << endl; - nextState = DataNegociate::Unimplemented; - break; - } - - if ( not success and (nextState != DataNegociate::Unimplemented) ) { - if ( data->getStateCount() < 6 ) - success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); - } - - // Special case: all tracks are overlaping a blockage. - if ( not success - and (nextState == DataNegociate::Unimplemented) - and segment->isSlackened() ) { - if ( solveFullBlockages() ) nextState = DataNegociate::MoveUp; - } - } - } - - if ( not (flags&NoTransition) ) { - ltrace(200) << "Incrementing state (before): " << nextState << " count:" << data->getStateCount() << endl; - data->setState ( nextState ); - ltrace(200) << "Incrementing state (after): " << nextState << " count:" << data->getStateCount() << endl; - } - - if ( success ) { - if ( repush ) { - actionFlags |= SegmentAction::ResetRipup; - addAction ( segment, actionFlags ); - } - } else { - clearActions (); - if ( data->getState() == DataNegociate::Unimplemented ) { - cinfo << "[UNSOLVED] " << segment << " unable to slacken topology." << endl; - } - } - - ltraceout(200); - DebugSession::close (); - - return success; - } - - -// ------------------------------------------------------------------- -// Class Definition : "::Manipulator". - - - inline TrackElement* Manipulator::getSegment () const { return _segment; } - inline DataNegociate* Manipulator::getData () const { return _data; } - inline RoutingEvent* Manipulator::getEvent () const { return _event; } - - - Manipulator::Manipulator ( TrackElement* segment, State& S ) - : _segment(segment) - , _data (NULL) - , _event (NULL) - , _S (S) - { - if ( !_segment ) - throw Error("Manipulator::Manipulator(): cannot build upon a NULL TrackElement."); - - DebugSession::open ( _segment->getNet(), 200 ); - - _data = _segment->getDataNegociate(); - if ( _data ) - _event = _data->getRoutingEvent(); - } - - - Manipulator::~Manipulator () - { - DebugSession::close (); - } - - - bool Manipulator::canRipup ( unsigned int flags ) const - { - if ( _data ) { - if ( not _event or _event->isUnimplemented() ) return false; - - unsigned int limit = Session::getKiteEngine()->getRipupLimit(_segment); - unsigned int count = _data->getRipupCount() + ((flags & HasNextRipup) ? 1 : 0); - - return (count < limit); - } - return false; - } - - - bool Manipulator::isCaged ( DbU::Unit axis ) const - { - Track* track = _segment->getTrack(); - if ( not track ) return false; - - TrackElement* neighbor = _segment->getPrevious(); - if ( neighbor and (neighbor->isFixed() or neighbor->isBlockage()) ) { - if ( abs(axis - neighbor->getTargetU()) < DbU::lambda(10.0) ) - return true; - } - - neighbor = _segment->getNext(); - if ( neighbor and (neighbor->isFixed() or neighbor->isBlockage()) ) { - if ( abs(axis - neighbor->getSourceU()) < DbU::lambda(10.0) ) - return true; - } - - return false; - } - - - bool Manipulator::ripup ( DbU::Unit point , unsigned int type, DbU::Unit axisHint ) - { - ltrace(200) << "Manipulator::ripup(DbU::Unit) " << DbU::getValueString(point) << endl; - - Interval overlap = Interval(point); - overlap.inflate ( Session::getExtensionCap() ); // Ugly. - - return ripup ( overlap, type, axisHint ); - } - - - bool Manipulator::ripup ( Interval overlap , unsigned int type, DbU::Unit axisHint, unsigned int toState ) - { - ltrace(200) << "Manipulator::ripup(Interval) " << overlap << endl; - - if ( not canRipup() ) return false; - - if ( _segment->isFixed() ) return false; - if ( _data == NULL ) return true; - - _S.addAction ( _segment, type, axisHint, toState ); - return true; - } - - - bool Manipulator::ripupPerpandiculars ( unsigned int flags ) - { - ltrace(200) << "Manipulator::ripupPerpandiculars() - " << flags << endl; - - bool success = true; - bool cagedPerpandiculars = false; - Interval constraints ( _event->getConstraints() ); - Interval perpandicularConstraints ( constraints ); - size_t placedPerpandiculars = 0; - unsigned int parallelActionFlags = SegmentAction::SelfRipup|SegmentAction::EventLevel4; - unsigned int perpandicularActionFlags = SegmentAction::SelfRipupPerpand; - - if ( flags & Manipulator::PerpandicularsFirst ) { - parallelActionFlags &= ~SegmentAction::EventLevel4; - perpandicularActionFlags |= SegmentAction::EventLevel4; - if ( flags & Manipulator::ToRipupLimit ) - perpandicularActionFlags |= SegmentAction::ToRipupLimit; - } else { - if ( flags & Manipulator::ToRipupLimit ) - parallelActionFlags |= SegmentAction::ToRipupLimit; - } - - ltrace(200) << "Pure constraints: " << constraints << endl; - - Track* track = NULL; - const vector& perpandiculars = _event->getPerpandiculars(); - - for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) { - track = perpandiculars[i]->getTrack(); - if ( not track ) { - if ( flags & Manipulator::PerpandicularsFirst ) { - _S.addAction ( perpandiculars[i], perpandicularActionFlags ); - } - continue; - } - - bool dislodgeCaged = false; - if ( Manipulator(perpandiculars[i],_S).isCaged(_event->getSegment()->getAxis()) ) { - cagedPerpandiculars = true; - dislodgeCaged = true; - //break; - //continue; - } - - placedPerpandiculars++; - - // Try to ripup the perpandicular itself. - DataNegociate* data2 = perpandiculars[i]->getDataNegociate(); - ltrace(200) << "| " << perpandiculars[i] << endl; - - if ( (flags & Manipulator::ToMoveUp) and (data2->getState() < DataNegociate::MoveUp) ) - data2->setState ( DataNegociate::MoveUp ); - - if ( Manipulator(perpandiculars[i],_S).ripup(_event->getSegment()->getAxis() - ,perpandicularActionFlags) ) { - if ( dislodgeCaged ) { - // Ugly: hard-coded uses of pitch. - _event->setAxisHint ( _event->getSegment()->getAxis() + DbU::lambda(5.0) ); - } - continue; - } - - // Cannot ripup the perpandicular, try to ripup it's neigbors. - size_t begin; - size_t end; - track->getOverlapBounds ( constraints, begin, end ); - - for ( ; (begin < end) ; begin++ ) { - TrackElement* other = track->getSegment(begin); - - if ( other->getNet() == _event->getSegment()->getNet() ) continue; - - Interval otherCanonical ( other->getCanonicalInterval() ); - if ( not otherCanonical.intersect(constraints) ) continue; - - // Try to ripup conflicting neighbor. - if ( Manipulator(other,_S).canRipup() ) { - ltrace(200) << " | Ripup: " << begin << " " << other << endl; - _S.addAction ( other, SegmentAction::OtherRipup ); - } else { - ltrace(200) << "Aborted ripup of perpandiculars, fixed or blocked." << endl; - return false; - } - } - } - - if ( cagedPerpandiculars and not placedPerpandiculars ) { - ltrace(200) << "Aborted ripup of perpandiculars, constraints are due to fixed/blockage." << endl; - _S.addAction ( _segment, SegmentAction::SelfRipup ); - return true; - } - - if ( _segment->isLocal() and not placedPerpandiculars ) { - ltrace(200) << "No placed perpandiculars, tight native constraints, place perpandiculars FIRST." << endl; - for ( size_t i=0 ; i < perpandiculars.size() ; i++ ) { - _S.addAction ( perpandiculars[i], perpandicularActionFlags|SegmentAction::EventLevel4 ); - } - _S.addAction ( _segment, parallelActionFlags ); - return true; - } - - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); - size_t tracksNb = 0; - - track = plane->getTrackByPosition(constraints.getVMin()); - - if ( track && (track->getAxis() < constraints.getVMin()) ) track = track->getNext(); - for ( ; track && (track->getAxis() <= constraints.getVMax()) - ; track = track->getNext(), tracksNb++ ); - - if ( _segment->isLocal() and (tracksNb < 2) ) success = ripple(); - - _S.addAction ( _segment, parallelActionFlags ); - return success; - } - - - bool Manipulator::relax ( Interval interval, unsigned int flags ) - { - interval.inflate ( - Session::getExtensionCap() /*+ DbU::lambda(5.0)*/ ); // Ugly. - ltrace(200) << "Manipulator::relax() of: " << _segment << " " << interval << endl; - - if ( _segment->isFixed() ) return false; - if ( not interval.intersect(_segment->getCanonicalInterval()) ) return false; - if ( not _data ) return false; - - if ( _segment->isTerminal() - and (_segment->getLayer() == Session::getRoutingGauge()->getRoutingLayer(1)) ) { - if ( interval.contains(_segment->base()->getAutoSource()->getX()) ) return false; - if ( interval.contains(_segment->base()->getAutoTarget()->getX()) ) return false; - } - - ltracein(200); - bool success = true; - - bool expand = _segment->isGlobal() and (flags&AllowExpand); - ltrace(200) << "Expand:" << expand << endl; - - Katabatic::GCellVector gcells; - _segment->getGCells ( gcells ); - - if ( gcells.size() < 2 ) { - cerr << Bug("relax() Cannot break %p:%s,\n only in %s." - ,_segment->base()->base() - ,getString(_segment).c_str() - ,getString(gcells[0]).c_str() - ) << endl; - ltraceout(200); - return false; - } - - unsigned int depth = Session::getRoutingGauge()->getLayerDepth(_segment->getLayer()); - Interval uside; - size_t dogLegCount = 0; - size_t iminconflict = gcells.size(); - size_t imaxconflict = gcells.size(); - size_t igcell; - - // Look for closest enclosing min & max GCells indexes. - for ( igcell=0 ; igcellgetUSide(_segment->getDirection()/*,true*/); - ltrace(200) << "| " << gcells[igcell] << " uside: " << uside << endl; - - if ( uside.contains(interval.getVMin()) ) { - iminconflict = igcell; - ltrace(200) << "> Min conflict: " << iminconflict << endl; - } - if ( uside.contains(interval.getVMax()) ) { - imaxconflict = igcell; - ltrace(200) << "> Max conflict: " << imaxconflict << endl; - } - } - - // Expand min & max to enclose GCells of greatest or equal order - // (i.e. less saturateds) - bool minExpanded = false; - bool maxExpanded = false; - if ( expand ) { - if ( iminconflict < gcells.size() ) { - size_t imindensity = 0; - - for ( size_t iexpand=1 ; iexpand < iminconflict ; iexpand++ ) { - if ( not _segment->canDogLegAt(gcells[iexpand],TrackElement::AllowDoglegReuse) ) continue; - - ltrace(200) << "Density " << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() - << " " << gcells[iexpand]->getDensity(depth) << endl; - - if ( gcells[imindensity]->getDensity(depth) > gcells[iexpand]->getDensity(depth) ) - imindensity = iexpand; - } - - if ( iminconflict != imindensity ) minExpanded = true; - iminconflict = (imindensity>0) ? imindensity : gcells.size(); - } - - if ( imaxconflict < gcells.size() ) { - size_t imindensity = imaxconflict; - for ( size_t iexpand=imaxconflict+1; iexpand < gcells.size() ; iexpand++ ) { - if ( not _segment->canDogLegAt(gcells[iexpand],TrackElement::AllowDoglegReuse) ) continue; - - ltrace(200) << "Density " << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() - << " " << gcells[iexpand]->getDensity(depth) << endl; - - if ( gcells[imindensity]->getDensity(depth) > gcells[iexpand]->getDensity(depth) ) - imindensity = iexpand; - } - - if ( imindensity != imaxconflict ) maxExpanded = true; - imaxconflict = (imindensity < gcells.size()) ? imindensity : gcells.size(); - } - } - ltrace(200) << "minExpanded:" << minExpanded << " (" << iminconflict - << ") maxExpanded:" << maxExpanded << " (" << imaxconflict << ")" << endl; - - // Check for full enclosure. - if ( ( (iminconflict == gcells.size()) and (imaxconflict == gcells.size() ) ) - or ( (iminconflict == 0) and (imaxconflict == gcells.size()-1) )) { - cinfo << "[INFO] Manipulator::relax(): Segment fully enclosed in interval." << endl; - ltraceout(200); - return false; - } - - // Suppress min/max if it's the first/last. - if ( (iminconflict < gcells.size()) and (imaxconflict == gcells.size()-1) ) imaxconflict = gcells.size(); - if ( (imaxconflict < gcells.size()) and (iminconflict == 0) ) iminconflict = gcells.size(); - - // Compute number of doglegs and nature of the *first* dogleg. - // (first can be min or max, second can only be max) - bool firstDogLegIsMin = false; - if ( iminconflict < gcells.size() ) { dogLegCount++; firstDogLegIsMin = true; } - if ( imaxconflict < gcells.size() ) dogLegCount++; - - switch ( dogLegCount ) { - case 2: - // Compact only if the double dogleg is at beginning or end. - if ( iminconflict == imaxconflict ) { - if ( iminconflict == 0 ) { - // First dogleg is max. - dogLegCount--; - } else if ( iminconflict == gcells.size()-1 ) { - dogLegCount--; - firstDogLegIsMin = true; - } - } - break; - case 1: break; - case 0: - cerr << Bug("Manipulator::relax() Can't find a GCell suitable for making dogleg." - ,getString(interval).c_str()) << endl; - ltraceout(200); - return false; - } - - ltrace(200) << "| Has to do " << dogLegCount << " doglegs." << endl; - - // Check of "min is less than one track close the edge" (while not expanded). - // AND we are on the first GCell AND there's one dogleg only. - if ( not minExpanded and (iminconflict == 0) and (imaxconflict == gcells.size()) ) { - ltrace(200) << "Cannot break in first GCell only." << endl; - ltraceout(200); - return false; - } - - // Check of "min is less than one track close the edge" (while not expanded). - if ( /*not minExpanded and*/ (iminconflict > 0) and (iminconflict < gcells.size()) ) { - uside = gcells[iminconflict-1]->getUSide(_segment->getDirection()/*,true*/); - ltrace(200) << "GCell Edge Comparison (min): " << uside - << " vs. " << DbU::getValueString(interval.getVMin()) << endl; - // Ugly: One lambda shrink. - if ( interval.getVMin()-DbU::lambda(1.0) <= uside.getVMax() ) { - ltrace(200) << "Using previous GCell." << endl; - iminconflict--; - } - } - - // Check if there is only one dogleg AND it's the last one. - if ( not maxExpanded and (iminconflict == gcells.size()) and (imaxconflict == gcells.size()-1) ) { - ltrace(200) << "Cannot break in last GCell only." << endl; - ltraceout(200); - return false; - } - - // Check of "max is less than one track close the edge" (while not expanded). - if ( /*not maxExpanded and*/ (imaxconflict < gcells.size()-1) ) { - uside = gcells[imaxconflict+1]->getUSide(_segment->getDirection()/*,true*/); - ltrace(200) << "GCell Edge Comparison (max): " << uside - << " vs. " << DbU::getValueString(interval.getVMax()) << endl; - // Ugly: Direct uses of routing pitch. - if ( interval.getVMax()+DbU::lambda(5.0) >= uside.getVMin() ) { - interval.inflate( 0, DbU::fromLambda(5.0) ); - ltrace(200) << "Using next GCell " << interval << endl; - imaxconflict++; - } - } - - size_t ifirstDogleg = gcells.size(); - size_t isecondDogleg = gcells.size(); - if ( not firstDogLegIsMin ) { - ifirstDogleg = imaxconflict; - } else { - ifirstDogleg = iminconflict; - isecondDogleg = imaxconflict; - } - - // Making first dogleg. - ltrace(200) << "Making FIRST dogleg at " << ifirstDogleg << endl; - TrackElement* segment1 = NULL; - TrackElement* segment2 = NULL; - Track* track = _segment->getTrack(); - Katabatic::GCell* dogLegGCell = gcells[ifirstDogleg]; - TrackElement* dogleg = NULL; - DbU::Unit doglegAxis; - bool doglegReuse1 = false; - bool doglegReuse2 = false; - - // Try to reuse existing dogleg if broken at either end. - if ( ifirstDogleg == 0 ) dogleg = _segment->getSourceDogLeg(); - if ( ifirstDogleg == gcells.size()-1 ) dogleg = _segment->getTargetDogLeg(); - if ( dogleg ) { - ltrace(200) << "Reusing dogleg." << endl; - doglegReuse1 = true; - segment1 = _segment; - } else { - // Try to create a new dogleg. - if ( not _segment->canDogLegAt(dogLegGCell) ) { - ltrace(200) << "Cannot create FIRST dogleg." << endl; - ltraceout(200); - return false; - } - dogleg = _segment->makeDogLeg ( dogLegGCell ); - segment1 = Session::lookup ( Session::getDogLegs()[2] ); - } - - if ( firstDogLegIsMin ) { - if ( minExpanded ) { - //doglegAxis = dogLegGCell->getUSide(_segment->getDirection(),false).getVMax() - DbU::lambda(1.0); - doglegAxis = dogLegGCell->getUSide(_segment->getDirection()/*,false*/).getCenter(); - ltrace(200) << "MARK 1 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; - } else { - // Ugly: hardcoded pitch. - doglegAxis = interval.getVMin() - DbU::lambda(5.0); - ltrace(200) << "MARK 2 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; - } - } else { - if ( maxExpanded ) { - doglegAxis = dogLegGCell->getUSide(_segment->getDirection()/*,false*/).getVMin(); - ltrace(200) << "MARK 3 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; - } else { - // Ugly: hardcoded pitch (5.0 - 1.0). - doglegAxis = interval.getVMax() + DbU::lambda(4.0); - ltrace(200) << "MARK 4 doglegAxis: " << DbU::getValueString(doglegAxis) << endl; - } - } - if ( doglegReuse1 ) _S.addAction ( dogleg, SegmentAction::OtherRipup ); - else dogleg->setAxis ( doglegAxis ); - - // If event is present, the dogleg is in the current RoutingSet. - RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); - if ( event ) { - ltrace(200) << "Set Axis Hint: @" << DbU::getValueString(doglegAxis) << " " << dogleg << endl; - event->setAxisHint ( doglegAxis ); - } else { - ltrace(200) << "Dogleg has no RoutingEvent yet." << endl; - } - - // if ( (dogLegCount == 2) and not _segment->getTrack() ) { - // Session::addInsertEvent ( _segment, track ); - // } - - // Making second dogleg. - if ( dogLegCount > 1 ) { - ltrace(200) << "Making SECOND dogleg at " << isecondDogleg - << " on " << segment1 << endl; - - dogleg = NULL; - dogLegGCell = gcells[isecondDogleg]; - - if ( ifirstDogleg == isecondDogleg ) { - ltrace(200) << "Double break in same GCell." << endl; - segment1->setSourceDogLeg(false); - } - - if ( isecondDogleg == gcells.size()-1 ) dogleg = segment1->getTargetDogLeg(); - if ( dogleg ) { - ltrace(200) << "Reusing dogleg." << endl; - doglegReuse2 = true; - segment2 = segment1; - } else { - // Try to create a new dogleg. - if ( not segment1->canDogLegAt(dogLegGCell) ) { - ltrace(200) << "Cannot create SECOND dogleg." << endl; - ltraceout(200); - return false; - } - dogleg = segment1->makeDogLeg ( dogLegGCell ); - segment2 = Session::lookup ( Session::getDogLegs()[2] ); - } - - if ( maxExpanded ) { - //doglegAxis = dogLegGCell->getUSide(segment1->getDirection(),false).getVMin(); - doglegAxis = dogLegGCell->getUSide(segment1->getDirection()/*,false*/).getCenter(); - } else { - // Ugly: hardcoded pitch. - doglegAxis = interval.getVMax() + DbU::lambda(5.0); - } - if ( doglegReuse2 ) _S.addAction ( dogleg, SegmentAction::OtherRipup ); - else dogleg->setAxis ( doglegAxis ); - - // If event is present, the dogleg is in the current RoutingSet. - RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); - if ( event ) { - ltrace(200) << "Set Axis Hint: @" << DbU::getValueString(doglegAxis) << " " << dogleg << endl; - event->setAxisHint ( doglegAxis ); - } else { - ltrace(200) << "Dogleg has no RoutingEvent yet." << endl; - } - - // This cases seems never to occurs. - const vector& doglegs = Session::getDogLegs(); - for ( size_t i=0 ; igetTrack() and track ) { - ltrace(200) << "Direct Track insert of: " << segment << endl; - Session::addInsertEvent ( segment, track ); - } - } - } - - switch ( dogLegCount ) { - case 1: - if ( not doglegReuse1 ) { - if ( firstDogLegIsMin ) - _segment->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - else - segment1->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - } - if ( (flags & NoDoglegReuse) and (doglegReuse1 or doglegReuse2 ) ) - success = false; - break; - case 2: - if ( not doglegReuse1 ) - _segment->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - if ( not doglegReuse2 ) - segment2->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - break; - } - - if ( _segment->isLocal() ) { - ltrace(200) << "Reset state of: " << _segment << endl; - _segment->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - } else { - ltrace(200) << "No state reset: " << _segment << endl; - } - - if ( (not doglegReuse1) and segment1 and segment1->isLocal() ) { - ltrace(200) << "Reset state of: " << segment1 << endl; - segment1->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - } - - if ( (not doglegReuse2) and segment2 and segment2->isLocal() ) { - ltrace(200) << "Reset state of: " << segment2 << endl; - segment2->getDataNegociate()->setState ( DataNegociate::RipupPerpandiculars, true ); - } - - // if ( _segment ) Manipulator(_segment,_S).pivotDown (); - // if ( segment1 ) Manipulator(segment1,_S).pivotDown (); - // if ( segment2 ) Manipulator(segment2,_S).pivotDown (); - - ltraceout(200); - return success; - } - - - bool Manipulator::insertInTrack ( size_t itrack ) - { - Track* track = _S.getTrack(itrack); - size_t begin = _S.getBegin(itrack); - size_t end = _S.getEnd (itrack); - Net* ownerNet = _segment->getNet(); - Interval toFree (_segment->getCanonicalInterval()); - Net* ripupNet = NULL; - set canonicals; - DbU::Unit rightAxisHint = 0; - DbU::Unit leftAxisHint = 0; - bool leftIntrication = false; - bool rightIntrication = false; - bool success = true; - unsigned long maxId = AutoSegment::getMaxId(); - - ltrace(200) << "Manipulator::insertInTrack() - " << toFree << endl; - - for ( size_t i = begin ; success && (i < end) ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; - if ( segment2->isBlockage() or segment2->isFixed() ) { - success = false; - continue; - } - if ( segment2->getId() >= maxId ) continue; - //if ( (segment2->getNet() != ripupNet ) - // && !toFree.intersect(segment2->getCanonicalInterval()) ) continue; - ripupNet = segment2->getNet(); - - DataNegociate* data2 = segment2->getDataNegociate(); - if ( !data2 ) { - ltrace(200) << "No DataNegociate, ignoring." << endl; - continue; - } - - if ( data2->getState() == DataNegociate::MaximumSlack ) { - ltrace(200) << "At " << DataNegociate::getStateString(data2) - << " for " << segment2 << endl; - success = false; - continue; - } - - bool shrinkLeft = false; - bool shrinkRight = false; - - if ( data2->getCost().getRightMinExtend() < toFree.getVMin() ) { - ltrace(200) << "- Shrink right edge (push left) " << segment2 << endl; - shrinkRight = true; - TrackElement* rightNeighbor2 = track->getSegment(i+1); - if ( rightNeighbor2 && (rightNeighbor2->getNet() == segment2->getNet()) ) { - Interval interval1 = segment2->getCanonicalInterval(); - Interval interval2 = rightNeighbor2->getCanonicalInterval(); - - if ( interval1.intersect(interval2) && (interval2.getVMax() > interval1.getVMax()) ) - shrinkLeft = true; - } - } - - if ( data2->getCost().getLeftMinExtend() > toFree.getVMax() ) { - ltrace(200) << "- Shrink left edge (push right) " << segment2 << endl; - shrinkLeft = true; - if ( i > 0 ) { - TrackElement* leftNeighbor2 = track->getSegment(i-1); - if ( leftNeighbor2 && (leftNeighbor2->getNet() == segment2->getNet()) ) { - Interval interval1 = segment2->getCanonicalInterval(); - Interval interval2 = leftNeighbor2->getCanonicalInterval(); - - if ( interval1.intersect(interval2) && (interval2.getVMin() < interval1.getVMin()) ) - shrinkRight = true; - } - } - } - - if ( _segment->isLocal() and segment2->isLocal() ) { - if ( shrinkLeft and shrinkRight ) { - Interval interval1 = segment2->getCanonicalInterval(); - if ( toFree.getCenter() < interval1.getCenter() ) shrinkRight = false; - else shrinkLeft = false; - } - } - - //if ( not (shrinkLeft xor shrinkRight) ) { - ltrace(200) << "- Hard overlap/enclosure/shrink " << segment2 << endl; - if ( _segment->isStrap() and segment2->isGlobal() ) continue; - if ( not (success = Manipulator(segment2,_S).ripup(toFree,SegmentAction::OtherRipup)) ) - continue; - //} - - canonicals.clear (); - forEach ( TrackElement*, isegment3 - , segment2->getCollapsedPerpandiculars().getSubSet(TrackElements_UniqCanonical(canonicals)) ) { - DataNegociate* data3 = isegment3->getDataNegociate(); - if ( not data3 ) continue; - - RoutingEvent* event3 = data3->getRoutingEvent(); - if ( not event3 ) continue; - - if ( not toFree.intersect(event3->getConstraints()) ) { - ltrace(200) << " . " << *isegment3 << endl; - continue; - } - - ltrace(200) << " | " << *isegment3 << endl; - - if ( shrinkRight xor shrinkLeft ) { - if ( shrinkRight ) { - if ( not (success=Manipulator(*isegment3,_S).ripup ( track->getAxis() - , SegmentAction::OtherPushAside - | SegmentAction::AxisHint - , toFree.getVMin() - DbU::lambda(2.5) - )) ) - break; - - if ( event3->getTracksFree() == 1 ) { - ltrace(200) << "Potential left intrication with other perpandicular." << endl; - if ( isegment3->getAxis() == segment2->getTargetU() - Session::getExtensionCap() ) { - leftIntrication = true; - leftAxisHint = isegment3->getAxis(); - } - } - } - if ( shrinkLeft ) { - if ( not (success=Manipulator(*isegment3,_S).ripup ( track->getAxis() - , SegmentAction::OtherPushAside - | SegmentAction::AxisHint - , toFree.getVMax() + DbU::lambda(2.5) - )) ) - break; - if ( event3->getTracksFree() == 1 ) { - ltrace(200) << "Potential right intrication with other perpandicular." << endl; - if ( isegment3->getAxis() == segment2->getSourceU() + Session::getExtensionCap() ) { - rightIntrication = true; - rightAxisHint = isegment3->getAxis(); - } - } - } - } else { - // DbU::Unit axisHint - // = (event3->getAxisHint() - toFree.getVMin() < toFree.getVMax() - event3->getAxisHint()) - // ? (toFree.getVMin() - DbU::lambda(1.0)) : (toFree.getVMax() + DbU::lambda(1.0)); - if ( not (success=Manipulator(*isegment3,_S).ripup ( track->getAxis() - , SegmentAction::OtherRipup - | SegmentAction::EventLevel3 - //| SegmentAction::AxisHint, axisHint - )) ) - break; - } - } - if ( not success ) break; - } - - if ( success ) { - ltrace(200) << "Manipulator::insertInTrack() success" << endl; - - _S.setState ( State::OtherRipup ); - _S.addAction ( _segment, SegmentAction::SelfInsert|SegmentAction::EventLevel4 ); - _segment->setAxis ( _S.getCost(itrack).getTrack()->getAxis() ); - - unsigned int flags = 0; - if ( rightIntrication ) flags |= RightAxisHint; - if ( leftIntrication ) flags |= LeftAxisHint; - if ( flags ) - Manipulator(_segment,_S).shrinkToTrack(itrack,flags,leftAxisHint,rightAxisHint); - } else - _S.clearActions (); - - return success; - } - - - bool Manipulator::forceToTrack ( size_t itrack ) - { - Track* track = _S.getTrack(itrack); - size_t begin = _S.getBegin(itrack); - size_t end = _S.getEnd (itrack); - Net* ownerNet = _segment->getNet(); - Interval toFree (_segment->getCanonicalInterval()); - Net* ripupNet = NULL; - set canonicals; - bool success = true; - - ltrace(200) << "Manipulator::forceToTrack() - " << toFree << endl; - - for ( size_t i = begin ; success && (i < end) ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( !toFree.intersect(segment2->getCanonicalInterval()) ) continue; - if ( segment2->isFixed() ) { - success = false; - continue; - } - //if ( (segment2->getNet() != ripupNet ) - // && !toFree.intersect(segment2->getCanonicalInterval()) ) continue; - ripupNet = segment2->getNet(); - - DataNegociate* data2 = segment2->getDataNegociate(); - if ( !data2 ) { - ltrace(200) << "No DataNegociate, ignoring." << endl; - continue; - } - - ltrace(200) << "- Forced ripup " << segment2 << endl; - if ( not (success=Manipulator(segment2,_S).ripup(toFree,SegmentAction::OtherRipup)) ) - continue; - - canonicals.clear (); - forEach ( TrackElement*, isegment3 - , segment2->getCollapsedPerpandiculars().getSubSet(TrackElements_UniqCanonical(canonicals)) ) { - DataNegociate* data3 = isegment3->getDataNegociate(); - if ( !data3 ) continue; - - RoutingEvent* event3 = data3->getRoutingEvent(); - if ( !event3 ) continue; - - if ( Manipulator(*isegment3,_S).canRipup() ) - _S.addAction ( *isegment3, SegmentAction::OtherRipup ); - } - } - - if ( success ) { - _S.setState ( State::OtherRipup ); - _S.addAction ( _segment, SegmentAction::SelfInsert ); - _segment->setAxis ( _S.getCost(itrack).getTrack()->getAxis() ); - } - - return success; - } - - - bool Manipulator::shrinkToTrack ( size_t i, unsigned int flags, DbU::Unit leftAxisHint, DbU::Unit rightAxisHint ) - { - Track* track = _S.getTrack(i); - size_t begin = _S.getBegin(i); - size_t end = _S.getEnd (i); - Net* ownerNet = _segment->getNet(); - set canonicals; - bool success = true; - DbU::Unit leftExtend = _segment->getSourceU() + Session::getExtensionCap(); - DbU::Unit rightExtend = _segment->getSourceU() - Session::getExtensionCap(); - - ltrace(200) << "Manipulator::shrinkToTrack()" << endl; - - if ( _segment->isLocal() ) return false; - //Interval shrunkFree ( _segment->getSourceConstraints().getVMax() - // , _segment->getTargetConstraints().getVMin() ); - Interval shrunkFree = _segment->base()->getMinSpanU(); - - ltrace(200) << "* " << shrunkFree << endl; - - for ( size_t i = begin ; success && (i < end) ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( segment2->isFixed() ) { success = false; continue; } - if ( !shrunkFree.intersect(segment2->getCanonicalInterval()) ) continue; - - success = false; - } - - if ( success ) { - set perpandiculars; - set::iterator iperpand; - - DbU::Unit axisHint; - if ( not (flags & LeftAxisHint ) ) leftAxisHint = shrunkFree.getCenter(); - if ( not (flags & RightAxisHint) ) rightAxisHint = shrunkFree.getCenter(); - - _segment->getPerpandicularsBound ( perpandiculars ); - for ( iperpand = perpandiculars.begin() ; iperpand != perpandiculars.end() ; iperpand++ ) { - DataNegociate* data2 = (*iperpand)->getDataNegociate(); - if ( data2 ) { - ltrace(200) << "| perpandicular bound:" << *iperpand << endl; - success = Manipulator(*iperpand,_S).ripup ( track->getAxis(), SegmentAction::SelfRipupAndAxisHint ); - if ( success ) { - if ( (*iperpand)->getAxis() == leftExtend ) axisHint = leftAxisHint; - else if ( (*iperpand)->getAxis() == rightExtend ) axisHint = rightAxisHint; - else { - cinfo << "[INFO] Bound Axis is neither left nor right\n " - << (*iperpand) << endl; - axisHint = shrunkFree.getCenter(); - } - - _S.getActions()[_S.getActions().size()-1].setAxisHint ( axisHint ); - } - } - } - - _S.addAction ( _segment, SegmentAction::SelfInsert ); - _S.setState ( State::OtherRipup ); - - ltrace(200) << "Successful shrinkToTrack." << endl; - return true; - } - - return false; - } - - - bool Manipulator::forceOverLocals () - { - ltrace(200) << "Manipulator::forceOverLocals()" << endl; - ltracein(200); - - vector& costs = _S.getCosts(); - size_t itrack = 0; - for ( ; itrackgetNet(); - Interval toFree (_segment->getCanonicalInterval()); - - for ( size_t i = begin ; success and (i < end) ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; - if ( segment2->isFixed() ) { - success = false; - continue; - } - - DataNegociate* data2 = segment2->getDataNegociate(); - if ( not data2 ) { - ltrace(200) << "No DataNegociate, ignoring." << endl; - success = false; - continue; - } - - ltrace(200) << "- Forced ripup " << segment2 << endl; - if ( not (success=Manipulator(segment2,_S).ripup(toFree,SegmentAction::OtherRipup)) ) { - continue; - } - } - - if ( success ) { - _S.setState ( State::OtherRipup ); - _S.addAction ( _segment, SegmentAction::SelfInsert ); - _segment->setAxis ( _S.getCost(itrack).getTrack()->getAxis() ); - break; - } - } - - ltraceout(200); - return (itrack < costs.size()); - } - - - bool Manipulator::desalignate () - { - ltrace(200) << "Manipulator::desalignate() " << _segment << endl; - - if ( _segment->isFixed () ) return false; - if ( !_segment->canDesalignate() ) return false; - - _segment->desalignate (); - return true; - } - - - bool Manipulator::slacken () - { - ltrace(200) << "Manipulator::slacken() " << _segment << endl; - - if ( _segment->isFixed () ) return false; - if ( not _segment->canSlacken() ) return false; - - _segment->slacken (); - return true; - } - - - bool Manipulator::goOutsideGCell () - { - ltrace(200) << "Manipulator::goOutsideGCell() " << _segment << endl; - return false; - -#if 0 - if ( _segment->isFixed () ) return false; - if ( !_segment->canGoOutsideGCell() ) return false; - - GCell* sourceGCell = _segment->getGCell(); - GCell* leftGCell = NULL; - GCell* rightGCell = NULL; - Interval uside; - bool goLeft = false; - bool goRight = false; - - if ( _segment->isHorizontal() ) { - uside = sourceGCell->getUSide ( Constant::Vertical, false ); - leftGCell = sourceGCell->getDown(); - rightGCell = sourceGCell->getUp (); - } else { - uside = sourceGCell->getUSide ( Constant::Horizontal, false ); - leftGCell = sourceGCell->getLeft (); - rightGCell = sourceGCell->getRight(); - } - - Interval constraints; - _segment->base()->getConstraints ( constraints ); - - // Ugly: Must use the right compensator for VMax. - if ( rightGCell and (uside.getVMax() <= constraints.getVMax())+DbU::lambda(1.0) ) goRight = true; - if ( leftGCell and (uside.getVMin() >= constraints.getVMin()) ) goLeft = true; - - if ( goRight and goLeft ) { - DbU::Unit distanceToLeft = _segment->getAxis() - uside.getVMin(); - DbU::Unit distanceToRight = uside.getVMax() - _segment->getAxis(); - if ( distanceToLeft < distanceToRight ) goRight = false; - else goLeft = false; - } - - _segment->moveAside ( goLeft ); - - return true; -#endif - } - - - bool Manipulator::ripple () - { - ltrace(200) << "Manipulator::ripple() from " << _segment << endl; - - //if ( not _segment->canRipple() ) return false; - if ( not _segment->isLocal() ) return false; - - Net* net = _segment->getNet(); - Interval uside = _segment->base()->getAutoSource()->getGCell()->getUSide ( Constant::perpandicular(_segment->getDirection())/*, false*/ ); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); - - ltracein(200); - forEach ( Track*, itrack, Tracks_Range::get(plane,uside)) { - size_t begin; - size_t end; - - itrack->getOverlapBounds ( _segment->getCanonicalInterval(), begin, end ); - for ( ; begin < end ; begin++ ) { - TrackElement* other = itrack->getSegment(begin); - ltrace(200) << "| " << other << endl; - - if ( other->getNet() == net ) continue; - if ( not other->canRipple() ) continue; - - DataNegociate* otherData = other->getDataNegociate(); - if ( not otherData ) continue; - - DbU::Unit shiftedAxisHint; - RoutingEvent* otherEvent = otherData->getRoutingEvent(); - - if ( other->getAxis() < _segment->getAxis() ) { - // Ugly: routing pitch. - shiftedAxisHint = otherEvent->getAxisHint() - DbU::lambda(5.0); - if ( shiftedAxisHint < uside.getVMin() ) - shiftedAxisHint = uside.getVMin(); - } else { - // Ugly: routing pitch. - shiftedAxisHint = otherEvent->getAxisHint() + DbU::lambda(5.0); - if ( shiftedAxisHint > uside.getVMax() ) - shiftedAxisHint = uside.getVMax(); - } - - otherEvent->setAxisHint ( shiftedAxisHint ); - _S.addAction ( other, SegmentAction::OtherRipup ); - } - } - ltraceout(200); - - return true; - } - - - bool Manipulator::pivotUp () - { - ltrace(200) << "Manipulator::pivotUp() " << _segment << endl; - - if ( _segment->isFixed () ) return false; - if ( _segment->isStrap () ) return false; - - float reserve = (_segment->isLocal()) ? 0.5 : 1.0; - if ( not _segment->canMoveUp(reserve) ) return false; - - _segment->moveUp (); - return true; - } - - - bool Manipulator::pivotDown () - { - ltrace(200) << "Manipulator::pivotDown() " << _segment << endl; - - if ( _segment->isFixed () ) return false; - if ( _segment->isStrap () ) return false; - if ( not _segment->canPivotDown(2.0) ) return false; - - _segment->moveDown (); - return true; - } - - - bool Manipulator::moveUp ( unsigned int flags ) - { - ltrace(200) << "Manipulator::moveUp() " << _segment << endl; - - unsigned int kflags = Katabatic::AutoSegment::Propagate|Katabatic::AutoSegment::PerpandicularFrag; - kflags |= (flags & AllowLocalMoveUp ) ? Katabatic::AutoSegment::AllowLocal : 0; - kflags |= (flags & AllowTerminalMoveUp) ? Katabatic::AutoSegment::AllowTerminal : 0; - - if ( _segment->isFixed() ) return false; - if ( not (flags & AllowLocalMoveUp) ) { - if ( _segment->isLocal() ) { - if ( not _segment->canPivotUp(0.5) ) return false; - } else { - if ( _segment->getLength() < DbU::lambda(100.0) ) { - if ( not (flags & AllowShortPivotUp) ) return false; - if ( not _segment->canPivotUp(1.0) ) return false; - } - if ( not _segment->canMoveUp(0.5,kflags) ) return false; // MARK 1 - } - } else { - if ( not _segment->canMoveUp(0.5,kflags) ) return false; // MARK 1 - } - -#if DISABLED - ltrace(200) << "| Repack Tracks: " << endl; - - Interval constraints; - Interval overlap = _segment->getCanonicalInterval(); - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); - size_t begin; - size_t end; - TrackElement* other; - - constraints = _segment->getGCell()->getUSide(Constant::perpandicular(_segment->getDirection()),true); - forEach ( Track*, itrack, Tracks_Range::get(plane,constraints)) { - itrack->getOverlapBounds ( overlap, begin, end ); - for ( ; (begin < end) ; begin++ ) { - other = itrack->getSegment(begin); - if ( other->isGlobal() ) continue; - - ltrace(200) << " | Ripup for repack: " << begin << " " << other << endl; - _S.addAction ( other, SegmentAction::OtherRipup ); - } - } -#endif - return _segment->moveUp ( kflags ); - } - - - bool Manipulator::makeDogLeg () - { - ltrace(200) << "Manipulator::makeDogLeg() " << _segment << endl; - - if ( _segment->isFixed() ) return false; - if ( !_segment->isLocal() ) return false; - - if ( _S.getCosts().size() ) { - Track* track = _S.getTrack(0); - size_t begin = _S.getBegin(0); - size_t end = _S.getEnd (0); - Net* ownerNet = _segment->getNet(); - Interval toFree (_segment->getCanonicalInterval()); - Interval overlap; - - for ( size_t i = begin ; i < end ; i++ ) { - TrackElement* segment2 = track->getSegment(i); - - ltrace(200) << "* Looking // " << segment2 << endl; - - if ( segment2->getNet() == ownerNet ) continue; - if ( !toFree.intersect(segment2->getCanonicalInterval()) ) continue; - - if ( overlap.isEmpty() ) - overlap = segment2->getCanonicalInterval(); - else - overlap.merge ( segment2->getCanonicalInterval() ); - } - - if ( !overlap.isEmpty() && makeDogLeg(overlap) ) return true; - } - - if ( !_segment->canDogLeg() ) return false; - _segment->makeDogLeg (); - - return true; - } - - - bool Manipulator::makeDogLeg ( Interval overlap ) - { - ltrace(200) << "Manipulator::makeDogLeg(Interval) " << _segment << endl; - ltrace(200) << overlap << endl; - - //if ( !_segment->isLocal() || !_segment->canDogLeg() ) return false; - - if ( _segment->isFixed () ) return false; - if ( !_segment->canDogLeg(overlap) ) return false; - - bool pushLeft; - bool isTerminal = _segment->isTerminal(); - TrackElement* dogleg = _segment->makeDogLeg(overlap,pushLeft); - if ( dogleg ) { - ltrace(200) << "Manipulator::makeDogLeg(Interval) - Push dogleg to the " - << ((pushLeft)?"left":"right") << endl; - if ( isTerminal ) { - Katabatic::AutoContact* contact = (pushLeft) ? _segment->base()->getAutoSource() - : _segment->base()->getAutoTarget(); - DbU::Unit axisHint = (_segment->isHorizontal()) ? contact->getX() : contact->getY(); - RoutingEvent* event = dogleg->getDataNegociate()->getRoutingEvent(); - if ( event ) { - event->setAxisHint ( axisHint ); - event->setForcedToHint ( true ); - ltrace(200) << "Forced to axis hint @" << DbU::getValueString(axisHint) << endl; - } - } - return true; - } - - return false; - } - - - bool Manipulator::makeDogLeg ( DbU::Unit position ) - { - ltrace(200) << "Manipulator::makeDogLeg(position) " << _segment << endl; - ltrace(200) << "Breaking position: " << DbU::getValueString(position) << endl; - - if ( _segment->isFixed() ) return false; - - Katabatic::GCellVector gcells; - _segment->getGCells ( gcells ); - - size_t igcell = 0; - for ( ; igcellgetUSide(_segment->getDirection()/*,true*/).contains(position) ) - break; - } - if ( igcell == gcells.size() ) return false; - if ( not _segment->canDogLegAt(gcells[igcell]) ) return false; - - TrackElement* dogleg = _segment->makeDogLeg(gcells[igcell]); - return ( dogleg != NULL ); - } - - - bool Manipulator::minimize () - { - ltrace(200) << "Manipulator::minimize() " << _segment << endl; - - if ( _segment->isFixed() ) return false; - if ( not _event->canMinimize() ) return false; - - DbU::Unit minSpan = DbU::Max; - DbU::Unit maxSpan = DbU::Min; - Interval punctualSpan ( false ); - - if ( _segment->base()->getAutoSource()->getAnchor() ) { - ltrace(200) << " | " << _segment->base()->getAutoSource() << endl; - Interval constraints ( _segment->base()->getAutoSource()->getUConstraints - (Constant::perpandicular(_segment->getDirection())) ); - ltrace(200) << " | Constraints: " << constraints << endl; - - minSpan = min ( minSpan, constraints.getVMax() ); - maxSpan = max ( maxSpan, constraints.getVMin() ); - punctualSpan.intersection ( constraints ); - } - - if ( _segment->base()->getAutoTarget()->getAnchor() ) { - ltrace(200) << " | " << _segment->base()->getAutoTarget() << endl; - Interval constraints ( _segment->base()->getAutoTarget()->getUConstraints - (Constant::perpandicular(_segment->getDirection())) ); - ltrace(200) << " | Constraints: " << constraints << endl; - - minSpan = min ( minSpan, constraints.getVMax() ); - maxSpan = max ( maxSpan, constraints.getVMin() ); - punctualSpan.intersection ( constraints ); - } - - const vector& perpandiculars = _event->getPerpandiculars(); - for ( size_t i=0 ; igetDataNegociate(); - if ( not data2 ) continue; - - ltrace(200) << " | " << perpandiculars[i] << endl; - - RoutingEvent* event2 = data2->getRoutingEvent(); - if ( not event2 ) continue; - - ltrace(200) << " | Constraints: " << event2->getConstraints() << endl; - - minSpan = min ( minSpan, event2->getConstraints().getVMax() ); - maxSpan = max ( maxSpan, event2->getConstraints().getVMin() ); - punctualSpan.intersection ( event2->getConstraints() ); - } - if ( minSpan > maxSpan ) swap ( minSpan, maxSpan ); - - ltrace(200) << "punctualSpan: " << punctualSpan - << " min/max span: [" << DbU::getValueString(minSpan) - << ":" << DbU::getValueString(maxSpan) << "]" - << " long: [" << minSpan - << ":" << maxSpan << "]" << endl; - - vector holes; - for ( size_t itrack=0 ; itrack<_S.getCosts().size() ; itrack++ ) { - size_t begin = _S.getBegin(itrack); - size_t end = _S.getEnd (itrack); - Track* track = _S.getTrack(itrack); - - if ( end < track->getSize() ) end++; - - ltrace(200) << "Looking for holes in " << _S.getCost(itrack) << endl; - - TrackElement* otherPrevious = NULL; - // ToDo: Manage disjoint but subsequent segment of a Net. - // (currently, that hole will not be found). - for ( ; begin < end ; begin++ ) { - TrackElement* otherSegment = track->getSegment(begin); - if ( otherSegment->getNet() == _segment->getNet() ) continue; - if ( !otherPrevious ) { - holes.push_back ( Interval(track->getMin() - ,otherSegment->getSourceU()) ); - ltrace(200) << "| First hole: " << holes.back() << " " << otherSegment << endl; - } else { - if ( otherSegment->getNet() == otherPrevious->getNet() ) continue; - - holes.push_back ( Interval(otherPrevious->getTargetU() - ,otherSegment ->getSourceU()) ); - ltrace(200) << "| Found hole: " << holes.back() - << " " << otherPrevious << " <-> " << " " << otherSegment << endl; - } - otherPrevious = otherSegment; - } - } - - if ( holes.empty() ) { - ltrace(200) << "No holes found to minimize into." << endl; - return false; - } - - Interval currentSpan = _segment->getCanonicalInterval(); - Interval biggestHole; - for ( size_t i=0 ; i currentSpan.getIntersection(biggestHole).getSize() ) - biggestHole = holes[i]; - } - - DbU::Unit axisHint = 0; - if ( not punctualSpan.isEmpty() ) { - bool success = false; - - if ( biggestHole.intersect(punctualSpan) ) { - ltrace(200) << "Go as punctual into biggest hole: " << biggestHole << endl; - axisHint = biggestHole.intersection(punctualSpan).getCenter(); - success = true; - } else { - for ( size_t i=0 ; igetDataNegociate(); - if ( !data2 ) continue; - - ltrace(200) << " | " << perpandiculars[i] << endl; - - RoutingEvent* event2 = data2->getRoutingEvent(); - if ( !event2 ) continue; - - _S.addAction ( perpandiculars[i], SegmentAction::SelfRipupAndAxisHint, axisHint ); - } - - _event->setMinimized (); - - return true; - } - - - bool Manipulator::relax ( size_t i ) - { - ltrace(200) << "Manipulator::relax() " << _segment << endl; - - if ( /* _segment->base()->isGlobal() - ||*/ _segment->isFixed() - || ( _segment->getDogLegLevel() > 0 ) - || ( _segment->getLength() < DbU::lambda(10.0) ) - || not _segment->canDogLegAt(_segment->base()->getAutoSource()->getGCell()) ) - return false; - - TrackElement* perpandicular - = _segment->makeDogLeg ( Session::lookup(_segment->base()->getAutoSource()->getGCell()) ); - - if ( perpandicular ) { - RoutingEvent* event = perpandicular->getDataNegociate()->getRoutingEvent(); - if ( event ) { - TrackCost& cost = _S.getCost(i); - Interval optimal = cost.getInterval(); - event->setOptimalAxis ( optimal.inflate( - Session::getExtensionCap() ) ); - } else { - cerr << Bug("New dog leg without active RoutingEvent.\n " - "%s",getString(perpandicular).c_str()) << endl; - } - } - - return true; - } - - - void Manipulator::reprocessPerpandiculars () - { - if ( _event->getAxisHistory() == _event->getAxisHint() ) return; - - bool moveLeft = (_event->getAxisHistory() > _event->getAxisHint()); - - const vector& perpandiculars = _event->getPerpandiculars(); - for ( size_t iperpand=0 ; iperpandgetDataNegociate(); - - if ( perpandicular->isFixed() ) continue; - if ( not data ) continue; - if ( not perpandicular->getTrack() ) continue; - if ( not Manipulator(perpandicular,_S).canRipup() - or (data->getState() >= DataNegociate::MaximumSlack) ) continue; - - // Ugly: ExtensionCap usage. - if ( moveLeft ) { - if ( perpandicular->getTargetU()-Session::getExtensionCap() == _event->getAxisHistory() ) - _S.addAction ( perpandicular, SegmentAction::OtherPacking ); - } else { - if ( perpandicular->getSourceU()+Session::getExtensionCap() == _event->getAxisHistory() ) - _S.addAction ( perpandicular, SegmentAction::OtherPacking ); - } - } - } - - - void Manipulator::repackPerpandiculars ( bool ripInserted ) - { - ltrace(200) << "Manipulator::repackPerpandiculars()" << endl; - - const vector& perpandiculars = _event->getPerpandiculars(); - for ( size_t iperpand=0 ; iperpandgetDataNegociate(); - - if ( perpandicular->isFixed () ) continue; - if ( perpandicular->isGlobal() ) continue; - if ( not data ) continue; - - if ( RoutingEvent::getStage() == RoutingEvent::Repair ) { - if (data->getTrack() and not ripInserted) continue; - - data->setState ( DataNegociate::Repair ); - if (data->getStateCount() > 1) - data->resetStateCount(); - } - _S.addAction ( perpandicular, SegmentAction::SelfRipupPerpand ); - } - _S.addAction ( _segment, SegmentAction::SelfRipup|SegmentAction::EventLevel4 ); - } - - -// ------------------------------------------------------------------- -// Local Functions. - - -} // End of anonymous namespace. +#include +#include +#include +#include +#include "vlsisapd/configuration/Configuration.h" +#include "hurricane/Bug.h" +#include "hurricane/DebugSession.h" +#include "hurricane/Breakpoint.h" +#include "hurricane/Net.h" +#include "hurricane/Layer.h" +#include "katabatic/AutoContact.h" +#include "kite/DataNegociate.h" +#include "kite/TrackSegment.h" +#include "kite/Track.h" +#include "kite/Tracks.h" +#include "kite/RoutingPlane.h" +#include "kite/RoutingEvent.h" +#include "kite/RoutingEventHistory.h" +#include "kite/RoutingEventQueue.h" +#include "kite/RoutingEventLoop.h" +#include "kite/NegociateWindow.h" +#include "kite/Session.h" +#include "kite/KiteEngine.h" +#include "kite/Manipulator.h" +#include "kite/SegmentFsm.h" namespace Kite { - using std::cerr; using std::endl; using std::setw; using std::min; + using std::ostringstream; using Hurricane::tab; using Hurricane::inltrace; using Hurricane::ltracein; using Hurricane::ltraceout; using Hurricane::DebugSession; using Hurricane::Bug; + using Hurricane::Error; using Hurricane::ForEachIterator; using Hurricane::Net; using Hurricane::Layer; using Katabatic::GCell; + using Katabatic::KbPropagate; // ------------------------------------------------------------------- @@ -3514,35 +69,8 @@ namespace Kite { bool RoutingEvent::Compare::operator() ( const RoutingEvent* lhs, const RoutingEvent* rhs ) const { - //if ( !lhs->isValid() ) const_cast(lhs)->revalidate (); - //if ( !rhs->isValid() ) const_cast(rhs)->revalidate (); - - //unsigned int lhsDepth = Session::getRoutingGauge()->getLayerDepth(lhs->getSegment()->getLayer()); - //unsigned int rhsDepth = Session::getRoutingGauge()->getLayerDepth(rhs->getSegment()->getLayer()); - - //if ( lhsDepth > rhsDepth ) return true; - //if ( lhsDepth < rhsDepth ) return false; - - if ( lhs == rhs ) return false; - - return RoutingEvent::Key::Compare() ( lhs->getKey(), rhs->getKey() ); - - // if ( lhs->getEventLevel() < rhs->getEventLevel() ) return true; - // if ( lhs->getEventLevel() > rhs->getEventLevel() ) return false; - - // // Uses static ordering. - // if ( lhs->getTracksNb() < rhs->getTracksNb() ) return false; - // if ( lhs->getTracksNb() > rhs->getTracksNb() ) return true; - - // if ( lhs->getPriority() < rhs->getPriority() ) return false; - // if ( lhs->getPriority() > rhs->getPriority() ) return true; - - // //return false; - // // For debugging purpose only: ensure a reproductible sort. Could be removed. - // //bool segmentCompare = TrackElement::CompareByPosition() ( lhs->getSegment(), rhs->getSegment() ); - - // //return (segmentCompare or ((void*)lhs < (void*)rhs)); - // return ((void*)lhs < (void*)rhs); + if (lhs == rhs) return false; + return RoutingEvent::Key::Compare()( lhs->getKey(), rhs->getKey() ); } @@ -3552,33 +80,29 @@ namespace Kite { bool RoutingEvent::Key::Compare::operator() ( const RoutingEvent::Key& lhs, const RoutingEvent::Key& rhs ) const { - //if ( lhs._ring xor rhs._ring ) return lhs._ring; + if (lhs._eventLevel > rhs._eventLevel) return false; + if (lhs._eventLevel < rhs._eventLevel) return true; - if ( lhs._eventLevel > rhs._eventLevel ) return false; - if ( lhs._eventLevel < rhs._eventLevel ) return true; + // Process all M2 (terminal access) before any others. + if ((lhs._layerDepth == 1) and (rhs._layerDepth != 1)) return false; + if ((lhs._layerDepth != 1) and (rhs._layerDepth == 1)) return true; - if ( lhs._canRipple xor rhs._canRipple ) return rhs._canRipple; - //if ( lhs._slackenStrap xor rhs._slackenStrap ) return lhs._slackenStrap; + if (lhs._priority > rhs._priority) return false; + if (lhs._priority < rhs._priority) return true; - // Uses static ordering. - //if ( lhs._tracksNb > rhs._tracksNb ) return true; - //if ( lhs._tracksNb < rhs._tracksNb ) return false; + if (lhs._length > rhs._length) return false; + if (lhs._length < rhs._length) return true; - if ( lhs._priority > rhs._priority ) return false; - if ( lhs._priority < rhs._priority ) return true; + if ((lhs._segFlags & KbHorizontal) xor (rhs._segFlags & KbHorizontal)) + return (rhs._segFlags & KbHorizontal); - if ( lhs._length > rhs._length ) return false; - if ( lhs._length < rhs._length ) return true; + if (lhs._axis > rhs._axis) return true; + if (lhs._axis < rhs._axis) return false; - if ( lhs._isHorizontal xor rhs._isHorizontal ) return rhs._isHorizontal; + if (lhs._sourceU > rhs._sourceU) return true; + if (lhs._sourceU < rhs._sourceU) return false; - if ( lhs._axis > rhs._axis ) return true; - if ( lhs._axis < rhs._axis ) return false; - - if ( lhs._sourceU > rhs._sourceU ) return true; - if ( lhs._sourceU < rhs._sourceU ) return false; - - if ( lhs._net->getName() != rhs._net->getName() ) + if (lhs._net->getName() != rhs._net->getName()) return lhs._net->getName() < rhs._net->getName(); return lhs._id < rhs._id; @@ -3586,12 +110,11 @@ namespace Kite { RoutingEvent::Key::Key ( const RoutingEvent* event ) - : _slackenStrap(event->getSegment()->isSlackenStrap()) - , _isHorizontal(event->getSegment()->isHorizontal()) - , _canRipple (event->getSegment()->canRipple()) - , _tracksNb (event->getTracksNb()) + : _tracksNb (event->getTracksNb()) , _priority (event->getPriority()) , _eventLevel (event->getEventLevel()) + , _segFlags (event->getSegment()->base()->getFlags()) + , _layerDepth (Session::getRoutingGauge()->getLayerDepth(event->getSegment()->getLayer())) , _length (event->getSegment()->getLength()) , _axis (event->getSegment()->getAxis()) , _sourceU (event->getSegment()->getSourceU()) @@ -3602,13 +125,13 @@ namespace Kite { void RoutingEvent::Key::update ( const RoutingEvent* event ) { - if ( !event ) return; + if (not event) return; - _slackenStrap = event->getSegment()->isSlackenStrap(); - _canRipple = event->getSegment()->canRipple(); _tracksNb = event->getTracksNb(); _priority = event->getPriority(); _eventLevel = event->getEventLevel(); + _segFlags = event->getSegment()->base()->getFlags(); + _layerDepth = Session::getRoutingGauge()->getLayerDepth(event->getSegment()->getLayer()); _length = event->getSegment()->getLength(); _axis = event->getSegment()->getAxis(); _sourceU = event->getSegment()->getSourceU(); @@ -3620,6 +143,7 @@ namespace Kite { // Class : "RoutingEvent". + unsigned int RoutingEvent::_idCounter = 0; unsigned int RoutingEvent::_stage = RoutingEvent::Negociate; size_t RoutingEvent::_allocateds = 0; size_t RoutingEvent::_processeds = 0; @@ -3638,21 +162,17 @@ namespace Kite { : _cloned (false) , _processed (false) , _disabled (false) - , _valid (false) - , _validConstraints (false) - , _validPerpandiculars (false) , _canHandleConstraints(false) , _minimized (false) , _forceToHint (false) , _ripedByLocal (false) + , _id (_idCounter++) , _segment (segment) + , _dataNegociate (segment->getDataNegociate()) , _axisHistory (segment->getAxis()) , _axisHint (segment->getAxis()) - , _optimalAxis (false) , _constraints () , _optimal () - , _perpandicular (false) - , _shearGCell (NULL) , _tracksNb (0) , _tracksFree (0) , _insertState (0) @@ -3660,26 +180,22 @@ namespace Kite { , _rippleState (0) , _eventLevel (0) , _priority (0.0) - , _perpandiculars () , _key (this) { + if (_idCounter == std::numeric_limits::max()) { + throw Error( "RoutingEvent::RoutingEvent(): Identifier counter has reached it's limit (%d bits)." + , std::numeric_limits::digits ); + } + DataNegociate* data = _segment->getDataNegociate(); - if ( data ) - data->setRoutingEvent ( this ); + if (data) data->setRoutingEvent( this ); - // Interval optimal; - // _segment->base()->getOptimal ( optimal ); - // _axisHint = optimal.getCenter(); - - invalidate ( true ); - - ltrace(180) << "create: " << (void*)this << ":" << this << endl; + ltrace(180) << "create: " << this << endl; ltrace(200) << "Initial setAxisHint @" << DbU::getValueString(getAxisHint()) << endl; - if ( _segment->getTrack() ) { - cerr << Bug("RoutingEvent::create() - TrackElement is already inserted in a Track." - "\n %s." - ,getString(_segment).c_str() + if (_segment->getTrack()) { + cerr << Bug( "RoutingEvent::create() - TrackElement is already inserted in a Track." + "\n %s.", getString(_segment).c_str() ) << endl; } } @@ -3687,6 +203,12 @@ namespace Kite { RoutingEvent* RoutingEvent::create ( TrackElement* segment, unsigned int mode ) { + // if (not dynamic_cast(segment)) { + // cerr << Error( "RoutingEvent::create() Can only create event from TrackSegment:\n" + // " %s", getString(segment).c_str() + // ) << endl; + // } + RoutingEvent* event = new RoutingEvent ( segment, mode ); ++_allocateds; @@ -3706,8 +228,8 @@ namespace Kite { clone->_disabled = false; clone->_eventLevel = 0; - ltrace(200) << "RoutingEvent::clone() " << (void*)clone << ":" << clone - << " (from: " << (void*)this << ")" << endl; + ltrace(200) << "RoutingEvent::clone() " << clone + << " (from: " << ")" << endl; return clone; } @@ -3715,18 +237,18 @@ namespace Kite { RoutingEvent::~RoutingEvent () { - ltrace(180) << "~RoutingEvent() " << (void*)this << endl; + ltrace(180) << "~RoutingEvent() " << endl; DataNegociate* data = _segment->getDataNegociate(); - if ( data and ( data->getRoutingEvent() == this ) ) - data->setRoutingEvent ( NULL ); + if ( data and (data->getRoutingEvent() == this) ) + data->setRoutingEvent( NULL ); } void RoutingEvent::destroy () { - ltrace(180) << "RoutingEvent::destroy() " << (void*)this << ":" << this << endl; - if ( _allocateds > 0 ) --_allocateds; + ltrace(180) << "RoutingEvent::destroy() " << this << endl; + if (_allocateds > 0) --_allocateds; delete this; } @@ -3737,37 +259,23 @@ namespace Kite { void RoutingEvent::setMode ( unsigned int mode ) - { - _mode = mode; - // if ( _mode == Repair ) { - // DataNegociate* data = _segment->getDataNegociate(); - // if ( data ) data->setState ( DataNegociate::Repair, true ); - // } - } + { _mode = mode; } unsigned int RoutingEvent::getState () const { DataNegociate* data = _segment->getDataNegociate(); - if ( not data ) return 0; - - return data->getState(); + return (data) ? data->getState() : 0; } void RoutingEvent::setState ( unsigned int state ) { DataNegociate* data = _segment->getDataNegociate(); - if ( not data ) return; - - data->setState ( state ); + if (data) data->setState( state ); } - void RoutingEvent::setEventLevel ( unsigned int level ) - { _eventLevel = level; } - - void RoutingEvent::setAxisHint ( DbU::Unit axis ) { ltrace(200) << "setAxisHint @" << DbU::getValueString(axis) << " " << _segment << endl; @@ -3775,27 +283,26 @@ namespace Kite { } - void RoutingEvent::cacheAxisHint () + void RoutingEvent::setAxisHintFromParent () { - if ( getStage() == Repair ) return; + if (getStage() == Repair) return; TrackElement* parent = _segment->getParent(); - if ( not parent ) return; + if (not parent) return; RoutingEvent* parentEvent = parent->getDataNegociate()->getRoutingEvent(); - if ( parentEvent == this ) { - cbug << Error("RoutingEvent::getAxisHint(): Parentage loop between\n" - " this :%p:%s\n parent:%p:%s" - ,_segment->base(),getString(_segment->base()).c_str() - ,parent ->base(),getString(parent ->base()).c_str() + if (parentEvent == this) { + cbug << Error( "RoutingEvent::setAxisHintFromParent(): Parentage loop between\n" + " this :%p:%s\n parent:%p:%s" + , _segment->base(),getString(_segment->base()).c_str() + , parent ->base(),getString(parent ->base()).c_str() ) << endl; _axisHint = parent->getAxis(); return; } - //_axisHint = (parentEvent) ? parentEvent->getAxisHint() : parent->getAxis (); - _axisHint = parent->getAxis (); + _axisHint = parent->getAxis(); - ltrace(200) << "cacheAxisHint() - hint:" << DbU::getValueString(_axisHint) + ltrace(200) << "setAxisHintFromParent() - hint:" << DbU::getValueString(_axisHint) << " axis:" << DbU::getValueString(parent->getAxis()) << " parent:" << parent << endl; return; } @@ -3804,41 +311,40 @@ namespace Kite { RoutingEvent* RoutingEvent::reschedule ( RoutingEventQueue& queue, unsigned int eventLevel ) { RoutingEvent* active = _segment->getDataNegociate()->getRoutingEvent(); - if ( active != this ) - return active->reschedule ( queue, eventLevel ); + if (active != this) return active->reschedule( queue, eventLevel ); RoutingEvent* fork = NULL; if ( (getStage() != Repair) and isUnimplemented() ) { ltrace(200) << "Reschedule: cancelled (Unimplemented) " - << (void*)this << " -> " << (void*)fork << ":" << fork << endl; + << " -> " << fork << endl; return NULL; } - if ( not isProcessed() ) { + if (not isProcessed()) { fork = this; ltrace(200) << "Reschedule/Self: " - << (void*)this << " -> " - << (void*)fork << ":" << eventLevel << ":" << fork << endl; + << " -> " + << eventLevel << ":" << fork << endl; } else { fork = clone(); fork->_processed = false; - _segment->getDataNegociate()->setRoutingEvent ( fork ); + _segment->getDataNegociate()->setRoutingEvent( fork ); ltrace(200) << "Reschedule/Fork: " - << (void*)this << " -> " << (void*)fork << ":" << fork << endl; + << " -> " << fork << endl; } - if ( fork->_eventLevel < eventLevel ) + if (fork->_eventLevel < eventLevel) fork->_eventLevel = eventLevel; - if ( getStage() == Repair ) { - fork->setMode ( RoutingEvent::Repair ); - _segment->getDataNegociate()->setState ( DataNegociate::Repair ); + if (getStage() == Repair) { + fork->setMode( RoutingEvent::Repair ); + _segment->getDataNegociate()->setState( DataNegociate::Repair ); } - queue.repush ( fork ); + queue.repush( fork ); return fork; } @@ -3846,12 +352,9 @@ namespace Kite { void RoutingEvent::setSegment ( TrackElement* segment ) { - if ( _segment ) - _segment->getDataNegociate()->setRoutingEvent ( NULL ); + if (_segment) _segment->getDataNegociate()->setRoutingEvent( NULL ); _segment = segment; - _segment->getDataNegociate()->setRoutingEvent ( this ); - - invalidate ( true, true ); + _segment->getDataNegociate()->setRoutingEvent( this ); } @@ -3860,30 +363,14 @@ namespace Kite { , RoutingEventLoop& loop ) { - loop.update ( _segment->getId() ); - if ( loop.isLooping() ) { - if ( ltracelevel() > 200 ) { - - cbug << Error("Loop detected: %s.\n Enabling trace (level:200)" - ,_getString().c_str()) << endl; - //ltracelevel ( 200 ); - //Cfg::getParamInt("misc.traceLevel")->setInt ( 200, Cfg::Parameter::CommandLine ); - - //const vector& elements = loop.getElements(); - //for ( size_t i=0 ; igetId() ); + if (loop.isLooping()) { + loop.erase( _segment->getId() ); + setState( DataNegociate::Unimplemented ); #if LOOP_DEBUG - if ( loop.getMaxCount() > 500 ) { + if (loop.getMaxCount() > 500) { cbug << Error("Loop detected, removing event %s.",_getString().c_str()) << endl; - //Cfg::getParamInt("misc.traceLevel")->setInt ( 1000, Cfg::Parameter::CommandLine ); - //ltracelevel ( 1000 ); - - loop.erase ( _segment->getId() ); - setState ( DataNegociate::Unimplemented ); ostringstream message; message << "Kite has detected a loop between the following Segments:\n"; @@ -3895,12 +382,9 @@ namespace Kite { } message << ""; - throw Error(message.str().c_str()); + throw Error( message.str().c_str() ); } #else - loop.erase ( _segment->getId() ); - setState ( DataNegociate::Unimplemented ); - ostringstream message; message << "[BUG] Kite has detected a loop between the following Segments:"; @@ -3912,64 +396,56 @@ namespace Kite { #endif } - DebugSession::open ( _segment->getNet(), 190 ); + DebugSession::open( _segment->getNet(), 148 ); -#if defined(CHECK_DETERMINISM) - cerr << "Order: " - << getProcesseds() - << "," << getEventLevel() - << "," << setw(6) << getPriority() - << " " << setw(6) << DbU::getValueString(_segment->getLength()) - << " " << _segment->isHorizontal() - << " " << setw(6) << DbU::getValueString(_segment->getAxis()) - << " " << setw(6) << DbU::getValueString(_segment->getSourceU()) - << ": " << _segment << endl; -#endif + ltrace(500) << "Deter| Event" + << getProcesseds() + << "," << getEventLevel() + << "," << setw(6) << getPriority() + << ": " << _segment << endl; _processeds++; - ltrace(210) << "Event:" << _processeds << " " << this << endl; ltracein(200); ltrace(200) << "State: *before* " << DataNegociate::getStateString(_segment->getDataNegociate()) << " ripup:" << _segment->getDataNegociate()->getRipupCount() << endl; ltrace(149) << "Level: " << getEventLevel() - << ", area: " << _segment->getArea() << endl; + << ", area: " << _segment->getFreedomDegree() << endl; - _preCheck(_segment); + _preCheck( _segment ); _eventLevel = 0; - history.push ( this ); + history.push( this ); if ( isProcessed() or isDisabled() ) { ltrace(200) << "Already processed or disabled." << endl; } else { - setProcessed (); + setProcessed(); switch ( _mode ) { - case Negociate: _processNegociate ( queue, history ); break; - case Pack: _processPack ( queue, history ); break; - case Repair: _processRepair ( queue, history ); break; + case Negociate: _processNegociate( queue, history ); break; + case Pack: _processPack ( queue, history ); break; + case Repair: _processRepair ( queue, history ); break; default: - cerr << Bug("RoutingEvent::process() - Unknown mode value:%d.",_mode) << endl; + cerr << Bug( "RoutingEvent::process() - Unknown mode value:%d.", _mode ) << endl; break; } } - -#if defined(CHECK_DATABASE) - Session::getKiteEngine()->_check ( _segment->getNet() ); -#endif ltraceout(200); - queue.repushInvalidateds (); - Session::revalidate (); - queue.commit (); + queue.repushInvalidateds(); + Session::revalidate(); + queue.commit(); - _postCheck(_segment); - DebugSession::close (); + //_postCheck( _segment ); +#if defined(CHECK_DATABASE) + Session::getKiteEngine()->_check( _segment->getNet() ); +#endif + DebugSession::close(); - if ( Session::getKiteEngine()->getPostEventCb() != NULL ) - Session::getKiteEngine()->getPostEventCb() (); + if (Session::getKiteEngine()->getPostEventCb() != NULL) + Session::getKiteEngine()->getPostEventCb()(); } @@ -3977,87 +453,65 @@ namespace Kite { { ltrace(200) << "* Mode:Negociation." << endl; - State S ( this, queue, history ); + SegmentFsm fsm ( this, queue, history ); - if ( S.getState() == State::MissingData ) { + if (fsm.getState() == SegmentFsm::MissingData) { cbug << Error("RoutingEvent::process() - Missing datas.") << endl; return; } ltracein(200); - S.getData()->incRipupCount (); + fsm.getData()->incRipupCount(); size_t itrack = 0; - for ( itrack = 0 ; itrack < S.getCosts().size() ; itrack++ ) - ltrace(200) << "| " << S.getCost(itrack) << endl; + for ( itrack = 0 ; itrack < fsm.getCosts().size() ; itrack++ ) + ltrace(200) << "| " << fsm.getCost(itrack) << endl; itrack = 0; - // if ( isForcedToHint() ) { - // // Try to honor the forced axis hint. - // bool hintFound = false; - // for ( ; itrack < S.getCosts().size() ; itrack++ ) { - // if ( S.getCost(itrack).getTrack()->getAxis() == getAxisHint() ) { - // hintFound = true; - // break; - // } - // } - // if ( not hintFound ) itrack = 0; - // ltrace(200) << "Forcing to hint Track: " << itrack << endl; - // } - - if ( Manipulator(_segment,S).canRipup() ) { - if ( S.getCosts().size() and S.getCost(itrack).isFree() ) { - // Track is free: insertion. + if (Manipulator(_segment,fsm).canRipup()) { + if (fsm.getCosts().size() and fsm.getCost(itrack).isFree()) { ltrace(200) << "Insert in free space " << this << endl; - resetInsertState (); + resetInsertState(); _axisHistory = _segment->getAxis(); _eventLevel = 0; - Session::addInsertEvent ( _segment, S.getCost(itrack).getTrack() ); - //Manipulator(_segment,S).reprocessPerpandiculars (); - S.setState ( State::SelfInserted ); - - // if ( _segment->isLocal() - // and _segment->isTerminal() - // and ( S.getData()->getState() >= DataNegociate::MoveUp ) ) { - // ltrace(200) << "Last chance: fixing " << _segment << endl; - // _segment->base()->setFixed ( true ); - // } + ltrace(500) << "Deter| addInsertEvent()" << endl; + ltrace(500) << "Deter| | " << _segment << endl; + ltrace(500) << "Deter| | " << fsm.getCost(itrack).getTrack() << endl; + Session::addInsertEvent( _segment, fsm.getCost(itrack).getTrack() ); + fsm.setState( SegmentFsm::SelfInserted ); } else { // Do ripup. - if ( S.getState() == State::EmptyTrackList ) { - Manipulator(_segment,S).ripupPerpandiculars (); + if (fsm.getState() == SegmentFsm::EmptyTrackList) { + Manipulator(_segment,fsm).ripupPerpandiculars(); } else { - if ( Manipulator(_segment,S).canRipup(Manipulator::HasNextRipup)) { - for ( itrack=0 ; itrackgetAxis()) - << " " << (void*)this << ":" << this << endl; + if (itrack < fsm.getCosts().size()) { + ltrace(200) << "Placed: @" << DbU::getValueString(fsm.getCost(itrack).getTrack()->getAxis()) + << " " << this << endl; } ltraceout(200); @@ -4068,33 +522,29 @@ namespace Kite { { ltrace(200) << "* Mode:Pack." << endl; - if ( _segment->getTrack() != NULL ) { + if (_segment->getTrack() != NULL) { ltrace(200) << "* Cancel: already in Track." << endl; return; } - // if ( !_canHandleConstraints ) { - // ltrace(200) << "* Cancel: cannot handle constraints." << endl; - // return; - // } - State S ( this, queue, history ); - if ( S.getState() == State::MissingData ) return; - if ( S.getState() == State::EmptyTrackList ) return; + SegmentFsm fsm ( this, queue, history ); + if (fsm.getState() == SegmentFsm::MissingData ) return; + if (fsm.getState() == SegmentFsm::EmptyTrackList) return; ltracein(200); - for ( size_t i = 0 ; i < S.getCosts().size() ; i++ ) - ltrace(200) << "| " << S.getCost(i) << endl; + for ( size_t i = 0 ; i < fsm.getCosts().size() ; i++ ) + ltrace(200) << "| " << fsm.getCost(i) << endl; ltraceout(200); - if ( S.getCosts().size() and S.getCost(0).isFree() ) { + if (fsm.getCosts().size() and fsm.getCost(0).isFree()) { ltrace(200) << "Insert in free space." << endl; - Session::addInsertEvent ( _segment, S.getCost(0).getTrack() ); - S.setState ( State::SelfInserted ); + Session::addInsertEvent( _segment, fsm.getCost(0).getTrack() ); + fsm.setState( SegmentFsm::SelfInserted ); } else { ltrace(200) << "Pack failed." << endl; _mode = Negociate; - S.addAction ( _segment, SegmentAction::SelfInsert ); - S.doActions (); + fsm.addAction( _segment, SegmentAction::SelfInsert ); + fsm.doActions(); } } @@ -4107,44 +557,35 @@ namespace Kite { ltrace(200) << "* Cancel: already in Track." << endl; return; } - // if ( !_canHandleConstraints ) { - // ltrace(200) << "* Cancel: cannot handle constraints." << endl; - // return; - // } - State S ( this, queue, history ); - if ( S.getState() == State::MissingData ) return; - if ( S.getState() == State::EmptyTrackList ) return; + SegmentFsm fsm ( this, queue, history ); + if (fsm.getState() == SegmentFsm::MissingData ) return; + if (fsm.getState() == SegmentFsm::EmptyTrackList) return; ltracein(200); - for ( size_t i = 0 ; i < S.getCosts().size() ; i++ ) - ltrace(200) << "| " << S.getCost(i) << endl; + for ( size_t i = 0 ; i < fsm.getCosts().size() ; i++ ) + ltrace(200) << "| " << fsm.getCost(i) << endl; ltraceout(200); - if ( S.getCosts().size() and S.getCost(0).isFree() ) { + if (fsm.getCosts().size() and fsm.getCost(0).isFree()) { ltrace(200) << "Insert in free space." << endl; - Session::addInsertEvent ( _segment, S.getCost(0).getTrack() ); - S.setState ( State::SelfInserted ); - //Manipulator(_segment,S).repackPerpandiculars (false); - //S.doActions (); - //queue.commit (); + Session::addInsertEvent( _segment, fsm.getCost(0).getTrack() ); + fsm.setState( SegmentFsm::SelfInserted ); } else { - switch ( S.getData()->getStateCount() ) { + switch ( fsm.getData()->getStateCount() ) { case 1: // First try: minimize. - //S.getData()->setState ( DataNegociate::Repair ); - Manipulator(_segment,S).minimize (); - S.addAction ( _segment, SegmentAction::SelfInsert ); - S.doActions (); - queue.commit (); + Manipulator(_segment,fsm).minimize (); + fsm.addAction( _segment, SegmentAction::SelfInsert ); + fsm.doActions(); + queue.commit(); break; case 2: // Second try: failed re-inserted first. - //S.getData()->setState ( DataNegociate::Repair ); - Manipulator(_segment,S).repackPerpandiculars (); - S.addAction ( _segment, SegmentAction::SelfInsert ); - S.doActions (); - queue.commit (); + Manipulator(_segment,fsm).repackPerpandiculars (); + fsm.addAction( _segment, SegmentAction::SelfInsert ); + fsm.doActions(); + queue.commit(); break; default: ltrace(200) << "Repair failed." << endl; @@ -4154,120 +595,70 @@ namespace Kite { } - void RoutingEvent::revalidate ( bool force ) + void RoutingEvent::revalidate () { - if ( _valid and not force ) return; + DebugSession::open( _segment->getNet(), 148 ); - DebugSession::open ( _segment->getNet(), 148 ); - - ltrace(200) << "RoutingEvent::revalidate() - " << (void*)this << ":" << this << endl; + ltrace(200) << "RoutingEvent::revalidate() - " << this << endl; ltracein(200); - cacheAxisHint (); + //_dataNegociate->update(); + + setAxisHintFromParent(); ltrace(200) << "axisHint:" << DbU::getValueString(getAxisHint()) << endl; _canHandleConstraints = true; - if ( /*!_validConstraints*/ true ) { - _segment->base()->getConstraints ( _constraints ); - _segment->base()->getOptimal ( _optimal ); + _segment->base()->getConstraints( _constraints ); + _segment->base()->getOptimal ( _optimal ); - ltrace(200) << "Stage:" << RoutingEvent::getStage() << endl; - if ( RoutingEvent::getStage() == RoutingEvent::Repair ) { - if (_segment->isTerminal()) { - ltrace(200) << "Not expanding on Terminals:" << _constraints << endl; - } else { - ltrace(200) << "Expanding:" << _constraints << endl; - // Ugly: direct uses of Cell Gauge. - _constraints.inflate ( DbU::lambda(50.0) ); - ltrace(200) << "Expanding (after):" << _constraints << endl; - } - } - // else if ( _segment->isDogleg() - // and (_segment->getDataNegociate()->getState() >= DataNegociate::MaximumSlack) ) { - // _constraints.inflate ( DbU::lambda(25.0) ); - // } - - ltrace(200) << "| Raw Track Constraint: " << _constraints << endl; - - _validConstraints = true; - } - - if ( not _validPerpandiculars ) { - TrackElement* perpandicular; - Interval canonical; - - _perpandiculars.clear (); - forEach ( AutoSegment*, isegment, _segment->base()->getCollapsedPerpandiculars() ) { - ltrace(200) << "| perpandicular " << *isegment << endl; - perpandicular = Session::lookup ( isegment->getCanonical(canonical)->base() ); - if ( !perpandicular ) continue; - - _perpandiculars.push_back ( perpandicular ); - } - _validPerpandiculars = true; - - if ( not _segment->isTerminal() and (_perpandiculars.size() < 2) ) - cerr << Bug("Less than two perpandiculars on %s.",getString(_segment).c_str()) << endl; - } - - ltrace(200) << "| Track Constraint: " << _constraints << endl; - - _perpandicular = _constraints; - DataNegociate* dataPerpandicular; - - for ( size_t i=0 ; i<_perpandiculars.size() ; i++ ) { - dataPerpandicular = _perpandiculars[i]->getDataNegociate(); - if ( !dataPerpandicular ) { - ltrace(200) << "| No data " << _perpandiculars[i] << endl; - continue; - } - - if ( _perpandiculars[i]->getTrack() ) { - Interval trackFree = _perpandiculars[i]->getFreeInterval(); - ltrace(200) << "| From " << _perpandiculars[i] << endl; - ltrace(200) << "| Track Perpandicular Free: " << trackFree << endl; - - _perpandicular.intersection ( trackFree ); + ltrace(200) << "Stage:" << RoutingEvent::getStage() << endl; + if (RoutingEvent::getStage() == RoutingEvent::Repair) { + if (_segment->isStrongTerminal(KbPropagate)) { + ltrace(200) << "Not expanding on Terminals:" << _constraints << endl; } else { - ltrace(200) << "| Not in any track " << _perpandiculars[i] << endl; + ltrace(200) << "Expanding:" << _constraints << endl; + // Ugly: direct uses of Cell Gauge. + _constraints.inflate( DbU::lambda(50.0) ); + ltrace(200) << "Expanding (after):" << _constraints << endl; } } + ltrace(200) << "| Raw Track Constraint: " << _constraints << endl; + _tracksNb = 0; - ltrace(200) << "| Perpandicular Free: " << _perpandicular << endl; - if ( not _perpandicular.isEmpty() ) { - RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); - Track* track = plane->getTrackByPosition(_perpandicular.getVMin()); + Interval perpandicular = _constraints; + perpandicular.intersection( getPerpandicularFree()); + ltrace(200) << "| Perpandicular Free: " << perpandicular << endl; - if ( track and (track->getAxis() < _perpandicular.getVMin()) ) track = track->getNext(); - for ( ; track and (track->getAxis() <= _perpandicular.getVMax()) - ; track = track->getNext(), _tracksNb++ ); + if (not perpandicular.isEmpty()) { + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); + Track* track = plane->getTrackByPosition(perpandicular.getVMin()); + + if ( track and (track->getAxis() < perpandicular.getVMin()) ) track = track->getNextTrack(); + for ( ; track and (track->getAxis() <= perpandicular.getVMax()) + ; track = track->getNextTrack(), _tracksNb++ ); } - if ( not _tracksNb ) { + if (not _tracksNb) { ltrace(200) << "| Reverting to pure constraints." << endl; RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_segment->getLayer()); Track* track = plane->getTrackByPosition(_constraints.getVMin()); - if ( track && (track->getAxis() < _constraints.getVMin()) ) track = track->getNext(); + if ( track && (track->getAxis() < _constraints.getVMin()) ) track = track->getNextTrack(); for ( ; track && (track->getAxis() <= _constraints.getVMax()) - ; track = track->getNext(), _tracksNb++ ); + ; track = track->getNextTrack(), _tracksNb++ ); _canHandleConstraints = false; } - if ( not _tracksNb ) { + if (not _tracksNb) { ltrace(200) << "| Pure constraints are too tight." << endl; - //_segment->base()->getConstraints ( _constraints ); _canHandleConstraints = false; } _priority = (DbU::getLambda(_segment->getLength()) + 1.0) * (DbU::getLambda(_segment->base()->getSlack()) + 1.0); - //_priority = (DbU::getLambda(_segment->getLength()) + 1.0) * (float)(_tracksNb+1); - //_priority = (float)_segment->getArea(); - _valid = true; - ltrace(200) << _segment << " has " << _tracksNb << " choices " << _perpandicular << endl; + ltrace(200) << _segment << " has " << _tracksNb << " choices " << perpandicular << endl; ltraceout(200); DebugSession::close(); @@ -4307,4 +698,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/RoutingEventHistory.cpp b/kite/src/RoutingEventHistory.cpp index d4a3113e..7e2d32ff 100644 --- a/kite/src/RoutingEventHistory.cpp +++ b/kite/src/RoutingEventHistory.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,22 +11,17 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./RoutingEventHistory.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include - -#include "hurricane/Error.h" -#include "kite/RoutingEvent.h" -#include "kite/RoutingEventHistory.h" +#include +#include "hurricane/Error.h" +#include "kite/RoutingEvent.h" +#include "kite/RoutingEventHistory.h" namespace Kite { - using std::cerr; using std::setw; using std::setfill; @@ -113,4 +102,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/RoutingEventLoop.cpp b/kite/src/RoutingEventLoop.cpp index 8d9d9ba5..bcf95b96 100644 --- a/kite/src/RoutingEventLoop.cpp +++ b/kite/src/RoutingEventLoop.cpp @@ -1,15 +1,9 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,16 +11,13 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./RoutingEventLoop.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include -#include -#include "kite/RoutingEvent.h" -#include "kite/RoutingEventLoop.h" +#include +#include +#include "kite/RoutingEvent.h" +#include "kite/RoutingEventLoop.h" namespace Kite { @@ -91,4 +82,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/RoutingEventQueue.cpp b/kite/src/RoutingEventQueue.cpp index bf9a6535..4cc3ddc6 100644 --- a/kite/src/RoutingEventQueue.cpp +++ b/kite/src/RoutingEventQueue.cpp @@ -1,43 +1,32 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Module : "./RoutingEvent.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Module : "./RoutingEventQueue.cpp" | +// +-----------------------------------------------------------------+ -#include -#include -#include -#include - -#include "hurricane/Bug.h" -#include "kite/DataNegociate.h" -#include "kite/TrackElement.h" -#include "kite/RoutingEventQueue.h" -#include "kite/Session.h" +#include +#include +#include +#include +#include "hurricane/Bug.h" +#include "kite/DataNegociate.h" +#include "kite/TrackSegment.h" +#include "kite/RoutingEventQueue.h" +#include "kite/Session.h" namespace Kite { - using std::cerr; using std::endl; using std::setw; @@ -72,39 +61,35 @@ namespace Kite { void RoutingEventQueue::load ( const vector& segments ) { for ( size_t i=0 ; igetDataNegociate()->getRoutingEvent() ) { + if (segments[i]->getDataNegociate()->getRoutingEvent()) { cinfo << "[INFO] Already have a RoutingEvent - " << segments[i] << endl; continue; } - if ( segments[i]->getTrack() ) { + if (segments[i]->getTrack()) { cinfo << "[INFO] Already in Track - " << segments[i] << endl; continue; } RoutingEvent* event = RoutingEvent::create(segments[i]); - event->updateKey (); - _events.insert ( event ); + event->updateKey(); + _events.insert( event ); } } void RoutingEventQueue::add ( TrackElement* segment, unsigned int level ) { - if ( segment->getTrack() ) { + if (segment->getTrack()) { cinfo << "[INFO] Already in Track " << (void*)segment->base()->base() << ":" << segment << endl; return; } RoutingEvent* event = RoutingEvent::create(segment); - event->setEventLevel ( level ); - push ( event ); + event->setEventLevel( level ); + push( event ); } - void RoutingEventQueue::push ( RoutingEvent* event ) - { _pushRequests.insert ( event ); } - - void RoutingEventQueue::commit () { ltrace(200) << "RoutingEventQueue::commit()" << endl; @@ -113,31 +98,25 @@ namespace Kite { size_t addeds = _pushRequests.size(); size_t before = _events.size(); - set::iterator ipushEvent = _pushRequests.begin(); + RoutingEventSet::iterator ipushEvent = _pushRequests.begin(); for ( ; ipushEvent != _pushRequests.end() ; ipushEvent++ ) { - (*ipushEvent)->updateKey (); + (*ipushEvent)->updateKey(); - _topEventLevel = max ( _topEventLevel, (*ipushEvent)->getEventLevel() ); - _events.insert ( (*ipushEvent) ); + _topEventLevel = max( _topEventLevel, (*ipushEvent)->getEventLevel() ); + _events.insert( (*ipushEvent) ); ltrace(200) << "| " << (*ipushEvent) << endl; } - _pushRequests.clear (); + _pushRequests.clear(); #if defined(CHECK_ROUTINGEVENT_QUEUE) - _keyCheck (); + _keyCheck(); #endif size_t after = _events.size(); - if ( after-before != addeds ) { - cerr << Bug("RoutingEventQueue::commit(): less than %d events pusheds (%d)." - ,addeds,(after-before)) << endl; + if (after-before != addeds) { + cerr << Bug( "RoutingEventQueue::commit(): less than %d events pusheds (%d)." + , addeds,(after-before) ) << endl; } - // if ( (RoutingEvent::getProcesseds() > 61246) - // and (RoutingEvent::getProcesseds() < 61256) ) { - // cerr << "RoutingEventQueue::commit()" << endl; - // dump (); - // } - ltraceout(200); } @@ -151,33 +130,20 @@ namespace Kite { _keyCheck (); #endif - if ( !_events.empty() ) { + if (not _events.empty()) { size_t beforeSize = _events.size(); ievent = _events.end(); ievent--; event = (*ievent); - _events.erase ( ievent ); - - // if ( (RoutingEvent::getProcesseds() > 61246) - // and (RoutingEvent::getProcesseds() < 61256) ) { - // cerr << "Popped: " << event << endl; - // dump (); - // } + _events.erase( ievent ); size_t afterSize = _events.size(); - if ( afterSize+1 != beforeSize ) { - cerr << Bug("RoutingEventQueue::pop(): more than one event popped: %d." - ,(beforeSize-afterSize)) << endl; + if (afterSize+1 != beforeSize) { + cerr << Bug( "RoutingEventQueue::pop(): more than one event popped: %d." + , (beforeSize-afterSize) ) << endl; } -// size_t erased = _events.erase ( event ); -// if ( erased != 1 ) { -// cerr << Bug("RoutingEventQueue::pop(): %d events matches key %p.",erased,event) << endl; -// #if defined(CHECK_ROUTINGEVENT_QUEUE) -// _keyCheck (); -// #endif -// } } return event; @@ -192,65 +158,59 @@ namespace Kite { multiset::iterator ievent = _events.find(event); size_t count = _events.count(event); - if ( count > 1 ) { + if (count > 1) { cerr << Bug("RoutingEventQueue::repush(): %d events matches key %p.",count,event) << endl; #if defined(CHECK_ROUTINGEVENT_QUEUE) _keyCheck (); #endif } - if ( ievent != _events.end() ) { - // if ( (RoutingEvent::getProcesseds() > 61246) - // and (RoutingEvent::getProcesseds() < 61256) ) { - // cerr << "Erasing: " << *ievent << endl; - // } - _events.erase ( ievent ); + if (ievent != _events.end()) { + _events.erase( ievent ); } push ( event ); - - // if ( (RoutingEvent::getProcesseds() > 61246) - // and (RoutingEvent::getProcesseds() < 61256) ) { - // cerr << "After repush: " << event << endl; - // dump(); - // } } void RoutingEventQueue::repushInvalidateds () { const vector& invalidateds0 = Session::getInvalidateds(); - set invalidateds1; + TrackSegmentSet invalidateds1; for ( size_t i=0 ; i( Session::lookup(invalidateds0[i]) ); + if (segment) + invalidateds1.insert( segment ); } - set::iterator isegment = invalidateds1.begin(); + TrackSegmentSet::iterator isegment = invalidateds1.begin(); for ( ; isegment != invalidateds1.end() ; isegment++ ) { RoutingEvent* event = (*isegment)->getDataNegociate()->getRoutingEvent(); if ( event and not event->isUnimplemented() and not event->isDisabled () and not event->isProcessed () ) { - repush ( event ); - } else { - // if ( (RoutingEvent::getProcesseds() > 61246) - // and (RoutingEvent::getProcesseds() < 61256) ) { - // cerr << "NOT repushed: " << event << endl; - // } + repush( event ); } } } + void RoutingEventQueue::prepareRepair () + { + multiset::const_iterator ievent = _events.begin (); + for ( ; ievent != _events.end(); ++ievent ) { + (*ievent)->getSegment()->base()->toOptimalAxis(); + } + } + + void RoutingEventQueue::clear () { - if ( not _events.empty() ) { + if (not _events.empty()) { cerr << Bug("RoutingEvent queue is not empty, %d events remains." ,_events.size()) << endl; } - _events.clear (); + _events.clear(); } @@ -316,4 +276,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/RoutingPlane.cpp b/kite/src/RoutingPlane.cpp index 3a1b4deb..3c45faf0 100644 --- a/kite/src/RoutingPlane.cpp +++ b/kite/src/RoutingPlane.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,22 +12,17 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./RoutingPlane.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "hurricane/Error.h" -#include "hurricane/Box.h" -#include "hurricane/Cell.h" - -#include "crlcore/RoutingLayerGauge.h" - -#include "kite/HorizontalTrack.h" -#include "kite/VerticalTrack.h" -#include "kite/RoutingPlane.h" -#include "kite/KiteEngine.h" +#include "hurricane/Error.h" +#include "hurricane/Box.h" +#include "hurricane/Cell.h" +#include "crlcore/RoutingLayerGauge.h" +#include "kite/HorizontalTrack.h" +#include "kite/VerticalTrack.h" +#include "kite/RoutingPlane.h" +#include "kite/KiteEngine.h" namespace { @@ -48,7 +38,6 @@ namespace { namespace Kite { - using std::cerr; using std::endl; using Hurricane::tab; @@ -68,8 +57,21 @@ namespace Kite { : _kite (kite) , _layerGauge(kite->getLayerGauge(depth)) , _depth (depth) + , _flags (0) + , _axisMin (0) + , _axisMax (0) + , _trackMin (0) + , _trackMax (0) , _tracks () - { } + { + switch ( _layerGauge->getDirection() ) { + case Constant::Horizontal: _flags |= KbHorizontal; break; + case Constant::Vertical: _flags |= KbVertical; break; + default: + cerr << Error( "RoutingPlane::RoutingPlane() - Unknown plane direction from LayerGauge: %u" + , _layerGauge->getDirection() ) << endl; + } + } RoutingPlane::~RoutingPlane () @@ -82,8 +84,8 @@ namespace Kite { << (void*)this << " " << this << endl; ltracein(90); - for ( size_t index = 0 ; index < _tracks.size() ; index++ ) - _tracks[index]->destroy (); + for ( size_t index=0 ; index<_tracks.size() ; ++index ) + _tracks[index]->destroy(); delete this; @@ -95,40 +97,41 @@ namespace Kite { { RoutingPlane* plane = new RoutingPlane ( kite, depth ); - if ( !plane->_layerGauge ) - throw Error ( badLayerGauge, depth, getString(kite->getRoutingGauge()).c_str() ); + if (not plane->_layerGauge) + throw Error( badLayerGauge, depth, getString(kite->getRoutingGauge()).c_str() ); size_t trackNumber; Box abutmentBox = kite->getCell()->getAbutmentBox(); - if ( plane->getLayerGauge()->getDirection() & Constant::Horizontal ) { - plane->_trackMin = abutmentBox.getXMin () - DbU::lambda (2.0); - plane->_trackMax = abutmentBox.getXMax () + DbU::lambda (2.0); - plane->_axisMin = abutmentBox.getYMin (); - plane->_axisMax = abutmentBox.getYMax (); - trackNumber = plane->computeTracksSize (); + // HARD CODED. + if (plane->getDirection() == KbHorizontal) { + plane->_trackMin = abutmentBox.getXMin() - DbU::lambda(2.0); + plane->_trackMax = abutmentBox.getXMax() + DbU::lambda(2.0); + plane->_axisMin = abutmentBox.getYMin(); + plane->_axisMax = abutmentBox.getYMax(); + trackNumber = plane->computeTracksSize(); } else { - plane->_trackMin = abutmentBox.getYMin () - DbU::lambda (2.0); - plane->_trackMax = abutmentBox.getYMax () + DbU::lambda (2.0); - plane->_axisMin = abutmentBox.getXMin (); - plane->_axisMax = abutmentBox.getXMax (); - trackNumber = plane->computeTracksSize (); + plane->_trackMin = abutmentBox.getYMin() - DbU::lambda(2.0); + plane->_trackMax = abutmentBox.getYMax() + DbU::lambda(2.0); + plane->_axisMin = abutmentBox.getXMin(); + plane->_axisMax = abutmentBox.getXMax(); + trackNumber = plane->computeTracksSize(); } - plane->_tracks.reserve ( trackNumber ); - for ( size_t index = 0 ; index < trackNumber ; index++ ) { - if ( plane->getLayerGauge()->getDirection() & Constant::Horizontal ) { - plane->_tracks.push_back ( HorizontalTrack::create ( plane, index ) ); + plane->_tracks.reserve( trackNumber ); + for ( size_t index=0 ; indexgetDirection() == KbHorizontal) { + plane->_tracks.push_back( HorizontalTrack::create( plane, index ) ); // Ugly: Direct uses of CellGauge (middle tracks 4 & 5 for local use). - if ( depth == 1 ) { - switch ( index % 10 ) { + if (depth == 1) { + switch ( index%10 ) { case 4: case 5: - plane->_tracks.back()->setLocalAssigned ( true ); + plane->_tracks.back()->setLocalAssigned( true ); break; } } } else { - plane->_tracks.push_back ( VerticalTrack::create ( plane, index ) ); + plane->_tracks.push_back( VerticalTrack::create( plane, index ) ); } } @@ -137,30 +140,30 @@ namespace Kite { RoutingPlane* RoutingPlane::getTop () const - { return getKiteEngine()->getRoutingPlaneByIndex ( getDepth()+1 ); } + { return getKiteEngine()->getRoutingPlaneByIndex( getDepth()+1 ); } RoutingPlane* RoutingPlane::getBottom () const { - if ( !getDepth() ) return NULL; - return getKiteEngine()->getRoutingPlaneByIndex ( getDepth()-1 ); + if (not getDepth()) return NULL; + return getKiteEngine()->getRoutingPlaneByIndex( getDepth()-1 ); } Track* RoutingPlane::getTrackByIndex ( size_t index ) const { - if ( index >= getTracksSize() ) return NULL; + if (index >= getTracksSize()) return NULL; return _tracks[index]; } Track* RoutingPlane::getTrackByPosition ( DbU::Unit axis, unsigned int mode ) const { - return getTrackByIndex ( getLayerGauge()->getTrackIndex ( getAxisMin() - , getAxisMax() - , axis - , mode - ) ); + return getTrackByIndex( getLayerGauge()->getTrackIndex( getAxisMin() + , getAxisMax() + , axis + , mode + ) ); } @@ -168,8 +171,8 @@ namespace Kite { { bool coherency = true; - for ( size_t i=0 ; i<_tracks.size() ; i++ ) { - coherency = _tracks[i]->_check(overlaps) and coherency; + for ( size_t i=0 ; i<_tracks.size() ; ++i ) { + coherency = _tracks[i]->check(overlaps) and coherency; } return coherency; @@ -179,7 +182,9 @@ namespace Kite { string RoutingPlane::_getString () const { return "<" + _getTypeName() + " @" - + getString(_depth) + " [" + + getString(_depth) + " " + + getString(getLayer()) + " [ " + + ((getDirection() == KbHorizontal) ? " horizontal [" : " vertical [") + getString(_tracks.size()) + "/" + getString(_tracks.capacity()) + "]>"; @@ -189,17 +194,17 @@ namespace Kite { Record* RoutingPlane::_getRecord () const { Record* record = new Record ( getString(this) ); - record->add ( getSlot ( "_kite" , _kite ) ); - record->add ( getSlot ( "_layerGauge" , _layerGauge ) ); - record->add ( getSlot ( "_depth" , &_depth ) ); - record->add ( DbU::getValueSlot ( "_axisMin" , &_axisMin ) ); - record->add ( DbU::getValueSlot ( "_axisMax" , &_axisMax ) ); - record->add ( DbU::getValueSlot ( "_trackMin" , &_trackMin ) ); - record->add ( DbU::getValueSlot ( "_trackMax" , &_trackMax ) ); - record->add ( getSlot ( "_tracks" , &_tracks ) ); + record->add( getSlot ( "_kite" , _kite ) ); + record->add( getSlot ( "_layerGauge" , _layerGauge ) ); + record->add( getSlot ( "_depth" , &_depth ) ); + record->add( DbU::getValueSlot( "_axisMin" , &_axisMin ) ); + record->add( DbU::getValueSlot( "_axisMax" , &_axisMax ) ); + record->add( DbU::getValueSlot( "_trackMin" , &_trackMin ) ); + record->add( DbU::getValueSlot( "_trackMax" , &_trackMax ) ); + record->add( getSlot ( "_tracks" , &_tracks ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/SegmentFsm.cpp b/kite/src/SegmentFsm.cpp new file mode 100644 index 00000000..93902fa9 --- /dev/null +++ b/kite/src/SegmentFsm.cpp @@ -0,0 +1,1241 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2013, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Module : "./SegmentFsm.cpp" | +// +-----------------------------------------------------------------+ + + +#include +#include "hurricane/Bug.h" +#include "hurricane/DebugSession.h" +#include "kite/TrackElement.h" +#include "kite/Tracks.h" +#include "kite/RoutingPlane.h" +#include "kite/DataNegociate.h" +#include "kite/RoutingEvent.h" +#include "kite/RoutingEventQueue.h" +#include "kite/RoutingEventHistory.h" +#include "kite/Manipulator.h" +#include "kite/SegmentFsm.h" +#include "kite/KiteEngine.h" + + +namespace { + + using namespace std; + using namespace Hurricane; + using namespace Kite; + + +// ------------------------------------------------------------------- +// Class : "Cs1Candidate". + + class Cs1Candidate { + public: + inline Cs1Candidate ( Track* track=NULL ); + inline Track* getTrack () const; + inline size_t getBegin () const; + inline size_t getEnd () const; + inline size_t getLength () const; + inline Interval getConflict ( size_t ); + inline Interval getLongestConflict () const; + inline DbU::Unit getBreakPos () const; + inline DbU::Unit getConflictLength () const; + inline void setBegin ( size_t ); + inline void setEnd ( size_t ); + inline void addConflict ( const Interval& ); + void consolidate (); + public: + friend inline bool operator< ( const Cs1Candidate&, const Cs1Candidate& ); + private: + Track* _track; + size_t _begin; + size_t _end; + vector _conflicts; + Interval _longestConflict; + DbU::Unit _breakPos; + DbU::Unit _conflictLength; + }; + + + inline Cs1Candidate::Cs1Candidate ( Track* track ) + : _track (track) + , _begin (0) + , _end (0) + , _conflicts () + , _longestConflict() + , _breakPos (0) + , _conflictLength (0) + { } + + inline Track* Cs1Candidate::getTrack () const { return _track; } + inline size_t Cs1Candidate::getBegin () const { return _begin; } + inline size_t Cs1Candidate::getEnd () const { return _end; } + inline size_t Cs1Candidate::getLength () const { return _conflicts.size(); } + inline Interval Cs1Candidate::getLongestConflict () const { return _longestConflict; } + inline DbU::Unit Cs1Candidate::getBreakPos () const { return _breakPos; } + inline void Cs1Candidate::setBegin ( size_t i ) { _begin=i; } + inline void Cs1Candidate::setEnd ( size_t i ) { _end=i; } + + inline void Cs1Candidate::addConflict ( const Interval& conflict ) + { + _conflicts.push_back(conflict); + _conflictLength += conflict.getSize(); + + if (conflict.getSize() > _longestConflict.getSize()) + _longestConflict = conflict; + } + + inline Interval Cs1Candidate::getConflict ( size_t i ) + { + if (i >= _conflicts.size()) return Interval(); + return _conflicts[i]; + } + + inline bool operator< ( const Cs1Candidate& lhs, const Cs1Candidate& rhs ) + { + DbU::Unit delta = lhs._longestConflict.getSize() - rhs._longestConflict.getSize(); + if (delta < 0) return true; + if (delta > 0) return false; + + return lhs._conflictLength < rhs._conflictLength; + } + + + void Cs1Candidate::consolidate () + { + if (_conflicts.size() > 0) { + DbU::Unit halfConflict = 0; + size_t i = 0; + for ( ; i<_conflicts.size()-1 ; ++i ) { + halfConflict += _conflicts[i].getSize(); + if (halfConflict > _conflictLength/2) + break; + } + + // Ugly: hard-coded pitch. + _breakPos = _conflicts[i].getVMin() - DbU::lambda(5.0); + } + } + + +// ------------------------------------------------------------------- +// Class : "UnionItervals". + + class UnionIntervals { + public: + inline UnionIntervals (); + void addInterval ( Interval& ); + inline size_t size () const; + inline bool empty () const; + inline list::const_iterator begin () const; + inline list::const_iterator end () const; + inline DbU::Unit getVMin () const; + inline DbU::Unit getVMax () const; + string _getString (); + private: + list _intervals; + }; + + + inline UnionIntervals::UnionIntervals () : _intervals() { } + inline list::const_iterator UnionIntervals::begin () const { return _intervals.begin(); } + inline list::const_iterator UnionIntervals::end () const { return _intervals.end(); } + inline size_t UnionIntervals::size () const { return _intervals.size(); } + inline bool UnionIntervals::empty () const { return _intervals.empty(); } + inline DbU::Unit UnionIntervals::getVMin () const { return (empty()) ? DbU::Max : (*begin()).getVMin(); } + inline DbU::Unit UnionIntervals::getVMax () const { return (empty()) ? DbU::Min : (*begin()).getVMax(); } + + + void UnionIntervals::addInterval ( Interval& interval ) + { + ltrace(200) << "UnionInterval::addInterval() - " << interval << endl; + + list::iterator iintv = _intervals.begin (); + + bool merged = false; + while ( iintv != _intervals.end() ) { + if (not merged) { + if (interval.getVMax() < (*iintv).getVMin()) { _intervals.insert( iintv, interval ); return; } + if (interval.getVMin() > (*iintv).getVMax()) { ++iintv; continue; } + + merged = true; + interval = (*iintv).merge( interval ); + ++iintv; + } else { + if ((*iintv).intersect( interval )) { + interval = (*iintv).merge( interval ); + iintv = _intervals.erase( iintv ); + continue; + } else + break; + } + } + + if (not merged) _intervals.push_back( interval ); + } + + + string UnionIntervals::_getString () + { + ostringstream s; + + list::iterator iintv = _intervals.begin(); + for ( ; iintv != _intervals.end() ; ++iintv ) { + s << " [" << DbU::getValueString((*iintv).getVMin()) + << ":" << DbU::getValueString((*iintv).getVMax()) << "]"; + } + return s.str(); + } + + +// ------------------------------------------------------------------- +// Class : "RipupHistory". + + class RipupHistory { + public: + RipupHistory ( RoutingEvent* ); + inline bool isDislodger ( RoutingEvent* ) const; + inline size_t size () const; + inline size_t getDislodgersCount () const; + void addAxis ( DbU::Unit ); + void addAxis ( RoutingEvent* ); + bool hasAxis ( DbU::Unit ) const; + UnionIntervals* getUnionIntervals ( DbU::Unit ); + void addDislodger ( RoutingEvent* ); + void addDislodger ( TrackElement* ); + void print ( ostream& ); + private: + RoutingEvent* _masterEvent; + map _dislodgers; + size_t _dislodgersCount; + }; + + + RipupHistory::RipupHistory ( RoutingEvent* event ) + : _masterEvent (event) + , _dislodgers () + , _dislodgersCount(0) + { + const Interval& perpandicular = _masterEvent->getPerpandicularFree(); + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(_masterEvent->getSegment()->getLayer()); + Track* track; + + if (not perpandicular.isEmpty()) { + track = plane->getTrackByPosition(perpandicular.getVMin()); + + if (track and (track->getAxis() < perpandicular.getVMin())) track = track->getNextTrack(); + for ( ; track && (track->getAxis() <= perpandicular.getVMax()) + ; track = track->getNextTrack() ) + addAxis( track->getAxis() ); + } + + track = plane->getTrackByPosition(_masterEvent->getSegment()->getAxis()); + if (track) { + size_t begin = Track::npos; + size_t end = Track::npos; + Interval interval = _masterEvent->getSegment()->getCanonicalInterval(); + track->getOverlapBounds( interval, begin, end ); + + if (begin != Track::npos) { + for ( ; begin < end ; ++begin ) { + TrackElement* other = track->getSegment(begin); + if (other->getNet() == _masterEvent->getSegment()->getNet() ) continue; + if (not interval.intersect(other->getCanonicalInterval())) continue; + + addDislodger( other ); + } + } + } + } + + + inline bool RipupHistory::isDislodger ( RoutingEvent* event ) const { return hasAxis(event->getSegment()->getAxis()); } + inline size_t RipupHistory::size () const { return _dislodgers.size(); } + inline size_t RipupHistory::getDislodgersCount () const { return _dislodgersCount; } + + + void RipupHistory::addAxis ( DbU::Unit axis ) + { + if (hasAxis(axis)) return; + _dislodgers.insert( make_pair(axis,UnionIntervals()) ); + } + + + void RipupHistory::addAxis ( RoutingEvent* event ) + { addAxis( event->getAxisHistory() ); } + + + bool RipupHistory::hasAxis ( DbU::Unit axis ) const + { return _dislodgers.find(axis) != _dislodgers.end(); } + + + UnionIntervals* RipupHistory::getUnionIntervals ( DbU::Unit axis ) + { + map::iterator iunion = _dislodgers.find ( axis ); + if (iunion == _dislodgers.end()) return NULL; + + return &(iunion->second); + } + + + void RipupHistory::addDislodger ( RoutingEvent* event ) + { + if (event->getSegment() == _masterEvent->getSegment()) return; + if (event->getSegment()->getLayer() != _masterEvent->getSegment()->getLayer()) return; + + UnionIntervals* intervals = getUnionIntervals( event->getAxisHistory() ); + if (not intervals) return; + + Interval canonical = event->getSegment()->getCanonicalInterval(); + intervals->addInterval( canonical ); + + ++_dislodgersCount; + } + + + void RipupHistory::addDislodger ( TrackElement* segment ) + { + if (_masterEvent->getSegment()->getNet() == segment->getNet()) return; + + UnionIntervals* intervals = getUnionIntervals( segment->getAxis() ); + if (not intervals) return; + + Interval canonical = segment->getCanonicalInterval(); + intervals->addInterval( canonical ); + + ++_dislodgersCount; + } + + + void RipupHistory::print ( ostream& o ) + { + o << "[HISTORY] " << _masterEvent << endl; + + map::iterator iunion = _dislodgers.begin(); + for ( ; iunion != _dislodgers.end() ; ++iunion ) + o << " @" << DbU::getValueString(iunion->first) + << " " << (iunion->second)._getString() << endl; + } + + +} // Anonymous namespace. + + +namespace Kite { + + using std::sort; + using Hurricane::tab; + using Hurricane::inltrace; + using Hurricane::ltracein; + using Hurricane::ltraceout; + using Hurricane::DebugSession; + using Hurricane::Bug; + using Hurricane::ForEachIterator; + using Katabatic::KbHalfSlacken; + + +// ------------------------------------------------------------------- +// Class : "SegmentAction". + + SegmentAction::SegmentAction ( TrackElement* segment + , unsigned int type + , DbU::Unit axisHint + , unsigned int toState + ) + : _segment (segment) + , _type (type) + , _axisHint(axisHint) + , _toState (toState) + { } + + + bool SegmentAction::doAction ( RoutingEventQueue& queue ) + { + // Note: + // "_immediate" ripup flags was associated with "perpandicular", as they + // must be re-inserted *before* any parallel. Must look to solve the redundancy. + + DebugSession::open( _segment->getNet(), 200 ); + + if (_type & Perpandicular) { + ltrace(200) << "* Riping Pp " << _segment << endl; + } else { + ltrace(200) << "* Riping // " << _segment << endl; + } + + if (_segment->isFixed()) { DebugSession::close(); return true; } + + DataNegociate* data = _segment->getDataNegociate(); + if (data == NULL) { DebugSession::close(); return true; } + + if (_type & ResetRipup) data->resetRipupCount(); + + if (_type & ToState) { + data->setState ( _toState ); + data->setRipupCount( Session::getKiteEngine()->getRipupLimit(_segment) ); + } + + if (_segment->getTrack()) Session::addRemoveEvent( _segment ); + + RoutingEvent* event = data->getRoutingEvent(); + if (event == NULL) { + cerr << Bug( "Missing Event on %p:%s" + , _segment->base()->base(),getString(_segment).c_str() ) << endl; + DebugSession::close(); + return true; + } + + if ( (_type & AxisHint) /*and not _segment->isSlackenDogleg()*/ ) { + ltrace(200) << "Setting Axis Hint: @" << DbU::getValueString(_axisHint) << endl; + event->setAxisHint( _axisHint ); + } + + // It is possible that this code could be disabled. + // There should be no need to move the axis of the segment to be inserted, + // it will automatically slot into the empty track, if any. + if (_type & MoveToAxis) { + ltrace(200) << "Moving Axis To: @" << DbU::getValueString(_axisHint) << endl; + _segment->setAxis( _axisHint ); + } + + if (_type & ToRipupLimit) { + unsigned int limit = Session::getKiteEngine()->getRipupLimit(_segment); + if (limit > data->getRipupCount()) + data->setRipupCount( limit ); + } + + unsigned int eventLevel = 0; + if (_type & EventLevel1) eventLevel = 1; + if (_type & EventLevel2) eventLevel = 2; + if (_type & EventLevel3) eventLevel = 3; + if (_type & EventLevel4) eventLevel = 4; + if (_type & EventLevel5) eventLevel = 5; + event->setRipedByLocal( _type&RipedByLocal ); + + RoutingEvent* fork = event->reschedule( queue, eventLevel ); + + if (fork) { + unsigned int mode = RoutingEvent::Repair; + if (RoutingEvent::getStage() < RoutingEvent::Repair) + mode = (_type&PackingMode) ? RoutingEvent::Pack : RoutingEvent::Negociate; + fork->setMode( mode ); + } + + DebugSession::close(); + return true; + } + + +// ------------------------------------------------------------------- +// Class : "SegmentFsm". + + + SegmentFsm::SegmentFsm ( RoutingEvent* event, RoutingEventQueue& queue, RoutingEventHistory& history ) + : _event (event) + , _queue (queue) + , _history (history) + , _state (0) + , _data (NULL) + , _constraint () + , _optimal () + , _costs () + , _actions () + , _fullBlocked (true) + { + TrackElement* segment = _event->getSegment(); + unsigned int depth = Session::getRoutingGauge()->getLayerDepth(segment->getLayer()); + _event->setTracksFree ( 0 ); + + _data = segment->getDataNegociate(); + if ( !_data ) { + _state = MissingData; + return; + } + + _data->update(); + _event->revalidate(); + + _constraint = _event->getConstraints(); + _optimal = _event->getOptimal(); + + const Interval& perpandicular = _event->getPerpandicularFree (); + + ltrace(148) << "Katabatic intervals:" << endl; + ltrace(148) << "* Optimal: " << _optimal << endl; + ltrace(148) << "* Constraints: " << _constraint << endl; + ltrace(148) << "* Perpandicular: " << perpandicular << endl; + ltrace(148) << "* AxisHint: " << DbU::getValueString(_event->getAxisHint()) << endl; + + if ( _event->getTracksNb() ) { + if ( _constraint.getIntersection(perpandicular).isEmpty() ) { + ltrace(200) << "Perpandicular free is too tight." << endl; + _state = EmptyTrackList; + } else + _constraint.intersection ( perpandicular ); + } else { + ltrace(200) << "No Track in perpandicular free." << endl; + _state = EmptyTrackList; + } + + if ( _state == EmptyTrackList ) return; + + ltrace(148) << "Negociate intervals:" << endl; + ltrace(148) << "* Optimal: " << _optimal << endl; + ltrace(148) << "* Constraints: " << _constraint << endl; + ltracein(148); + + // if ( segment->isLocal() and (_data->getState() >= DataNegociate::MaximumSlack) ) + // _constraint.inflate ( 0, DbU::lambda(1.0) ); + + bool inLocalDepth = (depth < 3); + bool isOneLocalTrack = (segment->isLocal()) + and (segment->base()->getAutoSource()->getGCell()->getGlobalsCount(depth) >= 9.0); + + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); + forEach ( Track*, itrack, Tracks_Range::get(plane,_constraint)) { + unsigned int costflags = 0; + costflags |= (segment->isLocal() and (depth >= 3)) ? TrackCost::LocalAndTopDepth : 0; + + _costs.push_back ( itrack->getOverlapCost(segment,costflags) ); + _costs.back().setAxisWeight ( _event->getAxisWeight(itrack->getAxis()) ); + _costs.back().incDeltaPerpand ( _data->getWiringDelta(itrack->getAxis()) ); + if (segment->isGlobal()) _costs.back().setForGlobal(); + + if ( inLocalDepth and (_costs.back().getDataState() == DataNegociate::MaximumSlack) ) + _costs.back().setInfinite (); + + if ( isOneLocalTrack + and _costs.back().isOverlapGlobal() + and (_costs.back().getDataState() >= DataNegociate::ConflictSolveByHistory) ) + _costs.back().setInfinite (); + + _costs.back().consolidate (); + if ( _fullBlocked and (not _costs.back().isBlockage() and not _costs.back().isFixed()) ) + _fullBlocked = false; + + ltrace(149) << "| " << _costs.back() << ((_fullBlocked)?" FB ": " -- ") << (*itrack) << endl; + } + ltraceout(148); + + if ( _costs.empty() ) { + Track* nearest = plane->getTrackByPosition(_constraint.getCenter()); + + if ( (nearest->getAxis() < _constraint.getVMin()) + or (nearest->getAxis() > _constraint.getVMax()) ) { + //setUnimplemented (); + //cerr << "[UNIMPLEMENTED] " << segment << " no Track in constraint interval " + // << _constraint << " " << "." << endl; + } else { + cerr << Bug(" %s Track_Range() failed to find Tracks in %s (they exists)." + ,getString(segment).c_str() + ,getString(_constraint).c_str() + ) << endl; + } + _state = EmptyTrackList; + } + + unsigned int flags = 0; + flags |= (segment->isStrap()) ? TrackCost::IgnoreAxisWeight : 0; + flags |= (segment->isLocal() + and (_data->getState() < DataNegociate::Minimize) + and (_data->getRipupCount() < 5)) + ? TrackCost::DiscardGlobals : 0; + flags |= (RoutingEvent::getStage() == RoutingEvent::Repair) ? TrackCost::IgnoreSharedLength : 0; + + if ( flags & TrackCost::DiscardGlobals ) { + ltrace(200) << "TrackCost::Compare() - DiscardGlobals" << endl; + } + + sort ( _costs.begin(), _costs.end(), TrackCost::Compare(flags) ); + + size_t i=0; + for ( ; (i<_costs.size()) and _costs[i].isFree() ; i++ ); + _event->setTracksFree ( i ); + } + + + void SegmentFsm::addAction ( TrackElement* segment + , unsigned int type + , DbU::Unit axisHint + , unsigned int toSegmentFsm ) + { + if ( not segment->isFixed() ) { + _actions.push_back ( SegmentAction(segment,type,axisHint,toSegmentFsm) ); + ltrace(200) << "SegmentFsm::addAction(): " << segment << endl; + } + } + + + void SegmentFsm::doActions () + { + ltrace(200) << "SegmentFsm::doActions() - " << _actions.size() << endl; + + bool ripupOthersParallel = false; + bool ripedByLocal = getEvent()->getSegment()->isLocal(); + + for ( size_t i=0 ; i<_actions.size() ; i++ ) { + if ( ripedByLocal ) _actions[i].setFlag ( SegmentAction::RipedByLocal ); + if ( _actions[i].getType() & SegmentAction::OtherRipup ) { + ripupOthersParallel = true; + } + } + + for ( size_t i=0 ; i<_actions.size() ; i++ ) { + if ( (_actions[i].getType() & SegmentAction::SelfInsert) and ripupOthersParallel ) + _actions[i].setFlag ( SegmentAction::EventLevel3 ); + + DebugSession::open ( _actions[i].getSegment()->getNet(), 200 ); + if ( not _actions[i].doAction(_queue) ) { + cinfo << "[INFO] Failed action on " << _actions[i].getSegment() << endl; + } + DebugSession::close (); + } + + _actions.clear (); + } + + + bool SegmentFsm::insertInTrack ( size_t i ) + { + ltrace(200) << "SegmentFsm::insertInTrack() istate:" << _event->getInsertState() + << " track:" << i << endl; + + _event->incInsertState(); + switch ( _event->getInsertState() ) { + case 1: + if ( Manipulator(_event->getSegment(),*this).insertInTrack(i) ) return true; + _event->incInsertState(); + case 2: + if ( Manipulator(_event->getSegment(),*this).shrinkToTrack(i) ) return true; + _event->incInsertState(); + case 3: + if ( Manipulator(_event->getSegment(),*this).forceToTrack(i) ) return true; + _event->incInsertState(); + } + return false; + } + + + bool SegmentFsm::conflictSolveByHistory () + { + bool success = false; + RipupHistory ripupHistory ( _event ); + RoutingEvent* event; + TrackElement* segment = _event->getSegment(); + + ltrace(200) << "SegmentFsm::conflictSolveByHistory()" << endl; + + size_t maxDepth = min( getHistory().size(), (size_t)300 ); + size_t depth = 0; + while ( (ripupHistory.getDislodgersCount() < 3) and (depth < maxDepth) ) { + event = getHistory().getRNth(depth++); + if (not event) continue; + if ( (event->getSegment() != segment) and ripupHistory.isDislodger(event) ) + ripupHistory.addDislodger( event ); + } + + //ripupHistory.print ( cout ); + + UnionIntervals* intervals = ripupHistory.getUnionIntervals( segment->getAxis() ); + if (intervals and not intervals->empty()) { + + DbU::Unit minConflict = intervals->getVMin(); + DbU::Unit maxConflict = intervals->getVMax(); + Interval canonical = segment->getCanonicalInterval(); + bool sourceDogleg = canonical.contains(minConflict); + bool targetDogleg = canonical.contains(maxConflict); + Point breakPoint; + + if (sourceDogleg) { + if (segment->isHorizontal()) { + breakPoint = Point( minConflict, segment->getAxis() ); + ltrace(200) << breakPoint << endl; + } else { + breakPoint = Point( segment->getAxis(), minConflict ); + ltrace(200) << breakPoint << endl; + } + + Katabatic::GCell* dogLegGCell = Session::getGCellUnder( breakPoint.getX(), breakPoint.getY() ); + if (dogLegGCell) { + if (segment->canDogleg(dogLegGCell)) + success = segment->makeDogleg(dogLegGCell); + } else { + cerr << Bug( "No GCell under source %s for:\n %s." + , getString(breakPoint).c_str(), getString(segment).c_str() ) << endl; + } + } + + if (not success and targetDogleg) { + if (segment->isHorizontal()) { + breakPoint = Point( maxConflict, segment->getAxis() ); + ltrace(200) << breakPoint << endl; + } else { + breakPoint = Point( segment->getAxis(), maxConflict ); + ltrace(200) << breakPoint << endl; + } + + Katabatic::GCell* dogLegGCell = Session::getGCellUnder( breakPoint.getX(), breakPoint.getY() ); + if (dogLegGCell) { + if (segment->canDogleg(dogLegGCell)) { + success = segment->makeDogleg(dogLegGCell); + } + } else { + cerr << Bug( "No GCell under target %s for:\n %s." + , getString(breakPoint).c_str(), getString(segment).c_str() ) << endl; + } + } + } else { + ltrace(200) << "No disloggers found @" << DbU::getValueString(segment->getAxis()) << endl; + + Interval freeSpan = Session::getKiteEngine()-> + getTrackByPosition(segment->getLayer(),segment->getAxis())-> + getFreeInterval(segment->getSourceU(),segment->getNet()); + + if (freeSpan.contains(segment->getCanonicalInterval())) { + ltrace(200) << "Disloggers vanished, Segment can be re-inserted." << endl; + success = true; + } + } + + return success; + } + + + bool SegmentFsm::conflictSolveByPlaceds () + { + bool success = false; + Interval constraints; + vector candidates; + TrackElement* segment = _event->getSegment(); + bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(0.5) : segment->canMoveUp(1.0); // MARK 1 + unsigned int relaxFlags = Manipulator::NoDoglegReuse + | ((_data and (_data->getStateCount() < 2)) ? Manipulator::AllowExpand + : Manipulator::NoExpand); + + ltrace(200) << "SegmentFsm::conflictSolveByPlaceds()" << endl; + ltrace(200) << "| Candidates Tracks: " << endl; + + segment->base()->getConstraints( constraints ); + Interval overlap = segment->getCanonicalInterval(); + RoutingPlane* plane = Session::getKiteEngine()->getRoutingPlaneByLayer(segment->getLayer()); + Track* track = plane->getTrackByPosition(constraints.getVMin(),Constant::Superior); + + if (not track) { + cerr << Bug( "SegmentFsm::conflictSolveByPlaceds():\n" + " For: %s\n" + " In %s, no Track near %s" + , getString(segment).c_str() + , getString(plane).c_str() + , DbU::getValueString(constraints.getVMin()).c_str() + ) << endl; + return false; + } + + for ( ; track and track->getAxis() <= constraints.getVMax() ; track = track->getNextTrack() ) { + candidates.push_back( Cs1Candidate(track) ); + + size_t begin; + size_t end; + TrackElement* other; + Net* otherNet = NULL; + Interval otherOverlap; + bool otherIsGlobal = false; + + track->getOverlapBounds( overlap, begin, end ); + candidates.back().setBegin( begin ); + candidates.back().setEnd ( end ); + + ltrace(200) << "* " << track << " [" << begin << ":" << end << "]" << endl; + + for ( ; (begin < end) ; ++begin ) { + other = track->getSegment( begin ); + + if (other->getNet() == segment->getNet()) { + ltrace(200) << " | " << begin << " Same net: " << " " << other << endl; + continue; + } + if (not other->getCanonicalInterval().intersect(overlap)) { + ltrace(200) << " | " << begin << " No Conflict: " << " " << other << endl; + if (otherNet == NULL) candidates.back().setBegin( begin+1 ); + continue; + } + ltrace(200) << " | " << begin << " Conflict: " << " " << other << endl; + + if (otherNet != other->getNet()) { + if (otherNet) { + if (otherIsGlobal) { + candidates.back().addConflict( otherOverlap ); + ltrace(200) << " | Other overlap G: " << otherOverlap << endl; + } else { + ltrace(200) << " | Other overlap L: " << otherOverlap << " ignored." << endl; + } + } + otherNet = other->getNet(); + otherOverlap = other->getCanonicalInterval(); + otherIsGlobal = other->isGlobal() or other->isBlockage(); + } else { + otherOverlap.merge(other->getCanonicalInterval()); + otherIsGlobal = otherIsGlobal or other->isGlobal() or other->isBlockage(); + } + } + if (not otherOverlap.isEmpty()) { + if (otherIsGlobal) { + candidates.back().addConflict( otherOverlap ); + ltrace(200) << " | Other overlap G: " << otherOverlap << endl; + } else { + ltrace(200) << " | Other overlap L: " << otherOverlap << " ignored." << endl; + } + } + + candidates.back().consolidate(); + } + + sort( candidates.begin(), candidates.end() ); + + for ( size_t icandidate=0 ; icandidategetSegment( overlap.getCenter() ); + if (not other) { + cbug << Error("conflictSolveByPlaceds(): No segment under overlap center.") << endl; + continue; + } + + if (other->isGlobal()) { + ltrace(200) << "conflictSolveByPlaceds() - Conflict with global, other move up" << endl; + if ((success = Manipulator(other,*this).moveUp())) break; + } + + ltrace(200) << "conflictSolveByPlaceds() - Relaxing self" << endl; + + if (Manipulator(segment,*this).relax(overlap0,relaxFlags)) { + success = true; + break; + } else { + if ( not canMoveUp + and (relaxFlags != Manipulator::NoExpand) + and Manipulator(segment,*this).relax(overlap0,Manipulator::NoExpand|Manipulator::NoDoglegReuse) ) { + ltrace(200) << "Cannot move up but successful narrow breaking." << endl; + success = true; + break; + } + } + } + + if ( not success and segment->isGlobal() and (_costs.size() <= 1) ) { + ltrace(200) << "Overconstrained perpandiculars, rip them up. On track:" << endl; + ltrace(200) << " " << track << endl; + Manipulator(segment,*this).ripupPerpandiculars (); + success = true; + } + + return success; + } + + + bool SegmentFsm::solveTerminalVsGlobal () + { + TrackElement* segment = getEvent()->getSegment(); + ltrace(200) << "SegmentFsm::solveTerminalVsGlobal: " << " " << segment << endl; + + if (not (segment->isTerminal() and segment->isLocal())) return false; + + for ( size_t icost=0 ; icost<_costs.size() ; ++icost ) { + Interval overlap = segment->getCanonicalInterval(); + size_t begin; + size_t end; + getCost(icost).getTrack()->getOverlapBounds( overlap, begin, end ); + + for ( ; begingetSegment(begin); + Interval otherOverlap = other->getCanonicalInterval(); + + if (other->getNet() == segment->getNet()) continue; + if (not other->isGlobal()) continue; + if (not otherOverlap.contains(overlap)) continue; + + ltrace(200) << "| Global candidate:" << other << endl; + if (Manipulator(other,*this).moveUp(Manipulator::AllowTerminalMoveUp)) { + ltrace(200) << "| Global candidate selected." << endl; + return true; + } + } + } + + return false; + } + + + bool SegmentFsm::solveFullBlockages () + { + bool success = false; + TrackElement* segment = getEvent()->getSegment(); + + ltrace(200) << "SegmentFsm::solveFullBlockages: " << " " << segment << endl; + ltracein(200); + + if ( segment->isLocal() ) { + success = Manipulator(segment,*this).pivotUp(); + if ( not success ) { + ltrace(200) << "Tightly constrained local segment overlapping a blockage, move up." << endl; + ltrace(200) << segment << endl; + success = Manipulator(segment,*this).moveUp + (Manipulator::AllowLocalMoveUp|Manipulator::AllowTerminalMoveUp); + } + } else { + Interval overlap = segment->getCanonicalInterval(); + size_t begin; + size_t end; + + getCost(0).getTrack()->getOverlapBounds ( overlap, begin, end ); + for ( ; begingetSegment(begin); + Interval otherOverlap = other->getCanonicalInterval(); + + if ( other->getNet() == segment->getNet() ) continue; + if ( not otherOverlap.intersect(overlap) ) continue; + + ltrace(200) << "| " << begin << " Blockage conflict: " << " " << other << endl; + if ( (success = Manipulator(segment,*this).relax + (otherOverlap,Manipulator::NoDoglegReuse|Manipulator::NoExpand)) ) { + break; + } + } + } + if ( not success ) { + cparanoid << Error( "Tighly constrained segment overlapping a blockage:\n %s" + , getString(segment).c_str() ) << endl; + ltrace(200) << "Segment is hard blocked, bypass to Unimplemented." << endl; + } + + ltraceout(200); + return success; + } + + + bool SegmentFsm::desaturate () + { + ltrace(200) << "SegmentFsm::desaturate()" << endl; + ltracein(200); + + size_t itrack = 0; + +#if THIS_IS_DISABLED + TrackElement* segment = _event->getSegment(); + for ( ; itrackgetNet(); + Interval toFree (segment->getCanonicalInterval()); + bool success = true; + + for ( size_t i = begin ; success and (i < end) ; i++ ) { + TrackElement* segment2 = track->getSegment(i); + + ltrace(200) << "* Looking // " << segment2 << endl; + + if ( segment2->getNet() == ownerNet ) continue; + if ( not toFree.intersect(segment2->getCanonicalInterval()) ) continue; + if ( segment2->isFixed() or not segment2->isBipoint() ) { + success = false; + continue; + } + + DataNegociate* data2 = segment2->getDataNegociate(); + if ( not data2 ) { + ltrace(200) << "No DataNegociate, ignoring." << endl; + success = false; + continue; + } + + ltrace(200) << "- Forced moveUp " << segment2 << endl; + if ( not (success=Manipulator(segment2,*this).moveUp(Manipulator::AllowTerminalMoveUp)) ) { + continue; + } + } + + if ( success ) { + setState ( SegmentFsm::OtherRipup ); + addAction( segment + , SegmentAction::SelfInsert|SegmentAction::MoveToAxis + , getCost(itrack).getTrack()->getAxis() + ); + break; + } + } + } + +#endif + ltraceout(200); + return (itrack < _costs.size()); + } + + + + bool SegmentFsm::_slackenStrap ( TrackElement*& segment, DataNegociate*& data, unsigned int flags ) + { + ltrace(200) << "Strap segment Fsm." << endl; + + bool success = false; + unsigned int nextState = data->getState(); + + switch ( data->getState() ) { + case DataNegociate::RipupPerpandiculars: + nextState = DataNegociate::Minimize; + success = Manipulator(segment,*this).ripupPerpandiculars(); + if (success) break; + case DataNegociate::Minimize: + if (data->getStateCount() >= 2) { + nextState = DataNegociate::MaximumSlack; + } + success = Manipulator(segment,*this).minimize(); + if (success) break; + case DataNegociate::Dogleg: + case DataNegociate::Slacken: + case DataNegociate::ConflictSolveByHistory: + case DataNegociate::ConflictSolveByPlaceds: + case DataNegociate::MoveUp: + case DataNegociate::MaximumSlack: + case DataNegociate::Unimplemented: + nextState = DataNegociate::Unimplemented; + break; + } + + if (not success and (nextState != DataNegociate::Unimplemented)) + success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); + + if (not (flags&NoTransition)) { + data->setState( nextState ); + ltrace(200) << "Incrementing state (after): " << nextState << " count:" << data->getStateCount() << endl; + } + + return success; + } + + + bool SegmentFsm::_slackenLocal ( TrackElement*& segment, DataNegociate*& data, unsigned int flags ) + { + ltrace(200) << "Local segment Fsm." << endl; + + bool success = false; + unsigned int nextState = data->getState(); + + switch (data->getState()) { + case DataNegociate::RipupPerpandiculars: + nextState = DataNegociate::Minimize; + success = Manipulator(segment,*this).ripupPerpandiculars(); + if (success) break; + case DataNegociate::Minimize: + if (isFullBlocked() and not segment->isTerminal()) { + ltrace(200) << "Is Fully blocked." << endl; + nextState = DataNegociate::Unimplemented; + break; + } + nextState = DataNegociate::Dogleg; + success = Manipulator(segment,*this).minimize(); + if (success) break; + case DataNegociate::Dogleg: + nextState = DataNegociate::Slacken; + success = Manipulator(segment,*this).makeDogleg(); + if (success) break; + case DataNegociate::Slacken: + nextState = DataNegociate::ConflictSolveByPlaceds; + success = Manipulator(segment,*this).slacken(); + if (success) break; + case DataNegociate::ConflictSolveByHistory: + case DataNegociate::ConflictSolveByPlaceds: + nextState = DataNegociate::LocalVsGlobal; + success = conflictSolveByHistory(); + break; + case DataNegociate::LocalVsGlobal: + nextState = DataNegociate::MoveUp; + success = solveTerminalVsGlobal(); + if (success) break; + break; + case DataNegociate::MoveUp: + nextState = DataNegociate::MaximumSlack; + success = Manipulator(segment,*this).moveUp(); + if (success) break; + case DataNegociate::MaximumSlack: + if (segment->isStrap()) { + if ( (nextState < DataNegociate::MaximumSlack) or (data->getStateCount() < 2) ) { + nextState = DataNegociate::MaximumSlack; + success = conflictSolveByPlaceds(); + if (success) break; + } + } + case DataNegociate::Unimplemented: + nextState = DataNegociate::Unimplemented; + break; + } + + if (not success and (nextState != DataNegociate::Unimplemented)) { + if (data->getStateCount() < 6) + success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); + } + + if (not success + and (nextState == DataNegociate::Unimplemented) + and segment->isSlackened() + and isFullBlocked()) { + if (solveFullBlockages()) nextState = DataNegociate::MoveUp; + } + + if (not (flags&NoTransition)) { + data->setState( nextState ); + ltrace(200) << "Incrementing state (after): " << nextState << " count:" << data->getStateCount() << endl; + } + + return success; + } + + + bool SegmentFsm::_slackenGlobal ( TrackElement*& segment, DataNegociate*& data, unsigned int flags ) + { + bool success = false; + unsigned int nextState = data->getState(); + + switch ( data->getState() ) { + case DataNegociate::RipupPerpandiculars: + case DataNegociate::Minimize: + case DataNegociate::Dogleg: + ltrace(200) << "Global, SegmentFsm: RipupPerpandiculars." << endl; + nextState = DataNegociate::Slacken; + break; + case DataNegociate::Slacken: + ltrace(200) << "Global, SegmentFsm: Slacken." << endl; + if ((success = Manipulator(segment,*this).slacken(KbHalfSlacken))) { + nextState = DataNegociate::RipupPerpandiculars; + break; + } + case DataNegociate::MoveUp: + ltrace(200) << "Global, SegmentFsm: MoveUp." << endl; + if ((success = Manipulator(segment,*this).moveUp(Manipulator::AllowShortPivotUp))) { + break; + } + nextState = DataNegociate::ConflictSolveByHistory; + break; + case DataNegociate::ConflictSolveByHistory: + case DataNegociate::ConflictSolveByPlaceds: + ltrace(200) << "Global, SegmentFsm: ConflictSolveByHistory or ConflictSolveByPlaceds." << endl; + if ((success = conflictSolveByPlaceds())) { + if (segment->canMoveUp(1.0)) + nextState = DataNegociate::MoveUp; + else { + if (data->getStateCount() > 3) + nextState = DataNegociate::MaximumSlack; + } + if (segment->getDataNegociate()->getState() < DataNegociate::ConflictSolveByHistory) + nextState = segment->getDataNegociate()->getState(); + break; + } + case DataNegociate::MaximumSlack: + if ((success=Manipulator(segment,*this).forceOverLocals())) { + break; + } + case DataNegociate::Unimplemented: + ltrace(200) << "Global, SegmentFsm: MaximumSlack or Unimplemented." << endl; + nextState = DataNegociate::Unimplemented; + break; + } + + if (not success and (nextState != DataNegociate::Unimplemented)) { + if (data->getStateCount() < 6) + success = Manipulator(segment,*this).ripupPerpandiculars(Manipulator::ToRipupLimit); + } + + // Special case: all tracks are overlaping a blockage. + if (not success + and (nextState == DataNegociate::Unimplemented) + and segment->isSlackened() ) { + if (solveFullBlockages()) nextState = DataNegociate::MoveUp; + } + + if (not (flags&NoTransition)) { + if (data->getChildSegment()) { + TrackElement* child = segment; + ltrace(200) << "Incrementing state of childs (after): " << endl; + while ( child ) { + ltrace(200) << "| " << child << endl; + if (child->base()->isGlobal()) { + child->getDataNegociate()->setState( nextState ); + ltrace(200) << "| Update:" << nextState << " count:" << child->getDataNegociate()->getStateCount() << endl; + } + TrackElement* parent = child; + child = parent->getDataNegociate()->getChildSegment(); + parent->getDataNegociate()->setChildSegment( NULL ); + } + } else { + data->setState( nextState ); + ltrace(200) << "Incrementing state (after): " << segment << endl; + ltrace(200) << "| " << nextState << " count:" << data->getStateCount() << endl; + } + } + + return success; + } + + + bool SegmentFsm::slackenTopology ( unsigned int flags ) + { + bool success = false; + TrackElement* segment = getEvent()->getSegment(); + DataNegociate* data = segment->getDataNegociate (); + unsigned int actionFlags = SegmentAction::SelfInsert|SegmentAction::EventLevel5; + + DebugSession::open( segment->getNet(), 200 ); + ltrace(200) << "Slacken Topology for " << segment->getNet() + << " " << segment << endl; + ltracein(200); + + if (not segment or not data) { ltraceout(200); DebugSession::close(); return false; } + + _event->resetInsertState(); + data->resetRipupCount(); + + if (segment->isStrap()) { success = _slackenStrap ( segment, data, flags ); } + else if (segment->isLocal()) { success = _slackenLocal ( segment, data, flags ); } + else { success = _slackenGlobal( segment, data, flags ); } + + if (success) { + actionFlags |= SegmentAction::ResetRipup; + addAction( segment, actionFlags ); + } else { + clearActions(); + if (data->getState() == DataNegociate::Unimplemented) { + cinfo << "[UNSOLVED] " << segment << " unable to slacken topology." << endl; + } + } + + ltraceout(200); + DebugSession::close(); + + return success; + } + + +} // Kite namespace. diff --git a/kite/src/Session.cpp b/kite/src/Session.cpp index 17e320d3..b6e6c2ff 100644 --- a/kite/src/Session.cpp +++ b/kite/src/Session.cpp @@ -1,15 +1,9 @@ - -// -*- C++ -*- +// -*- mode: C++; explicit-buffer-name: "Session.cpp" -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,13 +11,11 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./Session.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include "hurricane/Bug.h" +#include "hurricane/Point.h" #include "hurricane/Error.h" #include "katabatic/GCellGrid.h" #include "kite/Session.h" @@ -34,7 +26,6 @@ namespace { - using namespace Kite; @@ -43,12 +34,11 @@ namespace { " Session already open for %s (internal error)."; -} // End of local namespace. +} // Anonymous namespace. namespace Kite { - using std::cerr; using std::endl; using Hurricane::tab; @@ -57,39 +47,32 @@ namespace Kite { using Hurricane::ltraceout; using Hurricane::Error; using Hurricane::Bug; + using Hurricane::Point; // ------------------------------------------------------------------- // Class : "Session". - Session::Session ( KiteEngine* kite ) : Katabatic::Session(kite) , _insertEvents() , _removeEvents() , _sortEvents () - { - //_addCanonizeCb ( _computeCagedConstraints ); - } + { } void Session::_postCreate () - { - Katabatic::Session::_postCreate (); - } + { Katabatic::Session::_postCreate(); } Session::~Session () { } - size_t Session::_preDestroy () + void Session::_preDestroy () { - _isEmpty (); - - size_t count = Katabatic::Session::_preDestroy (); - - return count; + _isEmpty(); + Katabatic::Session::_preDestroy(); } @@ -97,16 +80,16 @@ namespace Kite { { ltrace(110) << "Kite::Session::open()" << endl; - Session* session = Session::get (); - if ( session ) { - if ( session->_getKiteEngine() != kite ) - throw Error ( reopenSession, getString(session->getKiteEngine()).c_str() ); + Session* session = Session::get(); + if (session) { + if (session->_getKiteEngine() != kite) + throw Error( reopenSession, getString(session->getKiteEngine()).c_str() ); return session; } session = new Session ( kite ); - session->_postCreate (); + session->_postCreate(); return session; } @@ -120,14 +103,6 @@ namespace Kite { { return Session::getKiteEngine()->getConfiguration(); } - void Session::link ( TrackElement* trackSegment ) - { Session::get("link(TrackElement*)")->_getKiteEngine()->_link(trackSegment); } - - - void Session::unlink ( TrackElement* trackSegment ) - { Session::get("unlink(TrackElement*)")->_getKiteEngine()->_unlink(trackSegment); } - - TrackElement* Session::lookup ( Segment* segment ) { return Session::get("Session::lookup(Segment*)")->_getKiteEngine()->_lookup(segment); } @@ -136,10 +111,6 @@ namespace Kite { { return Session::get("lookup(AutoSegment*)")->_getKiteEngine()->_lookup ( segment ); } - Katabatic::GCell* Session::lookup ( Katabatic::GCell* gcell ) - { return Session::get("lookup(Katabatic::GCell*)")->_getKiteEngine()->getGCellGrid()->getGCell(gcell->getIndex()); } - - void Session::setInterrupt ( bool state ) { Session::get("setInterrupt()")->_getKiteEngine()->setInterrupt(state); } @@ -166,115 +137,102 @@ namespace Kite { size_t Session::_revalidate () { + ltrace(90) << "Kite::Session::_revalidate()" << endl; + ltracein(90); + set packTracks; - for ( size_t i=0 ; i < _removeEvents.size() ; i++ ) { - if ( !_removeEvents[i]._segment->getTrack() ) continue; + for ( size_t i=0 ; i<_removeEvents.size() ; ++i ) { + if (not _removeEvents[i]._segment->getTrack()) continue; - packTracks.insert ( _removeEvents[i]._segment->getTrack() ); - _removeEvents[i]._segment->detach (); + packTracks.insert( _removeEvents[i]._segment->getTrack() ); + _removeEvents[i]._segment->detach(); } - _removeEvents.clear (); + _removeEvents.clear(); - for ( set::iterator it=packTracks.begin() ; it != packTracks.end() ; it++ ) - (*it)->pack (); + for ( set::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it ) + (*it)->doRemoval(); - for ( size_t i=0 ; i < _insertEvents.size() ; i++ ) { - if ( _insertEvents[i]._segment ) { - _insertEvents[i]._track->insert ( _insertEvents[i]._segment ); + for ( size_t i=0 ; i<_insertEvents.size() ; ++i ) { + if (_insertEvents[i]._segment) { + _insertEvents[i]._track->insert( _insertEvents[i]._segment ); } - if ( _insertEvents[i]._marker ) _insertEvents[i]._track->insert ( _insertEvents[i]._marker ); + if (_insertEvents[i]._marker) _insertEvents[i]._track->insert( _insertEvents[i]._marker ); } - _insertEvents.clear (); + _insertEvents.clear(); // Check if to be destroyeds are not associateds with TrackSegments. const set& destroyeds = getDestroyeds(); set::const_iterator idestroyed = destroyeds.begin(); - for ( ; idestroyed != destroyeds.end() ; idestroyed++ ) { - if ( lookup(*idestroyed) ) { - throw Error("Destroyed AutoSegment is associated with a TrackSegment\n" - " (%s)" - ,getString(*idestroyed).c_str()); + for ( ; idestroyed != destroyeds.end() ; ++idestroyed ) { + if (lookup(*idestroyed)) { + ltraceout(90); + throw Error( "Destroyed AutoSegment is associated with a TrackSegment\n" + " (%s)" + , getString(*idestroyed).c_str()); } } - size_t count = Katabatic::Session::_revalidate (); + size_t count = Katabatic::Session::_revalidate(); Interval span; - vector processeds; - const vector& revalidateds = getRevalidateds (); - const set& netsModificateds = getNetsModificateds (); + const vector& revalidateds = getRevalidateds(); + //const set& netsModificateds = getNetsModificateds(); - for ( size_t i=0 ; ibase() ); + for ( size_t i=0 ; iisCanonical()) continue; + + //Net* currentNet = NULL; + TrackElement* trackSegment = lookup( revalidateds[i] ); - if ( trackSegment && !trackSegment->isRevalidated() ) { - if ( trackSegment->getNet() != currentNet ) { - currentNet = trackSegment->getNet(); - invalidEvent = (netsModificateds.find(currentNet) != netsModificateds.end()); - } - trackSegment->revalidate ( invalidEvent ); - processeds.push_back ( trackSegment ); - - Track* track = trackSegment->getTrack(); - if ( track ) { - track->forceSort (); - _sortEvents.insert ( track ); - } + if (trackSegment and trackSegment->isInvalidated()) { + trackSegment->revalidate(); } } - for ( size_t i=0 ; isetRevalidated ( false ); + _doglegReset(); # if defined(CHECK_DATABASE) unsigned int overlaps = 0; # endif - for ( set::iterator it=_sortEvents.begin() - ; it != _sortEvents.end() - ; it++ - ) { - (*it)->sort (); + for ( set::iterator it=_sortEvents.begin() ; it!=_sortEvents.end() ; ++it ) { + (*it)->doReorder(); # if defined(CHECK_DATABASE) - (*it)->_check ( overlaps, "Session::_revalidate() - track sorting." ); + (*it)->check( overlaps, "Session::_revalidate() - track sorting." ); # endif } - set faileds; - for ( set::iterator inet=netsModificateds.begin() ; inet != netsModificateds.end() ; inet++ ) { - _getKiteEngine()->_computeCagedConstraints ( *inet, faileds ); - } - # if defined(CHECK_DATABASE) - for ( set::iterator it=packTracks.begin() ; it != packTracks.end() ; it++ ) - (*it)->_check ( overlaps, "Session::_revalidate() - on packed track." ); + for ( set::iterator it=packTracks.begin() ; it != packTracks.end() ; ++it ) + (*it)->check( overlaps, "Session::_revalidate() - on packed track." ); //_getKiteEngine()->_showOverlap (); # endif - _sortEvents.clear (); + _sortEvents.clear(); - if ( not faileds.empty() ) { +#if THIS_IS_DISABLED + if (not faileds.empty()) { set::iterator ifailed = faileds.begin(); Katabatic::GCellVector gcells; for ( ; ifailed != faileds.end() ; ++ifailed ) { (*ifailed)->getGCells ( gcells ); - (*ifailed)->makeDogLeg ( gcells[0] ); + (*ifailed)->makeDogLeg( gcells[0] ); } - count += _revalidate (); + count += _revalidate(); } +#endif + ltraceout(90); return count; } bool Session::_isEmpty () const { - if ( !_insertEvents.empty() || !_removeEvents.empty() || !_sortEvents.empty() ) { - cerr << Bug(" Session::checkEmpty() failed :\n" - " %u inserts, %u removes and %u sort events remains." + if ( not _insertEvents.empty() or not _removeEvents.empty() or not _sortEvents.empty() ) { + cerr << Bug( " Session::checkEmpty() failed :\n" + " %u inserts, %u removes and %u sort events remains." , _insertEvents.size() , _removeEvents.size() , _sortEvents .size() ) << endl; @@ -287,17 +245,13 @@ namespace Kite { void Session::_addInsertEvent ( TrackMarker* marker, Track* track ) { - _insertEvents.push_back ( Event(marker,track) ); - _addSortEvent ( track, true ); + _insertEvents.push_back( Event(marker,track) ); + _addSortEvent( track, true ); } void Session::_addInsertEvent ( TrackElement* segment, Track* track ) { -#if defined(CHECK_DETERMINISM) - cerr << "Order: Insert in @" << DbU::getValueString(track->getAxis()) - << " " << segment << endl; -#endif ltrace(200) << "addInsertEvent() " << segment << "\n @" << track << endl; @@ -311,46 +265,46 @@ namespace Kite { return; } - _insertEvents.push_back ( Event(segment,track) ); - _addSortEvent ( track, true ); + _insertEvents.push_back( Event(segment,track) ); + _addSortEvent( track, true ); } void Session::_addRemoveEvent ( TrackElement* segment ) { - if ( not segment->getTrack() ) { - cerr << Bug(" Kite::Session::addRemoveEvent() : %s is not in any Track." - ,getString(segment).c_str()) << endl; + if (not segment->getTrack()) { + cerr << Bug( " Kite::Session::addRemoveEvent() : %s is not in any Track." + , getString(segment).c_str() ) << endl; return; } ltrace(200) << "Ripup: @" << DbU::getValueString(segment->getAxis()) << " " << segment << endl; - _removeEvents.push_back ( Event(segment,segment->getTrack()) ); - _addSortEvent ( segment->getTrack(), true ); + _removeEvents.push_back( Event(segment,segment->getTrack()) ); + _addSortEvent( segment->getTrack(), true ); } void Session::_addMoveEvent ( TrackElement* segment, Track* track ) { - if ( !segment->getTrack() ) { - cerr << Bug(" Kite::Session::addMoveEvent() : %s has no target Track." - ,getString(segment).c_str()) << endl; + if (not segment->getTrack()) { + cerr << Bug( " Kite::Session::addMoveEvent() : %s has no target Track." + , getString(segment).c_str() ) << endl; return; } - _addRemoveEvent ( segment ); - _addInsertEvent ( segment, track ); + _addRemoveEvent( segment ); + _addInsertEvent( segment, track ); } void Session::_addSortEvent ( Track* track, bool forced ) { - if ( !track ) { - cerr << Bug(" Kite::Session::addSortEvent() : no Track to sort.") << endl; + if (not track ) { + cerr << Bug( " Kite::Session::addSortEvent() : no Track to sort." ) << endl; return; } - if ( forced ) track->forceSort (); - _sortEvents.insert ( track ); + if (forced) track->invalidate(); + _sortEvents.insert( track ); } @@ -361,10 +315,10 @@ namespace Kite { Record* Session::_getRecord () const { Record* record = Session::_getRecord (); - record->add ( getSlot ( "_sortEvents" , &_sortEvents ) ); + record->add( getSlot( "_sortEvents" , &_sortEvents ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/Track.cpp b/kite/src/Track.cpp index 0e64b1f3..24436d37 100644 --- a/kite/src/Track.cpp +++ b/kite/src/Track.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,39 +12,32 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./Track.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ - - -#include -#include -#include -#include - -#include "hurricane/Warning.h" -#include "hurricane/Bug.h" -#include "hurricane/Layer.h" -#include "hurricane/Net.h" -#include "kite/RoutingPlane.h" -#include "kite/Track.h" -#include "kite/TrackMarker.h" -#include "kite/DataNegociate.h" +#include +#include +#include +#include +#include "hurricane/Warning.h" +#include "hurricane/Bug.h" +#include "hurricane/Layer.h" +#include "hurricane/Net.h" +#include "kite/RoutingPlane.h" +#include "kite/Track.h" +#include "kite/TrackMarker.h" +#include "kite/DataNegociate.h" namespace { - using namespace std; using namespace CRL; using namespace Kite; struct isDetachedSegment { - bool operator() ( const TrackElement* s ) { return !s->getTrack(); }; + bool operator() ( const TrackElement* s ) { return not s->getTrack(); }; }; @@ -57,12 +45,11 @@ namespace { { return (*(v.begin()+i))->getSourceU(); } -} // End of local namespace. +} // Anonymous namespace. namespace Kite { - using std::lower_bound; using std::remove_if; using std::sort; @@ -81,7 +68,7 @@ namespace Kite { // Class : "Track". - const size_t Track::NPOS = (size_t)-1; + const size_t Track::npos = (size_t)-1; Track::Track ( RoutingPlane* routingPlane, unsigned int index ) @@ -103,9 +90,7 @@ namespace Kite { Track::~Track () - { - ltrace(90) << "Track::~Track() - " << (void*)this << endl; - } + { ltrace(90) << "Track::~Track() - " << (void*)this << endl; } void Track::_preDestroy () @@ -114,10 +99,10 @@ namespace Kite { ltracein(90); for ( size_t i=0 ; i<_segments.size() ; i++ ) - if ( _segments[i] ) _segments[i]->detach(); + if (_segments[i]) _segments[i]->detach(); for ( size_t i=0 ; i<_markers.size() ; i++ ) - if ( _markers[i] ) _markers[i]->destroy(); + if (_markers[i]) _markers[i]->destroy(); ltraceout(90); } @@ -127,7 +112,7 @@ namespace Kite { { ltrace(90) << "Track::destroy() - " << (void*)this << " " << this << endl; - Track::_preDestroy (); + Track::_preDestroy(); delete this; } @@ -148,9 +133,20 @@ namespace Kite { { return _routingPlane->getBlockageLayer(); } + Track* Track::getNextTrack () const + { return getRoutingPlane()->getTrackByIndex( getIndex()+1 ); } + + + Track* Track::getPreviousTrack () const + { + if (not getIndex()) return NULL; + return getRoutingPlane()->getTrackByIndex( getIndex()-1 ); + } + + TrackElement* Track::getSegment ( size_t index ) const { - if ( (index == NPOS) || (index >= getSize()) ) return NULL; + if ( (index == npos) or (index >= getSize()) ) return NULL; return _segments[index]; } @@ -159,12 +155,9 @@ namespace Kite { { unsigned int state; size_t begin; - size_t end; - - getIBounds ( position, begin, end, state ); - - if ( state & (MinTrackMin|MaxTrackMax) ) return NULL; + getBeginIndex( position, begin, state ); + if (state & (BeginIsTrackMin|EndIsTrackMax)) return NULL; return getSegment(begin); } @@ -172,10 +165,10 @@ namespace Kite { TrackElement* Track::getNext ( size_t& index, Net* net ) const { for ( index++ ; index < _segments.size() ; index++ ) { - if ( _segments[index]->getNet() == net ) continue; + if (_segments[index]->getNet() == net) continue; return _segments[index]; } - index = NPOS; + index = npos; return NULL; } @@ -183,15 +176,15 @@ namespace Kite { TrackElement* Track::getPrevious ( size_t& index, Net* net ) const { - for ( index-- ; index != NPOS ; index-- ) { - if ( inltrace(148) ) { + for ( index-- ; index != npos ; index-- ) { + if (inltrace(148)) { cerr << tab << index << ":"; cerr.flush(); cerr << _segments[index] << endl; } - if ( _segments[index]->getNet() == net ) continue; + if (_segments[index]->getNet() == net) continue; return _segments[index]; } - index = NPOS; + index = npos; return NULL; } @@ -208,56 +201,59 @@ namespace Kite { } - void Track::getIBounds ( DbU::Unit position, size_t& begin, size_t& end, unsigned int& state ) const + void Track::getBeginIndex ( DbU::Unit position, size_t& begin, unsigned int& state ) const { - if ( _segments.empty() ) { + if (_segments.empty()) { state = EmptyTrack; - begin = end = 0; + begin = 0; return; } - if ( position < _min ) { - cerr << Warning ( " Position %s inferior to the lower bound of %s. Returning NPOS." - , DbU::getValueString(position).c_str() - , getString(this).c_str() ) << endl; - state = BeforeFirst; - begin = end = 0; + if (position < _min) { + cerr << Warning( " Position %s inferior to the lower bound of %s. Returning npos." + , DbU::getValueString(position).c_str() + , getString(this).c_str() ) << endl; + state = BeforeFirstElement; + begin = 0; return; } - if ( position > _max ) { - cerr << Warning ( " Position %s superior to the upper bound of %s. Returning NPOS." - , DbU::getValueString(position).c_str() - , getString(this).c_str() ) << endl; - state = AfterLast; - begin = end = _segments.size() - 1; + if (position > _max) { + cerr << Warning( " Position %s superior to the upper bound of %s. Returning npos." + , DbU::getValueString(position).c_str() + , getString(this).c_str() ) << endl; + state = AfterLastElement; + begin = _segments.size()-1; return; } vector::const_iterator lowerBound - = lower_bound ( _segments.begin(), _segments.end(), position, SourceCompare() ); - begin = end = lowerBound - _segments.begin(); + = lower_bound( _segments.begin(), _segments.end(), position, SourceCompare() ); + begin = lowerBound - _segments.begin(); - if ( begin < _segments.size() ) - for ( ; (begin > 0) && (_segments[begin-1]->getNet() == _segments[begin]->getNet()) ; --begin ); + // This is suspicious. + // I guess this has been written for the case of overlapping segments from the same + // net, we find the first one of the overlapped sets. But what if they are not overlapping + // but still from the same net? + if (begin < _segments.size()) + for ( ; (begin > 0) and (_segments[begin-1]->getNet() == _segments[begin]->getNet()) ; --begin ); state = 0; - if ( (begin == 0) && (position < _segments[0]->getSourceU()) ) { - state = BeforeFirst; + if ( (begin == 0) and (position < _segments[0]->getSourceU()) ) { + state = BeforeFirstElement; } else { - if ( begin ) end = begin -= 1; + if (begin) begin -= 1; size_t usedBegin = begin; - size_t usedEnd = begin; - Interval usedInterval = expandUsedInterval ( usedBegin, usedEnd ); + Interval usedInterval = getOccupiedInterval( usedBegin ); - if ( position < usedInterval.getVMax() ) - state = Inside; + if (position < usedInterval.getVMax()) + state = InsideElement; else - if ( begin+1 == _segments.size() ) - state = AfterLast; + if (begin+1 == _segments.size()) + state = AfterLastElement; else - state = Outside; + state = OutsideElement; } } @@ -265,22 +261,20 @@ namespace Kite { void Track::getOverlapBounds ( Interval interval, size_t& begin, size_t& end ) const { unsigned int iState; - size_t iBegin; - size_t iEnd; - if ( _segments.empty() - || (interval.getVMax() <= _min) - || (interval.getVMin() >= _max)) { - begin = end = NPOS; + if ( _segments.empty() + or (interval.getVMax() <= _min) + or (interval.getVMin() >= _max)) { + begin = end = npos; return; } - getIBounds ( interval.getVMin(), begin, iEnd, iState ); - expandUsedInterval ( begin, iEnd ); + getBeginIndex ( interval.getVMin(), begin, iState ); + getOccupiedInterval( begin ); - getIBounds ( interval.getVMax(), iBegin, end, iState ); + getBeginIndex( interval.getVMax(), end, iState ); while ( end < _segments.size() ) { - if ( _segments[end++]->getSourceU() >= interval.getVMax() ) break; + if (_segments[end++]->getSourceU() >= interval.getVMax()) break; } } @@ -302,34 +296,32 @@ namespace Kite { ltracein(148); vector::const_iterator lowerBound - = lower_bound ( _markers.begin(), _markers.end(), interval.getVMin(), TrackMarker::Compare() ); + = lower_bound( _markers.begin(), _markers.end(), interval.getVMin(), TrackMarker::Compare() ); size_t mbegin = lowerBound - _markers.begin(); - for ( ; (mbegin < _markers.size()) - && (_markers[mbegin]->getSourceU() <= interval.getVMax()) ; mbegin++ ) { + for ( ; (mbegin < _markers.size()) + and (_markers[mbegin]->getSourceU() <= interval.getVMax()) ; mbegin++ ) { ltrace(148) << "| @" << DbU::getValueString(_axis) << _markers[mbegin] << endl; if ( _markers[mbegin]->getNet() != net ) { ltrace(148) << "* Mark: @" << DbU::getValueString(_axis) << " " << _markers[mbegin] << endl; - cost.incTerminals ( _markers[mbegin]->getWeight(this) ); + cost.incTerminals( _markers[mbegin]->getWeight(this) ); } } - if ( begin == NPOS ) { - ltrace(148) << " begin == NPOS (after last TrackElement)." << endl; + if (begin == npos) { + ltrace(148) << " begin == npos (after last TrackElement)." << endl; ltraceout(148); return cost; } for ( ; begin < end ; begin++ ) { - Interval overlap = interval.getIntersection ( _segments[begin]->getCanonicalInterval() ); - //if ( not overlap.isEmpty() ) { - if ( _segments[begin]->getNet() == net ) { - cost.incDeltaShared ( overlap.getSize() ); - } - ltrace(190) << "| overlap: " << _segments[begin] << endl; - _segments[begin]->incOverlapCost ( net, cost ); - if ( cost.isInfinite() ) break; - //} + Interval overlap = interval.getIntersection( _segments[begin]->getCanonicalInterval() ); + if ( _segments[begin]->getNet() == net ) { + cost.incDeltaShared ( overlap.getSize() ); + } + ltrace(190) << "| overlap: " << _segments[begin] << endl; + _segments[begin]->incOverlapCost( net, cost ); + if (cost.isInfinite()) break; } ltraceout(148); @@ -343,16 +335,14 @@ namespace Kite { size_t begin; size_t end; - getOverlapBounds ( interval, begin, end ); + getOverlapBounds( interval, begin, end ); - return getOverlapCost ( interval, net, begin, end, flags ); + return getOverlapCost( interval, net, begin, end, flags ); } TrackCost Track::getOverlapCost ( TrackElement* segment, unsigned int flags ) const - { - return getOverlapCost ( segment->getCanonicalInterval(), segment->getNet(), flags ); - } + { return getOverlapCost ( segment->getCanonicalInterval(), segment->getNet(), flags ); } void Track::getTerminalWeight ( Interval interval, Net* net, size_t& count, unsigned int& weight ) const @@ -381,39 +371,25 @@ namespace Kite { } - Track* Track::getNext () const - { - return getRoutingPlane()->getTrackByIndex ( getIndex()+1 ); - } - - - Track* Track::getPrevious () const - { - if ( !getIndex() ) return NULL; - - return getRoutingPlane()->getTrackByIndex ( getIndex()-1 ); - } - - size_t Track::find ( const TrackElement* segment ) const { - if ( !_segments.size() ) return NPOS; + if (_segments.empty()) return npos; vector::const_iterator lowerBound - = lower_bound ( _segments.begin() - , _segments.end() - , segment - , SegmentCompare() - ); + = lower_bound( _segments.begin() + , _segments.end() + , segment + , SegmentCompare() + ); - if ( lowerBound != _segments.end() ) { + if (lowerBound != _segments.end()) { while ( segment->getSourceU() == (*lowerBound)->getSourceU() ) { - if ( *lowerBound == segment ) return (size_t)(lowerBound-_segments.begin()); + if (*lowerBound == segment) return (size_t)(lowerBound-_segments.begin()); lowerBound++; } } - return NPOS; + return npos; } @@ -423,13 +399,14 @@ namespace Kite { size_t begin; size_t end; - if ( !_segments.size() ) return Interval(_min,_max); + if (_segments.empty()) return Interval(_min,_max); - getIBounds ( position, begin, end, state ); - if ( (state == Inside) && (_segments[begin]->getNet() != net) ) + getBeginIndex( position, begin, state ); + if ( (state == InsideElement) and (_segments[begin]->getNet() != net) ) return Interval(); - return expandFreeInterval ( begin, end, state, net ); + end = begin; + return expandFreeInterval( begin, end, state, net ); } @@ -437,37 +414,34 @@ namespace Kite { { DbU::Unit minFree = _min; - if ( !(state & MinTrackMin) ) { - if ( _segments[begin]->getNet() == net ) - getPrevious ( begin, net ); + if (not (state & BeginIsTrackMin) ) { + if (_segments[begin]->getNet() == net) + getPrevious( begin, net ); - if ( begin != NPOS ) { - size_t usedEnd; - minFree = expandUsedInterval ( begin, usedEnd ).getVMax(); + if (begin != npos) { + minFree = getOccupiedInterval(begin).getVMax(); } } - if ( !(state & MaxTrackMax) ) { - if ( _segments[end]->getNet() == net ) { - getNext ( end, net ); + if (not (state & EndIsTrackMax) ) { + if (_segments[end]->getNet() == net) { + getNext( end, net ); - if ( end == NPOS ) { + if (end == npos) { end = _segments.size() - 1; - setMaximalFlags ( state, MaxTrackMax ); + setMaximalFlags( state, EndIsTrackMax ); } else { - setMaximalFlags ( state, MaxSegmentMin ); + setMaximalFlags( state, EndIsSegmentMin ); } } } - return Interval ( minFree, getMaximalPosition(end,state) ); + return Interval( minFree, getMaximalPosition(end,state) ); } - void Track::forceSort () - { - _segmentsValid = false; - } + void Track::invalidate () + { _segmentsValid = false; } void Track::insert ( TrackMarker* marker ) @@ -499,54 +473,53 @@ namespace Kite { void Track::setSegment ( TrackElement* segment, size_t index ) { if ( index >= _segments.size() ) return; - _segments[index] = segment; } - bool Track::_check ( unsigned int& overlaps, const char* message ) const + bool Track::check ( unsigned int& overlaps, const char* message ) const { bool coherency = true; bool holes = false; - if ( message ) cerr << " o Checking Track - " << message << endl; - ltrace(90) << "[CHECK] " << (void*)this << ":" << this << endl; + if (message) cerr << " o Checking Track - " << message << endl; + ltrace(90) << (void*)this << ":" << this << endl; for ( size_t i=0 ; i<_segments.size() ; i++ ) { - if ( _segments[i] ) { - if ( i ) { - if ( _segments[i-1] == _segments[i] ) { + if (_segments[i]) { + if (i) { + if (_segments[i-1] == _segments[i]) { cerr << "[CHECK] incoherency at " << i << " " << _segments[i] << " is duplicated. " << endl; coherency = false; } } - if ( !_segments[i]->getTrack() ) { + if (not _segments[i]->getTrack()) { cerr << "[CHECK] incoherency at " << i << " " << _segments[i] << " is detached." << endl; coherency = false; } else { - if ( _segments[i]->getTrack() != this ) { + if (_segments[i]->getTrack() != this) { cerr << "[CHECK] incoherency at " << i << " " << _segments[i] << " is in track " << _segments[i]->getTrack() << endl; coherency = false; } - if ( _segments[i]->getIndex() != i ) { + if (_segments[i]->getIndex() != i) { cerr << "[CHECK] incoherency at " << i << " " << _segments[i] << " has bad index " << _segments[i]->getIndex() << endl; coherency = false; } } - if ( _segments[i]->getAxis() != getAxis() ) { + if (_segments[i]->getAxis() != getAxis()) { cerr << "[CHECK] incoherency at " << i << " " << _segments[i] << " is not on Track axis " << DbU::getValueString(getAxis()) << "." << endl; coherency = false; } - coherency = _segments[i]->_check () and coherency; + coherency = _segments[i]->_check() and coherency; } else { cerr << "[CHECK] Hole at position " << i << "." << endl; holes = true; @@ -554,7 +527,7 @@ namespace Kite { } } - if ( !holes ) + if (not holes) coherency = (checkOverlap(overlaps) == 0) and coherency; return coherency; @@ -563,7 +536,7 @@ namespace Kite { DbU::Unit Track::getSourcePosition ( size_t i ) const { - if ( i == NPOS) return 0; + if ( i == npos) return 0; return _segments[i]->getSourceU(); } @@ -581,14 +554,14 @@ namespace Kite { { Interval canonical; - switch ( state & MinMask ) { - case MinTrackMin: return _min; - case MinSegmentMin: return _segments[index]->getSourceU (); - case MinSegmentMax: return _segments[index]->getTargetU (); + switch ( state & BeginMask ) { + case BeginIsTrackMin: return _min; + case BeginIsSegmentMin: return _segments[index]->getSourceU (); + case BeginIsSegmentMax: return _segments[index]->getTargetU (); } - cerr << Bug ( " Track::getMinimalPosition(size_t,unsigned int) :" - " invalid state value %ud.", state ) << endl; + cerr << Bug( " Track::getMinimalPosition(size_t,unsigned int) :" + " invalid state value %ud.", state ) << endl; return _min; } @@ -598,104 +571,79 @@ namespace Kite { { Interval canonical; - switch ( state & MaxMask ) { - case MaxTrackMax: return _max; - case MaxSegmentMin: return _segments[index ]->getSourceU (); - case MaxNextSegmentMin: if ( index+1 >= getSize() ) return _max; - return _segments[index+1]->getSourceU (); - case MaxSegmentMax: return _segments[index ]->getTargetU (); + switch ( state & EndMask ) { + case EndIsTrackMax: return _max; + case EndIsSegmentMin: return _segments[index ]->getSourceU (); + case EndIsNextSegmentMin: if (index+1 >= getSize()) return _max; + return _segments[index+1]->getSourceU (); + case EndIsSegmentMax: return _segments[index ]->getTargetU (); } - cerr << Bug ( " Track::getMaximalPosition(size_t,unsigned int) :" - " invalid state value %ud.", state ) << endl; + cerr << Bug( " Track::getMaximalPosition(size_t,unsigned int) :" + " invalid state value %ud.", state ) << endl; return _min; } - Interval Track::expandUsedInterval ( size_t& begin, size_t& end ) const + Interval Track::getOccupiedInterval ( size_t& begin ) const { - if ( begin == NPOS ) return Interval(); + if (begin == npos) return Interval(); size_t seed = begin; Net* owner = _segments[seed]->getNet(); - Interval expandInterval; - Interval ownerInterval; - _segments[seed]->getCanonical ( ownerInterval ); + Interval segmentInterval; + Interval mergedInterval; + _segments[seed]->getCanonical( mergedInterval ); size_t i = seed; - while ( --i != NPOS ) { - if ( _segments[i]->getNet() != owner ) break; + while ( --i != npos ) { + if (_segments[i]->getNet() != owner) break; - _segments[i]->getCanonical ( expandInterval ); - if ( expandInterval.getVMax() >= ownerInterval.getVMin() ) { - ownerInterval.merge ( expandInterval ); + _segments[i]->getCanonical ( segmentInterval ); + if (segmentInterval.getVMax() >= mergedInterval.getVMin()) { + mergedInterval.merge( segmentInterval ); begin = i; } } - end = i = seed; + i = seed; while ( ++i < _segments.size() ) { - if ( _segments[i]->getNet() != owner ) break; + if (_segments[i]->getNet() != owner) break; - _segments[i]->getCanonical ( expandInterval ); - if ( expandInterval.getVMin() > ownerInterval.getVMax() ) break; - if ( expandInterval.getVMax() > ownerInterval.getVMax() ) end = i; + _segments[i]->getCanonical( segmentInterval ); + if (segmentInterval.getVMin() > mergedInterval.getVMax()) break; - ownerInterval.merge ( expandInterval ); + mergedInterval.merge( segmentInterval ); } - return ownerInterval; + return mergedInterval; } - size_t Track::pack () + size_t Track::doRemoval () { - ltrace(148) << "Track::pack() - " << this << endl; + ltrace(148) << "Track::doRemoval() - " << this << endl; ltracein(148); size_t size = _segments.size(); vector::iterator beginRemove - = remove_if ( _segments.begin(), _segments.end(), isDetachedSegment() ); + = remove_if( _segments.begin(), _segments.end(), isDetachedSegment() ); - _segments.erase ( beginRemove, _segments.end() ); + _segments.erase( beginRemove, _segments.end() ); -# if 0 - size_t first = 0; - size_t last = 0; - bool erase = false; - - while ( last < _segments.size() ) { - if ( _segments[last] ) { - if ( erase ) { - _segments.erase ( _segments.begin()+first, _segments.begin()+last ); - - erase = false; - last = first; - } else { - first = last; - } - } else { - erase = true; - } - } - - if ( erase ) - _segments.erase ( _segments.begin()+first, _segments.end() ); -# endif - - ltrace(148) << "After packing " << this << endl; + ltrace(148) << "After doRemoval " << this << endl; ltraceout(148); return size - _segments.size(); } - void Track::sort () + void Track::doReorder () { - if ( !_segmentsValid ) { + if (not _segmentsValid ) { std::sort ( _segments.begin(), _segments.end(), SegmentCompare() ); for ( size_t i=0 ; i < _segments.size() ; i++ ) { _segments[i]->setIndex ( i ); @@ -703,7 +651,7 @@ namespace Kite { _segmentsValid = true; } - if ( !_markersValid ) { + if (not _markersValid ) { std::sort ( _markers.begin(), _markers.end(), TrackMarker::Compare() ); _markersValid = true; } @@ -719,10 +667,10 @@ namespace Kite { if ( _segments[i]->getNet() == _segments[i+1]->getNet() ) { if ( _segments[i]->getSourceU() == _segments[i+1]->getSourceU() ) { if ( _segments[i]->getTargetU() < _segments[i+1]->getTargetU() ) { - cerr << Warning(" Invalid sorting length order in %s:\n%s \n%s " - ,getString(this).c_str() - ,getString(_segments[i ]).c_str() - ,getString(_segments[i+1]).c_str()) << endl; + cerr << Error(" Invalid sorting length order in %s:\n%s \n%s " + ,getString(this).c_str() + ,getString(_segments[i ]).c_str() + ,getString(_segments[i+1]).c_str()) << endl; } } for ( j=i+1 ; (j<_segments.size()) && (_segments[i]->getNet() == _segments[j]->getNet()) ; j++ ); @@ -732,10 +680,10 @@ namespace Kite { if ( (j<_segments.size()) && (_segments[i]->getTargetU() > _segments[j]->getSourceU()) ) { - cerr << Warning("Overlap in %s between:\n %s\n %s" - ,getString(this).c_str() - ,getString(_segments[i]).c_str() - ,getString(_segments[j]).c_str()) << endl; + cerr << Error("Overlap in %s between:\n %s\n %s" + ,getString(this).c_str() + ,getString(_segments[i]).c_str() + ,getString(_segments[j]).c_str()) << endl; overlaps++; } } @@ -760,13 +708,13 @@ namespace Kite { Record* Track::_getRecord () const { Record* record = new Record ( _getString() ); - record->add ( getSlot ( "_routingPlane", _routingPlane ) ); - record->add ( getSlot ( "_index" , &_index ) ); + record->add ( getSlot ( "_routingPlane", _routingPlane ) ); + record->add ( getSlot ( "_index" , &_index ) ); record->add ( DbU::getValueSlot ( "_axis" , &_axis ) ); - record->add ( getSlot ( "_segments" , &_segments ) ); + record->add ( getSlot ( "_segments" , &_segments ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackCost.cpp b/kite/src/TrackCost.cpp index 8b116903..b3eb0a7d 100644 --- a/kite/src/TrackCost.cpp +++ b/kite/src/TrackCost.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,28 +12,19 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackCost.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x - - - - -#include -#include -#include - -#include "kite/Track.h" -#include "kite/TrackCost.h" -#include "kite/Session.h" +// +-----------------------------------------------------------------+ +#include +#include +#include +#include "kite/Track.h" +#include "kite/TrackCost.h" +#include "kite/Session.h" namespace Kite { - using std::cerr; using std::endl; @@ -46,7 +32,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "TrackCost". - TrackCost::TrackCost ( Track* track , const Interval& interval , size_t begin @@ -79,7 +64,7 @@ namespace Kite { , _ripupCount (0) { TrackElement* neighbor; - if ( _begin != Track::NPOS ) { + if ( _begin != Track::npos ) { neighbor = _track->getSegment(_begin); if ( neighbor and (neighbor->getNet() != net) ) { DbU::Unit distance = interval.getVMin() - neighbor->getTargetU(); @@ -91,7 +76,7 @@ namespace Kite { // _distanceToFixed += interval.getVMin() - neighbor->getTargetU(); // } } - if ( _end != Track::NPOS ) { + if ( _end != Track::npos ) { neighbor = _track->getSegment(_end); if ( neighbor and (neighbor->getNet() != net) ) { DbU::Unit distance = neighbor->getSourceU() - interval.getVMax(); @@ -190,6 +175,7 @@ namespace Kite { s += "+" + getString(_ripupCount); s += ":" + getString((_dataState<<2)+_ripupCount); s += " " + string ( (_blockage )?"b":"-" ); + s += string ( (_blockage )?"f":"-" ); s += string ( (_hardOverlap )?"h":"-" ); s += string ( (_overlap )?"o":"-" ); s += string ( (_overlapGlobal )?"g":"-" ); @@ -210,17 +196,22 @@ namespace Kite { Record* TrackCost::_getRecord () const { Record* record = new Record ( _getString() ); - record->add ( getSlot ( "_track" , _track ) ); - record->add ( getSlot ( "_begin" , &_begin ) ); - record->add ( getSlot ( "_end" , &_end ) ); - record->add ( getSlot ( "_interval" , &_interval ) ); - record->add ( getSlot ( "_infinite" , _infinite ) ); - record->add ( getSlot ( "_overlap" , _overlap ) ); - record->add ( getSlot ( "_terminals", _terminals ) ); - record->add ( getSlot ( "_delta" , &_delta ) ); + record->add( getSlot ( "_track" , _track ) ); + record->add( getSlot ( "_begin" , &_begin ) ); + record->add( getSlot ( "_end" , &_end ) ); + record->add( getSlot ( "_interval" , &_interval ) ); + record->add( getSlot ( "_infinite" , _infinite ) ); + record->add( getSlot ( "_overlap" , _overlap ) ); + record->add( getSlot ( "_terminals" , _terminals ) ); + record->add( DbU::getValueSlot( "_delta" , &_delta ) ); + record->add( DbU::getValueSlot( "_deltaShared" , &_deltaShared ) ); + record->add( DbU::getValueSlot( "_deltaPerpand" , &_deltaPerpand ) ); + record->add( DbU::getValueSlot( "_axisWeight" , &_axisWeight ) ); + record->add( DbU::getValueSlot( "_distanceToFixed", &_distanceToFixed ) ); + record->add( DbU::getValueSlot( "_longuestOverlap", &_longuestOverlap ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackElement.cpp b/kite/src/TrackElement.cpp index 8aa4ecd1..d16d5097 100644 --- a/kite/src/TrackElement.cpp +++ b/kite/src/TrackElement.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,60 +12,51 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackElement.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ - - -#include -#include - -#include "hurricane/Bug.h" -#include "hurricane/Warning.h" -#include "hurricane/Net.h" -#include "hurricane/Name.h" -#include "katabatic/AutoContact.h" -#include "katabatic/GCell.h" -#include "crlcore/RoutingGauge.h" -#include "kite/DataNegociate.h" -#include "kite/TrackElement.h" -#include "kite/TrackCost.h" -#include "kite/Track.h" -#include "kite/Session.h" -#include "kite/RoutingEvent.h" -#include "kite/NegociateWindow.h" - +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/Warning.h" +#include "hurricane/Net.h" +#include "hurricane/Name.h" +#include "katabatic/AutoContact.h" +#include "katabatic/GCell.h" +#include "crlcore/RoutingGauge.h" +#include "kite/DataNegociate.h" +#include "kite/TrackElement.h" +#include "kite/TrackCost.h" +#include "kite/Track.h" +#include "kite/Session.h" +#include "kite/RoutingEvent.h" +#include "kite/NegociateWindow.h" namespace { - using namespace std; using namespace Hurricane; using namespace CRL; using namespace Kite; - // --------------------------------------------------------------- - // Function : "DummyOverlapCost ()". - - - void DummyOverlapCost ( const TrackElement* segment, TrackCost& cost ) + void dummyOverlapCost ( const TrackElement* segment, TrackCost& cost ) { cerr << Warning("No overlapCost callback has been set (%s)." ,getString(segment).c_str()) << endl; } -} // End of local namespace. +} // Anonymous namespace. namespace Kite { - + using Hurricane::inltrace; + using Hurricane::ltracein; + using Hurricane::ltraceout; + using Hurricane::tab; using Hurricane::Bug; using Hurricane::Net; using Hurricane::Name; @@ -78,144 +64,141 @@ namespace Kite { // ------------------------------------------------------------------- -// Class : "TrackElement::Compare". - - - bool TrackElement::Compare::operator() ( TrackElement* lhs, TrackElement* rhs ) - { - return lhs->getArea() > rhs->getArea(); - } - - -// ------------------------------------------------------------------- -// Class : "TrackElement::CompareByPosition". +// Comparison Classes. // // Return: lhs < rhs. - bool TrackElement::CompareByPosition::operator() ( const TrackElement* lhs, const TrackElement* rhs ) const + bool Compare::operator() ( TrackElement* lhs, TrackElement* rhs ) + { return lhs->getFreedomDegree() > rhs->getFreedomDegree(); } + + + bool CompareByPosition::operator() ( const TrackElement* lhs, const TrackElement* rhs ) const { - if ( lhs == rhs ) return false; + if (lhs == rhs) return false; - if ( lhs->isBlockage() xor rhs->isBlockage() ) - return lhs->isBlockage(); + if (lhs->isBlockage() xor rhs->isBlockage()) return lhs->isBlockage(); - if ( lhs->getLength() < rhs->getLength() ) return true; - if ( lhs->getLength() > rhs->getLength() ) return false; + if (lhs->getLength() < rhs->getLength()) return true; + if (lhs->getLength() > rhs->getLength()) return false; - if ( lhs->isHorizontal() xor rhs->isHorizontal() ) - return rhs->isHorizontal(); + if (lhs->isHorizontal() xor rhs->isHorizontal()) return rhs->isHorizontal(); - if ( lhs->getAxis() > rhs->getAxis() ) return true; - if ( lhs->getAxis() < rhs->getAxis() ) return false; + if (lhs->getAxis() > rhs->getAxis()) return true; + if (lhs->getAxis() < rhs->getAxis()) return false; - if ( lhs->getSourceU() > rhs->getSourceU() ) return true; - if ( lhs->getSourceU() < rhs->getSourceU() ) return false; + if (lhs->getSourceU() > rhs->getSourceU()) return true; + if (lhs->getSourceU() < rhs->getSourceU()) return false; - if ( lhs->isBlockage() and rhs->isBlockage() ) return false; + if (lhs->isBlockage() and rhs->isBlockage()) return false; - //return lhs->getNet()->getName() < rhs->getNet()->getName(); return lhs->getId() < rhs->getId(); } +// ------------------------------------------------------------------- +// Class : "SegmentObserver". + + + void SegmentObserver::notify ( unsigned int flags ) + { + TrackElement* segment = getOwner(); + switch ( flags ) { + case AutoSegment::Invalidate: + if (not segment->isInvalidated()) { + ltrace(200) << "::notify() on " << segment << endl; + segment->invalidate(); + } + break; + case AutoSegment::Revalidate: + // Revalidation must be delayed until *all* the AutoSegments have been revalidated. + // if (segment->isInvalidated()) { + // ltrace(200) << "::notify() on " << segment << endl; + // segment->revalidate( true ); + // } + break; + } + } + + // ------------------------------------------------------------------- // Class : "TrackElement". - SegmentOverlapCostCB* TrackElement::_overlapCostCallback = DummyOverlapCost; + SegmentOverlapCostCB* TrackElement::_overlapCostCallback = dummyOverlapCost; SegmentOverlapCostCB* TrackElement::setOverlapCostCB ( SegmentOverlapCostCB* cb ) { SegmentOverlapCostCB* oldCb = _overlapCostCallback; - _overlapCostCallback = cb; - return oldCb; } -// Former inline functions. - AutoSegment* TrackElement::base () const { return NULL; } - bool TrackElement::isBipoint () const { return false; } - bool TrackElement::isCreated () const { return false; } - bool TrackElement::isFixed () const { return false; } - bool TrackElement::isBlockage () const { return false; } - bool TrackElement::isStrap () const { return false; } - bool TrackElement::isSlackenStrap () const { return false; } - bool TrackElement::isLocal () const { return true; } - bool TrackElement::isGlobal () const { return not isLocal(); } - bool TrackElement::isLocked () const { return false; } - bool TrackElement::isTerminal () const { return false; } - bool TrackElement::isDogleg () const { return false; } - bool TrackElement::isRevalidated () const { return false; } - bool TrackElement::isRouted () const { return true; } - bool TrackElement::isSlackened () const { return false; } - bool TrackElement::isSlackenDogLeg () const { return false; } - bool TrackElement::hasSourceDogLeg () const { return false; } - bool TrackElement::hasTargetDogLeg () const { return false; } - bool TrackElement::allowOutsideGCell () const { return false; } - bool TrackElement::canGoOutsideGCell () const { return false; } - bool TrackElement::canRipple () const { return false; } - unsigned long TrackElement::getId () const { return 0; } - unsigned long TrackElement::getArea () const { return 0; } - unsigned int TrackElement::getDogLegLevel () const { return 0; } - unsigned int TrackElement::getDogLegOrder () const { return 0; } - Interval TrackElement::getSourceConstraints () const { return Interval(); } - Interval TrackElement::getTargetConstraints () const { return Interval(); } - DataNegociate* TrackElement::getDataNegociate ( unsigned int ) const { return NULL; } - TrackElements TrackElement::getCollapsedPerpandiculars () { return new TrackElements_CollapsedPerpandicular(NULL); } - void TrackElement::setAllowOutsideGCell ( bool ) { } - void TrackElement::setLock ( bool ) { } - void TrackElement::setRevalidated ( bool ) { } - void TrackElement::invalidate () { } - void TrackElement::setCanRipple ( bool ) { } - void TrackElement::setSourceDogLeg ( bool ) { } - void TrackElement::setTargetDogLeg ( bool ) { } - TrackElement* TrackElement::getCanonical ( Interval& i ) { i=Interval(getSourceU(),getTargetU()); return this; } - bool TrackElement::canSlacken () const { return false; } - - - bool TrackElement::canDesalignate () const { return false; } - bool TrackElement::canPivotUp ( float ) const { return false; }; - bool TrackElement::canPivotDown ( float ) const { return false; }; - bool TrackElement::canMoveUp ( float, unsigned int ) const { return false; }; - float TrackElement::getMaxUnderDensity ( unsigned int ) const { return 0.0; }; - bool TrackElement::canDogLeg () { return false; }; - bool TrackElement::canDogLeg ( Interval ) { return false; }; - bool TrackElement::canDogLegAt ( Katabatic::GCell*, unsigned int ) { return false; }; - TrackElement* TrackElement::getSourceDogLeg () { return NULL; } - TrackElement* TrackElement::getTargetDogLeg () { return NULL; } - TrackElement* TrackElement::getParent () const { return NULL; } - void TrackElement::dataInvalidate () { } - void TrackElement::eventInvalidate () { } - void TrackElement::setArea () { } - void TrackElement::setRouted ( bool ) { } - void TrackElement::setTrack ( Track* track ) { _track = track; } - void TrackElement::setDogLegLevel ( unsigned int ) { } - void TrackElement::setDogLegOrder ( unsigned int ) { } - void TrackElement::swapTrack ( TrackElement* ) { } - void TrackElement::reschedule ( unsigned int ) { } - void TrackElement::detach () { } - void TrackElement::revalidate ( bool invalidEvent ) { } - void TrackElement::setAxis ( DbU::Unit, unsigned int flags ) { } - void TrackElement::slacken () { } - bool TrackElement::moveUp ( unsigned int ) { return false; } - bool TrackElement::moveDown ( unsigned int ) { return false; } - bool TrackElement::moveAside ( bool onLeft ) { return false; } - TrackElement* TrackElement::makeDogLeg () { return NULL; } - TrackElement* TrackElement::makeDogLeg ( Interval, bool& leftDogleg ) { return NULL; } - TrackElement* TrackElement::makeDogLeg ( Katabatic::GCell* ) { return NULL; } - TrackElement* TrackElement::_postDogLeg ( Katabatic::GCell* ) { return NULL; } - void TrackElement::_postModify () { } - void TrackElement::desalignate () { } - bool TrackElement::_check () const { return true; } +// Wrapped AutoSegment Functions. + AutoSegment* TrackElement::base () const { return NULL; } + bool TrackElement::isFixed () const { return false; } + bool TrackElement::isLocal () const { return true; } + bool TrackElement::isGlobal () const { return not isLocal(); } + bool TrackElement::isBipoint () const { return false; } + bool TrackElement::isTerminal () const { return false; } + bool TrackElement::isStrongTerminal ( unsigned int ) const { return false; } + bool TrackElement::isStrap () const { return false; } + bool TrackElement::isSlackened () const { return false; } + bool TrackElement::isDogleg () const { return false; } +// Predicates. + bool TrackElement::canSlacken () const { return false; } + bool TrackElement::canPivotUp ( float ) const { return false; }; + bool TrackElement::canPivotDown ( float ) const { return false; }; + bool TrackElement::canMoveUp ( float, unsigned int ) const { return false; }; + bool TrackElement::canDogleg () { return false; }; + bool TrackElement::canDogleg ( Interval ) { return false; }; + bool TrackElement::canDogleg ( Katabatic::GCell*, unsigned int ) { return false; }; +// Accessors. + unsigned long TrackElement::getId () const { return 0; } + unsigned long TrackElement::getFreedomDegree () const { return 0; } + float TrackElement::getMaxUnderDensity ( unsigned int ) const { return 0.0; }; + unsigned int TrackElement::getDoglegLevel () const { return 0; } + TrackElement* TrackElement::getParent () const { return NULL; } + Interval TrackElement::getSourceConstraints () const { return Interval(); } + Interval TrackElement::getTargetConstraints () const { return Interval(); } + DataNegociate* TrackElement::getDataNegociate ( unsigned int ) const { return NULL; } + TrackElements TrackElement::getPerpandiculars () { return new TrackElements_Perpandiculars(NULL); } + void TrackElement::invalidate () { } + TrackElement* TrackElement::getCanonical ( Interval& i ) { i=Interval(getSourceU(),getTargetU()); return this; } + TrackElement* TrackElement::getSourceDogleg () { return NULL; } + TrackElement* TrackElement::getTargetDogleg () { return NULL; } +// Mutators. + void TrackElement::setTrack ( Track* track ) { _track = track; } + void TrackElement::updateFreedomDegree () { } + void TrackElement::setDoglegLevel ( unsigned int ) { } + void TrackElement::swapTrack ( TrackElement* ) { } + void TrackElement::reschedule ( unsigned int ) { } + void TrackElement::detach () { } + void TrackElement::revalidate () { } + void TrackElement::setAxis ( DbU::Unit, unsigned int flags ) { } + TrackElement* TrackElement::makeDogleg () { return NULL; } + TrackElement* TrackElement::makeDogleg ( Interval, unsigned int& ) { return NULL; } + TrackElement* TrackElement::makeDogleg ( Katabatic::GCell*, TrackElement*&, TrackElement*& ) { return NULL; } + void TrackElement::_postDoglegs ( TrackElement*&, TrackElement*& ) { } + bool TrackElement::moveAside ( unsigned int ) { return false; } + bool TrackElement::slacken ( unsigned int ) { return false; } + bool TrackElement::moveUp ( unsigned int ) { return false; } + bool TrackElement::moveDown ( unsigned int ) { return false; } +#if THIS_IS_DISABLED + void TrackElement::desalignate () { } +#endif + bool TrackElement::_check () const { return true; } TrackElement::TrackElement ( Track* track ) - : _track(track) - , _index((size_t)-1) + : _flags (0) + , _track (track) + , _index ((size_t)-1) + , _sourceU (0) + , _targetU (0) + , _observer(this) { } @@ -241,50 +224,38 @@ namespace Kite { TrackElement* TrackElement::getNext () const { size_t dummy = _index; - return _track->getNext ( dummy, getNet() ); + return _track->getNext( dummy, getNet() ); } TrackElement* TrackElement::getPrevious () const { size_t dummy = _index; - return _track->getPrevious ( dummy, getNet() ); + return _track->getPrevious( dummy, getNet() ); } Interval TrackElement::getFreeInterval () const { - if ( !_track ) return Interval(false); + if (not _track) return Interval(false); size_t begin = _index; size_t end = _index; - return _track->expandFreeInterval ( begin, end, Track::Inside, getNet() ); + return _track->expandFreeInterval( begin, end, Track::InsideElement, getNet() ); } - size_t TrackElement::getGCells ( vector& gcells ) const + size_t TrackElement::getGCells ( Katabatic::GCellVector& gcells ) const { - vector().swap ( gcells ); + vector().swap( gcells ); return gcells.size(); } - size_t TrackElement::getPerpandicularsBound ( set& bounds ) - { - bounds.clear (); - return 0; - } - - - unsigned int TrackElement::getOrder () const - { return numeric_limits::max(); } - - void TrackElement::incOverlapCost ( Net* net, TrackCost& cost ) const { - if ( not _track or (getNet() == net) ) return; - - _overlapCostCallback ( this, cost ); + if (not _track or (getNet() == net)) return; + _overlapCostCallback( this, cost ); } @@ -293,17 +264,20 @@ namespace Kite { string TrackElement::_getString () const - { return "<" + _getTypeName() + ">"; } + { return "<"+_getTypeName()+">"; } Record* TrackElement::_getRecord () const { - Record* record = new Record ( _getString() ); - record->add ( getSlot ( "_track", _track ) ); - record->add ( getSlot ( "_index", _index ) ); + Record* record = new Record( _getString() ); + record->add( getSlot( "_flags", _track ) ); + record->add( getSlot( "_track", _track ) ); + record->add( getSlot( "_index", _index ) ); + record->add( DbU::getValueSlot( "_sourceU", &_sourceU ) ); + record->add( DbU::getValueSlot( "_targetU", &_targetU ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackElements.cpp b/kite/src/TrackElements.cpp index 297f8f30..3ef8d438 100644 --- a/kite/src/TrackElements.cpp +++ b/kite/src/TrackElements.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,10 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackElements.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ #include "hurricane/Bug.h" @@ -31,7 +23,6 @@ namespace Kite { - using namespace std; using Hurricane::tab; using Hurricane::inltrace; @@ -43,20 +34,20 @@ namespace Kite { // ------------------------------------------------------------------- -// Class : "TrackElements_CollapsedPerpandicular". +// Class : "TrackElements_Perpandiculars". - TrackElements_CollapsedPerpandicular::Locator::Locator ( TrackElement* segment ) + TrackElements_Perpandiculars::Locator::Locator ( TrackElement* segment ) : TrackElementHL () , _locator (segment->base()) , _element (NULL) { - ltrace(80) << "TrackElements_CollapsedPerpandicular::Locator::Locator()" << endl; + ltrace(80) << "TrackElements_Perpandiculars::Locator::Locator()" << endl; ltrace(80) << " " << segment << endl; Interval bounds; if ( _locator.isValid() ) { - _element = Session::lookup ( _locator.getElement()->getCanonical(bounds)->base() ); + _element = Session::lookup( _locator.getElement()->getCanonical(bounds)->base() ); if ( !_element ) { cerr << Bug("Canonical segment without TrackElement.") << endl; progress (); @@ -65,20 +56,20 @@ namespace Kite { } - TrackElement* TrackElements_CollapsedPerpandicular::Locator::getElement () const + TrackElement* TrackElements_Perpandiculars::Locator::getElement () const { return _element; } - void TrackElements_CollapsedPerpandicular::Locator::progress () + void TrackElements_Perpandiculars::Locator::progress () { - ltrace(80) << "TrackElements_CollapsedPerpandicular::Locator::progress()" << endl; + ltrace(80) << "TrackElements_Perpandiculars::Locator::progress()" << endl; Interval bounds; while ( _locator.isValid() ) { _locator.progress (); if ( _locator.isValid() ) { - _element = Session::lookup ( _locator.getElement()->getCanonical(bounds)->base() ); + _element = Session::lookup( _locator.getElement()->getCanonical(bounds)->base() ); if ( !_element ) { cerr << Bug("Canonical segment whithout TrackElement.") << endl; continue; @@ -90,32 +81,32 @@ namespace Kite { } - TrackElementHL* TrackElements_CollapsedPerpandicular::Locator::getClone () const + TrackElementHL* TrackElements_Perpandiculars::Locator::getClone () const { return new Locator(*this); } - bool TrackElements_CollapsedPerpandicular::Locator::isValid () const + bool TrackElements_Perpandiculars::Locator::isValid () const { return _locator.isValid(); } - TrackElementHC* TrackElements_CollapsedPerpandicular::getClone () const - { return new TrackElements_CollapsedPerpandicular(*this); } + TrackElementHC* TrackElements_Perpandiculars::getClone () const + { return new TrackElements_Perpandiculars(*this); } - TrackElementHL* TrackElements_CollapsedPerpandicular::getLocator () const + TrackElementHL* TrackElements_Perpandiculars::getLocator () const { return new Locator(_segment); } - string TrackElements_CollapsedPerpandicular::Locator::_getString () const + string TrackElements_Perpandiculars::Locator::_getString () const { - string s = ""; + string s = ""; return s; } - string TrackElements_CollapsedPerpandicular::_getString () const + string TrackElements_Perpandiculars::_getString () const { - string s = ""; return s; @@ -132,8 +123,8 @@ namespace Kite { bool TrackElements_UniqCanonical::accept ( TrackElement* segment ) const { - if ( _canonicals.find(segment) == _canonicals.end() ) { - _canonicals.insert ( segment ); + if (_canonicals.find(segment) == _canonicals.end()) { + _canonicals.insert( segment ); return true; } @@ -145,4 +136,4 @@ namespace Kite { { return ""; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackFixedSegment.cpp b/kite/src/TrackFixedSegment.cpp index 7bf569c1..116536a9 100644 --- a/kite/src/TrackFixedSegment.cpp +++ b/kite/src/TrackFixedSegment.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,41 +12,34 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackFixedSegment.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ - - -#include - -#include "hurricane/Bug.h" -#include "hurricane/Warning.h" -#include "hurricane/Net.h" -#include "hurricane/Name.h" -#include "hurricane/RegularLayer.h" -#include "hurricane/Technology.h" -#include "hurricane/DataBase.h" -#include "hurricane/Horizontal.h" -#include "hurricane/Vertical.h" -#include "katabatic/AutoContact.h" -#include "katabatic/GCellGrid.h" -#include "crlcore/RoutingGauge.h" -#include "kite/DataNegociate.h" -#include "kite/TrackFixedSegment.h" -#include "kite/TrackCost.h" -#include "kite/Track.h" -#include "kite/Session.h" -#include "kite/RoutingEvent.h" -#include "kite/NegociateWindow.h" -#include "kite/KiteEngine.h" +#include +#include "hurricane/Bug.h" +#include "hurricane/Warning.h" +#include "hurricane/Net.h" +#include "hurricane/Name.h" +#include "hurricane/RegularLayer.h" +#include "hurricane/Technology.h" +#include "hurricane/DataBase.h" +#include "hurricane/Horizontal.h" +#include "hurricane/Vertical.h" +#include "katabatic/AutoContact.h" +#include "katabatic/GCellGrid.h" +#include "crlcore/RoutingGauge.h" +#include "kite/DataNegociate.h" +#include "kite/TrackFixedSegment.h" +#include "kite/TrackCost.h" +#include "kite/Track.h" +#include "kite/Session.h" +#include "kite/RoutingEvent.h" +#include "kite/NegociateWindow.h" +#include "kite/KiteEngine.h" namespace Kite { - using namespace std; using Hurricane::inltrace; using Hurricane::ltracein; @@ -80,79 +68,81 @@ namespace Kite { TrackFixedSegment::TrackFixedSegment ( Track* track, Segment* segment ) : TrackElement (NULL) , _segment (segment) - , _isBlockage (segment->getNet() == _blockageNet) { Box boundingBox = segment->getBoundingBox(); - if ( track ) { + unsigned int flags = TElemFixed | ((segment->getNet() == _blockageNet) ? TElemBlockage : 0); + setFlags( flags ); + + if (track) { unsigned int depth = track->getDepth(); Technology* technology = DataBase::getDB()->getTechnology(); const Layer* layer1 = track->getLayer()->getBlockageLayer(); RegularLayer* layer2 = dynamic_cast(technology->getLayer(layer1->getMask())); if ( layer2 ) { //DbU::Unit extention = layer2->getExtentionCap(); - if ( track->getDirection() == Constant::Horizontal ) { - Interval uside = track->getKiteEngine()->getGCellGrid()->getUSide ( Constant::Horizontal ); + if (track->getDirection() == KbHorizontal) { + Interval uside = track->getKiteEngine()->getGCellGrid()->getUSide( KbHorizontal ); - _sourceU = max ( boundingBox.getXMin(), uside.getVMin()); - _targetU = min ( boundingBox.getXMax(), uside.getVMax()); + _sourceU = max( boundingBox.getXMin(), uside.getVMin()); + _targetU = min( boundingBox.getXMax(), uside.getVMax()); - Katabatic::GCell* gcell = track->getKiteEngine()->getGCellGrid()->getGCell ( Point(_sourceU,track->getAxis()) ); - Katabatic::GCell* end = track->getKiteEngine()->getGCellGrid()->getGCell ( Point(_targetU,track->getAxis()) ); + Katabatic::GCell* gcell = track->getKiteEngine()->getGCellGrid()->getGCell( Point(_sourceU,track->getAxis()) ); + Katabatic::GCell* end = track->getKiteEngine()->getGCellGrid()->getGCell( Point(_targetU,track->getAxis()) ); Katabatic::GCell* right = NULL; - Interval guside = gcell->getUSide ( Constant::Horizontal /*, true*/ ); + Interval guside = gcell->getSide( KbHorizontal ); Interval segside ( boundingBox.getXMin(), boundingBox.getXMax() ); - if ( gcell ) { + if (gcell) { while ( gcell and (gcell != end) ) { right = gcell->getRight(); - if ( right == NULL ) break; + if (right == NULL) break; - guside = gcell->getUSide ( Constant::Horizontal /*, true*/ ); - Interval usedLength = guside.getIntersection ( segside ); + guside = gcell->getSide( KbHorizontal ); + Interval usedLength = guside.getIntersection( segside ); - gcell->addBlockage ( depth, usedLength.getSize() ); - //gcell->addBlockedAxis ( depth, track->getAxis() ); + gcell->addBlockage ( depth, usedLength.getSize() ); + //gcell->addBlockedAxis( depth, track->getAxis() ); gcell = right; } - if ( end ) { - guside = gcell->getUSide ( Constant::Horizontal /*, true*/ ); - Interval usedLength = guside.getIntersection ( segside ); + if (end) { + guside = gcell->getSide( KbHorizontal ); + Interval usedLength = guside.getIntersection( segside ); - end->addBlockage ( depth, usedLength.getSize() ); - //end->addBlockedAxis ( depth, track->getAxis() ); + end->addBlockage ( depth, usedLength.getSize() ); + //end->addBlockedAxis( depth, track->getAxis() ); } } else cerr << Warning("TrackFixedSegment(): TrackFixedElement outside GCell grid.") << endl; } else { - Interval uside = track->getKiteEngine()->getGCellGrid()->getUSide ( Constant::Vertical ); + Interval uside = track->getKiteEngine()->getGCellGrid()->getUSide( KbVertical ); - _sourceU = max ( boundingBox.getYMin(), uside.getVMin()); - _targetU = min ( boundingBox.getYMax(), uside.getVMax()); + _sourceU = max( boundingBox.getYMin(), uside.getVMin()); + _targetU = min( boundingBox.getYMax(), uside.getVMax()); - Katabatic::GCell* gcell = track->getKiteEngine()->getGCellGrid()->getGCell ( Point(track->getAxis(),_sourceU) ); - Katabatic::GCell* end = track->getKiteEngine()->getGCellGrid()->getGCell ( Point(track->getAxis(),_targetU) ); + Katabatic::GCell* gcell = track->getKiteEngine()->getGCellGrid()->getGCell( Point(track->getAxis(),_sourceU) ); + Katabatic::GCell* end = track->getKiteEngine()->getGCellGrid()->getGCell( Point(track->getAxis(),_targetU) ); Katabatic::GCell* up = NULL; - Interval guside = gcell->getUSide ( Constant::Vertical /*, true*/ ); + Interval guside = gcell->getSide( KbVertical ); Interval segside ( boundingBox.getYMin(), boundingBox.getYMax() ); - if ( gcell ) { + if (gcell) { while ( gcell and (gcell != end) ) { up = gcell->getUp(); - if ( up == NULL ) break; + if (up == NULL) break; - guside = gcell->getUSide ( Constant::Vertical /*, true*/ ); - Interval usedLength = guside.getIntersection ( segside ); + guside = gcell->getSide( KbVertical ); + Interval usedLength = guside.getIntersection( segside ); - gcell->addBlockage ( depth, usedLength.getSize() ); - //gcell->addBlockedAxis ( depth, track->getAxis() ); + gcell->addBlockage ( depth, usedLength.getSize() ); + //gcell->addBlockedAxis( depth, track->getAxis() ); gcell = up; } if ( end ) { - guside = gcell->getUSide ( Constant::Vertical /*, true*/ ); - Interval usedLength = guside.getIntersection ( segside ); + guside = gcell->getSide( KbVertical /*, true*/ ); + Interval usedLength = guside.getIntersection( segside ); - end->addBlockage ( depth, usedLength.getSize() ); - //end->addBlockedAxis ( depth, track->getAxis() ); + end->addBlockage ( depth, usedLength.getSize() ); + //end->addBlockedAxis( depth, track->getAxis() ); } } else cerr << Warning("TrackFixedSegment(): TrackFixedElement outside GCell grid.") << endl; @@ -163,7 +153,7 @@ namespace Kite { void TrackFixedSegment::_postCreate () - { TrackElement::_postCreate (); } + { TrackElement::_postCreate(); } TrackFixedSegment::~TrackFixedSegment () @@ -173,7 +163,7 @@ namespace Kite { void TrackFixedSegment::_preDestroy () { ltrace(90) << "TrackFixedSegment::_preDestroy() - " << (void*)this << endl; - TrackElement::_preDestroy (); + TrackElement::_preDestroy(); } @@ -182,27 +172,28 @@ namespace Kite { if ( not _blockageNet ) _blockageNet = Session::getBlockageNet(); TrackFixedSegment* trackFixedSegment = NULL; - if ( track ) { + if (track) { trackFixedSegment = new TrackFixedSegment ( track, segment ); - trackFixedSegment->_postCreate (); - Session::addInsertEvent ( trackFixedSegment, track ); + trackFixedSegment->_postCreate(); ltrace(190) << "Adding: " << segment << " on " << track << endl; ltrace(200) << "TrackFixedSegment::create(): " << trackFixedSegment << endl; + + Session::addInsertEvent( trackFixedSegment, track ); + } return trackFixedSegment; } AutoSegment* TrackFixedSegment::base () const { return NULL; } - bool TrackFixedSegment::isFixed () const { return true; } - bool TrackFixedSegment::isBlockage () const { return _isBlockage; } DbU::Unit TrackFixedSegment::getAxis () const { return getTrack()->getAxis(); } bool TrackFixedSegment::isHorizontal () const { return getTrack()->isHorizontal(); } bool TrackFixedSegment::isVertical () const { return getTrack()->isVertical(); } + bool TrackFixedSegment::isFixed () const { return true; } unsigned int TrackFixedSegment::getDirection () const { return getTrack()->getDirection(); } const Layer* TrackFixedSegment::getLayer () const { return _segment->getLayer(); } - Interval TrackFixedSegment::getFreeInterval ( bool useOrder ) const { return Interval(); } + Interval TrackFixedSegment::getFreeInterval () const { return Interval(); } unsigned long TrackFixedSegment::getId () const @@ -215,7 +206,7 @@ namespace Kite { Net* TrackFixedSegment::getNet () const { Net* realNet = _segment->getNet(); - if ( realNet->isSupply() or realNet->isClock() ) + if (realNet->isSupply() or realNet->isClock()) return _blockageNet; return realNet; } @@ -224,14 +215,14 @@ namespace Kite { TrackElement* TrackFixedSegment::getNext () const { size_t dummy = _index; - return _track->getNext ( dummy, getNet() ); + return _track->getNext( dummy, getNet() ); } TrackElement* TrackFixedSegment::getPrevious () const { size_t dummy = _index; - return _track->getPrevious ( dummy, getNet() ); + return _track->getPrevious( dummy, getNet() ); } @@ -247,7 +238,7 @@ namespace Kite { + " " + DbU::getValueString(_targetU-_sourceU) + " [" + ((_track) ? getString(_index) : "npos") + "] " + "F" - + ((_isBlockage) ? "B" : "-"); + + ((isBlockage()) ? "B" : "-"); s1.insert ( s1.size()-1, s2 ); return s1; @@ -256,11 +247,10 @@ namespace Kite { Record* TrackFixedSegment::_getRecord () const { - Record* record = TrackElement::_getRecord (); - record->add ( getSlot ( "_segment", _segment ) ); - + Record* record = TrackElement::_getRecord(); + record->add( getSlot( "_segment", _segment ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackMarker.cpp b/kite/src/TrackMarker.cpp index 1dd421e9..09cf8acf 100644 --- a/kite/src/TrackMarker.cpp +++ b/kite/src/TrackMarker.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,35 +12,28 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackMarker.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ - - -#include -#include - -#include "hurricane/Bug.h" -#include "hurricane/Warning.h" -#include "hurricane/RoutingPad.h" -#include "hurricane/Net.h" -#include "hurricane/Name.h" -#include "crlcore/RoutingGauge.h" -#include "katabatic/GCell.h" -#include "kite/TrackMarker.h" -#include "kite/Track.h" -#include "kite/RoutingPlane.h" -#include "kite/Session.h" -#include "kite/RoutingEvent.h" -#include "kite/KiteEngine.h" +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/Warning.h" +#include "hurricane/RoutingPad.h" +#include "hurricane/Net.h" +#include "hurricane/Name.h" +#include "crlcore/RoutingGauge.h" +#include "katabatic/GCell.h" +#include "kite/TrackMarker.h" +#include "kite/Track.h" +#include "kite/RoutingPlane.h" +#include "kite/Session.h" +#include "kite/RoutingEvent.h" +#include "kite/KiteEngine.h" namespace Kite { - using std::cerr; using std::endl; using std::ostringstream; @@ -101,7 +89,7 @@ namespace Kite { Track* track = rp->getTrackByPosition ( trackSpan.getVMin() ); while ( track && (track->getAxis() <= trackSpan.getVMax()) ) { Session::addInsertEvent ( this, track ); - track = track->getNext (); + track = track->getNextTrack(); _refcount++; } } @@ -139,7 +127,6 @@ namespace Kite { return record; } - -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackSegment.cpp b/kite/src/TrackSegment.cpp index 89880a96..729bb58f 100644 --- a/kite/src/TrackSegment.cpp +++ b/kite/src/TrackSegment.cpp @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,31 +15,27 @@ // +-----------------------------------------------------------------+ - - -#include -#include - -#include "hurricane/Bug.h" -#include "hurricane/Warning.h" -#include "hurricane/Net.h" -#include "hurricane/Name.h" -#include "hurricane/RoutingPad.h" -#include "katabatic/AutoContact.h" -#include "katabatic/GCell.h" -#include "crlcore/RoutingGauge.h" -#include "kite/DataNegociate.h" -#include "kite/TrackSegment.h" -#include "kite/Track.h" -#include "kite/Session.h" -#include "kite/RoutingEvent.h" -#include "kite/NegociateWindow.h" -#include "kite/KiteEngine.h" +#include +#include +#include "hurricane/Bug.h" +#include "hurricane/Warning.h" +#include "hurricane/Net.h" +#include "hurricane/Name.h" +#include "hurricane/RoutingPad.h" +#include "katabatic/AutoContact.h" +#include "katabatic/GCell.h" +#include "crlcore/RoutingGauge.h" +#include "kite/DataNegociate.h" +#include "kite/TrackSegment.h" +#include "kite/Track.h" +#include "kite/Session.h" +#include "kite/RoutingEvent.h" +#include "kite/NegociateWindow.h" +#include "kite/KiteEngine.h" namespace Kite { - using namespace std; using Hurricane::inltrace; using Hurricane::ltracein; @@ -51,7 +47,8 @@ namespace Kite { using Hurricane::Net; using Hurricane::Name; using Hurricane::RoutingPad; - + using Katabatic::SegSlackened; + using Katabatic::KbPropagate; // ------------------------------------------------------------------- // Class : "TrackSegment". @@ -60,35 +57,33 @@ namespace Kite { TrackSegment::TrackSegment ( AutoSegment* segment, Track* track ) : TrackElement (track) , _base (segment) - , _created (true) - , _lock (true) - , _revalidated (false) - , _sourceDogLeg (false) - , _targetDogLeg (false) - , _canRipple (false) - , _routed (false) - , _area (0) + , _freedomDegree(0) , _data (NULL) , _dogLegLevel (0) { + ltrace(99) << "CTOR TrackSegment " << (void*)this << ":" << this << endl; + ltrace(99) << " over " << (void*)segment << ":" << segment << endl; + + setFlags( TElemCreated|TElemLocked ); if (segment) { - _data = new DataNegociate ( this ); - _base->getCanonical ( _sourceU, _targetU ); - setArea (); - //update (); + _data = new DataNegociate( this ); + _base->getCanonical( _sourceU, _targetU ); + updateFreedomDegree(); } } void TrackSegment::_postCreate () { - TrackElement::_postCreate (); - Session::link ( this ); + TrackElement::_postCreate(); + base()->addObserver( getObserver() ); } TrackSegment::~TrackSegment () - { if ( _data ) delete _data; } + { + if (_data) delete _data; + } void TrackSegment::_preDestroy () @@ -97,9 +92,8 @@ namespace Kite { << " [" << (void*)_base << ", " << (void*)(_base?_base->base():NULL) << "]" << endl; - Session::unlink ( this ); - - TrackElement::_preDestroy (); + base()->removeObserver( getObserver() ); + TrackElement::_preDestroy(); } @@ -107,13 +101,13 @@ namespace Kite { { created = false; - TrackElement* trackElement = Session::lookup ( segment->base() ); - if ( not trackElement ) { - TrackSegment* trackSegment = new TrackSegment ( segment, track ); - trackSegment->_postCreate (); + TrackElement* trackElement = Session::lookup( segment->base() ); + if (not trackElement) { + TrackSegment* trackSegment = new TrackSegment( segment, track ); + trackSegment->_postCreate(); created = true; - trackSegment->invalidate (); + trackSegment->invalidate(); ltrace(200) << "TrackSegment::create(): " << trackSegment << endl; trackElement = trackSegment; @@ -124,73 +118,39 @@ namespace Kite { // Formerly Inline Functions. - AutoSegment* TrackSegment::base () const { return _base; } - bool TrackSegment::isBipoint () const { return _base->isBipoint(); } - bool TrackSegment::isCreated () const { return _created; } - bool TrackSegment::isFixed () const { return _base->isFixed(); } - bool TrackSegment::isStrap () const { return _base->isCanonicalStrap(); } - bool TrackSegment::isSlackenStrap () const { return _base->isSlackenStrap(); } - bool TrackSegment::isLocal () const { return _base->isCanonicalLocal(); } - bool TrackSegment::isGlobal () const { return !isLocal(); } - bool TrackSegment::isLocked () const { return _lock; } - bool TrackSegment::isTerminal () const { return _base->isTerminal(); } - bool TrackSegment::isDogleg () const { return _base->isDogleg(); } - bool TrackSegment::isRevalidated () const { return _revalidated; } - bool TrackSegment::isRouted () const { return _routed; } - bool TrackSegment::isSlackened () const { return _base->isSlackened(); } - bool TrackSegment::isSlackenDogLeg () const { return isSlackened() and (_dogLegLevel > 0); } - bool TrackSegment::hasSourceDogLeg () const { return _sourceDogLeg; } - bool TrackSegment::hasTargetDogLeg () const { return _targetDogLeg; } - bool TrackSegment::allowOutsideGCell () const { return _base->allowOutsideGCell(); } - bool TrackSegment::canGoOutsideGCell () const { return _base->canGoOutsideGCell(); } - bool TrackSegment::canRipple () const { return _canRipple; } - unsigned long TrackSegment::getId () const { return _base->getId(); } - DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); } - unsigned long TrackSegment::getArea () const { return _area; } - unsigned int TrackSegment::getDogLegLevel () const { return _dogLegLevel; } - Interval TrackSegment::getSourceConstraints () const { return _base->getSourceConstraints(); } - Interval TrackSegment::getTargetConstraints () const { return _base->getTargetConstraints(); } - TrackElements TrackSegment::getCollapsedPerpandiculars () { return new TrackElements_CollapsedPerpandicular(this); } - void TrackSegment::setAllowOutsideGCell ( bool state ) { _base->setAllowOutsideGCell(state,true); } - void TrackSegment::setLock ( bool state ) { _lock = state; } - void TrackSegment::setRevalidated ( bool state ) { _revalidated = state; } - void TrackSegment::invalidate () { _base->invalidate(); } - void TrackSegment::setCanRipple ( bool state ) { _canRipple = state; } - void TrackSegment::setSourceDogLeg ( bool state ) { _sourceDogLeg = state; } - void TrackSegment::setTargetDogLeg ( bool state ) { _targetDogLeg = state; } - - - TrackElement* TrackSegment::getCanonical ( Interval& i ) - { return Session::lookup ( _base->getCanonical(i)->base() ); } - - - bool TrackSegment::canSlacken () const - { return (not isSlackened())?(_base->canSlacken(true)):false; } - - - bool TrackSegment::isHorizontal () const - { return _base->isHorizontal(); } - - - bool TrackSegment::isVertical () const - { return _base->isVertical(); } - - - unsigned int TrackSegment::getDirection () const - { return _base->getDirection(); } - - - Net* TrackSegment::getNet () const - { return _base->getNet(); } - - - const Layer* TrackSegment::getLayer () const - { return _base->getLayer(); } +// Wrappeds. + AutoSegment* TrackSegment::base () const { return _base; } + bool TrackSegment::isFixed () const { return _base->isFixed(); } + bool TrackSegment::isHorizontal () const { return _base->isHorizontal(); } + bool TrackSegment::isVertical () const { return _base->isVertical(); } + bool TrackSegment::isLocal () const { return not _base->isWeakGlobal() and not _base->isGlobal(); } + bool TrackSegment::isGlobal () const { return _base->isWeakGlobal() or _base->isGlobal(); } + bool TrackSegment::isBipoint () const { return _base->isBipoint(); } + bool TrackSegment::isTerminal () const { return _base->isTerminal(); } + bool TrackSegment::isStrongTerminal ( unsigned int flags ) const { return _base->isStrongTerminal(flags); } + bool TrackSegment::isStrap () const { return _base->isStrap(); } + bool TrackSegment::isSlackened () const { return _base->isSlackened(); } + bool TrackSegment::isDogleg () const { return _base->isDogleg(); } +// Predicates. +// Accessors. + unsigned long TrackSegment::getId () const { return _base->getId(); } + unsigned int TrackSegment::getDirection () const { return _base->getDirection(); } + Net* TrackSegment::getNet () const { return _base->getNet(); } + const Layer* TrackSegment::getLayer () const { return _base->getLayer(); } + DbU::Unit TrackSegment::getAxis () const { return _base->getAxis(); } + unsigned long TrackSegment::getFreedomDegree () const { return _freedomDegree; } + unsigned int TrackSegment::getDoglegLevel () const { return _dogLegLevel; } + Interval TrackSegment::getSourceConstraints () const { return _base->getSourceConstraints(); } + Interval TrackSegment::getTargetConstraints () const { return _base->getTargetConstraints(); } + TrackElement* TrackSegment::getCanonical ( Interval& i ) { return Session::lookup( _base->getCanonical(i)->base() ); } + TrackElements TrackSegment::getPerpandiculars () { return new TrackElements_Perpandiculars(this); } +// Mutators. + void TrackSegment::invalidate () { setFlags( TElemInvalidated ); _base->invalidate(); } DataNegociate* TrackSegment::getDataNegociate ( unsigned int flags ) const { - if ( flags & TrackElement::DataSelf ) return _data; + if (flags & KtDataSelf) return _data; TrackElement* parent = getParent(); return (parent) ? parent->getDataNegociate() : NULL; @@ -200,41 +160,41 @@ namespace Kite { TrackElement* TrackSegment::getNext () const { size_t dummy = _index; - return _track->getNext ( dummy, getNet() ); + return _track->getNext( dummy, getNet() ); } TrackElement* TrackSegment::getPrevious () const { size_t dummy = _index; - return _track->getPrevious ( dummy, getNet() ); + return _track->getPrevious( dummy, getNet() ); } TrackElement* TrackSegment::getParent () const { AutoSegment* baseParent = base()->getParent(); - if ( not baseParent ) return NULL; + if (not baseParent) return NULL; - TrackElement* element = Session::lookup ( baseParent ); + TrackElement* element = Session::lookup( baseParent ); return element; } Interval TrackSegment::getFreeInterval () const { - if ( not _track ) return Interval(false); + if (not _track) return Interval(false); size_t begin = _index; size_t end = _index; - return _track->expandFreeInterval ( begin, end, Track::Inside, getNet() ); + return _track->expandFreeInterval( begin, end, Track::InsideElement, getNet() ); } - size_t TrackSegment::getGCells ( vector& gcells ) const + size_t TrackSegment::getGCells ( Katabatic::GCellVector& gcells ) const { - vector().swap ( gcells ); + Katabatic::GCellVector().swap( gcells ); Katabatic::GCell* sourceGCell = base()->getAutoSource()->getGCell(); Katabatic::GCell* targetGCell = base()->getAutoTarget()->getGCell(); @@ -242,40 +202,41 @@ namespace Kite { ltrace(148) << "getGCells(): sourceGCell: " << sourceGCell << endl; ltrace(148) << "getGCells(): targetGCell: " << targetGCell << endl; - forEach ( AutoSegment*, isegment, base()->getCollapseds() ) { + forEach ( AutoSegment*, isegment, base()->getAligneds() ) { + ltrace(148) << "| " << *isegment << endl; + Katabatic::GCell* gcell = isegment->getAutoSource()->getGCell(); - if ( gcell->getIndex() < sourceGCell->getIndex() ) { + if (gcell->getIndex() < sourceGCell->getIndex()) { sourceGCell = gcell; ltrace(148) << "getGCells(): new sourceGCell: " << sourceGCell << endl; } gcell = isegment->getAutoTarget()->getGCell(); - if ( gcell->getIndex() > targetGCell->getIndex() ) { + if (gcell->getIndex() > targetGCell->getIndex()) { targetGCell = gcell; ltrace(148) << "getGCells(): new targetGCell: " << targetGCell << endl; } } - if ( not sourceGCell or not targetGCell ) return 0; - if ( not sourceGCell ) { gcells.push_back ( targetGCell ); return 1; } - if ( not targetGCell ) { gcells.push_back ( sourceGCell ); return 1; } + if (not sourceGCell or not targetGCell) return 0; + if (not sourceGCell) { gcells.push_back( targetGCell ); return 1; } + if (not targetGCell) { gcells.push_back( sourceGCell ); return 1; } - if ( isHorizontal() ) { - gcells.push_back ( sourceGCell ); + if (isHorizontal()) { + gcells.push_back( sourceGCell ); while ( sourceGCell != targetGCell ) { sourceGCell = sourceGCell->getRight(); - if ( not sourceGCell ) break; + if (not sourceGCell) break; - //cerr << " Pushing: " << sourceGCell << endl; - gcells.push_back ( sourceGCell ); + gcells.push_back( sourceGCell ); } } else { - gcells.push_back ( sourceGCell ); + gcells.push_back( sourceGCell ); while ( sourceGCell != targetGCell ) { sourceGCell = sourceGCell->getUp(); - if ( not sourceGCell ) break; + if (not sourceGCell) break; - gcells.push_back ( sourceGCell ); + gcells.push_back( sourceGCell ); } } @@ -289,95 +250,69 @@ namespace Kite { set baseBounds; set::iterator ibase; - _base->getPerpandicularsBound ( baseBounds ); + _base->getPerpandicularsBound( baseBounds ); - for ( ibase = baseBounds.begin() ; ibase != baseBounds.end() ; ibase++ ) { - TrackElement* segment = Session::lookup ( *ibase ); - if ( segment ) - bounds.insert ( segment ); + for ( ibase=baseBounds.begin() ; ibase!=baseBounds.end() ; ++ibase ) { + TrackElement* segment = Session::lookup( *ibase ); + if (segment) + bounds.insert( segment ); } return bounds.size(); } - void TrackSegment::setDogLegLevel ( unsigned int level ) + void TrackSegment::setDoglegLevel ( unsigned int level ) { - if ( level > 15 ) { + if (level > 15) { cerr << Bug("%s has reached maximum dog leg count (15)." ,_getString().c_str()) << endl; level = 15; } - _dogLegLevel = level; } - void TrackSegment::dataInvalidate () - { if (_data) _data->invalidate(); } - - - void TrackSegment::eventInvalidate () - { - if ( !_data ) return; - - RoutingEvent* event = _data->getRoutingEvent(); - if ( event ) event->invalidate ( true ); - } - - - void TrackSegment::setArea () - { - //float length = getValue ( getTargetU() - getSourceU() ); - //float height = getValue ( getSlack() ); - //_area = (unsigned long)( length * height ); - _area = _base->getSlack(); - } - - - void TrackSegment::setRouted ( bool state ) - { _routed = state; } + void TrackSegment::updateFreedomDegree () + { _freedomDegree = _base->getSlack(); } void TrackSegment::setTrack ( Track* track ) - { TrackElement::setTrack ( track ); } + { TrackElement::setTrack( track ); } void TrackSegment::detach () { ltrace(200) << "TrackSegment::detach() - " << endl; - setTrack ( NULL ); - setIndex ( (size_t)-1 ); - setLock ( true ); + setTrack( NULL ); + setIndex( (size_t)-1 ); + setFlags( TElemLocked ); } - void TrackSegment::revalidate ( bool invalidEvent ) + void TrackSegment::revalidate () { - _created = false; + unsetFlags( TElemCreated ); ltrace(148) << "revalidate() - " << this << endl; - _base->getCanonical ( _sourceU, _targetU ); - _data->update (); - if ( invalidEvent ) - _data->invalidate ( true, true ); + _base->getCanonical( _sourceU, _targetU ); - if ( _track ) Session::addSortEvent ( _track ); - _revalidated = true; + if (_track) Session::addSortEvent( _track, true ); + unsetFlags( TElemInvalidated ); } void TrackSegment::setAxis ( DbU::Unit axis, unsigned int flags ) { - _base->setAxis ( axis, flags ); - invalidate (); + _base->setAxis( axis, flags ); + invalidate(); } void TrackSegment::swapTrack ( TrackElement* other ) { - if ( not other ) return; + if (not other) return; ltrace(200) << "TrackSegment::swapTrack()" << endl; @@ -386,40 +321,31 @@ namespace Kite { size_t otherIndex = other->getIndex (); Track* otherTrack = other->getTrack (); - if ( _track and otherTrack and (_track != otherTrack) ) { - cerr << Error("TrackSegment::swapTrack() - swapping TrackSement from different tracks.") << endl; + if (_track and otherTrack and (_track != otherTrack)) { + cerr << Error("TrackSegment::swapTrack() - swapping TrackSegments from different tracks.") << endl; } - // detach (); - // other->detach (); - // if ( thisTrack ) thisTrack ->insert ( other ); - // if ( otherTrack ) otherTrack->insert ( this ); + setTrack( NULL ); + other->setTrack( NULL ); - setTrack ( NULL ); - other->setTrack ( NULL ); + other->setTrack( thisTrack ); + other->setIndex( thisIndex ); + if (thisTrack) thisTrack->setSegment( other, thisIndex ); - //other->setRouted ( thisRouted ); - other->setTrack ( thisTrack ); - other->setIndex ( thisIndex ); - if ( thisTrack ) thisTrack->setSegment ( other, thisIndex ); - - //setRouted ( otherRouted ); - setTrack ( otherTrack ); - setIndex ( otherIndex ); - if ( _track ) _track->setSegment ( this, _index ); + setTrack( otherTrack ); + setIndex( otherIndex ); + if (_track) _track->setSegment( this, _index ); #if defined(CHECK_DATABASE_DISABLED) - if ( _track ) - _track->_check(); - else if ( other->getTrack() ) - other->getTrack()->_check(); + if (_track) _track->_check(); + else if (other->getTrack()) other->getTrack()->_check(); #endif - RoutingEvent* thisEvent = getDataNegociate(TrackElement::DataSelf)->getRoutingEvent(); + RoutingEvent* thisEvent = getDataNegociate(KtDataSelf)->getRoutingEvent(); RoutingEvent* otherEvent = other->getDataNegociate()->getRoutingEvent(); - if ( thisEvent ) thisEvent ->setSegment ( other ); - if ( otherEvent ) otherEvent->setSegment ( this ); + if (thisEvent ) thisEvent ->setSegment( other ); + if (otherEvent) otherEvent->setSegment( this ); ltrace(200) << "| this: " << this << endl; ltrace(200) << "| other: " << other << endl; @@ -431,35 +357,20 @@ namespace Kite { ltrace(200) << "TrackSegment::reschedule() - " << this << endl; ltracein(200); - if ( not _data or not _data->hasRoutingEvent() ) - Session::getNegociateWindow()->addInsertEvent ( this, level ); + if (not _data or not _data->hasRoutingEvent()) + Session::getNegociateWindow()->addRoutingEvent( this, level ); else { - if ( _track != NULL ) - Session::addRemoveEvent ( this ); - Session::getNegociateWindow()->rescheduleEvent ( _data->getRoutingEvent(), level ); + if (_track != NULL) + Session::addRemoveEvent( this ); + Session::getNegociateWindow()->rescheduleEvent( _data->getRoutingEvent(), level ); } ltraceout(200); } - void TrackSegment::slacken () - { - if ( not isSlackened() ) { - ltrace(200) << "TrackSegment::slacken()" << endl; - ltracein(200); - - base()->slacken ( true ); - _postModify (); - - ltraceout(200); - } else - throw Bug("TrackSegment::slacken(): NULL base or already slackened."); - } - - float TrackSegment::getMaxUnderDensity ( unsigned int flags ) const - { return _base->getMaxUnderDensity ( flags ); } + { return _base->getMaxUnderDensity( flags ); } bool TrackSegment::canPivotUp ( float reserve ) const @@ -467,11 +378,41 @@ namespace Kite { bool TrackSegment::canPivotDown ( float reserve ) const - { return _base->canPivotDown(reserve); } + { return _base->canPivotDown( reserve ); } bool TrackSegment::canMoveUp ( float reserve, unsigned int flags ) const - { return _base->canMoveUp ( reserve, flags ); } + { return _base->canMoveUp( reserve, flags ); } + + + bool TrackSegment::canSlacken () const + { + ltrace(200) << "TrackSegment::canSlacken() doglegLevel:" << getDoglegLevel() << endl; + return (not isSlackened() and (getDoglegLevel() <= 3)) ? _base->canSlacken(KbPropagate) : false; + } + + bool TrackSegment::slacken ( unsigned int flags ) + { + ltrace(200) << "TrackSegment::slacken()" << endl; + + bool success = false; + + if (not isSlackened()) { + TrackElement* perpandicular = NULL; + TrackElement* parallel = NULL; + + ltracein(200); + + success = base()->slacken( flags|KbPropagate ); + _postDoglegs( perpandicular, parallel ); + + ltraceout(200); + return success; + } else + cerr << Bug("TrackSegment::slacken(): NULL base or already slackened.") << endl; + + return success; + } bool TrackSegment::moveUp ( unsigned int flags ) @@ -481,30 +422,14 @@ namespace Kite { ltrace(200) << "TrackSegment::moveUp() " << flags << endl; ltracein(200); - success = base()->moveUp ( flags ); + success = base()->moveUp( flags ); + if (success) { + TrackElement* perpandicular = NULL; + TrackElement* parallel = NULL; - const vector& invalidateds = Session::getInvalidateds(); - if ( not invalidateds.empty() ) { - vector segments; - for ( size_t i=0 ; iaddTrackSegment(invalidateds[i],false); - if ( segment != NULL ) { - ltrace(200) << "moved up: " << invalidateds[i] << endl; - segments.push_back ( segment ); - // if ( (segment->getTrack() == NULL) - // or (segment->getLayer() != segment->getTrack()->getLayer()) ) - segment->reschedule ( 0 ); - } - } - for ( size_t i=0 ; isetState ( DataNegociate::ConflictSolve1, true ); - // _data->resetRipupCount (); - // } ltraceout(200); @@ -519,30 +444,14 @@ namespace Kite { ltrace(200) << "TrackSegment::moveDown() " << flags << endl; ltracein(200); - success = base()->moveDown ( flags ); + success = base()->moveDown( flags ); + if (success) { + TrackElement* perpandicular = NULL; + TrackElement* parallel = NULL; - const vector& invalidateds = Session::getInvalidateds(); - if ( not invalidateds.empty() ) { - vector segments; - for ( size_t i=0 ; iaddTrackSegment(invalidateds[i],false); - if ( segment != NULL ) { - ltrace(200) << "moved down: " << invalidateds[i] << endl; - segments.push_back ( segment ); - // if ( (segment->getTrack() == NULL) - // or (segment->getLayer() != segment->getTrack()->getLayer()) ) - segment->reschedule ( 0 ); - } - } - for ( size_t i=0 ; isetState ( DataNegociate::ConflictSolve1, true ); - // _data->resetRipupCount (); - // } ltraceout(200); @@ -550,45 +459,31 @@ namespace Kite { } - bool TrackSegment::moveAside ( bool onLeft ) + bool TrackSegment::moveAside ( unsigned int flags ) { bool success = true; - ltrace(200) << "TrackSegment::moveAside() - " << (onLeft?"left":"right") << endl; + ltrace(200) << "TrackSegment::moveAside() - " + << ((flags&KtMoveToLeft )?"left" :"") + << ((flags&KtMoveToRight)?"rigth":"") << endl; ltracein(200); - - if ( onLeft ) base()->moveULeft (); - else base()->moveURight (); - - const vector& invalidateds = Session::getInvalidateds(); - if ( not invalidateds.empty() ) { - vector segments; - for ( size_t i=0 ; iaddTrackSegment(invalidateds[i],false) ); - segments.back()->reschedule ( 0 ); - } - - for ( size_t i=0 ; imoveULeft (); + if (flags & KtMoveToRight) base()->moveURight(); ltraceout(200); return success; } - TrackElement* TrackSegment::getSourceDogLeg () + TrackElement* TrackSegment::getSourceDogleg () { - if ( not hasSourceDogLeg() ) return NULL; + if (not hasSourceDogleg()) return NULL; - unsigned int direction = Constant::perpandicular ( getDirection() ); + unsigned int direction = perpandicularTo( getDirection() ); TrackElement* dogleg = NULL; forEach ( Segment*, isegment, base()->getAutoSource()->getSlaveComponents().getSubSet() ) { - dogleg = Session::lookup ( *isegment ); - if ( dogleg and (dogleg->getDirection() == direction) ) { + dogleg = Session::lookup( *isegment ); + if (dogleg and (dogleg->getDirection() == direction)) { ltrace(200) << "Source dogleg: " << dogleg << endl; return dogleg; } @@ -597,15 +492,15 @@ namespace Kite { } - TrackElement* TrackSegment::getTargetDogLeg () + TrackElement* TrackSegment::getTargetDogleg () { - if ( not hasSourceDogLeg() ) return NULL; + if (not hasSourceDogleg()) return NULL; - unsigned int direction = Constant::perpandicular ( getDirection() ); + unsigned int direction = perpandicularTo( getDirection() ); TrackElement* dogleg = NULL; forEach ( Segment*, isegment, base()->getAutoTarget()->getSlaveComponents().getSubSet() ) { - dogleg = Session::lookup ( *isegment ); - if ( dogleg and (dogleg->getDirection() == direction) ) { + dogleg = Session::lookup( *isegment ); + if (dogleg and (dogleg->getDirection() == direction)) { ltrace(200) << "Target dogleg: " << dogleg << endl; return dogleg; } @@ -614,198 +509,244 @@ namespace Kite { } - bool TrackSegment::canDogLeg ( Interval interval ) + bool TrackSegment::canDogleg () { - ltrace(200) << "TrackSegment::canDogLeg(Interval) " << interval << endl; + ltrace(200) << "TrackSegment::canDogleg()" << endl; - if ( isFixed() ) { - ltrace(200) << "Failed: is fixed" << endl; - return false; - } - - if ( not isLocal() ) { - ltrace(200) << "Failed: is not local" << endl; - return false; - } - - if ( hasSourceDogLeg() or hasTargetDogLeg() or isSlackened() ) { - ltrace(200) << "Failed: already has source and/or target dogleg or slackened." << endl; - return false; - } - - return _base->canDogLeg(interval); - } - - - TrackElement* TrackSegment::makeDogLeg ( Interval interval, bool& leftDogleg ) - { - ltrace(200) << "TrackSegment::makeDogLeg(Interval)" << endl; - - bool upLayer = (Session::getRoutingGauge()->getLayerDepth(getLayer()) < 2); - - base()->makeDogLeg ( interval, upLayer, leftDogleg ); - - return _postDogLeg (); - } - - - bool TrackSegment::canDogLeg () - { - ltrace(200) << "TrackSegment::canDogLeg()" << endl; - - if ( not isLocal() ) { + if (not isLocal()) { ltrace(200) << "Failed: is not local." << endl; return false; } - if ( isFixed() ) { + if (isFixed()) { ltrace(200) << "Failed: is fixed." << endl; return false; } - if ( isSlackened() ) { + if (isSlackened()) { ltrace(200) << "Failed: is local & slackened." << endl; return false; } - if ( hasSourceDogLeg() || hasTargetDogLeg() ) return false; + if (hasSourceDogleg() or hasTargetDogleg()) { + ltrace(200) << "Failed: already has source or target dogleg." << endl; + return false; + } + + if (getDoglegLevel() > 3) { + ltrace(200) << "Failed: maximum dogleg level reached (4)." << endl; + return false; + } return true; } - TrackElement* TrackSegment::makeDogLeg () + bool TrackSegment::canDogleg ( Katabatic::GCell* doglegGCell, unsigned int flags ) { - Katabatic::AutoContact* source = _base->getAutoSource(); - Katabatic::AutoContact* target = _base->getAutoTarget(); - Katabatic::GCell* gcell = _base->getAutoSource()->getGCell(); + ltrace(200) << "TrackSegment::canDogleg(GCell*) " << doglegGCell << endl; + ltracein(200); - TrackElement* dogleg = makeDogLeg ( gcell ); - - if ( dogleg ) { - if ( source->isTerminal() xor target->isTerminal() ) { - if ( target->isTerminal() ) - source = target; - - DbU::Unit axis = (_base->isHorizontal()) ? source->getX() : source->getY(); - - ltrace(200) << "Setting dogleg axis @" << DbU::getValueString(axis) << endl; - dogleg->setAxis ( axis ); - } - return _postDogLeg(); - } - - return NULL; - } - - - bool TrackSegment::canDogLegAt ( Katabatic::GCell* dogLegGCell, unsigned int flags ) - { - ltrace(200) << "TrackSegment::canDogLegAt(GCell*) " << dogLegGCell << endl; - - if ( isFixed() ) { - ltrace(200) << "Cannot dogleg a fixed segment." << endl; + if (doglegGCell->isUnderIoPad()) { + ltrace(200) << "false: Cannot dogleg in a GCell under an I/O Pad." << endl; + ltraceout(200); return false; } - if ( isLocal() ) { - if ( hasSourceDogLeg() or hasTargetDogLeg() ) { - ltrace(200) << "Cannot dogleg again a local segment." << endl; + if (isFixed()) { + ltrace(200) << "false: Cannot dogleg a fixed segment." << endl; + ltraceout(200); + return false; + } + + if (isLocal()) { + if (hasSourceDogleg() or hasTargetDogleg()) { + ltrace(200) << "false: Cannot dogleg again a local segment." << endl; + ltraceout(200); return false; } - if ( isSlackened() ) { - ltrace(200) << "Cannot dogleg a local slackened segment." << endl; + if (isSlackened()) { + ltrace(200) << "false: Cannot dogleg a local slackened segment." << endl; + ltraceout(200); return false; } } + if (getDoglegLevel() > 3) { + ltrace(200) << "Failed: maximum dogleg level reached (4)." << endl; + ltraceout(200); + return false; + } + vector gcells; - getGCells ( gcells ); + getGCells( gcells ); ltrace(190) << "Source: " << *gcells.begin () << endl; ltrace(190) << "Target: " << *gcells.rbegin() << endl; bool isGCellInside = false; - for ( size_t igcell=0 ; igcellgetLayerDepth(getLayer()) < 2); + if (isFixed()) { + ltrace(200) << "Failed: is fixed" << endl; + return false; + } - base()->makeDogLeg ( dogLegGCell, upLayer ); + if (not isLocal()) { + ltrace(200) << "Failed: is not local" << endl; + return false; + } - return _postDogLeg (); + if (hasSourceDogleg() or hasTargetDogleg() or isSlackened()) { + ltrace(200) << "Failed: already has source and/or target dogleg or slackened." << endl; + return false; + } + + if (getDoglegLevel() > 3) { + ltrace(200) << "Failed: maximum dogleg level reached (4)." << endl; + return false; + } + + return _base->canDogleg(interval); } - TrackElement* TrackSegment::_postDogLeg () + TrackElement* TrackSegment::makeDogleg () { + Katabatic::AutoContact* source = _base->getAutoSource(); + Katabatic::AutoContact* target = _base->getAutoTarget(); + Katabatic::GCell* gcell = _base->getAutoSource()->getGCell(); + + TrackElement* dogleg = NULL; + TrackElement* parallel = NULL; + makeDogleg( gcell, dogleg, parallel ); + + if (dogleg) { + if (source->isTerminal() xor target->isTerminal()) { + if (target->isTerminal()) + source = target; + + DbU::Unit axis = (_base->isHorizontal()) ? source->getX() : source->getY(); + + ltrace(200) << "Setting dogleg axis @" << DbU::getValueString(axis) << endl; + dogleg->setAxis( axis ); + } + } + return dogleg; + } + + + TrackElement* TrackSegment::makeDogleg ( Katabatic::GCell* dogLegGCell + , TrackElement*& perpandicular + , TrackElement*& parallel + ) + { + ltrace(200) << "TrackSegment::makeDogleg(GCell*)" << endl; + ltrace(200) << "Break in: " << dogLegGCell << endl; + + base()->makeDogleg( dogLegGCell ); + _postDoglegs( perpandicular, parallel ); + + return perpandicular; + } + + + TrackElement* TrackSegment::makeDogleg ( Interval interval, unsigned int& flags ) + { + TrackElement* perpandicular = NULL; + TrackElement* parallel = NULL; + + ltrace(200) << "TrackSegment::makeDogleg(Interval)" << endl; + flags = base()->makeDogleg( interval ); + _postDoglegs( perpandicular, parallel ); + + return perpandicular; + } + + + void TrackSegment::_postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel ) + { + ltrace(200) << "TrackSegment::_postDoglegs()" << endl; ltracein(200); - TrackElement* perpandicular = NULL; + unsigned int doglegLevel = 0; + const vector& doglegs = Session::getDoglegs(); + vector segments; - const vector& dogLegs = Session::getDogLegs(); - if ( not dogLegs.empty() ) { - vector segments; - for ( size_t i=0 ; iaddTrackSegment(dogLegs[i],false) ); + for ( size_t i=0 ; icreateTrackSegment(doglegs[i],0) ); + segments[i+0]->setFlags( TElemTargetDogleg ); + segments[i+0]->getDataNegociate()->resetRipupCount(); + //segments[i+0]->getDataNegociate()->resetStateCount(); + segments[i+0]->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars ); + doglegLevel = segments[i+0]->getDoglegLevel() + 1; + segments[i+0]->setDoglegLevel( doglegLevel ); - switch ( i ) { - case 0: - segments[i]->setTargetDogLeg(); - segments[i]->getDataNegociate()->resetRipupCount(); + ltrace(200) << "Looking up new perpand: " << doglegs[i+1] << endl; + segments.push_back( Session::getNegociateWindow()->createTrackSegment(doglegs[i+1],0) ); + segments[i+1]->setFlags( TElemSourceDogleg|TElemTargetDogleg ); + segments[i+1]->setDoglegLevel( doglegLevel ); - if ( segments[i] != this ) { - cerr << Error ( "Incoherency in TrackSegment LUT, lookup of %p gives %p instead of %p (this)" - , dogLegs[i], segments[i], this - ) << endl; - } - break; - case 1: - perpandicular = segments[i]; - segments[i]->setSourceDogLeg (); - segments[i]->setTargetDogLeg (); - segments[i]->setDogLegLevel ( getDogLegLevel()+1 ); - break; - case 2: - segments[i]->setSourceDogLeg (); - break; - } + ltrace(200) << "Looking up new parallel: " << doglegs[i+2] << endl; + segments.push_back( Session::getNegociateWindow()->createTrackSegment(doglegs[i+2],0) ); + segments[i+2]->setFlags( TElemSourceDogleg ); + segments[i+2]->getDataNegociate()->resetStateCount(); + segments[i+2]->getDataNegociate()->setState( segments[i+0]->getDataNegociate()->getState() ); + segments[i+2]->setDoglegLevel( doglegLevel ); + + segments[i+0]->getDataNegociate()->setChildSegment( segments[i+2] ); + + perpandicular = segments[i+1]; + parallel = segments[i+2]; } // TO CHECK @@ -813,103 +754,45 @@ namespace Kite { // if the new bit takes it's place or not. //if ( getGCell() != originalGCell ) swapTrack ( segments[2] ); - for ( size_t i=0 ; ireschedule ( ((i==1) ? 0 : 1) ); - } - - ltrace(200) << "original: " << segments[0] << endl; - ltrace(200) << "perpand: " << segments[1] << endl; - ltrace(200) << "new paral: " << segments[2] << endl; - } - - ltraceout(200); - - return perpandicular; - } - - - bool TrackSegment::canDesalignate () const - { - ltrace(200) << "TrackSegment::canDesalignate()" << endl; - - return _base->canDesalignate(); - } - - - void TrackSegment::desalignate () - { - ltrace(200) << "TrackSegment::desalignate()" << endl; - ltracein(200); - - _base->desalignate (); - _postModify (); - - ltraceout(200); - } - - - void TrackSegment::_postModify () - { - ltrace(200) << "TrackSegment::_postModify()" << endl; - ltracein(200); - - unsigned int doglegLevel = getDogLegLevel() + 1; - unsigned int parallelDir = getDirection (); - unsigned int perpandicularDir = Constant::perpandicular ( parallelDir ); - - const vector& invalidateds = Session::getInvalidateds(); - vector segments; - - if ( not invalidateds.empty() ) { - for ( size_t i=0 ; iaddTrackSegment(invalidateds[i],false); - if ( segment != NULL ) - segments.push_back ( segment ); - } - } - - for ( size_t i=0 ; iisCreated() and (segment->getDirection() == perpandicularDir) ) { - ltrace(200) << "Increasing dogleg level to: " << doglegLevel << endl; - segment->setDogLegLevel ( doglegLevel ); - } - - if ( segment->getDirection() == parallelDir ) { - forEach ( TrackElement*, iperpandicular, segment->getCollapsedPerpandiculars() ) { - ltrace(200) << "| pp: " << *iperpandicular << endl; - iperpandicular->reschedule ( 0 ); + for ( size_t i=0 ; ireschedule ( ((i%3==1) ? 0 : 1) ); + const char* segPart = "Unknown"; + switch ( i%3 ) { + case 0: segPart = "original "; break; + case 1: segPart = "perpand "; break; + case 2: segPart = "new paral"; break; } - segment->reschedule ( 0 ); + ltrace(200) << "[" << (i/3) << ":" << i << "] " << segPart << ": " + << segments[i] << endl; } - } + } ltraceout(200); + + Session::doglegReset(); } bool TrackSegment::_check () const { - if ( not base() ) return true; + if (not base()) return true; bool coherency = true; - if ( not base()->isCanonical() ) { + if (not base()->isCanonical()) { cerr << "[CHECK] " << this << " supporting AutoSegment is not canonical." << endl; coherency = false; } DbU::Unit min; DbU::Unit max; - base()->getCanonical ( min, max ); - if ( getSourceU() != min ) { + base()->checkPositions(); + base()->getCanonical( min, max ); + if (getSourceU() != min) { cerr << "[CHECK] " << this << " has bad source position " << DbU::getValueString(min) << "." << endl; coherency = false; } - if ( getTargetU() != max ) { + if (getTargetU() != max) { cerr << "[CHECK] " << this << " has bad target position " << DbU::getValueString(max) << "." << endl; coherency = false; } @@ -932,9 +815,9 @@ namespace Kite { + " [" + ((_track) ? getString(_index) : "npos") + "] " + ((isSlackened() ) ? "S" : "-") + ((_track ) ? "T" : "-") - + ((_canRipple ) ? "r" : "-") - + ((_sourceDogLeg ) ? "s" : "-") - + ((_targetDogLeg ) ? "t" : "-"); + + ((canRipple() ) ? "r" : "-") + + ((hasSourceDogleg()) ? "s" : "-") + + ((hasTargetDogleg()) ? "t" : "-"); s1.insert ( s1.size()-1, s2 ); @@ -944,13 +827,10 @@ namespace Kite { Record* TrackSegment::_getRecord () const { - Record* record = TrackElement::_getRecord (); - record->add ( getSlot ( "_base" , _base ) ); - record->add ( getSlot ( "_lock" , _lock ) ); - record->add ( getSlot ( "_revalidated", _revalidated ) ); - + Record* record = TrackElement::_getRecord(); + record->add( getSlot( "_base", _base ) ); return record; } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/TrackSegmentCost.cpp b/kite/src/TrackSegmentCost.cpp index af35d811..00124a5d 100644 --- a/kite/src/TrackSegmentCost.cpp +++ b/kite/src/TrackSegmentCost.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,12 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./TrackSegmentCost.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x - - +// +-----------------------------------------------------------------+ #include diff --git a/kite/src/Tracks.cpp b/kite/src/Tracks.cpp index 112f1899..0df2b44b 100644 --- a/kite/src/Tracks.cpp +++ b/kite/src/Tracks.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,22 +12,17 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./Tracks.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include - -#include "kite/Track.h" -#include "kite/Tracks.h" -#include "kite/RoutingPlane.h" +#include +#include "kite/Track.h" +#include "kite/Tracks.h" +#include "kite/RoutingPlane.h" namespace Kite { - using std::cerr; using std::endl; using Hurricane::tab; @@ -56,8 +46,8 @@ namespace Kite { _track = routingPlane->getTrackByPosition ( _constraints.getVMin() ); - if ( _track && (_track->getAxis() < _constraints.getVMin()) ) _track = _track->getNext(); - if ( _track && (_track->getAxis() > _constraints.getVMax()) ) _track = NULL; + if ( _track and (_track->getAxis() < _constraints.getVMin()) ) _track = _track->getNextTrack(); + if ( _track and (_track->getAxis() > _constraints.getVMax()) ) _track = NULL; ltrace(147) << "_track: " << _track << endl;; } @@ -87,8 +77,8 @@ namespace Kite { { if ( !_track ) return; - _track = _track->getNext (); - if ( _track && (_track->getAxis() > _constraints.getVMax()) ) _track = NULL; + _track = _track->getNextTrack(); + if ( _track and (_track->getAxis() > _constraints.getVMax()) ) _track = NULL; } @@ -170,12 +160,12 @@ namespace Kite { if ( _maxTrack->getAxis() > _constraints.getVMax() ) _maxTrack = NULL; if ( _minTrack && !_maxTrack ) { - _minTrack = _minTrack->getPrevious (); - if ( _minTrack->getAxis() < _constraints.getVMin() ) _minTrack = NULL; + _minTrack = _minTrack->getPreviousTrack(); + if (_minTrack->getAxis() < _constraints.getVMin()) _minTrack = NULL; } if ( _maxTrack && !_minTrack ) { - _maxTrack = _maxTrack->getNext (); + _maxTrack = _maxTrack->getNextTrack(); if ( _maxTrack->getAxis() > _constraints.getVMax() ) _maxTrack = NULL; } @@ -237,7 +227,7 @@ namespace Kite { if ( _onMin ) { _onMin = (_maxTrack == NULL); if ( _minTrack ) { - _minTrack = _minTrack->getPrevious(); + _minTrack = _minTrack->getPreviousTrack(); if ( _minTrack ) { if ( _minTrack->getAxis() < _optimal.getVMin() ) _inMinOptimal = false; @@ -248,7 +238,7 @@ namespace Kite { } else { _onMin = (_minTrack != NULL); if ( _maxTrack ) { - _maxTrack = _maxTrack->getNext(); + _maxTrack = _maxTrack->getNextTrack(); if ( _maxTrack ) { if ( _maxTrack->getAxis() > _optimal.getVMax() ) _inMaxOptimal = false; @@ -326,4 +316,4 @@ namespace Kite { } -} // End of Katabatic namespace. +} // Kite namespace. diff --git a/kite/src/VerticalTrack.cpp b/kite/src/VerticalTrack.cpp index e04ad0ba..e3b35678 100644 --- a/kite/src/VerticalTrack.cpp +++ b/kite/src/VerticalTrack.cpp @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,13 +12,10 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Module : "./VerticalTrack.cpp" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// +-----------------------------------------------------------------+ -#include "kite/VerticalTrack.h" +#include "kite/VerticalTrack.h" namespace Kite { @@ -62,7 +54,7 @@ namespace Kite { bool VerticalTrack::isHorizontal () const { return false; } bool VerticalTrack::isVertical () const { return true; } - unsigned int VerticalTrack::getDirection () const { return Constant::Vertical; } + unsigned int VerticalTrack::getDirection () const { return KbVertical; } Point VerticalTrack::getPosition ( DbU::Unit coordinate ) const @@ -80,4 +72,4 @@ namespace Kite { } -} // End of Kite namespace. +} // Kite namespace. diff --git a/kite/src/kite/Configuration.h b/kite/src/kite/Configuration.h index 808caf19..dc5b33ee 100644 --- a/kite/src/kite/Configuration.h +++ b/kite/src/kite/Configuration.h @@ -1,34 +1,24 @@ - -// -*- C++ -*- +// -*- mode: C++; explicit-buffer-name: "Configuration.h" -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Configuration.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/Configuration.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_CONFIGURATION__ -#define __KITE_CONFIGURATION__ +#ifndef KITE_CONFIGURATION_H +#define KITE_CONFIGURATION_H -#include - -#include "katabatic/Configuration.h" +#include +#include "katabatic/Configuration.h" namespace Kite { @@ -47,7 +37,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Kite::Configuration". - class Configuration : public Katabatic::Configuration { public: typedef boost::function< void(void) > PostEventCb_t; @@ -68,6 +57,7 @@ namespace Kite { ~Configuration (); // Decorateds. virtual bool isGMetal ( const Layer* ) const; + virtual bool isGContact ( const Layer* ) const; virtual size_t getDepth () const; virtual size_t getAllowedDepth () const; virtual size_t getLayerDepth ( const Layer* ) const; @@ -137,10 +127,10 @@ namespace Kite { -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::Configuration); -#endif // __KITE_CONFIGURATION__ +#endif // KITE_CONFIGURATION_H diff --git a/kite/src/kite/Constants.h b/kite/src/kite/Constants.h new file mode 100644 index 00000000..8d6bfa0f --- /dev/null +++ b/kite/src/kite/Constants.h @@ -0,0 +1,52 @@ +// -*- mode: C++; explicit-buffer-name: "Constants.h" -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2013, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Header : "./kite/Constants.h" | +// +-----------------------------------------------------------------+ + + +#ifndef KITE_CONSTANTS_H +#define KITE_CONSTANTS_H + +#include "katabatic/Constants.h" + +namespace Kite { + + using Katabatic::KbOpenSession; + using Katabatic::KbRealignate; + using Katabatic::KbNativeConstraints; + using Katabatic::KbForceMove; + using Katabatic::KbHorizontal; + using Katabatic::KbVertical; + using Katabatic::KbWithPerpands; + using Katabatic::KbBySource; + using Katabatic::KbByTarget; + using Katabatic::KbWarnOnError; + using Katabatic::perpandicularTo; + + enum FunctionFlags { KtLoadGlobalRouting = 0x00000001 + , KtBuildGlobalRouting = 0x00000002 + , KtAllowDoglegReuse = 0x00000004 + , KtDataSelf = 0x00000008 + , KtNearest = 0x00000010 + , KtForce = 0x00000020 + , KtResetCount = 0x00000040 + , KtWithPerpands = 0x00000080 + , KtWithConstraints = 0x00000100 + , KtMoveToLeft = 0x00000200 + , KtMoveToRight = 0x00000400 + , KtLoadingStage = 0x00000800 + , }; + +} // Kite namespace. + +#endif // KITE_CONSTANTS_H diff --git a/kite/src/kite/DataNegociate.h b/kite/src/kite/DataNegociate.h index 9c71ad40..352671ae 100644 --- a/kite/src/kite/DataNegociate.h +++ b/kite/src/kite/DataNegociate.h @@ -1,8 +1,7 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -11,23 +10,21 @@ // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./DataNegociate.h" | +// | C++ Header : "./kite/DataNegociate.h" | // +-----------------------------------------------------------------+ -#ifndef __KITE_DATA_NEGOCIATE__ -#define __KITE_DATA_NEGOCIATE__ +#ifndef KITE_DATA_NEGOCIATE_H +#define KITE_DATA_NEGOCIATE_H -#include -#include +#include +#include namespace Hurricane { class Record; } -#include "kite/TrackSegmentCost.h" #include "kite/TrackElement.h" -#include "kite/RoutingEvent.h" namespace Katabatic { class AutoSegment; } @@ -51,58 +48,66 @@ namespace Kite { class DataNegociate { - public: - enum SlackState { RipupPerpandiculars= 1 - , Desalignate = 2 - , Minimize = 3 - , DogLeg = 4 - , Slacken = 5 - , ConflictSolve1 = 6 - , ConflictSolve2 = 7 - , LocalVsGlobal = 8 - , MoveUp = 9 - , MaximumSlack =10 - , Unimplemented =11 - , Repair =12 + enum SlackState { RipupPerpandiculars = 1 + , Minimize = 2 + , Dogleg = 3 + , Slacken = 4 + , ConflictSolveByHistory = 5 + , ConflictSolveByPlaceds = 6 + , LocalVsGlobal = 7 + , MoveUp = 8 + , MaximumSlack = 9 + , Unimplemented =10 + , Repair =11 }; - public: - DataNegociate ( TrackElement* ); - ~DataNegociate (); - inline bool hasRoutingEvent () const; - inline RoutingEvent* getRoutingEvent () const; - inline TrackElement* getTrackSegment () const; - inline Track* getTrack () const; - inline TrackSegmentCost& getCost (); - //inline unsigned int getZ () const; - inline unsigned int getState () const; - inline unsigned int getStateCount () const; - inline unsigned int getRipupCount () const; - inline unsigned int getStateAndRipupCount () const; - inline void setState ( unsigned int, bool reset=false ); - inline void setRoutingEvent ( RoutingEvent* ); - inline void setRipupCount ( unsigned int ); - inline void incRipupCount (); - inline void decRipupCount (); - inline void resetRipupCount (); - inline void resetStateCount (); - inline void invalidate ( bool withPerpandiculars=false, bool withConstraints=false ); - void update (); - static string getStateString ( DataNegociate* ); - Record* _getRecord () const; - string _getString () const; - inline string _getTypeName () const; - + DataNegociate ( TrackElement* ); + ~DataNegociate (); + inline bool hasRoutingEvent () const; + inline RoutingEvent* getRoutingEvent () const; + inline TrackElement* getTrackSegment () const; + inline TrackElement* getChildSegment () const; + inline Track* getTrack () const; + inline DbU::Unit getLeftMinExtend () const; + inline DbU::Unit getRightMinExtend () const; + inline unsigned int getTerminals () const; + inline Net* getNet () const; + inline unsigned int getState () const; + inline unsigned int getStateCount () const; + inline unsigned int getRipupCount () const; + inline unsigned int getStateAndRipupCount () const; + DbU::Unit getWiringDelta ( DbU::Unit axis ) const; + inline const vector& getPerpandiculars () const; + inline const Interval& getPerpandicularFree () const; + inline void setState ( unsigned int, unsigned int flags=0 ); + inline void setRoutingEvent ( RoutingEvent* ); + inline void setChildSegment ( TrackElement* ); + inline void setRipupCount ( unsigned int ); + inline void incRipupCount (); + inline void decRipupCount (); + inline void resetRipupCount (); + inline void resetStateCount (); + void update (); + static string getStateString ( DataNegociate* ); + Record* _getRecord () const; + string _getString () const; + inline string _getTypeName () const; protected: // Attributes. - RoutingEvent* _routingEvent; - TrackElement* _trackSegment; - TrackSegmentCost _cost; - unsigned int _state :5; - unsigned int _stateCount:5; - //unsigned int _z : 5; - + TrackElement* _trackSegment; + TrackElement* _childSegment; + RoutingEvent* _routingEvent; + Net* _net; + unsigned int _state : 5; + unsigned int _stateCount : 5; + unsigned int _terminals : 5; + unsigned int _ripupCount : 16; + DbU::Unit _leftMinExtend; + DbU::Unit _rightMinExtend; + vector _attractors; + vector _perpandiculars; + Interval _perpandicularFree; private: DataNegociate ( const DataNegociate& ); DataNegociate& operator= ( const DataNegociate& ); @@ -110,29 +115,32 @@ namespace Kite { // Inline Functions. - inline bool DataNegociate::hasRoutingEvent () const { return _routingEvent != NULL; } - inline RoutingEvent* DataNegociate::getRoutingEvent () const { return _routingEvent; } - inline TrackElement* DataNegociate::getTrackSegment () const { return _trackSegment; } - inline Track* DataNegociate::getTrack () const { return _trackSegment->getTrack(); } - inline TrackSegmentCost& DataNegociate::getCost () { return _cost; } - inline unsigned int DataNegociate::getState () const { return _state; } - inline unsigned int DataNegociate::getStateCount () const { return _stateCount; } -//inline unsigned int DataNegociate::getZ () const { return _z; } - inline unsigned int DataNegociate::getRipupCount () const { return _cost.getRipupCount(); } - inline void DataNegociate::setRoutingEvent ( RoutingEvent* event ) { _routingEvent = event; } - inline void DataNegociate::setRipupCount ( unsigned int count ) { _cost.setRipupCount(count); } - inline void DataNegociate::incRipupCount () { _cost.incRipupCount(); } - inline void DataNegociate::decRipupCount () { _cost.decRipupCount(); } - inline void DataNegociate::resetRipupCount () { _cost.resetRipupCount(); } - inline void DataNegociate::resetStateCount () { _stateCount=0; } - inline string DataNegociate::_getTypeName () const { return "DataNegociate"; } + inline bool DataNegociate::hasRoutingEvent () const { return _routingEvent != NULL; } + inline RoutingEvent* DataNegociate::getRoutingEvent () const { return _routingEvent; } + inline TrackElement* DataNegociate::getTrackSegment () const { return _trackSegment; } + inline TrackElement* DataNegociate::getChildSegment () const { return _childSegment; } + inline Track* DataNegociate::getTrack () const { return _trackSegment->getTrack(); } + inline unsigned int DataNegociate::getState () const { return _state; } + inline unsigned int DataNegociate::getTerminals () const { return _terminals; } + inline unsigned int DataNegociate::getRipupCount () const { return _ripupCount; } + inline DbU::Unit DataNegociate::getLeftMinExtend () const { return _leftMinExtend; } + inline DbU::Unit DataNegociate::getRightMinExtend () const { return _rightMinExtend; } + inline Net* DataNegociate::getNet () const { return _net; } + inline const vector& DataNegociate::getPerpandiculars () const { return _perpandiculars; } + inline const Interval& DataNegociate::getPerpandicularFree () const { return _perpandicularFree; } + inline unsigned int DataNegociate::getStateCount () const { return _stateCount; } + inline void DataNegociate::resetStateCount () { _stateCount=0; } + inline void DataNegociate::setRoutingEvent ( RoutingEvent* event ) { _routingEvent = event; } + inline void DataNegociate::setChildSegment ( TrackElement* child ) { _childSegment = child; } + inline void DataNegociate::setRipupCount ( unsigned int count ) { _ripupCount = count; } + inline void DataNegociate::incRipupCount () { _ripupCount++; } + inline void DataNegociate::decRipupCount () { if (_ripupCount) _ripupCount--; } + inline void DataNegociate::resetRipupCount () { _ripupCount = 0; } + inline string DataNegociate::_getTypeName () const { return "DataNegociate"; } - inline void DataNegociate::invalidate ( bool withPerpandiculars, bool withConstraints ) - { if (_routingEvent) _routingEvent->invalidate(withPerpandiculars,withConstraints); } - - inline void DataNegociate::setState ( unsigned int state, bool reset ) + inline void DataNegociate::setState ( unsigned int state, unsigned int flags ) { - if ( (_state != state) or reset ) { + if ( (_state != state) or (flags & KtResetCount) ) { //std::cerr << "Changing state to:" << state << std::endl; _state = state; _stateCount = 1; @@ -141,10 +149,9 @@ namespace Kite { } inline unsigned int DataNegociate::getStateAndRipupCount () const - { return (_state << 4) + getRipupCount(); } + { return (_state << 4) + _ripupCount; } -} // End of Kite namespace. +} // Kite namespace. - -#endif // __KITE_DATA_NEGOCIATE__ +#endif // KITE_DATA_NEGOCIATE_H diff --git a/kite/src/kite/GraphicKiteEngine.h b/kite/src/kite/GraphicKiteEngine.h index 07d72e62..ba38fb27 100644 --- a/kite/src/kite/GraphicKiteEngine.h +++ b/kite/src/kite/GraphicKiteEngine.h @@ -2,32 +2,24 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul Chaput | // | E-mail : Jean-Paul.Chaput@lip6.fr | // | =============================================================== | -// | C++ Header : "./GraphicKiteEngine.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/GraphicKiteEngine.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_GRAPHIC_KITE_ENGINE__ -#define __KITE_GRAPHIC_KITE_ENGINE__ +#ifndef KITE_GRAPHIC_KITE_ENGINE_H +#define KITE_GRAPHIC_KITE_ENGINE_H -#include +#include namespace Hurricane { class Go; @@ -37,9 +29,8 @@ namespace Hurricane { class CellViewer; } -#include "crlcore/GraphicToolEngine.h" - -#include "kite/KiteEngine.h" +#include "crlcore/GraphicToolEngine.h" +#include "kite/KiteEngine.h" namespace Kite { @@ -56,7 +47,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Kite::GraphicKiteEngine". - class GraphicKiteEngine : public GraphicTool { Q_OBJECT; @@ -103,7 +93,7 @@ namespace Kite { }; -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_GRAPHIC_KITE_ENGINE__ +#endif // KITE_GRAPHIC_KITE_ENGINE_H diff --git a/kite/src/kite/HorizontalTrack.h b/kite/src/kite/HorizontalTrack.h index 9e176f01..061c5c91 100644 --- a/kite/src/kite/HorizontalTrack.h +++ b/kite/src/kite/HorizontalTrack.h @@ -2,33 +2,23 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./HorizontalTrack.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/HorizontalTrack.h" | +// +-----------------------------------------------------------------+ +#ifndef KITE_HORIZONTAL_TRACK_H +#define KITE_HORIZONTAL_TRACK_H - -#ifndef __KITE_HORIZONTAL_TRACK__ -#define __KITE_HORIZONTAL_TRACK__ - -#include "kite/Track.h" +#include "kite/Track.h" namespace Kite { @@ -36,7 +26,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "HorizontalTrack". - class HorizontalTrack : public Track { @@ -61,7 +50,7 @@ namespace Kite { }; -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_HORIZONTAL_TRACK__ +#endif // KITE_HORIZONTAL_TRACK_H diff --git a/kite/src/kite/KiteEngine.h b/kite/src/kite/KiteEngine.h index 35acf305..ac989057 100644 --- a/kite/src/kite/KiteEngine.h +++ b/kite/src/kite/KiteEngine.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -11,36 +11,36 @@ // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./KiteEngine.h" | +// | C++ Header : "./kite/KiteEngine.h" | // +-----------------------------------------------------------------+ -#ifndef __KITE_KITE_ENGINE__ -#define __KITE_KITE_ENGINE__ +#ifndef KITE_KITE_ENGINE_H +#define KITE_KITE_ENGINE_H -#include +#include -#include "hurricane/Name.h" +#include "hurricane/Name.h" namespace Hurricane { class Layer; class Net; class Cell; } -#include "crlcore/RoutingGauge.h" -#include "katabatic/KatabaticEngine.h" +#include "crlcore/RoutingGauge.h" +#include "katabatic/KatabaticEngine.h" namespace Knik { class KnikEngine; } -#include "kite/TrackElement.h" -#include "kite/Configuration.h" +#include "kite/Constants.h" +#include "kite/TrackElement.h" +#include "kite/Configuration.h" namespace Kite { - using Hurricane::Name; using Hurricane::Layer; using Hurricane::Net; @@ -53,19 +53,10 @@ namespace Kite { class NegociateWindow; -// ------------------------------------------------------------------- -// Enumerations - - - enum GlobalFlags { BuildGlobalSolution=1, LoadGlobalSolution }; - // ------------------------------------------------------------------- // Class : "Kite::KiteEngine". - class KiteEngine : public KatabaticEngine { - public: - enum LookupFlags { OnAllCollapseds=1 }; public: static const Name& staticGetName (); @@ -74,8 +65,8 @@ namespace Kite { public: inline KatabaticEngine* base (); inline Configuration* getKiteConfiguration (); - inline Net* getBlockageNet (); virtual Configuration* getConfiguration (); + inline Net* getBlockageNet (); inline bool getToolSuccess () const; inline unsigned long getEventsLimit () const; inline unsigned int getRipupLimit ( unsigned int type ) const; @@ -104,29 +95,25 @@ namespace Kite { inline void setExpandStep ( float ); inline void setEdgeCapacityPercent ( float ); inline void setGlobalMinBreak ( unsigned int depth, DbU::Unit ); - void preProcess (); - void buildBlockages (); void buildPowerRails (); void protectRoutingPads (); + void preProcess (); + void setInterrupt ( bool ); + void buildBlockages (); void createGlobalGraph ( unsigned int mode ); virtual void createDetailedGrid (); void saveGlobalSolution (); void annotateGlobalGraph (); + void runNegociate ( unsigned int slowMotion=0 ); void runGlobalRouter ( unsigned int mode ); virtual void loadGlobalRouting ( unsigned int method, KatabaticEngine::NetSet& ); - void runNegociate ( unsigned int slowMotion=0 ); - void setInterrupt ( bool ); virtual void finalizeLayout (); void _gutKite (); - inline TrackElementLut& _getTrackElementLut (); - void _link ( TrackElement* ); - void _unlink ( TrackElement* ); + void _computeCagedConstraints (); TrackElement* _lookup ( Segment* ) const; inline TrackElement* _lookup ( AutoSegment* ) const; bool _check ( unsigned int& overlap, const char* message=NULL ) const; void _check ( Net* ) const; - void _computeCagedConstraints (); - void _computeCagedConstraints ( Net*, set& ); virtual Record* _getRecord () const; virtual string _getString () const; virtual string _getTypeName () const; @@ -140,7 +127,6 @@ namespace Kite { Configuration* _configuration; vector _routingPlanes; NegociateWindow* _negociateWindow; - TrackElementLut _trackSegmentLut; double _minimumWL; mutable bool _toolSuccess; @@ -179,18 +165,17 @@ namespace Kite { inline void KiteEngine::setMinimumWL ( double minimum ) { _minimumWL = minimum; } inline void KiteEngine::setPostEventCb ( Configuration::PostEventCb_t cb ) { _configuration->setPostEventCb(cb); } inline void KiteEngine::printConfiguration () const { _configuration->print(getCell()); } - inline TrackElementLut& KiteEngine::_getTrackElementLut () { return _trackSegmentLut; } - inline TrackElement* KiteEngine::_lookup ( AutoSegment* as ) const { return _lookup(as->base()); } + inline TrackElement* KiteEngine::_lookup ( AutoSegment* segment ) const { return segment->getObserver(); } // Variables. extern const char* missingRW; -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::KiteEngine); -#endif // __KITE_KITE_ENGINE__ +#endif // KITE_KITE_ENGINE_H diff --git a/kite/src/kite/Manipulator.h b/kite/src/kite/Manipulator.h new file mode 100644 index 00000000..80dc08bd --- /dev/null +++ b/kite/src/kite/Manipulator.h @@ -0,0 +1,98 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2013, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Header : "./kite/Manipulator.h" | +// +-----------------------------------------------------------------+ + + +#ifndef KITE_MANIPULATOR_H +#define KITE_MANIPULATOR_H + +#include "hurricane/DbU.h" +#include "katabatic/Constants.h" + + +namespace Kite { + + using Hurricane::DbU; + using Katabatic::KbNoFlags; + + class TrackElement; + class DataNegociate; + class RoutingEvent; + class SegmentFsm; + + +// ------------------------------------------------------------------- +// Class Declaration : "::Manipulator". + + class Manipulator { + public: + enum FunctionFlag { ToRipupLimit = 0x0001 + , AllowExpand = 0x0002 + , NoExpand = 0x0004 + , PerpandicularsFirst = 0x0008 + , ToMoveUp = 0x0010 + , AllowLocalMoveUp = 0x0020 + , AllowTerminalMoveUp = 0x0040 + , AllowShortPivotUp = 0x0080 + , NoDoglegReuse = 0x0100 + , LeftAxisHint = 0x0200 + , RightAxisHint = 0x0400 + , NotOnLastRipup = 0x0800 + }; + public: + Manipulator ( TrackElement*, SegmentFsm& ); + ~Manipulator (); + inline TrackElement* getSegment () const; + inline DataNegociate* getData () const; + inline RoutingEvent* getEvent () const; + bool canRipup ( unsigned int flags=0 ) const; + bool isCaged ( DbU::Unit ) const; + bool ripup ( unsigned int type, DbU::Unit axisHint=0 ); + bool ripupPerpandiculars ( unsigned int flags=0 ); + void repackPerpandiculars (); + void reprocessPerpandiculars (); + bool ripple (); + bool minimize (); + bool slacken ( unsigned int flags=KbNoFlags ); + bool pivotUp (); + bool pivotDown (); + bool moveUp ( unsigned int flags=0 ); + bool makeDogleg (); + bool makeDogleg ( DbU::Unit ); + bool makeDogleg ( Interval ); + bool relax ( Interval, unsigned int flags=AllowExpand ); + bool insertInTrack ( size_t ); + bool shrinkToTrack ( size_t + , unsigned int flags=0 + , DbU::Unit leftAxisHint=0 + , DbU::Unit rightAxisHint=0 + ); + bool forceToTrack ( size_t ); + bool forceOverLocals (); + private: + TrackElement* _segment; + DataNegociate* _data; + RoutingEvent* _event; + SegmentFsm& _fsm; + }; + + + inline TrackElement* Manipulator::getSegment () const { return _segment; } + inline DataNegociate* Manipulator::getData () const { return _data; } + inline RoutingEvent* Manipulator::getEvent () const { return _event; } + + +} // Kite namespace. + +#endif // KITE_MANIPULATOR_H diff --git a/kite/src/kite/NegociateWindow.h b/kite/src/kite/NegociateWindow.h index 17f1c5c8..11cd85a7 100644 --- a/kite/src/kite/NegociateWindow.h +++ b/kite/src/kite/NegociateWindow.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -11,12 +11,12 @@ // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./NegociateWindow.h" | +// | C++ Header : "./kite/NegociateWindow.h" | // +-----------------------------------------------------------------+ -#ifndef __KITE_NEGOCIATE_WINDOW__ -#define __KITE_NEGOCIATE_WINDOW__ +#ifndef KITE_NEGOCIATE_WINDOW_H +#define KITE_NEGOCIATE_WINDOW_H #include #include @@ -41,7 +41,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Statistics". - class Statistics { public: inline Statistics (); @@ -90,39 +89,38 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Kite::NegociateWindow". - class NegociateWindow { public: enum Stage { Negociation = 1 - , Packing + , Packing = 2 }; public: - static NegociateWindow* create ( KiteEngine* ); - void destroy (); - inline bool isInterrupted () const; - inline KiteEngine* getKiteEngine () const; - Hurricane::Cell* getCell () const; - inline const Katabatic::GCellVector& getGCells () const; - inline RoutingEventQueue& getEventQueue (); - inline RoutingEventHistory& getEventHistory (); - inline RoutingEventLoop& getEventLoop (); - inline Stage getStage () const; - void setGCells ( const Katabatic::GCellVector& ); - inline void setInterrupt ( bool ); - inline void setStage ( Stage ); - double computeWirelength (); - TrackElement* addTrackSegment ( AutoSegment*, bool loading ); - void addInsertEvent ( TrackElement*, unsigned int level ); - inline void rescheduleEvent ( RoutingEvent*, unsigned int level ); - void run ( int slowMotion=0 ); - void printStatistics () const; - void _createRouting ( Katabatic::GCell* ); - size_t _negociate (); - Hurricane::Record* _getRecord () const; - std::string _getString () const; - inline std::string _getTypeName () const; + static NegociateWindow* create ( KiteEngine* ); + void destroy (); + inline bool isInterrupted () const; + inline KiteEngine* getKiteEngine () const; + Hurricane::Cell* getCell () const; + inline const Katabatic::GCellVector& getGCells () const; + inline RoutingEventQueue& getEventQueue (); + inline RoutingEventHistory& getEventHistory (); + inline RoutingEventLoop& getEventLoop (); + inline Stage getStage () const; + void setGCells ( const Katabatic::GCellVector& ); + inline void setInterrupt ( bool ); + inline void setStage ( Stage ); + double computeWirelength (); + TrackElement* createTrackSegment ( AutoSegment*, unsigned int flags ); + void addRoutingEvent ( TrackElement*, unsigned int level ); + inline void rescheduleEvent ( RoutingEvent*, unsigned int level ); + void run ( int slowMotion=0 ); + void printStatistics () const; + void _createRouting ( Katabatic::GCell* ); + size_t _negociate (); + Hurricane::Record* _getRecord () const; + std::string _getString () const; + inline std::string _getTypeName () const; private: // Attributes. @@ -157,7 +155,7 @@ namespace Kite { inline std::string NegociateWindow::_getTypeName () const { return "NegociateWindow"; } -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_NEGOCIATE_WINDOW__ +#endif // KITE_NEGOCIATE_WINDOW_H diff --git a/kite/src/kite/PyGraphicKiteEngine.h b/kite/src/kite/PyGraphicKiteEngine.h index d7b94208..95b60e2e 100644 --- a/kite/src/kite/PyGraphicKiteEngine.h +++ b/kite/src/kite/PyGraphicKiteEngine.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2012-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2012-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,8 +15,8 @@ // +-----------------------------------------------------------------+ -#ifndef __KITE_PY_GRAPHIC_KITE_ENGINE__ -#define __KITE_PY_GRAPHIC_KITE_ENGINE__ +#ifndef KITE_PY_GRAPHIC_KITE_ENGINE_H +#define KITE_PY_GRAPHIC_KITE_ENGINE_H #include "crlcore/PyGraphicToolEngine.h" #include "kite/GraphicKiteEngine.h" @@ -49,8 +49,8 @@ extern "C" { #define PY_GRAPHIC_KITE_ENGINE_O(v) ( PY_GRAPHIC_KITE_ENGINE(v)->_baseObject._object ) -} // End of extern "C". +} // extern "C". } // Kite namespace. -#endif // __KITE_PYGRAPHICKITEENGINE__ +#endif // KITE_PY_GRAPHIC_KITE_ENGINE_H diff --git a/kite/src/kite/PyKiteEngine.h b/kite/src/kite/PyKiteEngine.h index 25b0568f..00e2f13e 100644 --- a/kite/src/kite/PyKiteEngine.h +++ b/kite/src/kite/PyKiteEngine.h @@ -2,7 +2,7 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2010-2012, All Rights Reserved +// Copyright (c) UPMC/LIP6 2010-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -15,8 +15,8 @@ // +-----------------------------------------------------------------+ -#ifndef __PY_KITE_ENGINE__ -#define __PY_KITE_ENGINE__ +#ifndef PY_KITE_ENGINE_H +#define PY_KITE_ENGINE_H #include "hurricane/isobar/PyHurricane.h" #include "crlcore/PyToolEngine.h" @@ -55,4 +55,4 @@ extern "C" { } // Kite namespace. -#endif // __PY_KITE_ENGINE__ +#endif // PY_KITE_ENGINE_H diff --git a/kite/src/kite/RoutingEvent.h b/kite/src/kite/RoutingEvent.h index 1f8f9b00..b7f1f85f 100644 --- a/kite/src/kite/RoutingEvent.h +++ b/kite/src/kite/RoutingEvent.h @@ -1,33 +1,26 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./RoutingEvent.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/RoutingEvent.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_ROUTING_EVENT__ -#define __KITE_ROUTING_EVENT__ +#ifndef KITE_ROUTING_EVENT_H +#define KITE_ROUTING_EVENT_H +#include #include #include +#include #include "hurricane/Interval.h" namespace Hurricane { @@ -36,12 +29,15 @@ namespace Hurricane { #include "kite/TrackCost.h" #include "kite/TrackElement.h" +#include "kite/DataNegociate.h" #include "kite/Session.h" namespace Kite { + using std::set; using std::vector; + using std::binary_function; using Hurricane::DbU; using Hurricane::Interval; using Hurricane::Net; @@ -54,26 +50,26 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "RoutingEvent". - class RoutingEvent { private: class Key { public: - struct Compare { + class Compare : public binary_function { + public: bool operator() ( const Key& lhs, const Key& rhs ) const; }; + public: Key ( const RoutingEvent* ); void update ( const RoutingEvent* ); private: - bool _slackenStrap; - bool _isHorizontal; - bool _canRipple; unsigned int _tracksNb:6; float _priority; unsigned int _eventLevel; + unsigned int _segFlags; + unsigned int _layerDepth; DbU::Unit _length; DbU::Unit _axis; DbU::Unit _sourceU; @@ -83,88 +79,92 @@ namespace Kite { }; public: - // Sub-Class: "Compare". - struct Compare { + // Sub-Class: "Compare". + class Compare : public binary_function { + public: bool operator() ( const RoutingEvent* lhs, const RoutingEvent* rhs ) const; }; + // Sub-Class: "CompareById". + class CompareById : public binary_function { + public: + inline bool operator() ( const RoutingEvent* lhs, const RoutingEvent* rhs ) const; + }; friend class Compare; public: enum Mode { Negociate=1, Pack=2, Repair=3 }; public: - static unsigned int getStage (); - static size_t getAllocateds (); - static size_t getProcesseds (); - static size_t getCloneds (); - static void resetProcesseds (); - static void setStage ( unsigned int ); - public: - static RoutingEvent* create ( TrackElement*, unsigned int mode=Negociate ); - RoutingEvent* clone () const; - void destroy (); - inline bool isCloned () const; - inline bool isValid () const; - bool isUnimplemented () const; - inline bool isProcessed () const; - inline bool isDisabled () const; - inline bool isForcedToHint () const; - inline bool isSheared () const; - inline bool isRipedByLocal () const; - inline bool getMode () const; - inline bool canMinimize () const; - unsigned int getState () const; - inline const Key& getKey () const; - inline TrackElement* getSegment () const; - inline const vector& getPerpandiculars () const; - inline DbU::Unit getAxisHint () const; - inline DbU::Unit getAxisHistory () const; - inline long getAxisWeight ( DbU::Unit ) const; - inline const Interval& getOptimalAxis () const; - inline const Interval& getConstraints () const; - inline const Interval& getOptimal () const; - inline const Interval& getPerpandicular () const; - inline Katabatic::GCell* getShearGCell () const; - inline float getPriority () const; - inline unsigned int getTracksNb () const; - inline unsigned int getTracksFree () const; - inline unsigned int getInsertState () const; - inline unsigned int getEventLevel () const; - inline void invalidate ( bool withPerpandiculars=false, bool withConstraints=false ); - void revalidate ( bool force=false ); - inline void updateKey (); - void process ( RoutingEventQueue& - , RoutingEventHistory& - , RoutingEventLoop& - ); - void setSegment ( TrackElement* ); - RoutingEvent* reschedule ( RoutingEventQueue&, unsigned int eventLevel ); - void setMode ( unsigned int ); - void setState ( unsigned int ); - inline void setProcessed ( bool state=true ); - inline void setDisabled ( bool state=true ); - inline void setMinimized ( bool state=true ); - inline void setRipedByLocal ( bool state=true ); - void setEventLevel ( unsigned int ); - inline void setTracksFree ( unsigned int ); - inline void setForcedToHint ( bool state = true ); - void setAxisHint ( DbU::Unit ); - void cacheAxisHint (); - inline void setOptimalAxis ( Interval ); - inline void incInsertState (); - inline void resetInsertState (); - void _processNegociate ( RoutingEventQueue&, RoutingEventHistory& ); - void _processPack ( RoutingEventQueue&, RoutingEventHistory& ); - void _processRepair ( RoutingEventQueue&, RoutingEventHistory& ); - Record* _getRecord () const; - string _getString () const; - string _getTypeName () const; + static unsigned int getStage (); + static size_t getAllocateds (); + static size_t getProcesseds (); + static size_t getCloneds (); + static void resetProcesseds (); + static void setStage ( unsigned int ); + public: + static RoutingEvent* create ( TrackElement*, unsigned int mode=Negociate ); + RoutingEvent* clone () const; + void destroy (); + inline bool isCloned () const; + inline bool isValid () const; + bool isUnimplemented () const; + inline bool isProcessed () const; + inline bool isDisabled () const; + inline bool isForcedToHint () const; + inline bool isSheared () const; + inline bool isRipedByLocal () const; + inline unsigned int getId () const; + inline bool getMode () const; + inline bool canMinimize () const; + unsigned int getState () const; + inline const Key& getKey () const; + inline TrackElement* getSegment () const; + inline const vector& getPerpandiculars () const; + inline DbU::Unit getAxisHint () const; + inline DbU::Unit getAxisHistory () const; + inline long getAxisWeight ( DbU::Unit ) const; + inline const Interval& getConstraints () const; + inline const Interval& getOptimal () const; + inline const Interval& getPerpandicularFree () const; + inline float getPriority () const; + inline unsigned int getTracksNb () const; + inline unsigned int getTracksFree () const; + inline unsigned int getInsertState () const; + inline unsigned int getEventLevel () const; + void revalidate (); + inline void updateKey (); + void process ( RoutingEventQueue& + , RoutingEventHistory& + , RoutingEventLoop& + ); + void setSegment ( TrackElement* ); + RoutingEvent* reschedule ( RoutingEventQueue&, unsigned int eventLevel ); + void setMode ( unsigned int ); + void setState ( unsigned int ); + inline void setProcessed ( bool state=true ); + inline void setDisabled ( bool state=true ); + inline void setMinimized ( bool state=true ); + inline void setRipedByLocal ( bool state=true ); + inline void setTracksFree ( unsigned int ); + inline void setForcedToHint ( bool state = true ); + void setAxisHint ( DbU::Unit ); + void setAxisHintFromParent (); + inline void incInsertState (); + inline void resetInsertState (); + inline void setEventLevel ( unsigned int ); + void _processNegociate ( RoutingEventQueue&, RoutingEventHistory& ); + void _processPack ( RoutingEventQueue&, RoutingEventHistory& ); + void _processRepair ( RoutingEventQueue&, RoutingEventHistory& ); + Record* _getRecord () const; + string _getString () const; + string _getTypeName () const; private: RoutingEvent ( TrackElement*, unsigned int mode ); ~RoutingEvent (); protected: // Attributes. + static unsigned int _idCounter; static unsigned int _stage; static size_t _allocateds; static size_t _processeds; @@ -172,21 +172,18 @@ namespace Kite { mutable bool _cloned; bool _processed; bool _disabled; - bool _valid; - bool _validConstraints; - bool _validPerpandiculars; bool _canHandleConstraints; bool _minimized; bool _forceToHint; bool _ripedByLocal; + unsigned int _id; TrackElement* _segment; + DataNegociate* _dataNegociate; DbU::Unit _axisHistory; DbU::Unit _axisHint; - Interval _optimalAxis; Interval _constraints; Interval _optimal; - Interval _perpandicular; - Katabatic::GCell* _shearGCell; + //Interval _perpandicular; unsigned int _tracksNb : 6; unsigned int _tracksFree : 4; unsigned int _insertState : 6; @@ -194,54 +191,52 @@ namespace Kite { unsigned int _rippleState : 4; unsigned int _eventLevel; float _priority; - vector _perpandiculars; + //vector _perpandiculars; Key _key; }; // Inline Functions. inline bool RoutingEvent::isCloned () const { return _cloned; } - inline bool RoutingEvent::isValid () const { return _valid; } inline bool RoutingEvent::isProcessed () const { return _processed; } inline bool RoutingEvent::isDisabled () const { return _disabled; } inline bool RoutingEvent::isForcedToHint () const { return _forceToHint; } - inline bool RoutingEvent::isSheared () const { return (_shearGCell != NULL); } inline bool RoutingEvent::isRipedByLocal () const { return _ripedByLocal; } + inline unsigned int RoutingEvent::getId () const { return _id; } inline bool RoutingEvent::getMode () const { return _mode; } inline bool RoutingEvent::canMinimize () const { return !_minimized; } inline const RoutingEvent::Key& RoutingEvent::getKey () const { return _key; } inline TrackElement* RoutingEvent::getSegment () const { return _segment; } - inline const vector& RoutingEvent::getPerpandiculars () const { return _perpandiculars; } + inline const vector& RoutingEvent::getPerpandiculars () const { return _dataNegociate->getPerpandiculars(); } +//inline const vector& RoutingEvent::getPerpandiculars () const { return _perpandiculars; } inline DbU::Unit RoutingEvent::getAxisHistory () const { return _axisHistory; } inline DbU::Unit RoutingEvent::getAxisHint () const { return _axisHint; } inline long RoutingEvent::getAxisWeight ( DbU::Unit axis ) const { return abs(axis - getAxisHint()); } - inline const Interval& RoutingEvent::getOptimalAxis () const { return _optimalAxis; } inline const Interval& RoutingEvent::getConstraints () const { return _constraints; } inline const Interval& RoutingEvent::getOptimal () const { return _optimal; } - inline const Interval& RoutingEvent::getPerpandicular () const { return _perpandicular; } + inline const Interval& RoutingEvent::getPerpandicularFree () const { return _dataNegociate->getPerpandicularFree(); } +//inline const Interval& RoutingEvent::getPerpandicular () const { return _perpandicular; } inline float RoutingEvent::getPriority () const { return _priority; } inline unsigned int RoutingEvent::getEventLevel () const { return _eventLevel; } inline unsigned int RoutingEvent::getTracksNb () const { return _tracksNb; } inline unsigned int RoutingEvent::getTracksFree () const { return _tracksFree; } inline unsigned int RoutingEvent::getInsertState () const { return _insertState; } - inline Katabatic::GCell* RoutingEvent::getShearGCell () const { return _shearGCell; } inline void RoutingEvent::setProcessed ( bool state ) { _processed = state; } inline void RoutingEvent::setDisabled ( bool state ) { _disabled = state; } inline void RoutingEvent::setMinimized ( bool state ) { _minimized = state; } inline void RoutingEvent::setRipedByLocal ( bool state ) { _ripedByLocal = state; } inline void RoutingEvent::setTracksFree ( unsigned int nb ) { _tracksFree = nb; } inline void RoutingEvent::setForcedToHint ( bool state ) { _forceToHint = state; } - inline void RoutingEvent::setOptimalAxis ( Interval i ) { _optimalAxis = i; } inline void RoutingEvent::incInsertState () { _insertState++; } inline void RoutingEvent::resetInsertState () { _insertState = 0; } + inline void RoutingEvent::setEventLevel ( unsigned int level ) { _eventLevel = level; } inline void RoutingEvent::updateKey () { revalidate(); _key.update(this); } - inline void RoutingEvent::invalidate ( bool withPerpandiculars, bool withConstraints ) - { - _valid = false; - _validPerpandiculars = _validPerpandiculars and !withPerpandiculars; - _validConstraints = _validConstraints and !withConstraints; - } + inline bool RoutingEvent::CompareById::operator() ( const RoutingEvent* lhs, const RoutingEvent* rhs ) const + { return lhs->getId() < rhs->getId(); } + + + typedef set RoutingEventSet; // ------------------------------------------------------------------- @@ -275,10 +270,10 @@ namespace Kite { # endif -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::RoutingEvent); -# endif +#endif // KITE_ROUTING_EVENT_H diff --git a/kite/src/kite/RoutingEventHistory.h b/kite/src/kite/RoutingEventHistory.h index 72528b75..c3f0f087 100644 --- a/kite/src/kite/RoutingEventHistory.h +++ b/kite/src/kite/RoutingEventHistory.h @@ -1,39 +1,28 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./RoutingEventHistory.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/RoutingEventHistory.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_ROUTING_EVENT_HISTORY__ -#define __KITE_ROUTING_EVENT_HISTORY__ +#ifndef KITE_ROUTING_EVENT_HISTORY_H +#define KITE_ROUTING_EVENT_HISTORY_H - -#include -#include +#include +#include namespace Kite { - using std::vector; using std::ostream; @@ -42,7 +31,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "RoutingEventHistory". - class RoutingEventHistory { @@ -77,7 +65,7 @@ namespace Kite { inline string RoutingEventHistory::_getTypeName () const { return "RoutingEventHistory"; } -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_ROUTING_EVENT_HISTORY__ +#endif // KITE_ROUTING_EVENT_HISTORY_H diff --git a/kite/src/kite/RoutingEventLoop.h b/kite/src/kite/RoutingEventLoop.h index 3c64f9ec..d2e32d65 100644 --- a/kite/src/kite/RoutingEventLoop.h +++ b/kite/src/kite/RoutingEventLoop.h @@ -1,32 +1,23 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./kite/RoutingEventLoop.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/RoutingEventLoop.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_ROUTING_EVENT_LOOP__ -#define __KITE_ROUTING_EVENT_LOOP__ +#ifndef KITE_ROUTING_EVENT_LOOP_H +#define KITE_ROUTING_EVENT_LOOP_H -#include +#include namespace Kite { @@ -84,10 +75,10 @@ namespace Kite { -} // End of Kite namespace. +} // Kite namespace. //INSPECTOR_P_SUPPORT(Kite::RoutingEvent); -#endif // __KITE_ROUTING_EVENT_LOOP__ +#endif // KITE_ROUTING_EVENT_LOOP_H diff --git a/kite/src/kite/RoutingEventQueue.h b/kite/src/kite/RoutingEventQueue.h index 945b42c7..2bbebeb5 100644 --- a/kite/src/kite/RoutingEventQueue.h +++ b/kite/src/kite/RoutingEventQueue.h @@ -1,40 +1,29 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved -// -// =================================================================== -// -// $Id$ +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ -// | | // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./RoutingEventQueue.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | +// | C++ Header : "./kite/RoutingEventQueue.h" | // +-----------------------------------------------------------------+ -#ifndef __KITE_ROUTING_EVENT_QUEUE__ -#define __KITE_ROUTING_EVENT_QUEUE__ +#ifndef KITE_ROUTING_EVENT_QUEUE_H +#define KITE_ROUTING_EVENT_QUEUE_H - -#include -#include -#include "kite/RoutingEvent.h" +#include +#include +#include "kite/RoutingEvent.h" namespace Kite { - using std::set; using std::multiset; using std::vector; @@ -42,23 +31,23 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "RoutingEventQueue". - class RoutingEventQueue { public: RoutingEventQueue (); ~RoutingEventQueue (); - void load ( const vector& ); - void add ( TrackElement*, unsigned int level ); inline bool empty () const; inline size_t size () const; inline unsigned int getTopEventLevel () const; - void push ( RoutingEvent* ); RoutingEvent* pop (); + void load ( const vector& ); + void add ( TrackElement*, unsigned int level ); + inline void push ( RoutingEvent* ); void repush ( RoutingEvent* ); void repushInvalidateds (); void commit (); + void prepareRepair (); void clear (); void dump () const; void _keyCheck () const; @@ -69,7 +58,7 @@ namespace Kite { protected: // Attributes. unsigned int _topEventLevel; - set _pushRequests; + RoutingEventSet _pushRequests; multiset _events; private: @@ -84,9 +73,10 @@ namespace Kite { inline size_t RoutingEventQueue::size () const { return _events.size(); } inline unsigned int RoutingEventQueue::getTopEventLevel () const { return _topEventLevel; } inline string RoutingEventQueue::_getTypeName () const { return "EventQueue"; } + inline void RoutingEventQueue::push ( RoutingEvent* event ) { _pushRequests.insert( event ); } -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_ROUTING_EVENT_QUEUE__ +#endif // KITE_ROUTING_EVENT_QUEUE_H diff --git a/kite/src/kite/RoutingPlane.h b/kite/src/kite/RoutingPlane.h index 48f84535..867239d7 100644 --- a/kite/src/kite/RoutingPlane.h +++ b/kite/src/kite/RoutingPlane.h @@ -1,47 +1,36 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./RoutingPlane.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/RoutingPlane.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_ROUTING_PLANE__ -#define __KITE_ROUTING_PLANE__ +#ifndef KITE_ROUTING_PLANE_H +#define KITE_ROUTING_PLANE_H - -#include "crlcore/RoutingLayerGauge.h" -#include "kite/Track.h" +#include "crlcore/RoutingLayerGauge.h" +#include "kite/Track.h" namespace Kite { - using CRL::RoutingLayerGauge; + using Katabatic::KbDirectionMask; class KiteEngine; // ------------------------------------------------------------------- // Class : "RoutingPlane". - class RoutingPlane { public: @@ -65,7 +54,7 @@ namespace Kite { inline size_t computeTracksSize () const; inline DbU::Unit getTrackPosition ( size_t index ) const; Track* getTrackByIndex ( size_t index ) const; - Track* getTrackByPosition ( DbU::Unit axis, unsigned int mode=Constant::Nearest ) const; + Track* getTrackByPosition ( DbU::Unit axis, unsigned int mode=KtNearest ) const; bool _check ( unsigned int& overlaps ) const; Record* _getRecord () const; string _getString () const; @@ -82,6 +71,7 @@ namespace Kite { KiteEngine* _kite; RoutingLayerGauge* _layerGauge; size_t _depth; + unsigned int _flags; DbU::Unit _axisMin; DbU::Unit _axisMax; DbU::Unit _trackMin; @@ -104,7 +94,7 @@ namespace Kite { inline KiteEngine* RoutingPlane::getKiteEngine () const { return _kite; } inline RoutingLayerGauge* RoutingPlane::getLayerGauge () const { return _layerGauge; } - inline unsigned int RoutingPlane::getDirection () const { return _layerGauge->getDirection(); } + inline unsigned int RoutingPlane::getDirection () const { return _flags & KbDirectionMask; } inline size_t RoutingPlane::getDepth () const { return _depth; } inline DbU::Unit RoutingPlane::getAxisMin () const { return _axisMin; } inline DbU::Unit RoutingPlane::getAxisMax () const { return _axisMax; } @@ -122,16 +112,16 @@ namespace Kite { { return _layerGauge->getTrackPosition(_axisMin,index); } inline bool RoutingPlane::isHorizontal () const - { return (getDirection() == Constant::Horizontal); } + { return (getDirection() & KbHorizontal); } inline bool RoutingPlane::isVertical () const - { return (getDirection() == Constant::Vertical); } + { return (getDirection() & KbVertical); } -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::RoutingPlane); -#endif // __KITE_ROUTING_PLANE__ +#endif // KITE_ROUTING_PLANE_H diff --git a/kite/src/kite/SegmentFsm.h b/kite/src/kite/SegmentFsm.h new file mode 100644 index 00000000..7ca62734 --- /dev/null +++ b/kite/src/kite/SegmentFsm.h @@ -0,0 +1,185 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2008-2013, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | +// | =============================================================== | +// | C++ Header : "./kite/SegmentFsm.h" | +// +-----------------------------------------------------------------+ + + +#ifndef KITE_SEGMENT_FSM_H +#define KITE_SEGMENT_FSM_H + +#include "kite/TrackCost.h" + +namespace Kite { + + class TrackElement; + class DataNegociate; + class RoutingEvent; + class RoutingEventQueue; + class RoutingEventHistory; + + +// ------------------------------------------------------------------- +// Class : "SegmentAction". + + class SegmentAction { + public: + enum Type { Self = (1<< 0) + , Other = (1<< 1) + , Perpandicular = (1<< 2) + , Insert = (1<< 3) + , Ripup = (1<< 4) + , RipedByLocal = (1<< 5) + , ResetRipup = (1<< 6) + , ToRipupLimit = (1<< 7) + , MoveToAxis = (1<< 8) + , AxisHint = (1<< 9) + , PackingMode = (1<<10) + , ToState = (1<<11) + , EventLevel1 = (1<<12) + , EventLevel2 = (1<<13) + , EventLevel3 = (1<<14) + , EventLevel4 = (1<<15) + , EventLevel5 = (1<<16) + , SelfInsert = Self |Insert + , SelfRipup = Self |Ripup + , SelfRipupPerpand = Self |Ripup|Perpandicular + , SelfRipupPerpandWithAxisHint = Self |Ripup|Perpandicular|EventLevel4|AxisHint + , OtherRipup = Other|Ripup + , OtherRipupPerpandAndPushAside = Other|Ripup|Perpandicular|EventLevel3|AxisHint + , OtherRipupPerpandAndPacking = Other|Ripup|Perpandicular|EventLevel4|PackingMode + }; + public: + SegmentAction ( TrackElement* + , unsigned int type + , DbU::Unit axisHint=0 + , unsigned int toState =0 + ); + inline TrackElement* getSegment () const; + inline unsigned int getType () const; + inline void setAxisHint ( DbU::Unit ); + inline unsigned int setFlag ( unsigned int ); + bool doAction ( RoutingEventQueue& ); + private: + TrackElement* _segment; + unsigned int _type; + DbU::Unit _axisHint; + unsigned int _toState; + }; + + + inline TrackElement* SegmentAction::getSegment () const { return _segment; } + inline unsigned int SegmentAction::getType () const { return _type; } + inline void SegmentAction::setAxisHint ( DbU::Unit axis ) { _axisHint = axis; } + inline unsigned int SegmentAction::setFlag ( unsigned int flag ) { _type |= flag; return _type; } + + +// ------------------------------------------------------------------- +// Class : "SegmentFsm". + + class SegmentFsm { + + public: + enum State { MissingData = (1<<0) + , EmptyTrackList = (1<<1) + , Inserted = (1<<2) + , Self = (1<<3) + , Other = (1<<4) + , Ripup = (1<<5) + , MaximumSlack = (1<<6) + , SelfInserted = Self | Inserted + , OtherRipup = Other | Ripup + , SelfMaximumSlack = Self | MaximumSlack + }; + enum SlackenFlags { NoRecursive = (1<<0) + , NoTransition = (1<<1) + }; + + public: + SegmentFsm ( RoutingEvent* + , RoutingEventQueue& + , RoutingEventHistory& + ); + inline bool isFullBlocked () const; + inline RoutingEvent* getEvent () const; + inline RoutingEventQueue& getQueue () const; + inline RoutingEventHistory& getHistory () const; + inline unsigned int getState () const; + inline DataNegociate* getData (); + inline Interval& getConstraint (); + inline Interval& getOptimal (); + inline vector& getCosts (); + inline TrackCost& getCost ( size_t ); + inline Track* getTrack ( size_t ); + inline size_t getBegin ( size_t ); + inline size_t getEnd ( size_t ); + inline vector& getActions (); + inline void setState ( unsigned int ); + void addAction ( TrackElement* + , unsigned int type + , DbU::Unit axisHint=0 + , unsigned int toState =0 + ); + void doActions (); + inline void clearActions (); + bool insertInTrack ( size_t ); + bool conflictSolveByHistory (); + bool conflictSolveByPlaceds (); + bool solveTerminalVsGlobal (); + bool desaturate (); + bool slackenTopology ( unsigned int flags=0 ); + bool solveFullBlockages (); + private: + bool _slackenStrap ( TrackElement*& + , DataNegociate*& + , unsigned int flags ); + bool _slackenLocal ( TrackElement*& + , DataNegociate*& + , unsigned int flags ); + bool _slackenGlobal ( TrackElement*& + , DataNegociate*& + , unsigned int flags ); + private: + RoutingEvent* _event; + RoutingEventQueue& _queue; + RoutingEventHistory& _history; + unsigned int _state; + DataNegociate* _data; + Interval _constraint; + Interval _optimal; + vector _costs; + vector _actions; + bool _fullBlocked; + }; + + + inline bool SegmentFsm::isFullBlocked () const { return _fullBlocked and _costs.size(); } + inline RoutingEvent* SegmentFsm::getEvent () const { return _event; } + inline RoutingEventQueue& SegmentFsm::getQueue () const { return _queue; } + inline RoutingEventHistory& SegmentFsm::getHistory () const { return _history; } + inline unsigned int SegmentFsm::getState () const { return _state; } + inline DataNegociate* SegmentFsm::getData () { return _data; } + inline Interval& SegmentFsm::getConstraint () { return _constraint; } + inline Interval& SegmentFsm::getOptimal () { return _optimal; } + inline vector& SegmentFsm::getCosts () { return _costs; } + inline TrackCost& SegmentFsm::getCost ( size_t i ) { return _costs[i]; } + inline Track* SegmentFsm::getTrack ( size_t i ) { return _costs[i].getTrack(); } + inline size_t SegmentFsm::getBegin ( size_t i ) { return _costs[i].getBegin(); } + inline size_t SegmentFsm::getEnd ( size_t i ) { return _costs[i].getEnd(); } + inline vector& SegmentFsm::getActions () { return _actions; } + inline void SegmentFsm::setState ( unsigned int state ) { _state = state; } + inline void SegmentFsm::clearActions () { _actions.clear(); } + + +} // Kite namespace. + +#endif // KITE_SEGMENT_FSM_H diff --git a/kite/src/kite/Session.h b/kite/src/kite/Session.h index 0ba0d988..232eef66 100644 --- a/kite/src/kite/Session.h +++ b/kite/src/kite/Session.h @@ -1,34 +1,25 @@ - -// -*- C++ -*- +// -*- mode: C++; explicit-buffer-name: "Session.h" -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Session.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/Session.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_SESSION__ -#define __KITE_SESSION__ +#ifndef KITE_SESSION_H +#define KITE_SESSION_H -#include -#include -#include +#include +#include +#include namespace Hurricane { class Record; @@ -36,7 +27,7 @@ namespace Hurricane { class Segment; } -#include "katabatic/Session.h" +#include "katabatic/Session.h" namespace Katabatic { class GCell; class AutoSegment; @@ -64,7 +55,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Session". - class Session : public Katabatic::Session { @@ -72,39 +62,35 @@ namespace Kite { static Session* open ( KiteEngine* ); static Session* get ( const char* message=NULL ); inline static Katabatic::Session* base (); + inline static bool isEmpty (); inline static KiteEngine* getKiteEngine (); static Configuration* getConfiguration (); inline static Net* getBlockageNet (); inline static NegociateWindow* getNegociateWindow (); inline static unsigned int getRipupCost (); inline static Katabatic::GCell* getGCellUnder ( DbU::Unit, DbU::Unit ); + static void setInterrupt ( bool ); inline static void addInsertEvent ( TrackMarker* , Track* ); inline static void addInsertEvent ( TrackElement* , Track* ); inline static void addRemoveEvent ( TrackElement* ); inline static void addMoveEvent ( TrackElement* , Track* ); inline static void addSortEvent ( Track*, bool forced=false ); inline static size_t revalidate (); - inline static bool isEmpty (); - static void setInterrupt ( bool ); - static void link ( TrackElement* ); - static void unlink ( TrackElement* ); static TrackElement* lookup ( Segment* ); static TrackElement* lookup ( AutoSegment* ); - static Katabatic::GCell* lookup ( Katabatic::GCell* ); private: KiteEngine* _getKiteEngine (); Net* _getBlockageNet (); - NegociateWindow* _getNegociateWindow (); unsigned int _getRipupCost (); Katabatic::GCell* _getGCellUnder ( DbU::Unit, DbU::Unit ); - Katabatic::GCell* _lookup ( Katabatic::GCell* ); + virtual size_t _revalidate (); + bool _isEmpty () const; + NegociateWindow* _getNegociateWindow (); void _addInsertEvent ( TrackMarker* , Track* ); void _addInsertEvent ( TrackElement* , Track* ); void _addRemoveEvent ( TrackElement* ); void _addMoveEvent ( TrackElement* , Track* ); void _addSortEvent ( Track*, bool forced ); - virtual size_t _revalidate (); - bool _isEmpty () const; virtual Record* _getRecord () const; virtual string _getTypeName () const; @@ -131,7 +117,7 @@ namespace Kite { Session ( KiteEngine* ); virtual ~Session (); virtual void _postCreate (); - virtual size_t _preDestroy (); + virtual void _preDestroy (); private: Session ( const Session& ); Session& operator= ( const Session& ); @@ -193,7 +179,6 @@ namespace Kite { { return get("isEmpty()")->_isEmpty(); } -} // End of Kite namespace. +} // Kite namespace. - -#endif // __KITE_SESSION__ +#endif // KITE_SESSION_H diff --git a/kite/src/kite/Track.h b/kite/src/kite/Track.h index 009b5728..e3008733 100644 --- a/kite/src/kite/Track.h +++ b/kite/src/kite/Track.h @@ -2,31 +2,21 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Track.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/Track.h" | +// +-----------------------------------------------------------------+ - - -#ifndef __KITE_TRACK__ -#define __KITE_TRACK__ +#ifndef KITE_TRACK_H +#define KITE_TRACK_H #include "hurricane/Point.h" namespace Hurricane { @@ -39,7 +29,6 @@ namespace Hurricane { namespace Kite { - using Hurricane::Point; using Hurricane::Layer; @@ -50,43 +39,37 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Track". - class Track { public: - enum IndexState { MinTrackMin = (1<<0) - , MinSegmentMin = (1<<1) - , MinSegmentMax = (1<<2) - , MaxTrackMax = (1<<3) - , MaxSegmentMin = (1<<4) - , MaxNextSegmentMin = (1<<5) - , MaxSegmentMax = (1<<6) - , BeforeFirst = MinTrackMin | MaxSegmentMin - , Inside = MinSegmentMin | MaxSegmentMax - , Outside = MinSegmentMax | MaxNextSegmentMin - , AfterLast = MinSegmentMax | MaxTrackMax - , EmptyTrack = MinTrackMin | MaxTrackMax - , MinMask = MinTrackMin - | MinSegmentMin - | MinSegmentMax - , MaxMask = MaxTrackMax - | MaxSegmentMin - | MaxNextSegmentMin - | MaxSegmentMax + enum IndexState { BeginIsTrackMin = 0x00000001 + , BeginIsSegmentMin = 0x00000002 + , BeginIsSegmentMax = 0x00000004 + , EndIsTrackMax = 0x00000008 + , EndIsSegmentMin = 0x00000010 + , EndIsNextSegmentMin = 0x00000020 + , EndIsSegmentMax = 0x00000040 + , BeforeFirstElement = BeginIsTrackMin |EndIsSegmentMin + , InsideElement = BeginIsSegmentMin|EndIsSegmentMax + , OutsideElement = BeginIsSegmentMax|EndIsNextSegmentMin + , AfterLastElement = BeginIsSegmentMax|EndIsTrackMax + , EmptyTrack = BeginIsTrackMin |EndIsTrackMax + , BeginMask = BeginIsTrackMin |BeginIsSegmentMin|BeginIsSegmentMax + , EndMask = EndIsTrackMax |EndIsSegmentMin |EndIsNextSegmentMin|EndIsSegmentMax }; public: // Static Attributes. - static const size_t NPOS; + static const size_t npos; public: void destroy (); - inline RoutingPlane* getRoutingPlane () const; - KiteEngine* getKiteEngine () const; virtual bool isHorizontal () const = 0; virtual bool isVertical () const = 0; inline bool isLocalAssigned () const; + inline RoutingPlane* getRoutingPlane () const; + KiteEngine* getKiteEngine () const; virtual unsigned int getDirection () const = 0; inline size_t getIndex () const; unsigned int getDepth () const; @@ -95,38 +78,38 @@ namespace Kite { inline DbU::Unit getAxis () const; inline DbU::Unit getMin () const; inline DbU::Unit getMax () const; - Track* getNext () const; - Track* getPrevious () const; + Track* getNextTrack () const; + Track* getPreviousTrack () const; inline size_t getSize () const; + virtual Point getPosition ( DbU::Unit coordinate ) const = 0; + TrackElement* getSegment ( size_t index ) const; + TrackElement* getSegment ( DbU::Unit position ) const; TrackElement* getNext ( size_t& index, Net* ) const; TrackElement* getPrevious ( size_t& index, Net* ) const; TrackElement* getNextFixed ( size_t& index ) const; - TrackElement* getSegment ( size_t index ) const; - TrackElement* getSegment ( DbU::Unit position ) const; - void getIBounds ( DbU::Unit position, size_t& begin, size_t& end, unsigned int& state ) const; + size_t find ( const TrackElement* ) const; + DbU::Unit getSourcePosition ( vector::iterator ) const; + DbU::Unit getMinimalPosition ( size_t index, unsigned int state ) const; + DbU::Unit getMaximalPosition ( size_t index, unsigned int state ) const; + Interval getFreeInterval ( DbU::Unit position, Net* net=NULL ) const; + Interval getOccupiedInterval ( size_t& begin ) const; + Interval expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* ) const; + void getBeginIndex ( DbU::Unit position, size_t& begin, unsigned int& state ) const; void getOverlapBounds ( Interval, size_t& begin, size_t& end ) const; TrackCost getOverlapCost ( Interval, Net*, size_t begin, size_t end, unsigned int flags ) const; TrackCost getOverlapCost ( Interval, Net*, unsigned int flags ) const; TrackCost getOverlapCost ( TrackElement*, unsigned int flags ) const; void getTerminalWeight ( Interval, Net*, size_t& count, unsigned int& weight ) const; DbU::Unit getSourcePosition ( size_t index ) const; - DbU::Unit getSourcePosition ( vector::iterator ) const; - DbU::Unit getMinimalPosition ( size_t index, unsigned int state ) const; - DbU::Unit getMaximalPosition ( size_t index, unsigned int state ) const; - virtual Point getPosition ( DbU::Unit coordinate ) const = 0; - size_t find ( const TrackElement* ) const; - Interval getFreeInterval ( DbU::Unit position, Net* net=NULL ) const; - Interval expandUsedInterval ( size_t& begin, size_t& end ) const; - Interval expandFreeInterval ( size_t& begin, size_t& end, unsigned int state, Net* ) const; + bool check ( unsigned int& overlaps, const char* message=NULL ) const; unsigned int checkOverlap ( unsigned int& overlaps ) const; inline void setLocalAssigned ( bool ); - void forceSort (); + void invalidate (); void insert ( TrackElement* ); void insert ( TrackMarker* ); void setSegment ( TrackElement*, size_t ); - size_t pack (); - void sort (); - bool _check ( unsigned int& overlaps, const char* message=NULL ) const; + size_t doRemoval (); + void doReorder (); virtual Record* _getRecord () const; virtual string _getString () const; virtual string _getTypeName () const = 0; @@ -193,11 +176,11 @@ namespace Kite { inline bool Track::SegmentCompare::operator() ( const TrackElement* lhs, const TrackElement* rhs ) { - if ( lhs->getSourceU() < rhs->getSourceU() ) + if (lhs->getSourceU() < rhs->getSourceU()) return true; else { - if ( ( lhs->getSourceU() == rhs->getSourceU() ) - && ( lhs->getTargetU() > rhs->getTargetU() ) ) + if ( (lhs->getSourceU() == rhs->getSourceU()) + and (lhs->getTargetU() > rhs->getTargetU()) ) return true; } return false; @@ -215,23 +198,22 @@ namespace Kite { inline unsigned int Track::setMinimalFlags ( unsigned int& state, unsigned int flags ) const { - state &= ~MinMask; - state |= (flags & MinMask); + state &= ~BeginMask; + state |= (flags & BeginMask); return state; } inline unsigned int Track::setMaximalFlags ( unsigned int& state, unsigned int flags ) const { - state &= ~MaxMask; - state |= (flags & MaxMask); + state &= ~EndMask; + state |= (flags & EndMask); return state; } -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::Track); - -#endif // __KITE_TRACK__ +#endif // KITE_TRACK_H diff --git a/kite/src/kite/TrackCost.h b/kite/src/kite/TrackCost.h index 5a6838be..7a116b4c 100644 --- a/kite/src/kite/TrackCost.h +++ b/kite/src/kite/TrackCost.h @@ -2,34 +2,24 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved -// -// =================================================================== -// -// $Id$ +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ -// | | // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackCost.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | +// | C++ Header : "./kite/TrackCost.h" | // +-----------------------------------------------------------------+ +#ifndef KITE_TRACK_COST_H +#define KITE_TRACK_COST_H - -#ifndef __KITE_TRACK_COST__ -#define __KITE_TRACK_COST__ - -#include -#include "hurricane/Interval.h" +#include +#include "hurricane/Interval.h" namespace Hurricane { class Net; } @@ -37,7 +27,6 @@ namespace Hurricane { namespace Kite { - using std::string; using Hurricane::Record; using Hurricane::DbU; @@ -80,6 +69,7 @@ namespace Kite { , unsigned int flags ); ~TrackCost (); + inline bool isForGlobal () const; inline bool isBlockage () const; inline bool isFixed () const; inline bool isInfinite () const; @@ -102,6 +92,7 @@ namespace Kite { inline long getAxisWeight () const; inline int getRipupCount () const; inline unsigned int getDataState () const; + inline void setForGlobal (); inline void setBlockage (); inline void setFixed (); inline void setInfinite (); @@ -132,6 +123,7 @@ namespace Kite { size_t _begin; size_t _end; Interval _interval; + bool _forGlobal; bool _blockage; bool _fixed; bool _infinite; @@ -155,6 +147,7 @@ namespace Kite { // Inline Functions. + inline bool TrackCost::isForGlobal () const { return _forGlobal; } inline bool TrackCost::isBlockage () const { return _blockage; } inline bool TrackCost::isFixed () const { return _fixed; } inline bool TrackCost::isInfinite () const { return _infinite; } @@ -175,6 +168,7 @@ namespace Kite { inline long TrackCost::getAxisWeight () const { return _axisWeight; } inline int TrackCost::getRipupCount () const { return _ripupCount; } inline unsigned int TrackCost::getDataState () const { return _dataState; } + inline void TrackCost::setForGlobal () { _forGlobal = true; } inline void TrackCost::setBlockage () { _blockage = true; } inline void TrackCost::setFixed () { _fixed = true; } inline void TrackCost::setInfinite () { _infinite = true; } @@ -197,10 +191,10 @@ namespace Kite { inline TrackCost::Compare::Compare ( unsigned int flags ) : _flags(flags) { } -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_V_SUPPORT(Kite::TrackCost); -#endif // __KITE_TRACK_COST__ +#endif // KITE_TRACK_COST_H diff --git a/kite/src/kite/TrackElement.h b/kite/src/kite/TrackElement.h index dd494ea6..900d6bca 100644 --- a/kite/src/kite/TrackElement.h +++ b/kite/src/kite/TrackElement.h @@ -1,9 +1,8 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2012, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // // +-----------------------------------------------------------------+ // | C O R I O L I S | @@ -12,13 +11,12 @@ // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackElement.h" | +// | C++ Header : "./kite/TrackElement.h" | // +-----------------------------------------------------------------+ -#ifndef __KITE_TRACK_ELEMENT__ -#define __KITE_TRACK_ELEMENT__ - +#ifndef KITE_TRACK_ELEMENT_H +#define KITE_TRACK_ELEMENT_H #include #include @@ -31,13 +29,13 @@ namespace Hurricane { } #include "katabatic/AutoSegment.h" +#include "kite/Constants.h" #include "kite/Session.h" #include "kite/TrackElements.h" namespace Kite { - using std::string; using std::map; using Hurricane::Record; @@ -47,6 +45,8 @@ namespace Kite { using Hurricane::Net; using Hurricane::Layer; using Katabatic::AutoSegment; + using Katabatic::Observer; + using Katabatic::KbNoFlags; class DataNegociate; class Track; @@ -57,147 +57,152 @@ namespace Kite { typedef void (SegmentOverlapCostCB)( const TrackElement*, TrackCost& ); +// ------------------------------------------------------------------- +// Class : "SegmentObserver". + + class SegmentObserver : public Observer { + public: + inline SegmentObserver ( TrackElement* ); + virtual void notify ( unsigned int flags ); + private: + SegmentObserver ( const SegmentObserver& ); + }; + + + inline SegmentObserver::SegmentObserver ( TrackElement* owner ) + : Observer(owner) + { } + + // ------------------------------------------------------------------- // Class : "TrackElement". - + + enum TrackElementFlags { TElemCreated =0x00000001 + , TElemBlockage =0x00000002 + , TElemFixed =0x00000004 + , TElemLocked =0x00000008 + , TElemRouted =0x00000010 + , TElemSourceDogleg=0x00000020 + , TElemTargetDogleg=0x00000040 + , TElemRipple =0x00000080 + , TElemInvalidated =0x00000100 + }; + + + struct Compare { + bool operator() ( TrackElement* lhs, TrackElement* rhs ); + }; + + struct CompareByPosition { + bool operator() ( const TrackElement* lhs, const TrackElement* rhs ) const; + }; + class TrackElement { public: - enum Flags { AddToGCells =0x01 - , RemoveFromGCells=0x02 - , UnRouted =0x04 - , Routed =0x08 - , AllowDoglegReuse=0x10 - , DataSelf =0x01 - , DataParent =0x02 - }; - - public: - // Sub-Class: "Compare()". - class Compare { - public: - bool operator() ( TrackElement* lhs, TrackElement* rhs ); - }; - public: - // Sub-Class: "CompareByPosition()". - struct CompareByPosition { - bool operator() ( const TrackElement* lhs, const TrackElement* rhs ) const; - }; - - friend class Compare; - - - public: - static SegmentOverlapCostCB* setOverlapCostCB ( SegmentOverlapCostCB* ); - public: - void destroy (); - virtual AutoSegment* base () const = 0; - virtual bool isCreated () const; - virtual bool isBlockage () const; - virtual bool isFixed () const; - virtual bool isStrap () const; - virtual bool isSlackenStrap () const; - virtual bool isLocal () const; - virtual bool isGlobal () const; - virtual bool isLocked () const; - virtual bool isTerminal () const; - virtual bool isDogleg () const; - virtual bool isRevalidated () const; - virtual bool isRouted () const; - virtual bool isSlackened () const; - virtual bool isSlackenDogLeg () const; - virtual bool isHorizontal () const = 0; - virtual bool isVertical () const = 0; - virtual bool isBipoint () const; - virtual bool allowOutsideGCell () const; - virtual bool canDesalignate () const; - virtual bool canGoOutsideGCell () const; - virtual bool canSlacken () const; - virtual bool canPivotUp ( float reserve ) const; - virtual bool canPivotDown ( float reserve ) const; - virtual bool canMoveUp ( float reserve, unsigned int flags=AutoSegment::Propagate|AutoSegment::PerpandicularFrag ) const; - virtual float getMaxUnderDensity ( unsigned int flags=AutoSegment::Propagate ) const; - virtual bool canRipple () const; - virtual bool hasSourceDogLeg () const; - virtual bool hasTargetDogLeg () const; - virtual bool canDogLeg (); - virtual bool canDogLeg ( Interval ); - virtual bool canDogLegAt ( Katabatic::GCell*, unsigned int flags=0 ); - virtual unsigned long getId () const; - virtual unsigned int getDirection () const = 0; - virtual Net* getNet () const = 0; - virtual const Layer* getLayer () const = 0; - inline Track* getTrack () const; - inline size_t getIndex () const; - virtual unsigned long getArea () const; - inline Box getBoundingBox () const; - virtual unsigned int getDogLegLevel () const; - virtual unsigned int getDogLegOrder () const; - virtual TrackElement* getNext () const; - virtual TrackElement* getPrevious () const; - virtual TrackElement* getParent () const; - virtual DbU::Unit getAxis () const = 0; - inline DbU::Unit getSourceU () const; - inline DbU::Unit getTargetU () const; - inline DbU::Unit getLength () const; - virtual Interval getFreeInterval () const; - inline Interval getCanonicalInterval () const; - virtual Interval getSourceConstraints () const; - virtual Interval getTargetConstraints () const; - virtual DataNegociate* getDataNegociate ( unsigned int flags=DataSelf ) const; - virtual TrackElement* getCanonical ( Interval& ); - virtual size_t getGCells ( Katabatic::GCellVector& ) const; - virtual TrackElement* getSourceDogLeg (); - virtual TrackElement* getTargetDogLeg (); - virtual TrackElements getCollapsedPerpandiculars (); - virtual size_t getPerpandicularsBound ( set& ); - virtual unsigned int getOrder () const; - virtual void incOverlapCost ( Net*, TrackCost& ) const; - virtual void dataInvalidate (); - virtual void eventInvalidate (); - inline void setSlackened ( bool ); - virtual void setAllowOutsideGCell ( bool ); - virtual void setRevalidated ( bool ); - virtual void setCanRipple ( bool ); - virtual void setSourceDogLeg ( bool state=true ); - virtual void setTargetDogLeg ( bool state=true ); - virtual void setLock ( bool ); - virtual void setRouted ( bool ); - virtual void setTrack ( Track* ); - inline void setIndex ( size_t ); - virtual void setArea (); - virtual void setDogLegLevel ( unsigned int ); - virtual void setDogLegOrder ( unsigned int ); - virtual void swapTrack ( TrackElement* ); - virtual void reschedule ( unsigned int level ); - virtual void detach (); - virtual void revalidate ( bool invalidEvent=false ); - virtual void invalidate (); - virtual void setAxis ( DbU::Unit, unsigned int flags=Katabatic::AxisSet ); - virtual void slacken (); - virtual bool moveUp ( unsigned int flags=AutoSegment::Propagate ); - virtual bool moveDown ( unsigned int flags=AutoSegment::Propagate ); - virtual bool moveAside ( bool onLeft ); - virtual TrackElement* makeDogLeg (); - virtual TrackElement* makeDogLeg ( Interval, bool& leftDogleg ); - virtual TrackElement* makeDogLeg ( Katabatic::GCell* ); - virtual TrackElement* _postDogLeg ( Katabatic::GCell* ); - virtual void _postModify (); - virtual void desalignate (); - virtual bool _check () const; - virtual Record* _getRecord () const; - virtual string _getString () const; - virtual string _getTypeName () const; + static SegmentOverlapCostCB* setOverlapCostCB ( SegmentOverlapCostCB* ); + public: + void destroy (); + virtual AutoSegment* base () const; + // Wrapped AutoSegment Functions (when applicable). + virtual bool isFixed () const; + virtual bool isHorizontal () const = 0; + virtual bool isVertical () const = 0; + virtual bool isLocal () const; + virtual bool isGlobal () const; + virtual bool isBipoint () const; + virtual bool isTerminal () const; + virtual bool isStrongTerminal ( unsigned int flags=0 ) const; + virtual bool isStrap () const; + virtual bool isSlackened () const; + virtual bool isDogleg () const; + // Predicates. + inline bool isCreated () const; + inline bool isInvalidated () const; + inline bool isBlockage () const; + inline bool isLocked () const; + inline bool isRouted () const; + inline bool hasSourceDogleg () const; + inline bool hasTargetDogleg () const; + inline bool canRipple () const; + virtual bool canSlacken () const; + virtual bool canPivotUp ( float reserve ) const; + virtual bool canPivotDown ( float reserve ) const; + virtual bool canMoveUp ( float reserve, unsigned int flags=KbWithPerpands ) const; + virtual bool canDogleg (); + virtual bool canDogleg ( Interval ); + virtual bool canDogleg ( Katabatic::GCell*, unsigned int flags=0 ); + // Accessors + inline SegmentObserver* getObserver (); + virtual unsigned long getId () const; + virtual unsigned int getDirection () const = 0; + virtual Net* getNet () const = 0; + virtual const Layer* getLayer () const = 0; + inline Track* getTrack () const; + inline size_t getIndex () const; + virtual unsigned long getFreedomDegree () const; + virtual float getMaxUnderDensity ( unsigned int flags=0 ) const; + inline Box getBoundingBox () const; + virtual TrackElement* getNext () const; + virtual TrackElement* getPrevious () const; + virtual DbU::Unit getAxis () const = 0; + inline DbU::Unit getSourceU () const; + inline DbU::Unit getTargetU () const; + inline DbU::Unit getLength () const; + inline Interval getCanonicalInterval () const; + virtual Interval getFreeInterval () const; + virtual Interval getSourceConstraints () const; + virtual Interval getTargetConstraints () const; + virtual DataNegociate* getDataNegociate ( unsigned int flags=KtDataSelf ) const; + virtual TrackElement* getCanonical ( Interval& ); + virtual size_t getGCells ( Katabatic::GCellVector& ) const; + virtual TrackElement* getParent () const; + virtual unsigned int getDoglegLevel () const; + virtual TrackElement* getSourceDogleg (); + virtual TrackElement* getTargetDogleg (); + virtual TrackElements getPerpandiculars (); + // Mutators. + inline void setFlags ( unsigned int ); + inline void unsetFlags ( unsigned int ); + virtual void setTrack ( Track* ); + inline void setIndex ( size_t ); + virtual void updateFreedomDegree (); + virtual void setDoglegLevel ( unsigned int ); + virtual void swapTrack ( TrackElement* ); + virtual void reschedule ( unsigned int level ); + virtual void detach (); + virtual void revalidate (); + virtual void invalidate (); + virtual void incOverlapCost ( Net*, TrackCost& ) const; + virtual void setAxis ( DbU::Unit, unsigned int flags=Katabatic::SegAxisSet ); + virtual TrackElement* makeDogleg (); + inline bool makeDogleg ( Katabatic::GCell* ); + virtual TrackElement* makeDogleg ( Katabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel ); + virtual TrackElement* makeDogleg ( Interval, unsigned int& flags ); + virtual void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel ); + virtual bool moveAside ( unsigned int flags ); + virtual bool slacken ( unsigned int flags=KbNoFlags ); + virtual bool moveUp ( unsigned int flags ); + virtual bool moveDown ( unsigned int flags ); +#if THIS_IS_DISABLED + virtual void desalignate (); +#endif + virtual bool _check () const; + virtual Record* _getRecord () const; + virtual string _getString () const; + virtual string _getTypeName () const; protected: // Static Attributes. - static SegmentOverlapCostCB* _overlapCostCallback; - // Attributes. - Track* _track; - size_t _index; - DbU::Unit _sourceU; - DbU::Unit _targetU; + static SegmentOverlapCostCB* _overlapCostCallback; + // Attributes. + unsigned int _flags; + Track* _track; + size_t _index; + DbU::Unit _sourceU; + DbU::Unit _targetU; + SegmentObserver _observer; protected: // Constructors & Destructors. @@ -213,28 +218,46 @@ namespace Kite { // Inline functions. - inline Track* TrackElement::getTrack () const { return _track; } - inline size_t TrackElement::getIndex () const { return _index; } - inline DbU::Unit TrackElement::getLength () const { return getTargetU() - getSourceU(); } - inline DbU::Unit TrackElement::getSourceU () const { return _sourceU; } - inline DbU::Unit TrackElement::getTargetU () const { return _targetU; } - inline Interval TrackElement::getCanonicalInterval () const { return Interval(getSourceU(),getTargetU()); } - inline void TrackElement::setIndex ( size_t index ) { _index = index; } - inline void TrackElement::setSlackened ( bool state ) { if (base()) base()->setSlackened(state); }; + inline SegmentObserver* TrackElement::getObserver () { return &_observer; } + inline void TrackElement::setFlags ( unsigned int flags ) { _flags|= flags; } + inline void TrackElement::unsetFlags ( unsigned int flags ) { _flags&=~flags; } + inline bool TrackElement::isCreated () const { return _flags & TElemCreated; } + inline bool TrackElement::isInvalidated () const { return _flags & TElemInvalidated; } + inline bool TrackElement::isBlockage () const { return _flags & TElemBlockage; } + inline bool TrackElement::isLocked () const { return _flags & TElemLocked; } + inline bool TrackElement::isRouted () const { return _flags & TElemRouted; } + inline bool TrackElement::hasSourceDogleg () const { return _flags & TElemSourceDogleg; } + inline bool TrackElement::hasTargetDogleg () const { return _flags & TElemTargetDogleg; } + inline bool TrackElement::canRipple () const { return _flags & TElemRipple; } + inline Track* TrackElement::getTrack () const { return _track; } + inline size_t TrackElement::getIndex () const { return _index; } + inline DbU::Unit TrackElement::getLength () const { return getTargetU() - getSourceU(); } + inline DbU::Unit TrackElement::getSourceU () const { return _sourceU; } + inline DbU::Unit TrackElement::getTargetU () const { return _targetU; } + inline Interval TrackElement::getCanonicalInterval () const { return Interval(getSourceU(),getTargetU()); } + inline void TrackElement::setIndex ( size_t index ) { _index=index; } inline Box TrackElement::getBoundingBox () const { - if ( getDirection() == Constant::Horizontal ) - return Box ( getSourceU(), getAxis()-DbU::lambda(1.0), getTargetU(), getAxis()+DbU::lambda(1.0) ); + if (getDirection() == KbHorizontal) + return Box( getSourceU(), getAxis()-DbU::lambda(1.0), getTargetU(), getAxis()+DbU::lambda(1.0) ); + return Box( getAxis()-DbU::lambda(1.0), getSourceU(), getAxis()+DbU::lambda(1.0), getTargetU() ); + } - return Box ( getAxis()-DbU::lambda(1.0), getSourceU(), getAxis()+DbU::lambda(1.0), getTargetU() ); + inline bool TrackElement::makeDogleg ( Katabatic::GCell* gcell ) + { + TrackElement* perpandicular = NULL; + TrackElement* parallel = NULL; + + makeDogleg( gcell, perpandicular, parallel ); + + return (perpandicular != NULL); } -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::TrackElement); - -# endif +#endif diff --git a/kite/src/kite/TrackElements.h b/kite/src/kite/TrackElements.h index 8922af6d..e39e2b2a 100644 --- a/kite/src/kite/TrackElements.h +++ b/kite/src/kite/TrackElements.h @@ -2,36 +2,27 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackElements.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/TrackElements.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_TRACKELEMENTS_H__ -#define __KITE_TRACKELEMENTS_H__ +#ifndef KITE_TRACKELEMENTS_H +#define KITE_TRACKELEMENTS_H #include "katabatic/AutoSegments.h" namespace Kite { - using std::string; using std::set; @@ -50,7 +41,7 @@ namespace Kite { using Hurricane::GenericLocator; using Hurricane::GenericCollection; - using Katabatic::AutoSegments_CollapsedPerpandicular; + using Katabatic::AutoSegments_Perpandiculars; class TrackElement; @@ -58,7 +49,6 @@ namespace Kite { // ------------------------------------------------------------------- // Collections. - typedef Hurricane::Filter TrackElementHF; typedef Hurricane::Locator TrackElementHL; typedef Hurricane::Collection TrackElementHC; @@ -68,10 +58,9 @@ namespace Kite { // ------------------------------------------------------------------- -// Class : "TrackElements_CollapsedPerpandicular". +// Class : "TrackElements_Perpandiculars". - - class TrackElements_CollapsedPerpandicular : public TrackElementHC { + class TrackElements_Perpandiculars : public TrackElementHC { public: // Sub-Class: Locator. @@ -85,40 +74,38 @@ namespace Kite { virtual void progress (); virtual string _getString () const; protected: - AutoSegments_CollapsedPerpandicular::Locator _locator; - TrackElement* _element; + AutoSegments_Perpandiculars::Locator _locator; + TrackElement* _element; }; public: - // TrackElements_CollapsedPerpandicular Methods. - inline TrackElements_CollapsedPerpandicular ( TrackElement* segment ); - inline TrackElements_CollapsedPerpandicular ( const TrackElements_CollapsedPerpandicular& ); - virtual TrackElementHC* getClone () const; - virtual TrackElementHL* getLocator () const; - virtual string _getString () const; + // TrackElements_Perpandiculars Methods. + inline TrackElements_Perpandiculars ( TrackElement* segment ); + inline TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& ); + virtual TrackElementHC* getClone () const; + virtual TrackElementHL* getLocator () const; + virtual string _getString () const; protected: - // TrackElements_CollapsedPerpandicular Attributes. + // TrackElements_Perpandiculars Attributes. TrackElement* _segment; }; - inline TrackElements_CollapsedPerpandicular::Locator::Locator ( const Locator& locator ) + inline TrackElements_Perpandiculars::Locator::Locator ( const Locator& locator ) : TrackElementHL() , _locator (locator._locator) , _element (NULL) { } - inline TrackElements_CollapsedPerpandicular::TrackElements_CollapsedPerpandicular - ( TrackElement* segment ) + inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( TrackElement* segment ) : TrackElementHC() , _segment (segment) { } - inline TrackElements_CollapsedPerpandicular::TrackElements_CollapsedPerpandicular - ( const TrackElements_CollapsedPerpandicular& tracksegments ) + inline TrackElements_Perpandiculars::TrackElements_Perpandiculars ( const TrackElements_Perpandiculars& tracksegments ) : TrackElementHC() , _segment (tracksegments._segment) { } @@ -127,7 +114,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "TrackElements_UniqCanonical". - class TrackElements_UniqCanonical : public TrackElementHF { public: inline TrackElements_UniqCanonical ( set& ); @@ -152,7 +138,7 @@ namespace Kite { {} -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_TRACKELEMENTS__ +#endif // KITE_TRACKELEMENTS_H diff --git a/kite/src/kite/TrackFixedSegment.h b/kite/src/kite/TrackFixedSegment.h index 92d75547..f5fab66b 100644 --- a/kite/src/kite/TrackFixedSegment.h +++ b/kite/src/kite/TrackFixedSegment.h @@ -3,39 +3,27 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackFixedSegment.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/TrackFixedSegment.h" | +// +-----------------------------------------------------------------+ +#ifndef KITE_TRACK_FIXED_SEGMENT_H +#define KITE_TRACK_FIXED_SEGMENT_H - -#ifndef __KITE_TRACK_FIXED_SEGMENT__ -#define __KITE_TRACK_FIXED_SEGMENT__ - - -#include "kite/TrackElement.h" +#include "kite/TrackElement.h" namespace Kite { - using std::string; using std::map; using Hurricane::Record; @@ -49,17 +37,15 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "TrackFixedSegment". - class TrackFixedSegment : public TrackElement { public: - static TrackElement* create ( Track*, Segment* ); + static TrackElement* create ( Kite::Track* track , Segment* segment ); public: virtual AutoSegment* base () const; - virtual bool isFixed () const; - virtual bool isBlockage () const; virtual bool isHorizontal () const; virtual bool isVertical () const; + virtual bool isFixed () const; virtual unsigned long getId () const; virtual unsigned int getDirection () const; virtual Net* getNet () const; @@ -67,7 +53,7 @@ namespace Kite { virtual TrackElement* getNext () const; virtual TrackElement* getPrevious () const; virtual DbU::Unit getAxis () const; - virtual Interval getFreeInterval ( bool useOrder=false ) const; + virtual Interval getFreeInterval () const; virtual Record* _getRecord () const; virtual string _getString () const; virtual string _getTypeName () const; @@ -76,7 +62,6 @@ namespace Kite { // Attributes. static Net* _blockageNet; Segment* _segment; - bool _isBlockage; protected: // Constructors & Destructors. @@ -91,10 +76,9 @@ namespace Kite { }; -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::TrackFixedSegment); - -# endif +#endif // KITE_TRACK_FIXED_SEGMENT_H diff --git a/kite/src/kite/TrackMarker.h b/kite/src/kite/TrackMarker.h index 3dae45da..d13c7f60 100644 --- a/kite/src/kite/TrackMarker.h +++ b/kite/src/kite/TrackMarker.h @@ -2,33 +2,25 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackMarker.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/TrackMarker.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_TRACK_MARKER__ -#define __KITE_TRACK_MARKER__ +#ifndef KITE_TRACK_MARKER_H +#define KITE_TRACK_MARKER_H -#include "hurricane/DbU.h" +#include "hurricane/DbU.h" namespace Hurricane { class RoutingPad; class Net; @@ -47,7 +39,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "TrackMarker". - class TrackMarker { @@ -113,10 +104,10 @@ namespace Kite { { return ( lhsU < rhsU ); } -} // End of Kite namespace. +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::TrackMarker); -#endif // __KITE_TRACK_MARKER__ +#endif // KITE_TRACK_MARKER_H diff --git a/kite/src/kite/TrackSegment.h b/kite/src/kite/TrackSegment.h index ae042b33..195e4e10 100644 --- a/kite/src/kite/TrackSegment.h +++ b/kite/src/kite/TrackSegment.h @@ -1,43 +1,34 @@ - // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./TrackSegment.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/TrackSegment.h" | +// +-----------------------------------------------------------------+ +#ifndef KITE_TRACK_SEGMENT_H +#define KITE_TRACK_SEGMENT_H - -#ifndef __KITE_TRACK_SEGMENT__ -#define __KITE_TRACK_SEGMENT__ - - -#include "kite/TrackElement.h" +#include +#include +#include "kite/TrackElement.h" namespace Kite { - using std::string; using std::map; + using std::set; + using std::binary_function; using Hurricane::Record; using Hurricane::Interval; using Hurricane::DbU; @@ -52,109 +43,91 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "TrackSegment". - class TrackSegment : public TrackElement { public: - static TrackElement* create ( AutoSegment*, Track*, bool& created ); - public: - virtual AutoSegment* base () const; - virtual bool isBipoint () const; - virtual bool isCreated () const; - virtual bool isFixed () const; - virtual bool isStrap () const; - virtual bool isSlackenStrap () const; - virtual bool isLocal () const; - virtual bool isGlobal () const; - virtual bool isLocked () const; - virtual bool isTerminal () const; - virtual bool isDogleg () const; - virtual bool isRevalidated () const; - virtual bool isSlackened () const; - virtual bool isSlackenDogLeg () const; - virtual bool isHorizontal () const; - virtual bool isVertical () const; - virtual bool isRouted () const; - virtual bool allowOutsideGCell () const; - virtual bool canDesalignate () const; - virtual bool canGoOutsideGCell () const; - virtual bool canSlacken () const; - virtual bool canPivotUp ( float reserve ) const; - virtual bool canPivotDown ( float reserve ) const; - virtual bool canMoveUp ( float reserve, unsigned int flags ) const; - virtual float getMaxUnderDensity ( unsigned int flags ) const; - virtual bool canRipple () const; - virtual bool hasSourceDogLeg () const; - virtual bool hasTargetDogLeg () const; - virtual bool canDogLeg (); - virtual bool canDogLeg ( Interval ); - virtual bool canDogLegAt ( Katabatic::GCell*, unsigned int flags ); - virtual unsigned long getId () const; - virtual unsigned int getDirection () const; - virtual Net* getNet () const; - virtual const Layer* getLayer () const; - virtual unsigned long getArea () const; - virtual unsigned int getDogLegLevel () const; - virtual TrackElement* getNext () const; - virtual TrackElement* getPrevious () const; - virtual TrackElement* getParent () const; - virtual DbU::Unit getAxis () const; - virtual Interval getFreeInterval () const; - virtual Interval getSourceConstraints () const; - virtual Interval getTargetConstraints () const; - virtual DataNegociate* getDataNegociate ( unsigned int flags ) const; - virtual TrackElement* getCanonical ( Interval& ); - virtual size_t getGCells ( vector& ) const; - virtual TrackElement* getSourceDogLeg (); - virtual TrackElement* getTargetDogLeg (); - virtual TrackElements getCollapsedPerpandiculars (); - virtual size_t getPerpandicularsBound ( set& ); - virtual void dataInvalidate (); - virtual void eventInvalidate (); - virtual void setAllowOutsideGCell ( bool ); - virtual void setRevalidated ( bool ); - virtual void setCanRipple ( bool ); - virtual void setSourceDogLeg ( bool ); - virtual void setTargetDogLeg ( bool ); - virtual void setLock ( bool ); - virtual void setRouted ( bool ); - virtual void setTrack ( Track* ); - virtual void setArea (); - virtual void setDogLegLevel ( unsigned int ); - virtual void swapTrack ( TrackElement* ); - virtual void reschedule ( unsigned int level ); - virtual void detach (); - virtual void revalidate ( bool invalidEvent ); - virtual void invalidate (); - virtual void setAxis ( DbU::Unit, unsigned int flags ); - virtual void slacken (); - virtual bool moveUp ( unsigned int flags ); - virtual bool moveDown ( unsigned int flags ); - virtual bool moveAside ( bool onLeft ); - virtual TrackElement* makeDogLeg (); - virtual TrackElement* makeDogLeg ( Interval, bool& leftDogleg ); - virtual TrackElement* makeDogLeg ( Katabatic::GCell* ); - virtual TrackElement* _postDogLeg (); - virtual void _postModify (); - virtual void desalignate (); - virtual bool _check () const; - virtual Record* _getRecord () const; - virtual string _getString () const; - virtual string _getTypeName () const; + class CompareById : public binary_function { + public: + inline bool operator() ( const TrackSegment* lhs, const TrackSegment* rhs ); + }; + + public: + static TrackElement* create ( AutoSegment*, Track*, bool& created ); + public: + // Wrapped AutoSegment Functions (when applicable). + virtual AutoSegment* base () const; + virtual bool isFixed () const; + virtual bool isHorizontal () const; + virtual bool isVertical () const; + virtual bool isLocal () const; + virtual bool isGlobal () const; + virtual bool isBipoint () const; + virtual bool isTerminal () const; + virtual bool isStrongTerminal ( unsigned int flags=0 ) const; + virtual bool isStrap () const; + virtual bool isSlackened () const; + virtual bool isDogleg () const; + // Predicates. + virtual bool canDogleg (); + virtual bool canDogleg ( Interval ); + virtual bool canDogleg ( Katabatic::GCell*, unsigned int flags=0 ); + virtual bool canPivotUp ( float reserve ) const; + virtual bool canPivotDown ( float reserve ) const; + virtual bool canMoveUp ( float reserve, unsigned int flags ) const; + virtual bool canSlacken () const; + virtual float getMaxUnderDensity ( unsigned int flags ) const; + virtual unsigned long getId () const; + virtual unsigned int getDirection () const; + virtual Net* getNet () const; + virtual const Layer* getLayer () const; + virtual unsigned long getFreedomDegree () const; + virtual unsigned int getDoglegLevel () const; + virtual TrackElement* getNext () const; + virtual TrackElement* getPrevious () const; + virtual TrackElement* getParent () const; + virtual DbU::Unit getAxis () const; + virtual Interval getFreeInterval () const; + virtual Interval getSourceConstraints () const; + virtual Interval getTargetConstraints () const; + virtual DataNegociate* getDataNegociate ( unsigned int flags=KtDataSelf ) const; + virtual TrackElement* getCanonical ( Interval& ); + virtual size_t getGCells ( Katabatic::GCellVector& ) const; + virtual TrackElement* getSourceDogleg (); + virtual TrackElement* getTargetDogleg (); + virtual TrackElements getPerpandiculars (); + virtual size_t getPerpandicularsBound ( set& ); + // Mutators. + virtual void setTrack ( Track* ); + virtual void updateFreedomDegree (); + virtual void setDoglegLevel ( unsigned int ); + virtual void swapTrack ( TrackElement* ); + virtual void reschedule ( unsigned int level ); + virtual void detach (); + virtual void revalidate (); + virtual void invalidate (); + virtual void setAxis ( DbU::Unit, unsigned int flags ); + virtual TrackElement* makeDogleg (); + virtual TrackElement* makeDogleg ( Katabatic::GCell*, TrackElement*& perpandicular, TrackElement*& parallel ); + virtual TrackElement* makeDogleg ( Interval, unsigned int& flags ); + virtual void _postDoglegs ( TrackElement*& perpandicular, TrackElement*& parallel ); + virtual bool moveAside ( unsigned int flags ); + virtual bool slacken ( unsigned int flags=KbNoFlags ); + virtual bool moveUp ( unsigned int flags ); + virtual bool moveDown ( unsigned int flags ); +#if THIS_IS_DISABLED + virtual void desalignate (); +#endif + virtual bool _check () const; + virtual Record* _getRecord () const; + virtual string _getString () const; + virtual string _getTypeName () const; protected: // Attributes. - AutoSegment* _base; - bool _created; - bool _lock; - bool _revalidated; - bool _sourceDogLeg; - bool _targetDogLeg; - bool _canRipple; - bool _routed; - unsigned long _area; - DataNegociate* _data; - unsigned int _dogLegLevel:4; + AutoSegment* _base; + unsigned long _freedomDegree; + DataNegociate* _data; + unsigned int _dogLegLevel:4; protected: // Constructors & Destructors. @@ -169,10 +142,16 @@ namespace Kite { }; -} // End of Kite namespace. + inline bool TrackSegment::CompareById::operator() ( const TrackSegment* lhs, const TrackSegment* rhs ) + { return lhs->getId() < rhs->getId(); } + + + typedef set TrackSegmentSet; + + +} // Kite namespace. INSPECTOR_P_SUPPORT(Kite::TrackSegment); - -# endif +#endif // KITE_TRACK_SEGMENT_H diff --git a/kite/src/kite/TrackSegmentCost.h b/kite/src/kite/TrackSegmentCost.h index 5e554b1d..af280cb1 100644 --- a/kite/src/kite/TrackSegmentCost.h +++ b/kite/src/kite/TrackSegmentCost.h @@ -2,14 +2,9 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC/LIP6 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | @@ -17,12 +12,7 @@ // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | // | C++ Header : "./TrackSegmentCost.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x - - +// +-----------------------------------------------------------------+ #ifndef __TRACK_SEGMENT_COST__ diff --git a/kite/src/kite/Tracks.h b/kite/src/kite/Tracks.h index 363fd4d5..250401d0 100644 --- a/kite/src/kite/Tracks.h +++ b/kite/src/kite/Tracks.h @@ -2,40 +2,29 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./Tracks.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/Tracks.h" | +// +-----------------------------------------------------------------+ +#ifndef KITE_TRACKS_H +#define KITE_TRACKS_H - -#ifndef __KITE_TRACKS__ -#define __KITE_TRACKS__ - -#include -#include "hurricane/Collection.h" -#include "hurricane/Interval.h" +#include +#include "hurricane/Collection.h" +#include "hurricane/Interval.h" namespace Kite { - using std::string; using Hurricane::_TName; using Hurricane::Locator; @@ -56,7 +45,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Tracks_Range". - class Tracks_Range: public Collection { public: @@ -98,7 +86,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "Tracks_Spiral". - class Tracks_Spiral : public Collection { public: @@ -147,7 +134,7 @@ namespace Kite { }; -} // End of Katabatic namespace. +} // Katabatic namespace. -#endif // __KITE_TRACKS__ +#endif // KITE_TRACKS_H diff --git a/kite/src/kite/VerticalTrack.h b/kite/src/kite/VerticalTrack.h index 33e178c6..ff45913b 100644 --- a/kite/src/kite/VerticalTrack.h +++ b/kite/src/kite/VerticalTrack.h @@ -2,29 +2,21 @@ // -*- C++ -*- // // This file is part of the Coriolis Software. -// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved +// Copyright (c) UPMC 2008-2013, All Rights Reserved // -// =================================================================== -// -// $Id$ -// -// x-----------------------------------------------------------------x -// | | +// +-----------------------------------------------------------------+ // | C O R I O L I S | // | K i t e - D e t a i l e d R o u t e r | // | | // | Author : Jean-Paul CHAPUT | // | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | =============================================================== | -// | C++ Header : "./VerticalTrack.h" | -// | *************************************************************** | -// | U p d a t e s | -// | | -// x-----------------------------------------------------------------x +// | C++ Header : "./kite/VerticalTrack.h" | +// +-----------------------------------------------------------------+ -#ifndef __KITE_VERTICAL_TRACK__ -#define __KITE_VERTICAL_TRACK__ +#ifndef KITE_VERTICAL_TRACK_H +#define KITE_VERTICAL_TRACK_H #include "kite/Track.h" @@ -34,7 +26,6 @@ namespace Kite { // ------------------------------------------------------------------- // Class : "VerticalTrack". - class VerticalTrack : public Track { @@ -59,7 +50,7 @@ namespace Kite { }; -} // End of Kite namespace. +} // Kite namespace. -#endif // __KITE_VERTICAL_TRACK__ +#endif // KITE_VERTICAL_TRACK_H
    SummaryConceptsSummary NamespacesClass HierarchyClass Hierarchy Classes Member Index