Skip to main content

CAPH: A Language for Implementing Stream-Processing Applications on FPGAs

  • Chapter
  • First Online:

Abstract

We introduce CAPH, a new domain-specific language (DSL) suited to the implementation of stream-processing applications on field programmable gate arrays (FPGA). CAPH relies upon the actor/dataflow model of computation. Applications are described as networks of purely dataflow actors exchanging tokens through unidirectional channels. The behavior of each actor is defined as a set of transition rules using pattern matching. The CAPH suite of tools currently comprises a reference interpreter and a compiler producing both SystemC and synthetizable VHDL code. We describe the implementation, with a preliminary version of the compiler, of a simple real-time motion detection application on an FPGA-based smart camera platform. The language reference manual and a prototype compiler are available from http://wwwlasmea.univ-bpclermont.fr/Personnel/Jocelyn.Serot/caph.html.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   129.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    CAPH is a recursive acronym for Caph just Aint Plain Hdl. It is also the name of the second brightest star in the constellation of Cassiopeia.

  2. 2.

    In Fig. 1, streams are denoted (ordered) from right to left; for example, the actor ADD first processes the token 1, then the token 2, etc. Since streams are potentially infinite, their end is denoted “”. However, when describing actors textually, streams will be denoted from left to right; for example, ADD:1,2,…= 2,3,…

  3. 3.

    Pop the value from the connected FIFO.

  4. 4.

    The ’_’ symbol can also be used in the right-hand side of a rule; it then means that no value is produced on the corresponding output.

  5. 5.

    Synthesis of the generated VHDL code is carried using third-party tools; we currently use the altera Quartus II environment.

  6. 6.

    In the sequel, an instantiated actor will be called a box.

  7. 7.

    This evaluation takes place in an environment augmented with the bindings resulting from the corresponding firing action; for the sake of readability, environments have been left implicit here.

  8. 8.

    It operates by inspecting the general rule format of the actor.

  9. 9.

    Which is part of the compiler options.

  10. 10.

    Hence, pixels are actually encoded on 8 bits (+2 for control) and sums on 16 bits in this example.

  11. 11.

    Dedicated VHDL processes, transparent to the programmer, handle the insertion (resp. removal) of control tokens after (resp. before) the image date is read from (resp. written to) camera (resp. display).

  12. 12.

    It is possible to get rid of this FIFO by inserting a s1f (skip one frame) operator on the corresponding wire. In this case, the bounding boxes computed on frame number i are actually displayed on frame i + 1, which is acceptable if the objects do not move too quickly.

  13. 13.

    Programming these “dataflow computers” then meant writing the code of each DDP and configuring the network interconnections.

  14. 14.

    The dataflow computer described in [17] embedded 1024 DDPs, but it was a dedicated machine, not easily replicated.

