Syntroids
Synthesizing a Game for FPGAs using Temporal Logic Specifications
Gideon Geier, Philippe Heim, Felix Klein and Bernd Finkbeiner 24th October 2019
Saarland University
OSARES
Syntroids Synthesizing a Game for FPGAs using Temporal Logic - - PowerPoint PPT Presentation
Syntroids Synthesizing a Game for FPGAs using Temporal Logic Specifications Gideon Geier, Philippe Heim , Felix Klein and Bernd Finkbeiner 24th October 2019 Saarland University OSARES Reactive Synthesis What requirements temporal
Gideon Geier, Philippe Heim, Felix Klein and Bernd Finkbeiner 24th October 2019
Saarland University
OSARES
Syntroids, Philippe Heim, Gideon Geier
2
Syntroids, Philippe Heim, Gideon Geier
3
Syntroids, Philippe Heim, Gideon Geier
4
Syntroids, Philippe Heim, Gideon Geier
5
32×32 LED matrix Accelerometer + Gyroscope
Syntroids, Philippe Heim, Gideon Geier
6
Syntroids, Philippe Heim, Gideon Geier
7
”100 < ” sensor → score ”1 + ” score
Syntroids, Philippe Heim, Gideon Geier
8
”100 < ” sensor → score ”1 + ” score
Syntroids, Philippe Heim, Gideon Geier
8
inputs: I cells: C
O reactive system implementing a TSL specification ϕ
. . . . . . . . . . . .
Computer Aided Verification - 31th International Conference, CAV 2019, New York, NY, USA, July 15-18, 2019, Proceedings, Part I, 2019. Available: https://doi.org/10.1007/978-3-030-25540-4_3
9
SPI Sensor Submodule Chooser Sensor Sensor Selector Sensor Init Sensor Part (ACC) Sensor Part (GYRO) SPI Write Manager SPI Write CLK SPI Write SDI SPI Read Manager SPI Read CLK SPI Read SDI RegManager SensorRegister (REG A X) SensorRegister (REG G Z) SensorRegister (REG G X) SensorRegister (REG G Y) RotationCalculator GameModeChooser ActionConverter GameLogic ScoreBoard GameModule EnemyModule EnemyModule EnemyModule EnemyModule RadarBoard CockpitBoard LookupTable (cosine) LookupTable (sine) LedMatrix Video Memory InitialBlocker
spiPins csIn sdiIn spcIn readResponse cs readControl counter address spc readSpiPins sdi writeResponse cs writeControl counter address byte sdi spc writeSpiPins spiResponse spiControl sensorType startInit initFinished regManagerCmdInit sensorInit spiControlInit startAcc accFinished regManagerCmdAcc sensorAcc spiControlAcc startGyr gyrFinished regManagerCmdGyr sensorGyr spiControlGyr regManagerCmd regData regType gyroy gyrox gyroz accz gamemode gamestart shot scorecolor score gameover rotation color angle radius clock resetangle reset color angle radius clock resetangle reset color angle radius clock resetangle reset color angle radius clock resetangle reset enemies resets moveticks ramreqcosine ramcosineout ramreqsine ramsineout color bxcoord bycoord cockpitboardpoint gameover actcolor bxcoord bycoord scoreboardpoint color
radarboardpoint xcoordinate ycoordinate writecolor
write rampos ramwrite ramout sdo csAG csAlt sdi spc bufferPin color1 color2 coordy driverPin extclock
Sensor IO Game logic LED matrix Output
Syntroids, Philippe Heim, Gideon Geier
10
SPI Sensor Submodule Chooser Sensor Sensor Selector Sensor Init Sensor Part (ACC) Sensor Part (GYRO) SPI Write Manager SPI Write CLK SPI Write SDI SPI Read Manager SPI Read CLK SPI Read SDI RegManager SensorRegister (REG A X) SensorRegister (REG G Z) SensorRegister (REG G X) SensorRegister (REG G Y) RotationCalculator GameModeChooser ActionConverter GameLogic ScoreBoard GameModule EnemyModule EnemyModule EnemyModule EnemyModule RadarBoard CockpitBoard LookupTable (cosine) LookupTable (sine) LedMatrix Video Memory InitialBlocker
spiPins csIn sdiIn spcIn readResponse cs readControl counter address spc readSpiPins sdi writeResponse cs writeControl counter address byte sdi spc writeSpiPins spiResponse spiControl sensorType startInit initFinished regManagerCmdInit sensorInit spiControlInit startAcc accFinished regManagerCmdAcc sensorAcc spiControlAcc startGyr gyrFinished regManagerCmdGyr sensorGyr spiControlGyr regManagerCmd regData regType gyroy gyrox gyroz accz gamemode gamestart shot scorecolor score gameover rotation color angle radius clock resetangle reset color angle radius clock resetangle reset color angle radius clock resetangle reset color angle radius clock resetangle reset enemies resets moveticks ramreqcosine ramcosineout ramreqsine ramsineout color bxcoord bycoord cockpitboardpoint gameover actcolor bxcoord bycoord scoreboardpoint color
radarboardpoint xcoordinate ycoordinate writecolor
write rampos ramwrite ramout sdo csAG csAlt sdi spc bufferPin color1 color2 coordy driverPin extclock
Syntroids, Philippe Heim, Gideon Geier
10
cockpitboardpoint radarboardpoint
Syntroids, Philippe Heim, Gideon Geier
11
color1 ramout R ¬extclock high() ) able
Video Memory InitialBlocker
xcoordinate ycoordinate writecolor
write rampos ramwrite ramout bufferPin color1 color2 coordy driverPin extclock Syntroids, Philippe Heim, Gideon Geier
12
able
Video Memory InitialBlocker
xcoordinate ycoordinate writecolor
write rampos ramwrite ramout bufferPin color1 color2 coordy driverPin extclock Syntroids, Philippe Heim, Gideon Geier
13
color1 ramout R ¬extclock high() ))
extclock high() R ¬coordx ”1 + ” coord ))
Syntroids, Philippe Heim, Gideon Geier
14
spiResponse startAcc accFinished regManagerCmdAcc sensorAcc spiControlAcc startGyr gyrFinished regManagerCmdGyr sensorGyr spiControlGyr
Syntroids, Philippe Heim, Gideon Geier
15
Syntroids, Philippe Heim, Gideon Geier
16
TSL CFM
Synthesis LTL Controller TSL Tools Project Context Compiler LTL Synthesis Tool maybe unrealizable FRP (CλaSH) Design Pattern CλaSH Verilog Functions and Predicates FRP Library (CλaSH)
✓ ✗
Syntroids, Philippe Heim, Gideon Geier
17
Syntroids, Philippe Heim, Gideon Geier
18
”100 < ” sensor → score ”1 + ” score
Syntroids, Philippe Heim, Gideon Geier
19
TSL CFM
Synthesis LTL Controller TSL Tools Project Context Compiler LTL Synthesis Tool maybe unrealizable FRP (CλaSH) Design Pattern CλaSH Verilog Functions and Predicates FRP Library (CλaSH)
✓ ✗
Syntroids, Philippe Heim, Gideon Geier
20
Syntroids, Philippe Heim, Gideon Geier
21
TSL CFM
Synthesis LTL Controller TSL Tools Project Context Compiler LTL Synthesis Tool maybe unrealizable FRP (CλaSH) Design Pattern CλaSH Verilog Functions and Predicates FRP Library (CλaSH)
✓ ✗
Syntroids, Philippe Heim, Gideon Geier
22
Syntroids, Philippe Heim, Gideon Geier
23
handmade completely synthesized Sensor IO Game logic LED matrix Output
Sensor IO Game logic LED matrix Output
Syntroids, Philippe Heim, Gideon Geier
24
Module G A Bosy Bowser Strix Time Lat Gat Time Lat Gat Time Lat Gat ActionConverter (AC) 4 0.316 1 8 4.384 4 1.192 4 Cockpitboard (CB) 12 1548.48 1 11 227.136 7 6.512 7 EnemyModule (EM) 4 0.272 1 6 0.904 2 1.196 2 Gamelogic (GL) 21 > 99999
2 226 696.288 2 29 GamemodeChooser (GC) 7 4 111.072 1 100 13247.0 2377 2.164 1 35 Gamemodule (GM) 3 3 0.328 1 10 1.056 3 1.288 1 11 LedMatrix (LM) 27 1 > 99999
5 101 Radarboard (RB) 13 41319.2 1 10 26.448 6 79.376 6 RegisterManager (RM) 5 0.292 1 4 0.164 1.084 RotationCalculator (RC) 5 3 1.324 1 18 8045.37 9 1.66 1 22 SPI (SPI) 15 2 > 99999
3 413 3.608 3 72 SPIReadClk (SPIR) 2 0.272 1 4 0.348 2 1.168 2 SPIReadManag (SPIR) 11 2 3497.26 1 31 11821.0 1 10 14.684 2 27 SPIReadSdi (SPIR) 2 2 0.304 1 5 0.844 1 1.36 1 5 SPIWriteClk (SPIW) 2 0.276 1 6 3.628 4 1.196 4 SPIWriteManag (SPIW) 9 4 196.808 1 6 61.704 1 6 2.22 1 6 SPIWriteSdi (SPIW) 3 5 0.396 1 15 12.536 4 1.3 1 11 Scoreboard (SB) 7 1.26 1 8 15.576 4 1.516 4 Sensor (Sen) 6 4 7429.74 2 29 > 99999
4 70 SensorInit (Sen) 14 159.076 4 95 6613.8 4 84 3.676 4 46 SensorPart (Sen) 18 1985.21 3 34 12224.9 3 64 13.864 3 30 SensorRegister (RM) 1 0.292 1 2 0.048 1.188 SensorSelector (SS) 5 4 > 99999
277.288 1 17 SensorSubmodulChooser (Sen) 5 6 766.084 2 44 13007.8 2 369 3.176 3 39
25
might lead to mistakes
Syntroids, Philippe Heim, Gideon Geier
26
Syntroids, Philippe Heim, Gideon Geier
27
Syntroids, Philippe Heim, Gideon Geier
28