128
How the Other Half Lives Developing SDR Software for the Macintosh Platform Jeremy C. McDermond, J.D. (NH6Z)

How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

How the Other Half LivesDeveloping SDR Software for the Macintosh Platform

Jeremy C. McDermond, J.D. (NH6Z)

Page 2: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

About the Author

Page 3: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

About the AuthorLicensed in 1986 at age 14 as KB7AKH

Began to program on the Apple II at age 5

Learned C in 6th grade (on a 512k Mac)

Spent 15 years in systems and network engineering

Numerous industry certifications such as MCSE, Sun, and IBM AIX

Avoids MS Windows like the plague

Page 4: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The OpenHPSDR Platform

Page 5: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The OpenHPSDR Platform

Direct Downconversion Receiver (Mercury)

Page 6: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The OpenHPSDR Platform

Direct Downconversion Receiver (Mercury)

Direct Upconversion Transmitter (Penelope)

Page 7: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The OpenHPSDR Platform

Direct Downconversion Receiver (Mercury)

Direct Upconversion Transmitter (Penelope)

USB 2.0 Connected

Future connection via gigabit ethernet

Page 8: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mercury

Page 9: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mercury

LTC2208 ADC as close to antenna as possible

130Msps 16-bit

Page 10: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mercury

LTC2208 ADC as close to antenna as possible

130Msps 16-bit

Altera Cyclone III FPGA

Page 11: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mercury

LTC2208 ADC as close to antenna as possible

130Msps 16-bit

Altera Cyclone III FPGA

Current firmware allows 4 receivers at 192kHz sample rate

Page 12: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mercury Block Diagram

Page 13: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Penelope

Page 14: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Penelope

AD9744 DAC as close to antenna as possible

210 Msps 14-bit

Page 15: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Penelope

AD9744 DAC as close to antenna as possible

210 Msps 14-bit

Altera Cyclone II FPGA

Page 16: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Penelope

AD9744 DAC as close to antenna as possible

210 Msps 14-bit

Altera Cyclone II FPGA

Capable of transmitting multiple signals simultaneously

Page 17: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Penelope Block Diagram

Page 18: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Magister/Ozymandias

Page 19: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Magister/Ozymandias

USB 2.0 connection with Cypress FX2

Page 20: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Magister/Ozymandias

USB 2.0 connection with Cypress FX2

Altera Cyclone II FPGA

Page 21: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Ozymandias Block Diagram

Page 22: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Myths About the Mac

Page 23: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Myths About the Mac

The kernel is just FreeBSD

Page 24: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Myths About the Mac

The kernel is just FreeBSD

Because it’s UNIX®, all Linux software works

Page 25: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Myths About the Mac

The kernel is just FreeBSD

Because it’s UNIX®, all Linux software works

Everything’s that proprietary Apple stuff

Page 26: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Page 27: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Be a “First Class” piece of OpenHPSDR software

Page 28: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Be a “First Class” piece of OpenHPSDR software

Have a “Mac like” interface

Page 29: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Be a “First Class” piece of OpenHPSDR software

Have a “Mac like” interface

Fully leverage available Mac technologies

Page 30: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Be a “First Class” piece of OpenHPSDR software

Have a “Mac like” interface

Fully leverage available Mac technologies

Have a simple installation process

Page 31: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Goals of MacHPSDR

Be a “First Class” piece of OpenHPSDR software

Have a “Mac like” interface

Fully leverage available Mac technologies

Have a simple installation process

Make the source code fully available

Page 32: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mac-GHPSDR—A First Cut

Page 33: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mac-GHPSDR—A First Cut

A port of John Melton’s ghpsdr to the Mac

Page 34: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mac-GHPSDR—A First Cut

A port of John Melton’s ghpsdr to the Mac

Reworked the libusb code to use IOKit

Page 35: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mac-GHPSDR—A First Cut

A port of John Melton’s ghpsdr to the Mac