References

  1. Chalimbaud P, Berry F (2007) Embedded active vision system based on an FPGA architecture. EURASIP J Embedded Syst 2007:26–26. URL http://dx.doi.org/10.1155/2007/35010

  2. Dahlin A, Ersfolk J, Yang G, Habli H, Lilius J (2009) The Canals language and its compiler. In: Proceedings of th 12th international workshop on software and compilers for embedded systems, SCOPES ’09, pp 43–52. ACM, New York, NY, USA. URL http://dl.acm.org/citation.cfm?id=1543820.1543829

  3. Frigo J, Gokhale M, Lavenier D (2001) Evaluation of the Streams-C C-to-FPGA compiler: an applications perspective. In: Proceedings of the 2001 ACM/SIGDA ninth international symposium on Field programmable gate arrays, FPGA ’01, pp 134–140. ACM, New York, NY, USA. URL http://doi.acm.org/10.1145/360276.360326

  4. Graph visualisation software. URL http://www.graphviz.org

  5. Grov G, Michaelson G (2010) Hume box calculus: robust system development through software transformation. High Order Symbol Comput 23:191–226. URL http://dx.doi.org/10.1007/s10990-011-9067-y

  6. Gupta S, Dutt N, Gupta R, Nicolau A (2003) Spark: A high-level synthesis framework for applying parallelizing compiler transformations. In: In international conference on VLSI design, pp 461–466

    Google Scholar 

  7. Hammond K, Michaelson G (2003) Hume: a domain-specific language for real-time embedded systems. In: Proceedings of the 2nd international conference on Generative programming and component engineering, GPCE ’03, pp 37–56. Springer, New York, Inc., New York, NY, USA. URL http://dl.acm.org/citation.cfm?id=954186.954189

  8. Handel-c language reference manual (2009) URL http://www.agilityds.com/literature/HandelC_Language_Reference_Manual.pdf

  9. Impulse accelerated technologies. URL http://www.impulsec.com

  10. Koren I, Mendelsom B, Peled I, Silberman GM (1988) A data-driven vlsi array for arbitrary algorithms. Computer 21:30–43. DOI 10.1109/2.7055. URL http://dl.acm.org/citation.cfm?id=50810.50813

    Google Scholar 

  11. Lee E, Messerschmitt D (1987) Synchronous data flow. Proc IEEE 75(9):1235–1245

    Article  Google Scholar 

  12. Lucarz C, Mattavelli M, Wipliez M, Roquier G, Raulet M, Janneck J, Miller I, Parlour D (2008) Dataflow/Actor-Oriented language for the design of complex signal processing systems. In: Proceedings of the 2008 conference on design and architectures for signal and image processing, DASIP 2008, pp 168–175

    Google Scholar 

  13. Mandel L, Plateau F, Pouzet M (2010) Lucy-n: a n-synchronous extension of Lustre. In: Tenth International conference on mathematics of program construction (MPC 2010). Québec, Canada. URL MandelPlateauPouzet-MPC-2010.pdf

  14. Najjar WA, Boehm W, Draper BA, Hammes J, Rinker R, Beveridge JR, Chawathe M, Ross C (2003) High-level language abstraction for reconfigurable computing. Computer 36:63–69. DOI http://doi.ieeecomputersociety.org/10.1109/MC.2003.1220583

    Google Scholar 

  15. Sérot J Caph language reference manual. URL http://wwwlasmea.univ-bpclermont.fr/Personnel/Jocelyn.Serot/caph.html

  16. Sérot J (2008) The semantics of a purely functional graph notation system. In: Trends in functional programming. Madrid, Spain. URL http://wwwlasmea.univ-bpclermont.fr/Personnel/Jocelyn.Serot/fgn.html

  17. Sérot J, Quénot GM, Zavidovique B (1993) Functional programming on a data-flow architecture: Applications in real time image processing. Int J Mach Vision Appl 7(1):44–56

    Article  Google Scholar 

  18. Sérot J, Quénot GM, Zavidovique B (1995) A visual dataflow programming environment for a real-time parallel vision machine. J Vis Lang Comput 6:327–347

    Article  Google Scholar 

  19. Vasell J, Vasell J (1992) The function processor: a data-driven processor array for irregular computations. Future Gener Comput Syst 8, 321–335. DOI 10.1016/0167-739X(92)90066-K. URL http://dl.acm.org/citation.cfm?id=140466.140484

  20. Yankova YD, Bertels K, Vassiliadis S, Kuzmanov G, Chaves R (2006) HLL-to-HDL generation: Results and challenges. In: Proceeding of ProRisc 2006

    Google Scholar 

  21. Yankova YD, Kuzmanov G, Bertels K, Gaydadjiev GN, Lu Y, Vassiliadis S (2007) Dwarv: Delftworkbench automated reconfigurable vhdl generator. In: Proceedings of the 17th International conference on field programmable logic and applications (FPL07), pp 697–701

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Jocelyn Sérot .

Editor information

Editors and Affiliations

1 Appendix 1: Code Generated by the VHDL Back End for the suml Actor

2 Appendix 2: Code Generated by the SystemC Back End for the suml Actor

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer Science+Business Media, LLC

About this chapter

Cite this chapter

Sérot, J., Berry, F., Ahmed, S. (2013). CAPH: A Language for Implementing Stream-Processing Applications on FPGAs. In: Athanas, P., Pnevmatikatos, D., Sklavos, N. (eds) Embedded Systems Design with FPGAs. Springer, New York, NY. https://doi.org/10.1007/978-1-4614-1362-2_9

Download citation

  • DOI: https://doi.org/10.1007/978-1-4614-1362-2_9

  • Published:

  • Publisher Name: Springer, New York, NY

  • Print ISBN: 978-1-4614-1361-5

  • Online ISBN: 978-1-4614-1362-2

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics