Lab 4 Instructions By Yeong Choo and Sam Kanawati

Slides:



Advertisements
Similar presentations
FIR Filter. C-Implementation (FIR filter) #include #include #include "coeff_ccs_16int.h" int in_buffer[300]; int out_buffer[300]; #define TRUE 1 /*Function.
Advertisements

Loops (Part 1) Computer Science Erwin High School Fall 2014.
CS241 PASCAL I - Control Structures1 PASCAL I - Control Structures Philip Fees CS241.
Differential Coding and Scrambling Six Meeting. Channel coding for error correction.
Embedded Programming and Robotics Lesson 2 C Programming Refresher C Programming1.
EE 445S Real-Time Digital Signal Processing Lab Fall 2013 Lab 4 Generation of PN sequences Debarati Kundu and Andrew Mark.
IT253: Computer Organization Lecture 3: Memory and Bit Operations Tonga Institute of Higher Education.
Lecture 6 Instructor: Craig Duckett. Assignment 1, 2, and A1 Revision Assignment 1 I have finished correcting and have already returned the Assignment.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
Joshua Adadevoh ECE-3551 Project Audio Signal Encryption.
An Introduction to Programming with C++ Sixth Edition Chapter 5 The Selection Structure.
Basic Data Types & Memory & Representation. Basic data types Primitive data types are similar to JAVA: char int short long float double Unlike in JAVA,
EGRE 6311 LHO 04 - Subprograms, Packages, and Libraries EGRE 631 1/26/09.
Bitwise Operations C includes operators that permit working with the bit-level representation of a value. You can: - shift the bits of a value to the left.
Basic Data Types & Memory & Representation
Digital Control CSE 421.
Test 2 Review Outline.
Control Flow Testing Handouts
CS 352 Introduction to Logic Design
Arduino Programming Part II
CS161 Introduction to Computer Science
Adaptive Filters Common filter design methods assume that the characteristics of the signal remain constant in time. However, when the signal characteristics.
Introduction to Programming
Numeric Arrays Numeric Arrays Chapter 4.
The Selection Structure
Practical example of C programming
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Student Book An Introduction
C Basics.
KALINGA INSTITUTE OF INDUSTRIAL TECHNOLOGY
Java Review: Reference Types
Roller Coaster Design Project
Lab 1 Instructions By Yeong Choo and Sam Kanawati
FOR LOOPS.
Arrays, For loop While loop Do while loop
Lab 6 Part I Instructions
Lab 7 Instructions By Yeong Choo and Sam Kanawati
OptiSystem-MATLAB data formats (Version 1.0)
First discussion section agenda
CS 2308 Exam I Review.
MISP Assembly.
OptiSystem-MATLAB data interchange model and features
Lab 5 Part II Instructions
Object Oriented Programming (OOP) LAB # 5
Developing More Advanced Testbenches
Lab 6 Part II Instructions
Programming Fundamentals (750113) Ch1. Problem Solving
Vinod Kulathumani West Virginia University
Defining methods and more arrays
Lab 3 Part III Instructions
C-to-LC3 Compiler Over the course of the next two weeks, you will build a program that will compile C code to LC-3 assembly language Don't panic! You.
Lab 3 Part II Instructions
By Yeong Choo and Sam Kanawati
Lesson 1-1 Linear Relations and Things related to linear functions
int [] scores = new int [10];
x-Value = The horizontal value in an ordered pair or input Function = A relation that assigns exactly one value in the range to each.
Structures- case, sequence, formula node
Lab 2 Part II Instructions
Looping III (do … while statement)
Lab 2 Part I Instructions
Programming Fundamentals (750113) Ch1. Problem Solving
EECE.2160 ECE Application Programming
ECE 352 Digital System Fundamentals
Java Programming Loops
Programming Fundamentals (750113) Ch1. Problem Solving
Fundamental Programming
Introduction to Programming
EE 345S Real-Time Digital Signal Processing Lab Fall 2007
CPS125.
Presentation transcript:

Lab 4 Instructions By Yeong Choo and Sam Kanawati The University of Texas at Austin, March 19, 2018

DSK Implementation of PN Sequence Generation Create a talk-through project in CCS such as in Lab 1 introductory lab. Inside ISRs.c, please comment out the following lines: xLeft = CodecDataIn.Channel[ LEFT]; xRight = CodecDataIn.Channel[ RIGHT]; yLeft = xLeft; yRight = xRight; Also inside ISRs.c, please do the following: Implement a PN sequence generator with SSRG [5,2]s where 2nd and 5th taps are the feedbacks Represent the SSRG state as a single integer variable: Declare int SSRG_state; to represent up to 32-bit state, or declare long long SSRG_state; to represent 64-bit state Create a function prototype that does the following: Update SSRG [5,2]s next state and return a newest bit    i.e. y[n] = y[n-2] + y[n-5] mod 2 Inputs: pointer to state variable Output: newest bit at time n Implement int SSRG_update (int * state_ptrn); Leverage on bitwise operations (&, |, ^) and logical operations (<<, >>) Set initial condition of the SSRG_state to any value of range {1, …, 2 5 −1} Pass current output bit to Serial Port Codec such as the following: #define A 32000 … CodecDataOut.Channel[ LEFT] = A*((SSRG_state >> 4)&1); WriteCodecData(CodecDataOut.UINT); Note that SSRG_state has the oldest bit in the least significant bit, modify your code accordingly Verify periodic operation of SSRG [5,2]s by observing the following: Oscilloscope waveform (Include one screenshot in lab report) Collect an array of first 100 states (Include one table in lab report) For performance analysis Profile your implementation of SSRG [5,2]s (Include one screenshot in lab report)

DSK Implementation of Data Scrambler and Data Descrambler Implement data scrambling and data descrambling using the same SSRG [5,2]s Represent the Data Scrambler and Data Descrambler states as two separate integer variables: Declare int DS_state, DD_state; to represent up to 32-bit state Modify the above implementation to take in input bit “in” such that int SSRG_update (int *state_ptr, int in); Note that newest bit at time n to the Data Scrambler is function of bits to be sent and newest bit at time n-1 Pass the scrambled bit from Data Scrambler as an input to Data Descrambler Run Data Scrambler followed by Data Descrambler once at every ISR execution Send input vector to one channel of audio codec and data scrambler output to another channel of audio codec such as the following: #define A 32000 #define input 1 … int output; CodecDataOut.Channel[ LEFT] = A*(input); CodecDataOut.Channel[ RIGHT] = A*((DS_state >> 4) & 1); WriteCodecData(CodecDataOut.UINT); Note that this test uses constant input of 1 into data scrambler, to test your implementation, also use constant input of 0 Remember to update the DS_state and DD_state separately A few notes on debugging: To verify correct operation of data scrambler and descrambler, Input vector of all ones or all zeros. Please note that the intermediate vector between Data Scrambler and Data Descrambler must be different than the input vector Please verify that the output vector of data descrambler is exactly similar as the input vector Collect an array of first 100 states of data scrambler and data descrambler (Include two tables in lab report) Profile your implementation of data scrambler and data descrambler (Include two screenshots in lab report)

Autocorrelation Graphs Find out the period of PN sequence from the array of first 100 states of SSRG [5,2]s Verify that the experimental measurement of period matches the theoretical value Generate an autocorrelation graph on two periods worth of PN sequence output bit (Include one graph on lab report and supply all source code) Generate an autocorrelation graph on two periods worth of data scrambler output bit Don’t use Matlab Function call Please implement the autocorrelation from scratch following the slide below Expected output