Reworked the libusb code to use IOKit

Fixed performance problems with threading

Page 36: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Mac-GHPSDR—A First Cut

A port of John Melton’s ghpsdr to the Mac

Reworked the libusb code to use IOKit

Fixed performance problems with threading

Available at https://www.xenotropic.com/ham-svn/mac-ghpsdr

Page 37: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

MacHPSDR

Page 38: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

MacHPSDR

Native Cocoa user interface

Written in a mixture of Objective C and C

Uses an improved version of the IOKit base from Mac-GHPSDR

Page 39: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

MacHPSDRExample Video 80m from Corvallis, OR 6:22 A.M. 9/15/2010

Page 40: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

MacHPSDRExample Video 80m from Corvallis, OR 6:22 A.M. 9/15/2010

Page 41: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Apple Technologies In Use

Page 42: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Apple Technologies In UseObjective C

IOKit

Cocoa

Core Animation

OpenGL

Grand Central Dispatch

vDSP

Sparkle Updater

Page 43: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective C

Page 44: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Page 45: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Is a dialect of C that grafts on Object Oriented concepts

Page 46: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Is a dialect of C that grafts on Object Oriented concepts

Has a different syntax than C++

Page 47: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Is a dialect of C that grafts on Object Oriented concepts

Has a different syntax than C++

Isn’t bad once you get used to it

Page 48: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Is a dialect of C that grafts on Object Oriented concepts

Has a different syntax than C++

Isn’t bad once you get used to it

Readability is really nice

Page 49: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Objective CRequired to use Cocoa

Is a dialect of C that grafts on Object Oriented concepts

Has a different syntax than C++

Isn’t bad once you get used to it

Readability is really niceEx: [transceiver changeFrequency:3500000 onReceiver:4]

Page 50: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit

Page 51: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit

A generic framework for utilizing devices in the OS from userland

Page 52: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit

A generic framework for utilizing devices in the OS from userland

Supports not only USB, but Firewire and other devices

Page 53: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit

A generic framework for utilizing devices in the OS from userland

Supports not only USB, but Firewire and other devices

No driver installation necessary

Page 54: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Page 55: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Asynchronous calls are greatly preferred

Page 56: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Asynchronous calls are greatly preferred

Try to keep at least one transaction in the pipeline at a time

Page 57: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Asynchronous calls are greatly preferred

Try to keep at least one transaction in the pipeline at a time

Use realtime threads for reading and writing SDR data

Page 58: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Asynchronous calls are greatly preferred

Try to keep at least one transaction in the pipeline at a time

Use realtime threads for reading and writing SDR data

POSIX semaphores don’t work quite right, use mach

Page 59: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

IOKit Performance

Asynchronous calls are greatly preferred

Try to keep at least one transaction in the pipeline at a time

Use realtime threads for reading and writing SDR data

POSIX semaphores don’t work quite right, use mach

Larger block sizes help reduce kernel ⟺ userland transitions

Page 60: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Cocoa

Page 61: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Cocoa

Based on the NextStep tech (you can tell by the NS prefix to classes like NSView)

Page 62: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Cocoa

Based on the NextStep tech (you can tell by the NS prefix to classes like NSView)

Standard application toolkit

Page 63: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Cocoa

Based on the NextStep tech (you can tell by the NS prefix to classes like NSView)

Standard application toolkit

C-based Carbon toolkit will not be ported to 64-bit

Page 64: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Cocoa

Based on the NextStep tech (you can tell by the NS prefix to classes like NSView)

Standard application toolkit

C-based Carbon toolkit will not be ported to 64-bit

Interface is built with a tool that creates a “nib” file that defines the objects on screen

Page 65: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

Page 66: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

A technology that provides animation layers that can be composited

Page 67: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

A technology that provides animation layers that can be composited

Includes many default animations that happen automatically

Page 68: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

A technology that provides animation layers that can be composited

