innoplex tech talk series software defined radio … talks/sdrframeworks tech...gnu radio 16 • a...

54
INNOPLEX Tech Talk Series Software Defined Radio Frameworks 5 December 2017 Jim McCloskey, INNOPLEX Innovative solutions for complex problems

Upload: others

Post on 12-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

INNOPLEX Tech Talk SeriesSoftware Defined Radio Frameworks

5 December 2017Jim McCloskey, INNOPLEX

Innovative solutions for

complex problems

Page 2: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 3: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 4: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

For Our Demos

4

Ettus Research N210 USRP

Page 5: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

For Our Demos

5

RTL-SDR

Page 6: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

For Our Demos

6

Diskcone Antenna400M – 3 GHz

L-Band~1.54 GHz CenterBW: ??

Page 7: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 8: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 9: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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()

Page 10: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 11: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 12: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 13: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 14: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

SDR Use Cases

14

Embedded

Single Platform

Enterprise Scale

Network orUSB

Network

Page 15: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

FOSS SDR Frameworks

15

• Component model• Application construction• Data movement • Hardware abstraction• Development tools• Components libraries• Maturity • Community• Licensing

Page 16: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 17: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

GNU Radio Use Case Sweet Spot

17

Embedded

Single Platform

Enterprise Scale

Network orUSB

Network

Page 18: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 19: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

GNU Radio Companion

19

Module

Blocks within Modulators module

Page 20: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

GNU Radio Companion

20

Page 21: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Flowgraphs

21

Page 22: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Flowgraphs Under the Hood

22

top_block.py Execute from command line w/o usingGNU Radio Companion:$ topblock.py

$ htop – processes (gray)threads (green)

Page 23: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Flowgraphs Under the Hood

23

Flowgraphs execute as a single process independent of number of blocks

Page 24: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 25: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 26: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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)

Page 27: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Creating a New Block

27

<+ xyz +> shows where to put your code

3. Edit shell files to add functionality

Page 28: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 29: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 30: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 31: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 32: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

REDHAWK Use Case Sweet Spot

32

Embedded

Single Platform

Enterprise Scale

Network orUSB

Network

Page 33: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 34: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

REDHAWK Concepts

34

Components Devices Waveforms

GPP

Device Nodes

GPP

Domain Manager

Device Manager

Naming Service

Application Factory Event Service

omniORB

Core Framework

Page 35: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

REDHAWK Eclipse IDE

35

Page 36: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

SandBox/Chalkboard

36

Some similarities to GNU Radio Companion: Drag, drop & run…

Page 37: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Component Design

37

Page 38: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Component XML Metadata

38

Software Component Descriptor (square.scd.xml)

Page 39: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Component XML Metadata

39

Software Package Descriptor (square.spd.xml)

Page 40: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Component XML Metadata

40

Properties File (square.prf.xml)

Page 41: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Waveform Design

41

Page 42: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Waveform Deployment Example

42

Page 43: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Waveform Deployment Example

43

Page 44: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

REDHAWK Application: CMOSS

44

Page 45: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 46: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 47: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 48: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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)

Page 49: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

OpenCPI Use Case Sweet Spot

49

Embedded

Single Platform

Enterprise Scale

Network orUSB

Network

Page 50: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 51: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 52: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

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

Page 53: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Other SDR Framework Options

• X-Midas• Pothos• MATLAB Simulink• Ettus RFNoC• BAE Diamond• Many more …

53

Page 54: INNOPLEX Tech Talk Series Software Defined Radio … Talks/SDRFrameworks Tech...GNU Radio 16 • A real-time streaming signal processing platform • Component based model • Large

Questions?

Thank you for attending!

Jim McCloskeyDirector of RF Solutions

[email protected]

54