Add WNS/TNS timing analysis, clock uncertainty, and event buffer draining#17
Open
Add WNS/TNS timing analysis, clock uncertainty, and event buffer draining#17
Conversation
Extract the Metal co-simulation engine (SPI flash, UART, Wishbone bus trace models) from the standalone gpu_sim binary into a library module at src/sim/cosim_metal.rs. Replace the cmd_cosim stub in loom.rs with a thin wrapper that loads the design via setup::load_design() and calls cosim_metal::run_cosim(). Key changes: - New cosim_metal module exposes run_cosim()/CosimOpts/CosimResult - Design loading reuses setup::load_design() instead of duplicating it - DesignArgs gains clock_period_ps for configurable SDF clock period - load_sdf() accepts optional clock_period_ps (default 25000ps) - CI updated to use `loom cosim` instead of `gpu_sim` - gpu_sim binary removed from Cargo.toml and deleted Co-developed-by: Claude Code v2.1.44 (claude-opus-4-6)
…ning - Extend SimStats with worst/total slack tracking (WNS/TNS/WHS/THS) and per-endpoint HashSet for unique violation counting - Add --clock-uncertainty-ps CLI flag to gpu_sim for modeling clock jitter; uncertainty is added to setup/hold constraints via build_timing_constraint_buffer() - Drain event buffer in gpu_sim.rs GPU-only simulation loop after each batch, accumulating timing violation statistics across the full run - Print timing analysis summary (WNS/TNS, unique endpoints, PASS/FAIL) at end of simulation when timing is enabled - Add unit tests for WNS/TNS accumulation across single and multiple drains Co-developed-by: Claude Code v2.1.44 (claude-opus-4-6)
- Replace old summary statistics section with WNS/TNS/WHS/THS metric definitions and example output - Add --clock-uncertainty-ps to CLI flags table with explanation - Add multi-corner analysis section with max/min corner workflow - Add clock uncertainty section explaining the jitter model - Update gpu_sim example to show --clock-uncertainty-ps flag Co-developed-by: Claude Code v2.1.44 (claude-opus-4-6)
a564f01 to
c1ce430
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SimStatswith WNS/TNS/WHS/THS slack tracking and per-endpoint unique violation counting--clock-uncertainty-psCLI flag togpu_simfor modelling clock jitter (added to setup/hold constraints)gpu_simGPU-only simulation loop after each batch, accumulating timing statisticsdocs/timing-violations.mdwith new metrics, clock uncertainty, and multi-corner workflowTest plan
cargo test --lib)gpu_sim,loom,metal_testbinaries compile with--features metalmdbook buildsucceeds, new doc sections render correctly