Local LLM PCB Design Review and EMI Simulation: A Full Verification Workflow
This article documents the end-to-end process of using a locally deployed large language model for PCB design rule review and ray-tracing-based EMI assessment on a high-speed adapter carrier board. It covers cross-tool design data migration, three common import failures and their fixes, full-board rule check results including a critical ground-hole intrusion, local model selection and prompt structuring, context overflow handling, and three defects discovered in the automation pipeline itself. Readers get a reusable methodology that pairs deterministic rule engines with local LLM summarization and fast electromagnetic cross-validation.
1. Why the Process Matters More Than the Conclusion
In engineering practice, neither a checklist that can be put to work nor a set of polished field distribution plots amounts to evidence that can be signed off. What is actually reusable is the process: how data enters the toolchain, how rules are executed deterministically, where the model adds value, and how simulation results are cross-validated. This article does not publish conclusions; it publishes the process. Along the way, verification also surfaced three defects in the automation pipeline itself.
The board under test is an adapter carrier that maps a compute module onto a standard high-speed bus slot: roughly 171.71 × 100.28 mm, 4 layers, 1.6 mm thick, with 106 footprints, 3066 track segments, and 911 vias. Its purpose is to connect a previous-generation high-power compute module to a general-purpose motherboard slot, so high-speed differential density is extremely high and the fanout regions are crowded — a typical hard case for design review and electromagnetic assessment.
2. Gate One: Migrating Design Data Across Tools
2.1 Choosing a Migration Path
The original design came from a domestic online electronics design platform. In practice, its standard tier does not provide a direct export path to mainstream open-source EDA formats; only the professional tier has that capability. The initial idea was to export to a third-party EDA format first and relay from there, but testing showed this was an unnecessary detour — the professional tier outputs the target format directly, with no intermediate tool to install.
2.2 Three Typical Failures After Import
Once the data landed in the open-source EDA tool, three high-frequency problems appeared, all related to the environment rather than the design itself:
- Assertion triggered by an interface signature change: accessing via width now requires an explicit layer parameter, otherwise an assertion of the form
PCB_VIA::GetWidth called without a layer argumentfires; - Assertion failure during plugin registration:
assert "PgmOrNull()" failed in register_action()appears in the action registration phase, typically because actions are registered before the graphical environment is initialized; - Missing font dialog: a prompt like
Arial Negreta cursiva not foundappears and disappears once the font is installed.
Engineering recommendation: bake these three checks into the pre-flight stage of the migration script — install fonts first, defer plugin registration, and finally route everything through a wrapper interface that always passes the layer parameter.
2.3 Full-Board Rule Check Results
After import, a full-board design rule check produced 2080 violations (1635 errors, 445 warnings) and 59 unconnected items. The most severe one: a ground hole 4.013 mm in diameter is crossed directly by 20 differential traces, with a worst-case intrusion of -1.7625 mm — not insufficient clearance, but pressure inside the hole wall, shorting 8 networks (four transmit pairs, four receive pairs) against ground. Fabricating the board as-is would produce scrap.
There were also 68 dangling vias, 200 unclosed track endpoints, and 150 items with zero annular ring width. These findings are not subjective model judgments; the rule engine computed each one by coordinate, so they can be located precisely and regression-tested.
3. Gate Two: Swapping the Review Brain for a Local Model
3.1 Why Change Models
Early work used a cloud multimodal model, later replaced by a locally deployed instruction model at the 14-billion-parameter class, exposed through a local inference service on port 8083, consuming about 22.8 GB of VRAM on a 32 GB compute card. The switch was not about benchmark scores; the requirement was a model that reliably reads the structured JSON output of rule checks and summarizes long documents.
3.2 Two Frequent Engineering Pitfalls
- Missing credential: the error
no credential for provider route "local-v100"appears. The local service needs no authentication, but the routing layer marks the key field as required, so a missing value breaks the chain. The fix is to inject any placeholder key for the local route. - Context overflow: the error
request (66798 tokens) exceeds the available context size (65536 tokens)appears. The root cause was stuffing the entire JSON into the prompt at once. The fix is layered feeding: first the summary statistics and severity distribution, then batches grouped by network cluster.
3.3 Prompting and Structured Output
Constrain the model to emit machine-readable structure only, which makes regression comparison straightforward:
{"cluster_id": "MH7-fanout","severity": "fatal","evidence": ["20 diff traces cross 4.013mm GND hole", "min intrusion -1.7625mm"],"networks": ["TX6±","TX7±","RX10±","RX11±","GND"],"suggested_action": "reroute fanout, add anti-pad"}
4. Gate Three: Electromagnetic Evidence via Ray Tracing
Rules can only prove geometric violations; they cannot prove that signal integrity is acceptable. So after the fanout was fixed, a geometric-optics/ray-tracing class method was applied to key regions for a fast electromagnetic assessment: differential pairs and reference planes are discretized into surface elements, a large number of rays are emitted to tally reflection and diffraction paths, yielding insertion loss trends and estimated resonance points. It is not a replacement for full-wave simulation, but it delivers a trend judgment in minutes and is used to screen high-risk networks.
The exercise also exposed three defects in the automation pipeline: items with zero annular ring width were downgraded to warnings by the rule engine, causing under-reporting; differential pair recognition broke at layer-changing vias; and the report did not emit “intrusion amount” as a first-class field, requiring a second parse. After fixes and regression, the violation count dropped from 2080 to a handful of explainable items.
5. A Reusable Methodology
- Deterministic first, probabilistic second: the rule engine backstops hard defects, while the model only summarizes and prioritizes;
- Layered context: feed in three tiers — summary, clusters, details — to avoid overflow;
- Locatable evidence: every conclusion must carry coordinates, networks, and severity;
- Simulation for cross-validation: use fast ray tracing to screen risk, then run full-wave checks on a few networks;
- Self-audit the process: put the automation scripts themselves into regression too, so a tool error is never copied straight into a conclusion.
