TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
router.hpp File Reference

TraceMaker's detailed router, version 1 (roadmap M4; design doc 05 §2, §5). More...

#include <array>
#include <atomic>
#include <cstdint>
#include <string>
#include <vector>
#include "core/events.hpp"
#include "model/board.hpp"
#include "model/rules.hpp"
#include "route/global_router.hpp"

Go to the source code of this file.

Classes

struct  tmk::route::ConnRoute
 The copper of one routed connection, keyed by its two pads: what a later run can start from (RouterOptions::warm). More...
struct  tmk::route::RouterOptions
struct  tmk::route::RouterOptions::Bus
 Buses (doc 05 §38): groups of nets routed lane by lane. More...
struct  tmk::route::RouterOptions::GuidePath
 Path guidance (doc 16 F1): a preferred path for a connection, found by matching its two pad centres. More...
struct  tmk::route::RouterOptions::AdviceSet
 Hints from an advice file (src/advice, doc 17). More...
struct  tmk::route::Connection
struct  tmk::route::WorkCounts
 Work profile (doc 10 §2, D88): how many of each costly operation a run did, per phase. More...
struct  tmk::route::WorkProfile
struct  tmk::route::RouteResult
struct  tmk::route::RouteResult::Unrouted
 One unrouted connection of the state returned, structured for the stuck report (doc 17 §3): where it is, why the last attempt failed (a code, and the search's own words), how often it was ripped or failed, and which nets stood in the way. More...
struct  tmk::route::PortfolioResult
 Runs several differently configured routers (portfolio variants) and keeps the best result. More...
class  tmk::route::Router

Namespaces

namespace  tmk
namespace  tmk::route

Enumerations

enum class  tmk::route::WorkPhase { tmk::route::Setup , tmk::route::FirstPass , tmk::route::Negotiation , tmk::route::Cleanup }

Functions

const char * tmk::route::work_phase_name (WorkPhase p)
std::string tmk::route::failure_reason_code (const std::string &why)
 The reason code of a failure explanation (RouteResult::Unrouted::reason).
PortfolioResult tmk::route::route_portfolio (const model::Board &board, const model::DesignRules &rules, const RouterOptions &base, int variants, const std::vector< int > &pick={}, int threads=0)
 variants: how many variants to run (the first variants of the portfolio); pick: which variant indices to run instead (non-empty: overrides variants).
int tmk::route::portfolio_size ()
bool tmk::route::route_result_better (const RouteResult &a, const RouteResult &b)
 The portfolio's total order on results: true when a beats b (more routed, then fewer connections off their bus lanes, then fewer vias, then shorter copper).

Variables

constexpr int tmk::route::kWorkPhases = 4
constexpr int tmk::route::kAdvisedIndex = 1000
 Variant indices from here up are the advised copies the portfolio adds when RouterOptions::advice is active (position k of the advice's variants has index kAdvisedIndex + k).

Detailed Description

TraceMaker's detailed router, version 1 (roadmap M4; design doc 05 §2, §5).

Octilinear A* on a fine lattice (optimal under its cost model), with legality decided lazily by exact clearance tests against the DRC's rule engine, then exact verification of every committed segment and via.

Definition in file router.hpp.