Making system composition flexible, automatic, safe, practical. . .
(but not always at the same time) Stephen Kell
Stephen.Kell@cl.cam.ac.uk
Making systems composition. . . – p.1/29
Making system composition flexible, automatic, safe, practical. . . - - PowerPoint PPT Presentation
Making system composition flexible, automatic, safe, practical. . . (but not always at the same time) Stephen Kell Stephen.Kell@cl.cam.ac.uk Making systems composition. . . p.1/29 Introduction and running order An informal and incomplete
(but not always at the same time) Stephen Kell
Stephen.Kell@cl.cam.ac.uk
Making systems composition. . . – p.1/29
2 minutes each on Yiannis, Henry, Tope, Aisha, Behzad
Making systems composition. . . – p.2/29
Making systems composition. . . – p.3/29
Making systems composition. . . – p.4/29
Making systems composition. . . – p.5/29
Making systems composition. . . – p.6/29
Making systems composition. . . – p.7/29
Making systems composition. . . – p.8/29
stream consumer tuple producer tuple space tuple-stream adapter take_contiguous(n)
map project #2; flatten
tuple space
(20, b100101…) (21, b011000…) (22, b111010…) (24, b000110…) …
read
Making systems composition. . . – p.9/29
// simplified Knit-esque syntax with added adaptation features unit myTupSpc { exports [ prod { (int, bit list) in_ordered() }, cons { void
files { obj_elf("C", tuplespace.o) } } unit myTupleProducer { imports [ dest { void output(bit list, int) } ]; exports [ /* ... */ ]; files { obj_elf("C", tupleprod.o) } } unit myStreamConsumer { imports [ streamProvider { int read(byte addr, int) } ]; exports [ /* ... */ ]; files { obj_elf("C", streamcons.o) } }
Making systems composition. . . – p.10/29
unit takeContiguous { imports [ source { (int, bit list) in_monotonic() } ]; exports [ listProvider { (int, bit list) list get() } ]; files { obj_elf("C", take_contig.o) } } unit Process { exports [ /* ... */ ]; link exec_elf("process") { myTupleProducer.dest <- myTupSpc.cons { output(a, b) <- out(b, a) } takeContiguous.source <- myTupSpc.prod { in_monotonic <- in_ordered } myStreamConsumer.streamProvider <- { read <- flatten(map (project #2), takeContiguous.listProvider.get) } } }
Making systems composition. . . – p.11/29
Making systems composition. . . – p.12/29
Making systems composition. . . – p.13/29
Making systems composition. . . – p.14/29
H2 Source Verilog Source IMP Microcode CIL .net assembler VM btyecode MULTI-FORMAT SIMULATOR Waveform VCD TRACES SSMG Imperative Code Assertions RTL Gate Compiler H/W Synthesis Assertions Imperative Code Verilog Netlist IMP Microcode C/C++ SystemC Stimulus Generator H2 TOOL Microcode Compiler RTL+Bev Verilog Temporal Logic Compiler Convert to C
Making systems composition. . . – p.15/29
Making systems composition. . . – p.16/29
Making systems composition. . . – p.17/29
Making systems composition. . . – p.18/29
Making systems composition. . . – p.19/29
Making systems composition. . . – p.20/29
def bundle PioneerDvd() { input devices#keypad#now : { Stop : Play Pause Eject Tfwd Trwd};
input parts#mech#stat#track : {0..99}; input parts#mech#stat#sec : {0..59}; input parts#mech#stat#min : {0..99}; input parts#mech#stat#idx : {0..99};
Making systems composition. . . – p.21/29
with devices#keypad if (#now == stop) { #(playled, pauseled, stopled) := (0,0,1); works#cmd := stop; } else if (#now == play) { #(playled, pauseled, stopled) := (1,0,0); works#cmd := play; } else if (#now == pause) { // This bit is not idempotent - expect a compile time warning! if (works#cmd == play) { #(playled, pauseled, stopled) := (1,1,0); works#cmd := pause; } else { #(playled, pauseled, stopled) := (1,0,0); works#cmd := play; } }
Making systems composition. . . – p.22/29
Making systems composition. . . – p.23/29
Making systems composition. . . – p.24/29
Making systems composition. . . – p.25/29
Making systems composition. . . – p.26/29
Making systems composition. . . – p.27/29
Making systems composition. . . – p.28/29
Making systems composition. . . – p.29/29