Developing a multi-thread product -- Introduction

Slides:



Advertisements
Similar presentations
Spread Spectrum Chapter 7.
Advertisements

SirenDetect Alerting Drivers about Emergency Vehicles Jennifer Michelstein Department of Electrical Engineering Adviser: Professor Peter Kindlmann May.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
ECE 734: Project Presentation Pankhuri May 8, 2013 Pankhuri May 8, point FFT Algorithm for OFDM Applications using 8-point DFT processor (radix-8)
Chapter 5 Analog Transmission
Lecture 9: D/A and A/D Converters
My attempt to multi-thread an audio talk-though program using batches of data M. Smith Electrical and Computer Engineering University of Calgary, Smithmr.
Implement a 2x2 MIMO OFDM-based channel measurement system (no data yet) at 2.4 GHz Perform baseband processing and digital up and down conversion on Nallatech.
TigerSHARC processor and evaluation board Different capabilities Different functionality.
Software and Hardware Circular Buffer Operations First presented in ENCM There are 3 earlier lectures that are useful for midterm review. M. R.
TigerSHARC CLU Closer look at the XCORRS M. Smith, University of Calgary, Canada
6/3/20151 Developing a multi-thread product – Introduction (ENCM491 – real time operating systems in 1 hr) M. Smith Electrical Engineering, University.
3/5/2004DSP Applied to GPS Algorithms1 of 14 DSP Applied to GPS Algorithms.
A SINGLE FREQUENCY GPS SOFTWARE RECEIVER
Connectivity Lab University of California, Berkeley Location and Timing with C/A code in GPS Wanbin Tang Jan 24, 2007.
TigerSHARC CLU Closer look at the XCORRS M. Smith, University of Calgary, Canada
7/14/20151 Introduction toVisual DSP Kernel VDK for Multi-threaded environment ENCM491 – Real Time (in 1 hour) M. Smith, Electrical and Computer Engineering,
Graphic Equalizer Table By Jose Lerma. Main Idea The main idea of this table is to display the frequencies of any sound or audio input, either by microphone.
DSP. What is DSP? DSP: Digital Signal Processing---Using a digital process (e.g., a program running on a microprocessor) to modify a digital representation.
Numerical algorithms for power system protection Prof. dr. sc. Ante Marušić, doc. dr. sc. Juraj Havelka University of Zagreb Faculty of Electrical Engineering.
Real time DSP Professors: Eng. Julian Bruno Eng. Mariano Llamedo Soria.
Reconfigurable Communication System Design
Wireless PHY: Modulation and Demodulation Y. Richard Yang 09/6/2012.
Processor Architecture Needed to handle FFT algoarithm M. Smith.
EE/CS 481 Spring Founder’s Day, 2008 University of Portland School of Engineering Project Golden Eagle CMOS Fast Fourier Transform Processor Team.
GPS: Everything you wanted to know, but were afraid to ask Andria Bilich National Geodetic Survey.
Over-view of Lab. 1 See the Lab. 1 web-site and the lecture notes for more details.
Multi-threaded projects Services and Drivers Alternate ways of doing Labs 1, 2, 3 and 4.
Professor A G Constantinides 1 Discrete Fourier Transforms Consider finite duration signal Its z-tranform is Evaluate at points on z-plane as We can evaluate.
1 SVY 207: Lecture 5 The Pseudorange Observable u Aim of this lecture: –To understand how a receiver extracts a pseudorange measurement from a GPS signal.
Group Members: Surujlal Dasrath & Adam Truelove Advisors Dr. In Soo Ahn – Theory + Software Dr. Thomas Stewart – Theory + Software Dr. Anakwa – Hardware.
Applied Research Laboratories The University of Texas at Austin Applied Research Laboratories The University of Texas at Austin Interfacing GPSTk to Existing.
Basic Computer Organization and Design
(4) Filters.
GPS - Global Positioning System
DIGITAL SIGNAL PROCESSING ELECTRONICS
Embedded Systems Design
Spread Spectrum Chapter 7.
Chapter 4: Digital Transmission
Developing a multi-thread Simulation of GPS system You’ll only need to add the threads – all functions (except correlation( )) provided M. Smith Electrical.
Introduction to cosynthesis Rabi Mahapatra CSCE617
Software and Hardware Circular Buffer Operations
Microcoded CCU (Central Control Unit)
General Licensing Class
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
DMA example Video image manipulation
Trying to avoid pipeline delays
Developing a multi-thread product -- Introduction
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
TigerSHARC processor and evaluation board
CSCI1600: Embedded and Real Time Software
Convolution, GPS and the TigerSHARC XCORRS instr.
The performance requirements for DSP applications continue to grow and the traditional solutions do not adequately address this new challenge Paradigm.
Moving Arrays -- 2 Completion of ideas needed for a general and complete program Final concepts needed for Final DMA.
Single Value Processing Multi-Threaded Process
Wireless Networks Fall 2007
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
Getting serious about “going fast” on the TigerSHARC
Spread Spectrum Chapter 7.
CSCI1600: Embedded and Real Time Software
DMA example Video image manipulation
Satellite positioning GPS principles
Presented by Mohsen Shakiba
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
Real time signal processing
Global Positioning System
M. Smith Electrical and Computer Engineering University of Calgary,
Working with the Compute Block
This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during.
Presentation transcript:

