时序预算与时序图绘制
按 IPC-2221 传播速度估算走线/过孔延迟并做建立/保持裕量预算,同时把 WaveJson 风格波形描述渲染为 SVG 时序图与波形图;离线契约报告,布局前拦截时序违例。
Badges only claim the demo-run passed on that host; cross-host installation is handled by the adapter layer.
Preview gallery
Budget timing for a 100 MHz SPI bus: report per-signal delay and margin verdicts, and render CLK/CS/MOSI waveforms to SVG.
Content matches the files inside the package; extracted by the publish pipeline.
LCEDA timing / waveform bundle
Offline re-implementation of the pure-computation cores of the LCEDA extension-plaza timing group (see references/PROVENANCE.md): the timing-analysis path-delay / setup-hold budget and a WaveJson digital waveform renderer (the plaza tool delegates rendering to upstream WaveDrom; this bundle renders its own SVG from the same lane syntax). Editor-bound steps (net length harvest, schematic placement) are procedures in references/procedures.md.
What the script computes
scripts/demo.mjs (Node >= 20, no dependencies):
- Period
1000 / freqMHzns; per signal Manhattan pin distance in mil, overridden by measured trace length when given. - Via compensation
viaCount * boardThicknessMm * 39.37mil added to the routed length. - Propagation delay
totalLenMil * 0.0254 / 152.4ns (FR-4 empirical velocity 152.4 mm/ns used by the source tool). - Margin
period - (setup + hold + pd); <= 0 error, < 10% of period warning, else pass. - WaveJson lanes:
wavecharsp n P N 0 l L 1 h H x d u z = 2-9 . |,period(char spans2*periodhalf-cycle bricks),phase(advance in periods, leading bricks dropped),datalabels consumed in order by=and2-9. Unknown chars and missing labels are reported, not silently dropped. - Two SVG artifacts:
waveform.svg(lane preview) andtiming.svg(clock + launch/capture edges, setup/hold windows, per-signal delay).
Run
node scripts/demo.mjs --out-dir <dir> [--input <budget.json>]
Default input: scripts/fixtures/input.json. stdout is an
edaskills.report.v1 report; <dir> receives timing.csv,
waveform.svg, timing.svg.
Input shape: { "freqMHz", "setupNs", "holdNs", "boardThicknessMm", "signals": [{ "net", "sourcePin", "targetPin", "x1", "y1", "x2", "y2", "traceLenMil"?, "viaCount"? }], "wave": { "signal": [{ "name", "wave", "data"?, "period"?, "phase"? }] } } (coordinates in mil).
When to use
- First-pass setup/hold budget between two devices before layout review.
- Turn a WaveJson timing sketch into a shareable SVG without the editor.
- Explain a timing violation with a drawn launch/capture diagram.
Not for: sign-off (single empirical velocity, no jitter/crosstalk/ODT), source-synchronous or DDR protocols, or analog waveforms.
Dependencies
Demo run
node v24.19.0 · 2026/11/19
- [info] TIMING_OK (SPI_CLK): SPI_CLK margin 2.81 ns at 100 MHz (pd 0.19 ns)
- [warning] MARGIN_LOW (SPI_MOSI): SPI_MOSI margin 0.46 ns below 10% of 10.00 ns period
- [error] TIMING_VIOLATION (LONG_BUS): LONG_BUS margin -3.67 ns <= 0 (pd 6.67 ns over 40000 mil)
FAQ
Ratings & reviews
Not rated0 ratings
Sign in to rate this skill.
Sign inVersions
- v1.0.0Latest114.3 KB
首发种子版本。