INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A...
Transcript of INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A...
INNOPLEX Tech Talk SeriesSoftware Defined Radio Frameworks
5 December 2017Jim McCloskey, INNOPLEX
Innovative solutions for
complex problems
Agenda
• Software Defined Radio (SDR) Concepts• What is a Software Framework?• Investigate Three FOSS SDR Frameworks
• GNU Radio• REDHAWK• OpenCPI
• Other SDR Framework Options
2
What is a Software Defined Radio?
3
By SDR_et_WF.JPG: Topituukderivative work: McSush (talk) - SDR_et_WF.JPGCopyrighted free use, https://commons.wikimedia.org/w/index.php?curid=8831874
For Our Demos
4
Ettus Research N210 USRP
For Our Demos
5
RTL-SDR
For Our Demos
6
Diskcone Antenna400M – 3 GHz
L-Band~1.54 GHz CenterBW: ??
What is a Software Framework?
• Provides a standard way to build and deploy applications, usually for a specific domain or platform:
• Microsoft .NET – Windows application development • Android Studio – Mobile device application development• Qt – Cross platform apps; desktop and mobile
• Usually includes predefined classes and functions that can be used to process input, manage hardware devices, and interact with system software
• May include tools such as IDEs, helper functions, compilers, build systems, etc. to assist application development
• All this streamlines the development process: programmers don't need to reinvent the wheel each time they develop a new application
• Still something missing ...
7
Component Based Design (CBD)
• Breaks down the functionality of an application into separate software modules with well defined interfaces
• Applications are composed of interconnected components; perfect model for streaming signal processing applications
• The framework handles:• Deploying, starting, stopping, deallocating components• Data flow between components• Setting component parameters
• Reuse: Done properly, components can be reusable between applications and development teams
8
Generic Component Composition
9
Component Metadata (typ. XML)
FrameworkControl
DataData
FunctionalLogic
Port Port
Variables: frequencybandwidthdecimation…
Defines: - Number of ports- Port data types & directions- Component variables- Other software dependencies- more
create() start()stop()destroy()set()get()
Generic Component Execution
10
FrameworkControl
DataData
PortGrab data atinput port
Push result tooutput port
Performs operation or transform on the input; push result to output
Port
Signal DataTagsMessages
Component Template Generation
11
Component Metadata (typ. XML)
“Put your code here!”
DataPort
DataPort
Variables: variable 1,variable 2,…
- Number of ports- Port data types & directions- Component variables- Other software dependencies- more
Control PortCodeGenerator
The framework should provide tools to generate template code for a component based on metadata describing the component.
Component template or “shell”
Well defined data types for
ports
Applications are Chains of Components
12
ResamplerTunerReceiver API & Device Driver
USB, Ethernet, …
Receiver
Digitized IF Signal Data and Receiver Control
Demod AudioSync
PCI, AXI, …
AudioSubsystem
Framework “Core”
External Application
Framework API
What We Want in an SDR Framework
• Well defined component model• Well defined data model at the ports• Tools to generate shell components and applications• Data transport transparent to developer• Lots of prebuilt components & device support• Large developer community and support
• Community licensing; Free and Open Source Software (FOSS)
• Framework scales across use cases• Small embedded systems to large networked SDRs with multiple nodes
13
SDR Use Cases
14
Embedded
Single Platform
Enterprise Scale
Network orUSB
Network
FOSS SDR Frameworks
15
• Component model• Application construction• Data movement • Hardware abstraction• Development tools• Components libraries• Maturity • Community• Licensing
GNU Radio
16
• A real-time streaming signal processing platform• Component based model
• Large body of pre-built “blocks” available
• Simple model of Python wrapped C++ modules• Usually a single application on a single platform• Drag & drop based UI for application development
• GNU Radio Companion
• Large and active developer community• Licensed under the GNU General Public License (GPL) version 3
GNU Radio Use Case Sweet Spot
17
Embedded
Single Platform
Enterprise Scale
Network orUSB
Network
History
18
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
GNU Radio v1.0 Released
Ettus ResearchFirst USRP Radio
RFNoC for FPGAIn USRP Products
NI Purchases Ettus Research
GNU RadioCompanion
GNU RadioV3.7.11
PyBOMBSPackageManager
GnuRadio CON
GNU Radio Companion
19
Module
Blocks within Modulators module
GNU Radio Companion
20
Flowgraphs
21
Flowgraphs Under the Hood
22
top_block.py Execute from command line w/o usingGNU Radio Companion:$ topblock.py
$ htop – processes (gray)threads (green)
Flowgraphs Under the Hood
23
Flowgraphs execute as a single process independent of number of blocks
Creating a New Block
24
• Block functionality written in C++ for best execution speed• Blocks are C++ libraries wrapped as Python modules using SWIG• Simple Wrapper Interface Generator (SWIG) utility • New capability is called an Out-of-Tree (OOT) Module• gr_modtool utility generates most of the shell code for us
Creating a New Block
25
1. Create the new python module howto using gr_modtool$ gr_modtool newmod howtoCreating out-of-tree module in ./gr-howto... Done.Use 'gr_modtool add' to add a new block to this currently empty module.
$ lsapps cmake CMakeLists.txt docs examples grc include lib MANIFEST.md python swig
Creating a New Block
26
2. Add new square_ff block to module$ gr_modtool add -t general square_ffGNU Radio module name identified: howtoLanguage (python/cpp): cppLanguage: C++Block/code identifier: square_ffEnter valid argument list, including default arguments: Add Python QA code? [Y/n] Add C++ QA code? [y/N] Adding file 'lib/square_ff_impl.h'...Adding file 'lib/square_ff_impl.cc'...Adding file 'include/howto/square_ff.h'...Editing swig/howto_swig.i...Adding file 'python/qa_square_ff.py'...Editing python/CMakeLists.txt...Adding file 'grc/howto_square_ff.xml'...Editing grc/CMakeLists.txt...
Add code to these 3 shell files to define the block’s functionality
output = input * input
Variables: noneoutput(float)
input(float)
Creating a New Block
27
<+ xyz +> shows where to put your code
3. Edit shell files to add functionality
Block XML Metadata
28
howto_square_ff.xml
Used by GNU Radio Companion to describe the block’s interfaces and render it in the workflow pallet
Data Transport & Scheduler
29
• Scheduler calls a block’s work function and tells it how many items it can produce based on the number of items in the gr_buffer
• Blocks read from their input buffer and write to an output buffer• Scheduler is optimized for throughput
Shared memory buffers implemented by framework
Source: Introduction and Computational Capabilities of the Open Source GNU Radio ProjectTom Rondeau, SDR Technical Conference, 2010
GNU Radio Take-Aways
30
• Well defined component model• Blocks are C++ libraries wrapped in Python• Graphical design tool for workflow creation - GRC• Utilities for shell component generation (command line)• Creates efficient single process, multi-threaded applications • Framework handles data transport between blocks• Large community with lots of existing blocks• No built-in support for distributed computing across a network
REDHAWK
31
• Real-time streaming signal processing platform with distributed computing capabilities
• Based on JTRS Software Communications Architecture v2.2.2• CORBA middleware as primary data transport mechanism• Supports single application on a single platform or multiple
applications distributed across a network• Rich Eclipse-based UI for component and application development• Supports component development in Java, C++ and Python• Licensed under the Creative Commons Attribution-ShareAlike 3.0
Unported License
REDHAWK Use Case Sweet Spot
32
Embedded
Single Platform
Enterprise Scale
Network orUSB
Network
History
33
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
GNU Radio v1.0 Released
Ettus ResearchFirst USRP Radio
RFNoC for FPGAIn USRP Products
NI Purchases Ettus Research
GNU RadioCompanion
GNU RadioV3.7.11
PyBOMBSPackageManager
JTRS Mission Needs Statement
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
SCA v1.0 JTRS becomes JTNCSCA v2.0
SCA v2.2Specification Frozen at SCA v2.2.2 SCA v4.0 SCA v4.1
JTRS PEO movesto San Diego
GnuRadio CON
WIN-TCancelled
Ground Mobile Radio (GMR) Cancelled
ARS TechnicaArticle on JTRS
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
OSSIE SCA Released FOSS by Va Tech REDHAWK Begins
REDHAWK FOSSRelease RH v2.0.7 LTS
REDHAWK Concepts
34
Components Devices Waveforms
GPP
Device Nodes
GPP
Domain Manager
Device Manager
Naming Service
Application Factory Event Service
omniORB
Core Framework
…
REDHAWK Eclipse IDE
35
SandBox/Chalkboard
36
Some similarities to GNU Radio Companion: Drag, drop & run…
Component Design
37
Component XML Metadata
38
Software Component Descriptor (square.scd.xml)
Component XML Metadata
39
Software Package Descriptor (square.spd.xml)
Component XML Metadata
40
Properties File (square.prf.xml)
Waveform Design
41
Waveform Deployment Example
42
Waveform Deployment Example
43
REDHAWK Application: CMOSS
44
Integration with Other Frameworks
45
GNU Radio Flowgraph
REDHAWK Waveform
Not directly supported by IDE currently but is possible.
ApplicationLevelIntegration
See: GRCon17 - Low-Effort REDHAWK-GNU Radio Integration https://www.youtube.com/watch?v=foOaKyaryeY
REDHAWK Take-Aways
46
• Component model defined by SCA 2.2.2• Shell component code generation in IDE
• C++, Java, Python
• Can deploy applications written using other frameworks• Each component is a multi-threaded process
• Running waveform will launch at minimum one process per component
• Limited components in FOSS release• Built-in support for distributed computing across a network
OpenCPI• Open-Source Component Portability Infrastructure• Embedded framework (software and gateware) for Component-Based
Development• Focused on close-to-the-metal technologies -> chip level
• Component model that extends into specialized processors such as FPGAs, DSPs and GPUs
• Open Core Protocol (OCP) for component interconnect in FPGAs• Similar constructs to SCA (by design) but with greatly simplified
semantics• GNU Lesser General Public License Version 3
47
History
48
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
GNU Radio v1.0 Released
Ettus ResearchFirst USRP Radio
RFNoC for FPGAIn USRP Products
NI Purchases Ettus Research
GNU RadioCompanion
GNU RadioV3.7.11
PyBOMBSPackageManager
JTRS Mission Needs Statement
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
SCA v1.0 JTRS becomes JTNCSCA v2.0
SCA v2.2Specification Frozen at SCA v2.2.2 SCA v4.0 SCA v4.1
JTRS PEO movesto San Diego
GnuRadio CON
WIN-TCancelled
Ground Mobile Radio (GMR) Cancelled
ARS TechnicaArticle on JTRS
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
OSSIE SCA Released FOSS by Va Tech REDHAWK Begins
REDHAWK FOSSRelease RH v2.0.7 LTS
NSA Tech TransferAnnouncement
1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Mercury ComputerIRAD Program - CPI
Open SourcedBy Mercury Federal
Proposed as basis forSCA 3.0 (FPGA & DSP)
OpenCPI Use Case Sweet Spot
49
Embedded
Single Platform
Enterprise Scale
Network orUSB
Network
Terminology• Component: blue-print for application building blocks (workers)
• Defined in XML as a “spec” for (alternative) implementation
• Property: component configuration and control parameters• Defined as part of components “spec”, usable at runtime
• Port: component interfaces to talk to others• Define as part of component “spec” to send/receive messages
• Protocol: the set of supported messages at a port• Defined in XML and associated with components ports
• Worker: one of several implementations of a component• Defined in XML and associated with a component, plus source code
• Authoring Model: one of several ways to write worker code• For different technologies(GPP, DSP, FPGA, GPU) in different languages (C/C++, VHDL,
OpenCL, etc.)50
OpenCPI Concepts
51
Workers Device WorkersAssemblies
Platforms
RCC HDL
VHDL & XMLC/C++ & XMLXML
VHDL & XML
CPADAPTER
NO
C
DP
VHDL & XML
Resulting Application: Xilinx Zynq SoC
CPADAPTER
NO
CDP
Programmable Logic - PLProcessor Subsystem - PS
AXI
AXI
ARM
ADAPTER
OpenCPI Take-Aways
52
• Ambitious – tries to tackle all programmable device types• Dependent on proprietary (closed) FPGA vendor tool chains• Uses vendor tools at script/macro level
• Good for CM
• Last check – no flow-down support for timing constraints• Very limited component and platform support• Utilities for shell component generation (command line)• Framework handles data transport between blocks• No visible online community
Other SDR Framework Options
• X-Midas• Pothos• MATLAB Simulink• Ettus RFNoC• BAE Diamond• Many more …
53
Questions?
Thank you for attending!
Jim McCloskeyDirector of RF Solutions
54