Assertions and Measurements for Mixed-Signal Simulation PhD Thesis Thomas Ferr` ere VERIMAG, University of Grenoble (directeur: Oded Maler) Mentor Graphics Corporation (co-encadrant: Ernst Christen) October 28, 2016
Cyber-Physical Systems ◮ Both discrete and continuous modes of operation ◮ Example: a cell phone • A design: • A bug: (courtesy of Samsung and AppleInsider) ◮ Verification is needed 1 / 40
Cyber-Physical Systems ◮ Both discrete and continuous modes of operation ◮ Example: a cell phone • A design: • A bug: (courtesy of Samsung and AppleInsider) ◮ Verification is needed 1 / 40
Cyber-Physical Systems ◮ Both discrete and continuous modes of operation ◮ Example: a cell phone • A design: • A bug: (courtesy of Samsung and AppleInsider) ◮ Verification is needed 1 / 40
Cyber-Physical Systems ◮ Both discrete and continuous modes of operation ◮ Example: a cell phone • A design: • A bug: (courtesy of Samsung and AppleInsider) ◮ Verification is needed 1 / 40
Cyber-Physical Systems ◮ Both discrete and continuous modes of operation ◮ Example: a cell phone • A design: • A bug: (courtesy of Samsung and AppleInsider) ◮ Verification is needed 1 / 40
Mixed-Signal Simulation Integrated Circuits Modeling ◮ Digital: event-driven ↑ p q = 0 q = 1 ↑ p ◮ Analog: algebraic differential equations x, d x � � (courtesy of ST Microelectronics) = 0 f p d t ◮ Implement both analog and ◮ Mixed-Signal: analog events digital electronics ↑ ( x > 2 . 0) and digital control f q ◮ Design uses HDL and net lists at several stages 2 / 40
Mixed-Signal Simulation Integrated Circuits Modeling ◮ Digital: event-driven ↑ p q = 0 q = 1 ↑ p ◮ Analog: algebraic differential equations x, d x � � (courtesy of ST Microelectronics) = 0 f p d t ◮ Implement both analog and ◮ Mixed-Signal: analog events digital electronics ↑ ( x > 2 . 0) and digital control f q ◮ Design uses HDL and net lists at several stages 2 / 40
Simulation-Based Verification ◮ During the design stage run multiple simulations ◮ Each simulation produces a trace • Records evolution of quantities over time • Real-valued and Boolean signals ◮ Monitoring: each traced need to be analysed • Evaluate requirements: correctness, robusteness, diagnostics • In general measuring some performance ◮ Automation of the monitoring activity: • Additional observer blocks • Declarative property or measurement languages 3 / 40
Declarative Languages in Industry Assertions ◮ Digital domain ◮ Languages psl and sva built using two layers: • regular expression • temporal logic ◮ Discrete time interpretation Measurements ◮ Analog domain ◮ extract commands: signal processing, offline ◮ meas commands: event-driven, online 4 / 40
Research on Realtime Properties Problem: mixed-signal characterized by a synchronous interaction Solution: use continous-time representation ◮ Metric Temporal Logic (Koymans, 1990) • Signal Temporal Logic for real-valued signals (Maler and Nickovic, 2004) • Quantitative semantics for robustness estimate (Fainekos and Pappas, 2009) ◮ Timed Regular Expressions (Asarin, Caspi and Maler, 1998) 5 / 40
Limitations of Existing Tools and Techniques ◮ Digital assertions bound to precision of sampling clock ◮ Realtime properties monitoring not implemented ◮ Robustness computation is not efficient ◮ No easy diagnostic of temporal logic properties failure ◮ Measurements not controllable by sequential conditions ◮ No analog measures in a digital context 6 / 40
Outline 1. Preliminaries 2. Robustness Computation 3. Diagnostics 4. Regular Expressions Monitoring 5. Pattern-Based Measurements 6. Analog Measures in Digital Environment 7. Conclusion 7 / 40
Outline 1. Preliminaries 2. Robustness Computation 3. Diagnostics 4. Regular Expressions Monitoring 5. Pattern-Based Measurements 6. Analog Measures in Digital Environment 7. Conclusion 7 / 40
Signal Temporal Logic ◮ Propositions p : Boolean variables q , conditions x ≤ c , and events ↑ p ◮ Temporal operators: • Until: ϕ U I ψ • Eventually: ♦ I ψ = ⊤ U I ψ • Always: � I ψ = ¬ ♦ I ¬ ψ Formulas can be written with ♦ [ a,b ] and U only ◮ Example: stabilization property ϕ = � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) x 0.2 0 q t t 0 t 0 + 5 t 0 + 10 8 / 40
Signal Temporal Logic ◮ Propositions p : Boolean variables q , conditions x ≤ c , and events ↑ p ◮ Temporal operators: • Until: ϕ U I ψ • Eventually: ♦ I ψ = ⊤ U I ψ • Always: � I ψ = ¬ ♦ I ¬ ψ Formulas can be written with ♦ [ a,b ] and U only ◮ Example: stabilization property ϕ = � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) x 0.2 0 q t t 0 t 0 + 5 t 0 + 10 8 / 40
Monitoring Offline approach (Maler and Nickovic, 2004): for each subformula ϕ compute set of times [ ϕ ] w where ϕ holds according to w Definition (Satisfaction Set) [ p ] w = { t : p w ( t ) = 1 } [ ¬ ϕ ] w = [ ϕ ] w � � ♦ [ a,b ] ϕ w = [ ϕ ] w ⊖ [ a, b ] [ ϕ ∨ ψ ] w = [ ϕ ] w ∪ [ ψ ] w 9 / 40
Computation Theorem For any ϕ and w with finite variability, [ ϕ ] w is finite union of intervals ◮ Eventually operator: T ϕ T ⊖ [ a, b ] ♦ [ a,b ] ϕ t ◮ Worst-case complexity O ( | ϕ | ) 2 · | w | 10 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
x Example 0.2 0 q x ≤ 0 . 2 ↑ q � [0 , 5] x ≤ 0 . 2 ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2 � ( ↑ q → ♦ [0 , 5] � [0 , 5] x ≤ 0 . 2) t 0 5 11 / 40
Quantitative Semantics Robustness value � ϕ � w indicates how strongly ϕ is satisfied / violated by w ◮ Positive if satisfied / negative if violated ◮ Magnitude = conservative estimate of distance to satisfaction / violation boundary Definition (Robustness Signal) � x ≤ c � w = c − x w � ¬ ϕ � w = − � ϕ � w � � � ϕ � w ( t ′ ) ♦ [ a,b ] ϕ w = t �→ sup � ϕ ∨ ψ � w = max { � ϕ � w , � ψ � w } t ′ ∈ [ t + a,t + b ] 12 / 40
Outline 1. Preliminaries 2. Robustness Computation 3. Diagnostics 4. Regular Expressions Monitoring 5. Pattern-Based Measurements 6. Analog Measures in Digital Environment 7. Conclusion 12 / 40
Principle Theorem For any ϕ and w piecewise linear, � ϕ � w is piecewise linear ◮ Until rewrite rules preserve the robustness value ◮ Timed eventually computed using optimal streaming algorithm of (Lemire, 2006) adapted to variable-step sampling 13 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 2 • t + a t + b 14 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 1 • i 2 • i 3 • i 4 • t + a t + b 14 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 1 • i 2 • i 5 i 3 • • i 4 • t + a t + b 14 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 1 • i 2 • i 5 i 3 • • t + a t + b 14 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 1 • i 2 • i 5 • t + a t + b 14 / 40
Eventually Computation ◮ Problem: compute g ( t ) = sup t ′ ∈ [ t + a,t + b ] f ( t ′ ) ◮ Solution: take maximum of f at t + a, t + b and sampling points inside ( a, b ) f i 1 • i 2 • i 5 • t + a t + b 14 / 40
Recommend
More recommend