Includes many default animations that happen automatically

Stock image filters can be applied to layers

Page 69: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

A technology that provides animation layers that can be composited

Includes many default animations that happen automatically

Stock image filters can be applied to layers

Layers can be updated from any thread

Page 70: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Animation

A technology that provides animation layers that can be composited

Includes many default animations that happen automatically

Stock image filters can be applied to layers

Layers can be updated from any thread

Layers can use a variety of drawing technologies

Page 71: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenGL

Page 72: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenGL

3D rendering standard

Page 73: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenGL

3D rendering standard

A Core Animation layer can provide an OpenGL context

Page 74: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenGL

3D rendering standard

A Core Animation layer can provide an OpenGL context

MacHPSDR’s waterfall uses an OpenGL texture that scrolls

Page 75: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenGL

3D rendering standard

A Core Animation layer can provide an OpenGL context

MacHPSDR’s waterfall uses an OpenGL texture that scrolls

MacHPSDR’s panadapter draws the signal line with OpenGL into a Core Animation layer

Page 76: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

Page 77: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

New technology for “Snow Leopard”

Page 78: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

New technology for “Snow Leopard”

Provides a way to manage threading and parallelism

Page 79: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

New technology for “Snow Leopard”

Provides a way to manage threading and parallelism

The programmer creates queues, and the OS figures out the optimal number of threads as the program runs

Page 80: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

New technology for “Snow Leopard”

Provides a way to manage threading and parallelism

The programmer creates queues, and the OS figures out the optimal number of threads as the program runs

Optimizes based on the hardware available

Page 81: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Grand Central Dispatch

New technology for “Snow Leopard”

Provides a way to manage threading and parallelism

The programmer creates queues, and the OS figures out the optimal number of threads as the program runs

Optimizes based on the hardware available

Not used extensively in MacHPSDR because you can’t make “real time” GCD queues

Page 82: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

vDSP

Page 83: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

vDSPDSP processing functions that are a part of the Accelerate framework

Page 84: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

vDSPDSP processing functions that are a part of the Accelerate framework

Shipped on every Mac

Page 85: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

vDSPDSP processing functions that are a part of the Accelerate framework

Shipped on every Mac

Provides a set of functions that operate on arrays of floating point numbers optimized by using the processor’s vector instructions (SSE/Altivec)

Page 86: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

vDSPDSP processing functions that are a part of the Accelerate framework

Shipped on every Mac

Provides a set of functions that operate on arrays of floating point numbers optimized by using the processor’s vector instructions (SSE/Altivec)

Functions include FFT, convolutions, complex number manipulation, decibel calculations

Page 87: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The “DSP Rework” Branch

Page 88: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The “DSP Rework” Branch

Current trunk uses hacked up DttSP from John Melton’s ghpsdr

Page 89: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The “DSP Rework” Branch

Current trunk uses hacked up DttSP from John Melton’s ghpsdr

DSP Rework is a redesign of the DSP functions that DttSP performs

Page 90: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The “DSP Rework” Branch

Current trunk uses hacked up DttSP from John Melton’s ghpsdr

DSP Rework is a redesign of the DSP functions that DttSP performs

Rewritten using OO concepts with Objective C

Page 91: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

The “DSP Rework” Branch

Current trunk uses hacked up DttSP from John Melton’s ghpsdr

DSP Rework is a redesign of the DSP functions that DttSP performs

Rewritten using OO concepts with Objective C

Extensively leverages the vDSP functions

Page 92: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

Page 93: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

3rd party freely available package

Page 94: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

3rd party freely available package

Allows for automatic updating of software

Page 95: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

3rd party freely available package

Allows for automatic updating of software

Uses an RSS feed containing data about your software revisions

Page 96: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

3rd party freely available package

Allows for automatic updating of software

Uses an RSS feed containing data about your software revisions

Also can be configured to canvas anonymous data on user’s computer

Page 97: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Sparkle Updater

