180 likes | 448 Views
The BIP framework. Ananda Basu, Joseph Sifakis, Marius Bozga VERIMAG. Overview. Create the system hierarchy (from Atoms to Compounds) Describe the atomic components’ behavior and the architecture (connectors and priorities) in BIP
E N D
The BIP framework Ananda Basu, Joseph Sifakis, Marius Bozga VERIMAG
Overview • Create the system hierarchy (from Atoms to Compounds) • Describe the atomic components’ behavior and the architecture (connectors and priorities) in BIP • Generate from the BIP description platform specific code (C++ code) • Run execution or state space exploration • Results : execution trace or state-space graph
Modeling flow: BIP Model BIP compiler Execution Trace BIP Platform specific code State Space graph Platform
BIP Syntax :Atomic Component component name ( arg1, arg2…) ports p1,p2, … data type1 x,y,z; type2 u,v,w;… behavior state s1 on p1 provided g1 when (t1, d) do f1 to s1’ ……………… …… on pn provided gn when (tn, d) do fn to sn’ state s2 on ….. end end
Problem 1: “Pay Bursts Only Once” Bursty Event-Stream: Period = 10 Jitter = 50 Min. Interarrival Dist. = 1 CPU2 CPU3 CPU1 T1 T2 T3 WCED = 8 WCED = 4 WCED = 1 End-to-end Delay?
Case study : Problem 1Component Task: Task get count++ tick get finish READY finish, [delay<= WCET ] d start, (count>0) count--, delay:=0 EXEC tick delay++ get count++ tick
Case study : Problem 1 BIP code snippet for a Task component Task (int wcet) port get, start, tick, finish data {# int count, delay; #} … init {# count = 0; WCET = wcet; … #} behavior state READY on get do {# count++; #} to READY on start provided {# count > 0 #} do {# count--; delay = 0; #} to EXEC on tick to READY state EXEC on get do {# count++; #} to EXEC on finish when ({# delay <= WCET #}, delayable) to READY on tick do {# delay++; #} to EXEC end … end
Burst Input Stream Generator go tick get get finish get finish finish tick tick tick Case study : Problem 1Composition in BIP glue T1 T2 T3 EvntT1 T1T2 T2T3 Tick System
Case study : Problem 1 BIP code snippet for Task Composition component System contains Launcher BurstStreamGen(10, 5, 1) contains Task T1(8), T2(4), T3(1) connector Tick = BurstStreamGen.tick, T1.tick, T2.tick, T3.tick behavior end connector EvntT1 = BurstStreamGen.go, T1.get behavior end … priority // start < get ( no event losses ) getStart1 T1.Start : T1.start < EvntT1 : T1.get … priority // finish < get ( no event losses ) getFin1 T1T2 : T1.finish < EvntT1 : T1.get … priority // ( tick < finish ) getTick2 if (T1.delay == T1.WCET) Tick : T2.tick < T1T2 : T1.finish …
Case study :Problem 2 Bursty Event-Stream: Period = 10 Jitter = 50 Min. Interarrival Dist. = 1 Preemptive Fixed-Priority Scheduling. (T1 has higher priority than T3) CPU2 CPU1 T1 T2 End-to-end Delay? WCED = 4 WCED = 8 T3 WCED = 1
Case study : Problem 2Behavior & Architecture def Task(preemptable) get count++ preempt tick get READY resume start, (count>0) count--, delay=0 finish, [delay<= WCET] d tick preempt finish EXEC SUSPEND tick delay++ resume get count++ get count++ tick
Case study : Problem 2Composition in BIP glue tick tick tick get go finish get finish Burst Stream Generator T1 T2 resume preempt start start preempt resume finish T3 get tick Priorities : T3 < T1 System
ai-1 ai y x i … i+1 i+k Burst Event Stream Generator in BIP x := 0 y := 0 k := 0 tick, x++ y++ RUN period, [ x = T ] x := 0 k := k+1 go [k 0 x + k T J y d] y := 0, k :=k-1 tick go
Results : Max End-to-End Delays (Measured using an Observer Component)
Summary • Strengths • Modeling of heterogeneous systems: Event and Data driven, Untimed and Timed, Synchronous and asynchronous • Reusability: existing components can be combined to generate complex components using platform glue • Incremental modeling • Flexibility due to the combination between interactions and priorities • Limitations • Restrictions of computational approaches, eg state-space explosion, unable to compute average values.