Adam_Mcconnell_Fall_2012_2nd_revision

31
The World Leader in High Performance Signal Processing Solutions ADI Confidential Information ADI Confidential Information Not for external distribution Not for external distribution COOP Presentation - Fall 2012 Adam McConnell 3rd Rotation NC State University – Electrical Engr. & Mathematics Senior HSSA Group Supervisor: Tom MacLeod

Transcript of Adam_Mcconnell_Fall_2012_2nd_revision

Page 1: Adam_Mcconnell_Fall_2012_2nd_revision

The World Leader in High Performance Signal Processing Solutions

ADI Confidential InformationADI Confidential Information – – Not for external distributionNot for external distribution

COOP Presentation - Fall 2012Adam McConnell

3rd RotationNC State University – Electrical Engr. & Mathematics

SeniorHSSA Group

Supervisor: Tom MacLeod

Page 2: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Overview

What is ADIsim?

Projects I worked onDigital Timing Map for AD719x family of ADC’s LabVIEW wrappers for AD7190 Features and Digital TimingPython Script for code reuse and copying directories

Challenges

Page 3: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

The Problem

Page 4: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

QUESTIONHow can you provide customer support efficiently and

effectively without the availability of direct support?

Self-service Model support

ADIsimWritten in C++ consisting of a Simulator, Library, Dll, Testing

Environment Basis which client programs call on and allows customer to

interactively play with the part instead of reading data sheets 40+ pages long

‘Visual Hardware’ – Acts as if you have hardware connected

Page 5: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Page 6: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Page 7: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

What is ADIsim?ADIsim

HyperMaps PMFFeatures EqMaps

Timingmaps Client

Bottom Level

Top Level This is what customer uses

Active Functional ModelWeb Applications

Eval SoftwareMatlab

Page 8: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

What are EqMaps?Map of equations written in a XML file interpreted by ADIsimEquation is determined by inputs

Input

EQ0*

(Chop On is true)

EQ1*

(Chop Off is true)

Combiner

Output

EQ0 EQ1

Page 9: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Page 10: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Block declarations

Connections

Page 11: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

They can get complicated

Page 12: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Transferring EqMaps from XML C++

Why is it helpful?Easy to developEasy to maintainPortable

80 line XML file gets compressed to 3 lines of code:

Page 13: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

HyperMaps?

Multi-Variable look-up tables

Can’t use EQ maps here.

What about using a Filter Word of 1000 ?Uses Linear, Polynomial, Spline interpolation methods

Page 14: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

What is a Product Model File (PMF)?

Series of logic or functional blocks that when tied together provide certain behavior of an ADI product.

These logic blocks can be, but not limited to, EqMaps, HyperMaps, DSP applications, Math functionsThey are independent of each otherImplemented in ADIsim Library

Page 15: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Example: AD9480 PMF, XML ExcerptList of logic blocks Connections, Strings tying blocks together

Page 16: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

How ADIsim interprets the PMF

Settings Inputs

pi2 pi1 pi3

eq1

Output

Latency

INL

Jitter

PolyNoise

Splitter

eq3eq2

Combiner

Hypermaps

EQ maps

Page 17: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Active Functional Model (AFM)

Teaching toolVisually shows the inner workings of a part without all the

equipment and test benchesMimics/Simulates behavior

Instead of :

Page 18: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Page 19: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

TimingMaps (Primary project)

Describes the timing and setup behavior of a product within a particular mode

For the AD7190, 24-bit 4.8kHz ADC, needs to display clocks, data signals, timing and output codes for the continuous read mode

Page 20: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

TimingMaps

Page 21: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Problems & Improvements

Implemented entirely in LabVIEWChanges to model behavior of a new product is a hassleChanges to code leads to bugs/problems and debugging in LV can

be a pain

“every line of code will be read (and maintained) at least 10 times after you write it”Trying to reverse engineer LabVIEW code is a punishment

Implementing in C++ allows portability, flexibility and readability

Page 22: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

What does this LabVIEW code do?

Page 23: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Why do you hate yourself?

Page 24: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Template functions

Page 25: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Interpolate & SerializerInterpolation value of 2

Horner’s Method : 5 % 2 = 1 5 / 2 = 2 2 % 2 = 0 2 / 2 = 1 1 % 2 = 1 1 / 2 = 0

101 2 = 5 10

Page 26: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Page 27: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Current StatusEntirely implemented in C++Used LabVIEW wrapper to display results

Page 28: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Python ScriptAll this work to model one product?

Is there a generic framework for the entire AD719x family?24-bit Sigma-Delta ADC with PGA, common mode types, shared

inputsCarry over work from one project to the other

Copy/Paste could work but then you would need to go into every file/folder to change AD7190 to AD7191, etc.

Specifications for script:Inputs: directory of project

name of project, ‘X’name of new project, ‘Y’

Copy all subdirectories/files in CWD into new directory changing all words matching ‘X’ to ‘Y’Creates a copy of the project using a SVN checkout

Page 29: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Flow diagram of scriptCreate new directory

Separate files from folders in CWD

Copy/Rename files into new directory

subdir

top Go to next folder one level above

YES

NO

• Configure : core function

• CopySubdir : recursive function that goes into an arbitrary depth of directories

• CopyFile : copy file into new dir with new name, replaces every instance of ‘X’ to ‘Y’

• TestFile : determines if file is ascii or unicode

• ReplaceAsAscii• ReplaceAsUnicode

• GenDirList : returns two lists, one of files and the other of folders

• GetDir : returns pathname one level higher than current

• Remove : deletes entire directory made by SVN check-out

Page 30: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Challenges

Understanding ADIsimGoing from subtle details to big picture

First time using LabVIEW extensivelyWriting LV wrappers and successfully calling a C++ dll

Since my timing maps were using structs, I needed to cluster inputs together but the inputs were getting mismatched when passed to dll

First time writing software in C++Wasn’t comfortable using pointersWriting template functions

Page 31: Adam_Mcconnell_Fall_2012_2nd_revision

—Analog Devices Confidential Information—

Special thanks to:

Prissy Polly’s Group : Tom MacLeodMichael SinkMichael Crawford

Anuja GogateJim CampMeredith Morgan

Questions?