100 likes | 137 Views
Chapter 6: Real-Time Logic. Albert M. K. Cheng. Event-Action Model. Action: schedulable unit of work primitive or composite X;Y X||Y X!N !NY State predicate: assertion about state of the system Timing constraints. Event: temporal marker - 4 types
E N D
Chapter 6: Real-Time Logic Albert M. K. Cheng
Event-Action Model Action: schedulable unit of work primitive or composite X;Y X||Y X!N !NY State predicate: assertion about state of the system Timing constraints Event: temporal marker - 4 types external: cannot be cause by system start: begin action stop: end action transition: change in certain state attribute
Timing Constraints Periodic: while <state predicate> execute <action> with period = <time1> deadline = <time2> Sporadic: when <event> execute <action> with deadline = <time1> separation = <time2>
Non-Real-Time Temporal Logic Conventional temporal logic: concerns with relative ordering of events A;(B||C) means ABC or ACB Can model interleaving actions Cannot model parallel actions To deal with absolute timing, add clock variable: clock := clock + c, execute after every action Acceptable only if actions are executed in sequential order
Real-Time Logic 3 types of constants action in capital letters: primitive or composite (partial ordering of events) A.B B appears in composite action A start and stop events: ^A event marking the initiation of action A vA event marking the completion of action A ^A.B ^A.B2
Real-Time Logic Transition event constants: (S := T) (S := F) External event constants: omega BUTTON1 pressing button number 1 Integer constants: @(E,W) --> W E event, W nonnegative integer @(e,i) = time of the i-th occurrence of event e Timing property can be established by showing there does not exist an occurrence function which is consistent with the specification in conjunction with the negation of the safety property under investigation
Examples of RTL Formulas Forall i @(E,i) = t -> t >= 0 Forall i forall j [@(E,i) = t and @(E,j)=t‘ and i < j ] -> t < t‘ forall x @(TrainApproach, x) <= @(^Downgate, x) and @(vDowngate, x) <= @(TrainApproach, x) + 30 forall y @(^Downgate, y) + 15 <= @(vDowngate, y)
Example: Safety Assertion in RTL forall t forall u @(TrainApproach, t) + 45 <= @(Crossing, u) and @(Crossing,u)<@(TrainApproach, t) + 60 -> @(vDowngate, t) <= @(Crossing, u) and @(Crossing, u) <= @(vDowngate, t) + 45