Developing a multi-thread product -- Introduction M. Smith Electrical Engineering, University of Calgary Smithmr @ ucalgary.ca 11/24/2018

References Understanding GPS Principles and Applications, 1996, Elliott D. Kaplan Digital Signal Processing – A Practical Approach, 1993, Emmanuel C. Ifeachor, Barrie W. Jervis ADSP-TS101 TigerSHARC and Blackfin Processor Programming References, Analog Devices Articles submitted to Circuit Cellar magazine by M. Smith, March 2004 11/24/2018

Introduction GPS traditionally done with ASIC/Processor combination Looking at FPGA/DSP combination for low end GPS receivers Technological interest in software radio Cheaper, quicker development cycle. Customizations for special applications From a talk by Darrell Anklovitch for ENEL619.23 11/24/2018

What is GPS? Global Positioning System 24 satellite (SV) constellation Orbiting 20,000 km from the surface of the Earth in 12 hour cycles Orbits are set-up to give global coverage 24 hours a day Need at least 4 satellites in view to calculate a position (1) 11/24/2018

GPS Positioning Concepts (1) For now make 2 assumptions: We know the distance to each satellite We know where each satellite is Require 3 satellites for a 3-D position in this “ideal” scenario Requires 4 satellites to account for local receiver clock drift. 11/24/2018

GPS Signal Structure Each satellite transmits 2 carrier frequencies referred to as L1 (1575 MHz) and L2 (1227 MHz) Each carrier frequency is BPSK modulated with a unique PRN (pseudo random number) code The PRN code on L1 is called CA code (coarse acquisition), The PRN code on L2 is called P code (precise) CA code takes 1 ms for full PRN transmission at 1MHz chip (bit) rate. P code takes 1.5 s for full PRN transmission at ~10MHz chip rate Also modulated on each carrier is 50 Hz data that includes the current position of the satellite 11/24/2018

Determining Time Use the PRN code to determine time (1) Use the PRN code to determine time Use time to determine distance to the satellite distance = speed of light * time 11/24/2018

Algorithms to Find PRN Phase Time-domain Cross correlation: 1/N ∑ x1 (n) * x2(n) Coding equivalent to FIR filter, but need to filter N sets of data, each shifted by one data point – looks like a final exam question to me. Correlation of perfectly matching signals gives a maximum value Correlation of 2 random data sequences tends to 0 PRN code from different satellites are designed to correlate to 0. Frequency domain correlation: 1/N F-1[X1(k)X2(k)] where F-1 is the inverse Discrete Fourier Transform and the X’s are the Discrete Fourier Transforms of two sequences D 11/24/2018

