Abstract
Software-defined radio (SDR) promises to bring the flexibility and rapid iterative workflow of software to radio protocol design. Many factors make achieving this promise challenging, not least of which are the high data rates and timing requirements of real-world radio protocols. The Ziria language and accompanying compiler demonstrated that a high-level language can compete in this demanding space, but extracting reusable lessons from this success is difficult due to Ziria's lack of a formal semantics. Our first contribution is a core language, operational semantics, and type system for Ziria.
The insight we gained through developing this operational semantics led to our second contribution, consisting of two program transformations. The first is fusion, which can eliminate intermediate queues in Ziria programs. Fusion subsumes many one-off optimizations performed by the original Ziria compiler. The second transformation is pipeline coalescing, which reduces execution overhead by batching IO. Pipeline coalescing relies critically on fusion and provides a much simpler story for the original Ziria compiler's "vectorization" transformation. These developments serve as the basis of our third contribution, a new compiler for Ziria that produces significantly faster code than the original compiler. The new compiler leverages our intermediate language to help eliminate unnecessary memory traffic.
As well as providing a firm foundation for the Ziria language, our work on an operational semantics resulted in very real software engineering benefits. These benefits need not be limited to SDR---the core language and accompanying transformations we present are applicable to other domains that require processing streaming data at high speed.
Supplemental Material
Available for Download
This zip file contains a VMWare appliance loaded with the software described in the paper along with instructions for running the appliance.
- E. A. Ashcroft and W. W. Wadge. 1977. Lucid, a Nonprocedural Language with Iteration. Commun. ACM 20, 7 (July 1977), 519–526. Google Scholar
Digital Library
- Horia Vlad Balan, Marcelo Segura, Suvil Deora, Antonios Michaloliakos, Ryan Rogalin, Konstantinos Psounis, and Giuseppe Caire. 2013. USC SDR, an Easy-to-Program, High Data Rate, Real Time Software Radio Platform. In Proceedings of the Second Workshop on Software Radio Implementation Forum (SRIF ’13). Hong Kong, 25–30. Google Scholar
Digital Library
- Manu Bansal, Jeffrey Mehlman, Sachin Katti, and Philip Levis. 2012. OpenRadio: A Programmable Wireless Dataplane. In Proceedings of the First Workshop on Hot Topics in Software Defined Networks (HotSDN ’12). Helsinki, Finland, 109–114. Google Scholar
Digital Library
- Gerard Berry and Georges Gonthier. 1992. The Esterel Synchronous Programming Language: Design, Semantics, Implementation. Science of Computer Programming 19, 2 (1992), 87–152. Google Scholar
Digital Library
- Eric Blossom. 2004. GNU Radio: Tools for Exploring the Radio Frequency Spectrum. Linux Journal 2004, 122 (June 2004), 4. https://www.linuxjournal.com/article/7319Google Scholar
Digital Library
- Magnus Carlsson and Thomas Hallgren. 1998. Fudgets - Purely Functional Processes with Applications to Graphical User Interfaces. Ph.D. Dissertation. Chalmers University of Technology, Göteborg, Sweden.Google Scholar
- Paul Caspi and Marc Pouzet. 1995. A Functional Extension to Lustre. In Eighth International Symposium on Languages for Intentional Programming (ISLIP ’95), Mehmet A. Orgun and Edward A. Ashcroft (Eds.). World Scientific, Sydney, Australia.Google Scholar
- James Chacko, C. Sahin, Danh Nguyen, Doug Pfeil, Nagarajan Kandasamy, and Kapil Dandekar. 2014. FPGA-Based Latency-Insensitive OFDM Pipeline for Wireless Research. In Proceedings of the 2014 IEEE Conference on High Performance Extreme Computing Conference (HPEC ’14). Waltham, MA, 1–6. Google Scholar
Cross Ref
- Antony Courtney and Conal Elliott. 2001. Genuinely Functional User Interfaces. In Proceedings of the 2001 ACM SIGPLAN Haskell Workshop (HW ’01). Firenze, Italy.Google Scholar
- Duncan Coutts, Roman Leshchinskiy, and Don Stewart. 2007. Stream Fusion: From Lists to Streams to Nothing at All. In Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming (ICFP ’07). Freiburg, Germany, 315–326. Google Scholar
Digital Library
- Frédéric de Mesmay. 2010. On the Computer Generation of Adaptive Numerical Libraries. Ph.D. Dissertation. Electrical and Computer Engineering, Carnegie Mellon University.Google Scholar
- Danny Dubé and Marc Feeley. 2005. BIT: A Very Compact Scheme System for Microcontrollers. Higher-Order and Symbolic Computation 18, 3 (Dec. 2005), 271–298. Google Scholar
Digital Library
- Aveek Dutta, Dola Saha, Dirk Grunwald, and Douglas Sicker. 2013. CODIPHY: Composing on-Demand Intelligent Physical Layers. In Proceedings of the Second Workshop on Software Radio Implementation Forum (SRIF ’13). Hong Kong, 1–8. Google Scholar
Digital Library
- Ettus Research. 2017. Ettus Research, USRP: Universal Software Radio Peripheral. (Feb. 2017). http://www.ettus.com/Google Scholar
- Matthias Felleisen. 1987. The Calculi of Lambdaν -CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. Ph.D. Dissertation. Indiana University, Indianapolis, IN.Google Scholar
- Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. 2009. Semantics Engineering with PLT Redex. The MIT Press, Cambridge, MA.Google Scholar
- Franz Franchetti, Markus Püschel, Yevgen Voronenko, Srinivas Chellappa, and José M. F. Moura. 2009. Discrete Fourier Transform on Multicore. IEEE Signal Processing Magazine 26, 6 (Nov. 2009), 90–102. Google Scholar
Cross Ref
- Matteo Frigo. 1999. A Fast Fourier Transform Compiler. In Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI ’99). Atlanta, Georgia, 169–180. Google Scholar
Digital Library
- Thierry Gautier, Paul Le Guernic, and Loïc Besnard. 1987. SIGNAL: A Declarative Language for Synchronous Programming of Real-Time Systems. In Proceedings of Functional Programming Languages and Computer Architecture (FPCA ’87), Gilles Kahn (Ed.). Number 274 in Lecture Notes in Computer Science. Springer, Portland, Oregon, 257–277. Google Scholar
Cross Ref
- Andrew Gill, John Launchbury, and Simon L. Peyton Jones. 1993. A Short Cut to Deforestation. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture (FPCA ’93). ACM, Copenhagen, Denmark, 223–232. Google Scholar
Digital Library
- Nicholas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The Synchronous Data Flow Programming Language Lustre. Proc. IEEE 79, 9 (Sept. 1991), 1305–1320. Google Scholar
Cross Ref
- G. W. Hamilton. 2001. Extending Higher-Order Deforestation: Transforming Programs to Eliminate Even More Trees. In Selected Papers from the 3rd Scottish Functional Programming Workshop (SFP ’01), Kevin Hammond and Sharon Curtis (Eds.). Intellect Books, Exeter, UK, 25–36. http://dl.acm.org/citation.cfm?id=644403.644407Google Scholar
- John Hughes. 2000. Generalising Monads to Arrows. Science of Computer Programming 37, 1–3 (May 2000), 67–111. Google Scholar
Digital Library
- IEEE. 2012. IEEE Standard for Information Technology—Telecommunications and Information Exchange between Systems Local and Metropolitan Area Networks—Specific Requirements Part 11: Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications. IEEE Std 802.11-2012 (Revision of IEEE Std 802.11-2007) (March 2012). Google Scholar
Cross Ref
- Patricia Johann. 2001. Short Cut Fusion: Proved and Improved. In Proceedings of the 2nd International Workshop on Semantics, Applications, and Implementation of Program Generation (SAIG ’01). Lecture Notes in Computer Science, Vol. 2196. Springer-Verlag, Florence, Italy, 47–71. Google Scholar
Cross Ref
- Geoffrey Mainland. 2017. A Domain-Specific Language for Software-Defined Radio. In Proceedings of the 19th International Symposium on Practical Aspects of Declarative Languages (PADL ’17). Lecture Notes in Computer Science, Vol. 10137. Springer International Publishing, Paris, France, 173–188. Google Scholar
Cross Ref
- Geoffrey Mainland, Roman Leshchinskiy, and Simon Peyton Jones. 2013. Exploiting Vector Instructions with Generalized Stream Fusion. In Proceedings of the 18th ACM SIGPLAN International Conference on Functional Programming (ICFP ’13). Boston, MA, 37–48. Google Scholar
Digital Library
- Simon Marlow and Philip Wadler. 1993. Deforestation for Higher-Order Functions. In Proceedings of the 1992 Glasgow Workshop on Functional Programming (Workshops in Computing). Springer-Verlag, Ayr, Scotland, 154–165. Google Scholar
Cross Ref
- Patrick Murphy, Ashnu Sabharwal, and Behnaam Aazhang. 2006. Design of WARP: A Flexible Wireless Open-Access Research Platform. In Proceedings of the 14th European Signal Processing Conference (EUSIPCO ’06). Florence, Italy.Google Scholar
- Man Cheuk Ng, Kermin Elliott Fleming, Mythili Vutukuru, Samuel Gross, Arvind, and Hari Balakrishnan. 2010. Airblue: A System for Cross-Layer Wireless Protocol Development. In Proceedings of the 6th ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS ’10). La Jolla, CA, 4:1–4:11. Google Scholar
Digital Library
- Rishiyur S. Nikhil. 2008. Bluespec: A General-Purpose Approach to High-Level Synthesis Based on Parallel Atomic Transactions. In High-Level Synthesis, Philippe Coussy and Adam Morawiec (Eds.). Springer Netherlands, 129–146. Google Scholar
Cross Ref
- Simon L. Peyton Jones and Philip Wadler. 1993. Imperative Functional Programming. In Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’93). ACM, Charleston, South Carolina, 71–84. Google Scholar
Digital Library
- Markus Püschel, José M. F. Moura, Jeremy Johnson, David Padua, Manuela Veloso, Bryan Singer, Jianxin Xiong, Franz Franchetti, Aca Gacic, Yevgen Voronenko, Kang Chen, Robert W. Johnson, and Nicholas Rizzolo. 2005. Spiral: Code Generation for DSP Transforms. Proc. IEEE 93, 2 (Feb. 2005), 232–275. Google Scholar
Cross Ref
- T. Rondeau, Nicholas McCarthy, and Timothy O’Shea. 2013. SIMD Programming in GNURadio: Maintainable and User-Friendly Algorithm Optimization with VOLK. In Proceedings of SDR-WInnComm 2013. Washington, D.C.Google Scholar
- Sora Core Team and Kun Tan. 2012. Brick Specification. Technical Report MSR-TR-2012-26. Microsoft Research.Google Scholar
- Gordon Stewart, Mahanth Gowda, Geoffrey Mainland, Bozidar Radunovic, Dimitrios Vytiniotis, and Cristina Luengo Agulló. 2015. Ziria: An Optimizing Compiler for Wireless PHY Programming. In Proceedings of the 20th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’15). Istanbul, Turkey. Google Scholar
Digital Library
- Gordon Stewart, Dimitrios Vytiniotis, Geoffrey Mainland, Bozidar Radunovic, and Edsko de Vries. 2016. Ziria. (April 2016). https://github.com/dimitriv/Ziria Version 85cc34db.Google Scholar
- Josef Svenningsson. 2002. Shortcut Fusion for Accumulating Parameters & Zip-like Functions. In Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming (ICFP ’02). ACM, Pittsburgh, PA, 124–132. Google Scholar
Digital Library
- Akihiko Takano and Erik Meijer. 1995. Shortcut Deforestation in Calculational Form. In Proceedings of the Seventh International Conference on Functional Programming and Computer Architecture (FPCA ’95). La Jolla, CA, 306–313. Google Scholar
Digital Library
- Kun Tan, Jiansong Zhang, Ji Fang, He Liu, Yusheng Ye, Shen Wang, Yongguang Zhang, Haitao Wu, Wei Wang, and Geoffrey M. Voelker. 2009. Sora: High Performance Software Radio Using General Purpose Multi-Core Processors. In Proceedings of the 6th USENIX Symposium on Networked Systems Design and Implementation (NSDI ’09). Boston, MA, 75–90.Google Scholar
Digital Library
- Michael Bedford Taylor, Jason Kim, Jason Miller, David Wentzlaff, Fae Ghodrat, Ben Greenwald, Henry Hoffman, Paul Johnson, Jae-Wook Lee, Walter Lee, Albert Ma, Arvind Saraf, Mark Seneski, Nathan Shnidman, Volker Strumpen, Matt Frank, Saman Amarasinghe, and Anant Agarwal. 2002. The Raw Microprocessor: A Computational Fabric for Software Circuits and General-Purpose Programs. IEEE Micro 22, 2 (March 2002), 25–35. Google Scholar
Digital Library
- William Thies and Saman Amarasinghe. 2010. An Empirical Characterization of Stream Programs and Its Implications for Language and Compiler Design. In Proceedings of the 19th International Conference on Parallel Architectures and Compilation Techniques (PACT ’10). ACM, Vienna, Austria, 365–376. Google Scholar
Digital Library
- William Thies, Michal Karczmarek, and Saman P. Amarasinghe. 2002. StreamIt: A Language for Streaming Applications. In Proceedings of the 11th International Conference on Compiler Construction (CC ’02). Grenoble, France, 179–196. Google Scholar
Cross Ref
- William Thies, Michal Karczmarek, Janis Sermulins, Rodric Rabbah, and Saman Amarasinghe. 2005. Teleport Messaging for Distributed Stream Programs. In Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP ’05). Chicago, IL, 224–235. Google Scholar
Digital Library
- Charles F. Van Loan. 1992. Computational frameworks for the Fast Fourier Transform. Society for Industrial and Applied Mathematics, Philadelphia, PA. Google Scholar
Cross Ref
- Yevgen Voronenko, Volodymyr Arbatov, Christian Berger, Ronghui Peng, Markus Püschel, and Franz Franchetti. 2010. Computer Generation of Platform-Adapted Physical Layer Software. In Proceedings of Software Defined Radio (SDR ’10).Google Scholar
- William W. Wadge and Edward A. Ashcroft. 1985. Lucid, the Dataflow Programming Language. Number 22 in A.P.I.C. Studies in Data Processing. Academic Press, London.Google Scholar
- Philip Wadler. 1990. Deforestation: Transforming Programs to Eliminate Trees. Theoretical Computer Science 73, 2 (June 1990), 231–248. Google Scholar
Digital Library
- Philip Wadler and Stephen Blott. 1989. How to Make Ad-Hoc Polymorphism Less Ad Hoc. In Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’89). Austin, Texas, 60–76. Google Scholar
Digital Library
- Zhanyong Wan and Paul Hudak. 2000. Functional Reactive Programming from First Principles. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (PLDI ’00). Vancouver, British Columbia, Canada, 242–252. Google Scholar
Digital Library
- Jianxin Xiong, Jeremy Johnson, Robert Johnson, and David Padua. 2001. SPL: A Language and Compiler for DSP Algorithms. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation (PLDI ’01). Snowbird, Utah, 298–308. Google Scholar
Digital Library
Index Terms
Better living through operational semantics: an optimizing compiler for radio protocols
Recommendations
A software-defined radio based cognitive radio demonstration over FM band
Recent Advances in Wireless Communications and NetworksIn this paper, we present a software-defined radio (SDR) based cognitive radio (CR) implementation and demonstration over the frequency modulation (FM) band. Using GNU Radio as the software platform and USRP (Universal Software Radio Peripheral) SDR ...
From high-level radio protocol specifications to efficient low-level implementations via partial evaluation
FHPC 2017: Proceedings of the 6th ACM SIGPLAN International Workshop on Functional High-Performance ComputingSoftware-defined radio (SDR) is a challenging domain for language designers. To be useful in the real world, radio protocol implementations must operate at high data rates with low latency, yet to be useful to implementers, a language should allow ...
Prototyping domain-specific language semantics
OOPSLA Companion '08: Companion to the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsDomain-specific languages (DSLs) need semantics. For an external, executable, metamodel-based DSL, this can be done in an operational or a translational way. In my dissertation, I develop a framework that allows both. It provides flexibility for ...






Comments