Conversation
… commit 6/6) Closes Track D Phase 1 (FIFO + Priority networks). The latency.rs analysis pass now alternates RTA-derived WCET on compute hops with wctt-derived WCTT on network hops, realising the WCET+WCTT end-to-end framing recorded in the project memory. Models without Spar_Network::* annotations fall back to the existing Bus_Properties::Latency scalar — non-regression preserved (verified by no_spar_network_models_unchanged_v07). New diagnostic LatencyHopMixed signals chains that exercise both hop types end-to-end. COMPLIANCE.md updated with the Track D Phase 1 close-out narrative (5/6 commits delivered; commit 5 Lean is a sibling PR). New requirement: REQ-NETWORK-008. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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
Closes Track D Phase 1 (FIFO + Priority networks). The latency analysis pass now alternates RTA-derived WCET on compute hops with WCTT-derived bounds on network hops, realising the WCET+WCTT end-to-end framing recorded in the project memory.
spar-analysis::wctt::compute_network_hop_latency: new public helper returnsOption<NetworkHopLatency>with(min_ps, max_ps, unservable)for a connection segment that binds to one or moreSpar_Network::Switch_Type-annotated buses. Re-uses the same NC primitives (residual service, delay bound, output bound) as the existingWcttAnalysis::analyzewalk.spar-analysis::latency: walks every connection segment in each end-to-end flow; when the helper returnsSome(...), the per-hop contribution comes from the NC-derived bound and the legacy sampling-delay / inter-processor-overhead path is suppressed for that segment to avoid double-counting. When the helper returnsNone, the v0.7.0 path runs unchanged — that is the non-regression contract that gates Phase 1 close-out.[network hop]annotation on per-hop diagnostics when the bound is WCTT-derived;[compute hop]annotation for same-CPU compute segments on chains that also see a network hop;LatencyHopMixedInfo marker on chains that exercise both hop types.compute_network_hop_latencyflags a saturated residual service,latency.rsemits an Error and aborts aggregation for that chain — mirrorswctt.rs's existingWcttUnservablesemantics.What's NOT in this PR
spar-network::curvesand a widerSpar_TSN::*property set.spar moves verifydeterministic-apply, MCP read-only) — Track E is parallel.How to verify the WCET+WCTT framing on a sample model
Build a minimal cross-CPU chain with a switched bus:
with a system whose
Actual_Connection_Binding => (reference (sw))covers asensor (cpu1) -> c1 -> controller (cpu2)flow. Runspar analyzeand look for:The 0.012 ms hop is the canonical Le Boudec bound
D = T + sigma/R = 0 + 1500*8*10^12 / 1 Gbps = 12 us. Removing theSpar_Network::*annotations falls back to the v0.7.0 scalar path; removing theActual_Connection_Bindingentirely also falls back. Both fall-through cases are covered by unit tests.Test plan
cargo build --workspace— cleancargo test -p spar-analysis --lib— 834 passing (824 baseline + 10 new latency tests)cargo test --workspace— green, no failurescargo clippy --workspace --all-targets -- -D warnings— cleancargo fmt --all -- --check— cleanrivet validate— PASS (existing pre-existing schema warnings only)10 new latency::tests covering: non-regression (
no_spar_network_models_unchanged_v07), single-CPU chain (compute_only_chain_unchanged), single-hop NC bound matching helper (single_network_hop_uses_wctt), three-stage WCET+WCTT alternation (compute_then_network_then_compute), scalar fallback when noSwitch_Type(network_hop_falls_back_to_bus_latency_when_no_switch_type), NC switchover whenSwitch_Typeadded (network_hop_uses_wctt_when_switch_type_present),LatencyHopMixedmarker (latency_hop_mixed_diagnostic_emitted), unservable propagation (wctt_unservable_propagates_to_latency), unannotated-bus fallback (unannotated_bus_in_chain_falls_back), simple-fixture regression (existing_latency_fixtures_unchanged).Generated with Claude Code