Timing Frequency Domain 1/N F-1[X1(k)X2(k)] 1024 point FFT (2 * NLOG2N) 1024 MULTS (N) 1024 point INV FFT (NLOG2N) Time Domain 1/N ∑ x1 (n) * x2(n) n = 0 1024 MACs (N) 1024 Phases (N) 30,000 Complex operations N-1 1,048,576 operations (N2) 11/24/2018

TigerSHARC -- TS101 and TS201 TS101 TS201 Low-cost version $45 / chip Evaluation boards $950 each educational price 11/24/2018

Implementing a multi-thread system working on batch data Collect N pts @ 44 kHz  array1 Collect N pts @ 44 kHz  array2 Collect N pts @ 44 kHz  array3 Process array1 Process array2 Process array3 Process array4 Transmit N pts @ 44 kHz  array1 Transmit N pts @ 44 kHz  array2 Transmit N pts @ 44 kHz  array3 11/24/2018

Implementing a multi-thread system -- Laboratory 5 concepts Collect N pts @ 44 kHz  array1 Collect N pts @ 44 kHz  array2 Collect N pts @ 44 kHz  array3 Move array1  array4 SimulateComplex Move array2  array5 SimulateComplex Move array3  array6 SimulateComplex Transmit N pts @ 44 kHz  array4 Transmit N pts @ 44 kHz  array5 Transmit N pts @ 44 kHz  array6 11/24/2018

Essentially Take an audio Talk-through program for loop { Read_a_sample; Perform operation; Write_a_sample; } Turn into 5-threads running under interrupts Idle thread Initialization thread – sets up system, when ready – launches the other threads – then activates the first thread ReadValueThread, ProcessValueThread – with simulated Complex Algorithm WriteValueThread 11/24/2018

Initialization Thread – Lab. 5 early 11/24/2018

Main Threads – example – Lab. 5 early 11/24/2018

Need to investigate and understand system behaviour and limitations Concept of task priority 11/24/2018

Lab. 5 – using real-time audio-test 11/24/2018

VDK – Status History 11/24/2018

Laboratory 5 – Done in “C and C++” Stage 1 – 30% Develop and investigate a multi-tasking system where the threads are free-running. Thread tasks are “Sleep(time_task)” Develop and investigate a multi-tasking system where the threads communicate through semaphores to control order of operation Stage 2 – 55% Demonstrate and investigate turning an “audio – talk-through program” into a multi-threaded system – one point processed per interrupt Stage 3 – 15% Demonstrate a batch processing system as a multi-threaded system Options Use SHARC ADSP-21061 boards (40 MHz) – existing audio-libraries – have not attempted Use Blackfin ADSP-BF533 boards (600 MHz) – existing audio-libraries – have been successful at home, but not here Use Blackfin ADSP-BF533 boards (600 MHz) – using very simple, no frills, audio-talk though library – surprising simple with 1 to 32 points being processed. Fails with 33 points. Code logic issue, not a timing issue as I can waste 25000 cycles per block at 32 points 11/24/2018

Where to start? 11/24/2018

Adding the Initialization thread 11/24/2018

Making the InitializationThread a “Boot Thread” 11/24/2018

Add the thread programming control 11/24/2018

Avoid the free-running code 11/24/2018

Then add semaphores to control flow 11/24/2018

Tackled today GPS basic concepts Algorithm can be implemented in either time-domain or frequency domain Big time advantages in frequency domain for the GPS algorithm (unless add special instructions) Need to batch data for input, output and processing VDK is an Analog Devices VisualDSP++Tool for automatically generating the code for a multi-threaded system Laboratory 5 – First part 30% Implement a simple multi-threaded system where the threads mainly sleep, and either free run, or communicate through semaphores to control program flow 11/24/2018