|
TraceMaker
C++ API of the engine
|
Reference-return audit of high-speed nets (issue #7, docs/05-routing.md §42, D114). More...
#include <string>#include <utility>#include <vector>#include <nlohmann/json.hpp>#include "geom/point.hpp"#include "model/board.hpp"#include "model/rules.hpp"Go to the source code of this file.
Classes | |
| struct | tmk::analysis::ReturnPathOptions |
| struct | tmk::analysis::ReturnVoid |
| struct | tmk::analysis::ReturnLayerChange |
| struct | tmk::analysis::ReturnEnd |
| struct | tmk::analysis::NetReturn |
| struct | tmk::analysis::ReturnPathReport |
Namespaces | |
| namespace | tmk |
| namespace | tmk::analysis |
Functions | |
| ReturnPathReport | tmk::analysis::analyse_return_paths (const model::Board &b, const model::DesignRules &rules, const ReturnPathOptions &opt) |
| Analyses the nets the options select on b as it stands (routed copper included). Deterministic. | |
| nlohmann::json | tmk::analysis::return_path_json (const model::Board &b, const ReturnPathReport &r) |
| The report as JSON (nanometres converted to millimetres), and one return_path viewer message per net (docs/13-viewer-protocol.md). | |
| std::string | tmk::analysis::return_path_message (const model::Board &b, const NetReturn &n) |
| std::vector< std::string > | tmk::analysis::return_path_lines (const model::Board &b, const ReturnPathReport &r) |
| A one-line text form per net and the lines under it that explain a warning. | |
Reference-return audit of high-speed nets (issue #7, docs/05-routing.md §42, D114).
KiCad's DRC cannot tell whether a fast trace has continuous copper under it. A dogbone escape punches antipads through the reference pour, a plane can be split, a layer change can come without a nearby stitch: the signal is DRC-clean and its return current still walks around the void, which grows the loop area and the inductance. This pass answers a geometric question per net: does the trace have copper under it on the adjacent reference layer, and where it does not, how far does the return detour?
It is read-only (it adds nothing to the board) and it is a geometric model, not a field solver: the return of a signal over copper is taken to be its mirror image on the reference layer, across a void it is the shortest path that stays on the remaining reference copper (Dijkstra over the visibility graph of the reference polygon's vertices; Lee and Preparata 1984), and at a layer change it closes through the nearest stitching via of the reference net, or the nearest capacitor between the two reference nets, within a radius. The return does not close through "one assumed GND ball": at a footprint the nearest pad of the reference net is the assumed return pad (the comment on the issue).
Definition in file return_path.hpp.