3rd party freely available package

Allows for automatic updating of software

Uses an RSS feed containing data about your software revisions

Also can be configured to canvas anonymous data on user’s computer

Available at: sparkle.andymatuschak.org

Page 98: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Technologies

Page 99: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Technologies

OpenCL

Core Audio

Distributed Objects

Page 100: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

Page 101: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

“Open Computing Language”

Page 102: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

“Open Computing Language”

Designed to ease construction of massively data parallel tasks

Page 103: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

“Open Computing Language”

Designed to ease construction of massively data parallel tasks

Computing units include the CPU, GPU, and even some custom designed IBM Cell boards

Page 104: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

“Open Computing Language”

Designed to ease construction of massively data parallel tasks

Computing units include the CPU, GPU, and even some custom designed IBM Cell boards

Included in Snow Leopard

Page 105: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL

“Open Computing Language”

Designed to ease construction of massively data parallel tasks

Computing units include the CPU, GPU, and even some custom designed IBM Cell boards

Included in Snow Leopard

GPGPU is difficult for SDR because of small block sizes

Page 106: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL + OpenGL

Page 107: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL + OpenGL

Both standards maintained by the Khronos Group

Page 108: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

OpenCL + OpenGL

Both standards maintained by the Khronos Group

OpenGL can use the same buffers as OpenCL

Page 109: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Page 110: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Standard audio framework on the Mac

Page 111: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Standard audio framework on the Mac

Allows the use of “Audio Units”

Page 112: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Standard audio framework on the Mac

Allows the use of “Audio Units”

Audio Units are the same plugins that Logic Pro, Garageband, and Logic Express use

Page 113: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Standard audio framework on the Mac

Allows the use of “Audio Units”

Audio Units are the same plugins that Logic Pro, Garageband, and Logic Express use

Audio Units can be embedded in any program

Page 114: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Core Audio

Standard audio framework on the Mac

Allows the use of “Audio Units”

Audio Units are the same plugins that Logic Pro, Garageband, and Logic Express use

Audio Units can be embedded in any program

Stock audio units include a 31 band equalizer, a compressor/limiter

Page 115: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Distributed Objects

Page 116: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Distributed Objects

Allows Cocoa objects in different programs to communicate

Similar to remote procedure calls, but on the same machine

Hope to use this to integrate with logging software and other external programs

Page 117: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Page 118: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Integration with PSK31 and other digital mode software

Page 119: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Integration with PSK31 and other digital mode software

Finish the “DSP Rework” branch

Page 120: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Integration with PSK31 and other digital mode software

Finish the “DSP Rework” branch

Integration with logging software

Page 121: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Integration with PSK31 and other digital mode software

Finish the “DSP Rework” branch

Integration with logging software

Put Audio Unit support in transmit chain

Page 122: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Future Directions

Integration with PSK31 and other digital mode software

Finish the “DSP Rework” branch

Integration with logging software

Put Audio Unit support in transmit chain

Ichabod — the headless MacHPSDR

Page 123: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

How Do I Get MacHPSDR

Page 124: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

How Do I Get MacHPSDR

Binary Distribution at www.nh6z.net/MacHPSDR/MacHPSDR.zip

Source in Subversion: https://www.xenotropic.com/mac-svn/MacHPSDR

Page 125: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Documentation

Page 126: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

Documentation

There is none!

Could use an intrepid soul to help with the help files

Page 127: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

How to Contribute

Page 128: How the Other Half Livesmicrohams.blob.core.windows.net/content/2015/05/4_NH6ZMacHPS… · 04/05/2015  · Grand Central Dispatch New technology for “Snow Leopard” Provides a

How to Contribute

Patches are accepted by e-mail and reviewed

As time goes on, and if there is a critical mass of developers, SVN write access will be granted

Bugs are tracked on Lighthouse at mcdermj.lighthouseapp.com

The OpenHPSDR wiki is always a good place to contribute