Mapping CSP Models to Hardware using CLaSH Frist Kuipers, Rinse - - PowerPoint PPT Presentation

mapping csp models to hardware using clash
SMART_READER_LITE
LIVE PREVIEW

Mapping CSP Models to Hardware using CLaSH Frist Kuipers, Rinse - - PowerPoint PPT Presentation

Mapping CSP Models to Hardware using CLaSH Frist Kuipers, Rinse Wester, Jan Kuper & Jan Broenink University of Twente, Enschede 2016, August 23 1 Contents Introduction CLaSH CSP constructs Results Conclusions 2


slide-1
SLIDE 1

2016, August 23

Mapping CSP Models to Hardware using CLaSH

Frist Kuipers, Rinse Wester, Jan Kuper & Jan Broenink University of Twente, Enschede

1

slide-2
SLIDE 2

Contents

✤ Introduction ✤ CLaSH ✤ CSP constructs ✤ Results ✤ Conclusions

2

slide-3
SLIDE 3

Introduction

✤ Embedded system design more complicated ✤ Increase in number of requirements ✤ Model-Driven Design (MDD)

3

slide-4
SLIDE 4

Introduction

4

CPU FPGA Sensors Actuators

slide-5
SLIDE 5

CLaSH

✤ Functional Hardware Description Language (Haskell) ✤ Structural description of hardware ✤ Components based on Mealy-machine

5

slide-6
SLIDE 6

CLaSH

6

mealy s i = (s’, o) where (o, s’) = f s i

( )

i f

  • s

s′

slide-7
SLIDE 7

CLaSH

7

mac s (a, b) = (s’, out) where

  • utput = s’

s’ = s + a * b

a b × + c s s′

slide-8
SLIDE 8

CSP constructs in CLaSH

✤ Components with trigger tokens ✤ Three basic CSP constructs ✤ Parallel ✤ Sequential ✤ Channels

8

Comp

slide-9
SLIDE 9

Parallel construct

9

parallel’ (te, ti1, ti2) (tei, tii1, tii2) = ((tei, ti1r, ti2r), (teo, tio1, tio2)) where

  • - Return token when both are received

teo = ti1 && ti2

  • - Only consume token one when both received

ti1r = ti1 && ti2 ti2r = ti1 && ti2

  • - Return token to both structures in parallel

tio1 = te tio2 = te

PAR P Q

tio1 tio2 tii1 tii2 tei teo

slide-10
SLIDE 10

Sequential construct

10

sequential tei tii = (teo, tio) where teo = register False tii tio = register False tei

SEQ Q P

tio tii tei teo

slide-11
SLIDE 11

Channels

11

circuit (val_in, tkn_in_writer, tkn_in_reader) = (val_out, tkn_out_writer, tkn_out_reader) where (value, writer_ready, tkn_out_) = writer (val_in, success, tkn_in_writer) (success, value, writer_ready) = channel (success, value, writer_ready) (val_out, tkn_out_reader, succes) = reader (value, writer_ready, tkn_in_reader)

! channel ?

token t token token t token vi value value s success success value value vi writer ready writer ready

slide-12
SLIDE 12

Work flow

12

CSP model Data-flow diagram CλaSH Description VHDL Realisation (RaMstix) Timing diagram Timing diagram

Translation by hand TERRA M2T Translation by hand CλaSH compiler Quartus synthesis GHC simulation Modelsim

slide-13
SLIDE 13

Results

✤ Two examples implemented ✤ Single reader and writer ✤ Double reader and writer

13

slide-14
SLIDE 14

Double reader/writer

14

slide-15
SLIDE 15

Double reader/writer

15

clock Injected token - ti Input writer 0 - vi

1

Input writer 1 - vi

2

Channel 0 value - cOut0

Nothing 1 Nothing

Channel 1 value - cOut1

Nothing 2 Nothing

Success 0 - s0 Success 1 - s1 Output value 0 - rOut0

Nothing 1

Output value 1 - rOut1

Nothing 2

slide-16
SLIDE 16

Hardware results

16

Example Logic Elements Producer consumer 23 Double producer consumer 37

slide-17
SLIDE 17

Conclusion

✤ Mapping for CSP to FPGA developed ✤ Feasibility illustrated using examples

17

slide-18
SLIDE 18

Future work

✤ Integration in TERRA tool ✤ Support for alt construct

18

slide-19
SLIDE 19

Questions?

19