34
Chameleonic Radio Technical Memo No. 6 Implementation of OSSIE on OMAP M. Robert P. Balister J. Reed June 23, 2006 Bradley Dept. of Electrical & Computer Engineering Virginia Polytechnic Institute & State University Blacksburg, VA 24061

Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Chameleonic Radio

Technical Memo No. 6

Implementation of OSSIE on OMAPM. Robert

P. BalisterJ. Reed

June 23, 2006

Bradley Dept. of Electrical & Computer EngineeringVirginia Polytechnic Institute & State University

Blacksburg, VA 24061

Page 2: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Implementation of OSSIE on OMAP

Max RobertPhilip BalisterJeffrey H. Reed

Wireless @ Virginia TechMobile and Portable Radio Research Group (MPRG)[email protected]@balister.com

Page 3: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Ossie on OMAP

OSSIE provides SCA for NIJ Chamelonic radioOMAP OSK Description

USRP used for RF interfaceIssues building and running OSSIE on TI OMAP processor

Building OSSIE for the OMAPMemory ManagementSoftware Profiling

Page 4: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OMAP Starter Kit (OSK)

OMAP 5912 Starter Kit (OSK)Available from http://www.ti.com$295

LCD Display availableOSK board uses 5 volts @ 250 mA

Page 5: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OMAP Block Diagram

Page 6: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OMAP Capabilities

ARM926EJ-S Core operating at 192 MhzC55X DSP Core operating at 192 MhzUSB 1.1 controllerNumerous interfaces

GPIOI2CLCD Controller

Page 7: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OSK Block Diagram

Page 8: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

USRP

4 A/D

4 D/A

FPGA

USB

Daughter Boards

Page 9: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

USRP CapabilitiesDeveloped for the GNU Radio projectA/D's operate at 64 MSPS @12 bitsD/A's operate at 128 MSPS @14 bitsFPGA provides digital down conversion

sample rate reductionRX tuning

TX tuning and sample rate conversion done in AD9862

Page 10: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

USRP Daughter Boards

RFX series boardsSupport transmit and receiveSeveral models supporting different bands

400-500 Mhz, 900-1000 Mhz, 2.4-2.5 GhzDBSRX receive only, 800-2400 MhzBasic TX and RX boards, provide AC coupled inputs. Can bandpass sample to 200 MhzDC coupled versions available for LF operation

Page 11: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OSK and USRP

Page 12: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Building OSSIE for the OSK

Development environmentOpen Embedded versus Buildroot

Supporting SoftwareomniORBxerces-c

Page 13: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Development Environment

OSSIE runs on any hardware using LinuxNot uCLinux

Cross compiler required for ARM processorNeed cross compiled version of librariesProduce images of file systems suitable writing into flash memoryNeed a way to automate this process!

Page 14: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Some terms

PackageInstallable piece of software

rpm, ipk, deb etc

ImageSomething installed directly onto hardware

Flash file system imageskernel images

Page 15: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Where to start?Crosstools (http://www.kegel.com/crosstool/)

Generates cross tool chainsBuildroot (http://buildroot.uclibc.org/)

Generates tools chains and creates file systemsEasy to set up

OpenEmbedded (http://www.openembedded.org/)

Generates tool chains and creates file systemsHarder to set up, but more flexibility

Page 16: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Why Open Embedded

Easy to support multiple machinesLarge package databaseHandles complex software dependenciesStrong developer and user communitySimple to use, if you are a genius

Page 17: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Open Embedded Basics

Open Embedded meta dataMachine configurationDistribution configurationPackage build data (bitbake files)

BitbakeProcesses the meta dataProduces desired output, such as images and packages

Page 18: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Machine Configuration

Kernel detailsRequired kernel modulesFlash sizesHardware details (such as serial ports)Processor specific compiler optionsMachine specific software

such as specific display server pakages

Page 19: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Distribution Configuration

Define software versionscompilerssystem libraries

Page 20: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Bitbake files

Package informationdescription, license, maintainer, etc

Source locationRequired bitbake modules

autotools, pkgconfig, etcSpecialized build scripts

Page 21: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Simple bb file

DESCRIPTION = "SWIG - Simplified Wrapper and Interface Generator"HOMEPAGE = "http://swig.sourceforge.net/"LICENSE = "BSD"SECTION = "devel"

SRC_URI = "${SOURCEFORGE_MIRROR}/swig/swig-${PV}.tar.gz"S = "${WORKDIR}/SWIG-${PV}"

inherit autotools

EXTRA_OECONF = "--with-python=${STAGING_BINDIR} --with-swiglibdir=${STAGING_DIR}/${BUILD_SYS}/swig"

do_configure() {oe_runconf

}

Page 22: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Complex bb filedo_compile () {

export XERCESCROOT=${S}cd src/xercesc

# runConfigure is going to bust CC and CXX I betCC_SAVE="${CC}"CXX_SAVE="${CXX}"./runConfigure -plinux -c${CC} -x${CXX} -minmem -nsocket -tnative -rpthreadCC="${CC_SAVE}"CXX="${CXX_SAVE}"oe_runmake

}

do_stage () {oe_libinstall -C lib libxerces-c ${STAGING_LIBDIR}oe_libinstall -C lib libxerces-depdom ${STAGING_LIBDIR}

cp -pPR include/xercesc ${STAGING_INCDIR}}

do_install () {oe_libinstall -C lib libxerces-c ${D}${libdir}oe_libinstall -C lib libxerces-depdom ${D}${libdir}

}

Page 23: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Open Embedded Summary

Challenging to get started with OEBuild on other peoples workDocument a packages build processOE is capable of building complex packagesBitbake files available for OSSIE

Page 24: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

SCA Overhead

SCA requires some overheadMemory overheadFramework overhead

CORBA for inter-component communication

How can we measure the impact of the SCAAnalysis of component memory usageCode Profiling of running waveforms

Page 25: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Memory Usage

Memory Management Unit (MMU) criticalMost libraries built as shared libraries

This dramatically uses physical memory usageMMU leads to real time issues

Demand loading pages from disk takes time

Page 26: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

OSSIE/OMAP Benchmarks

● Memory ramifications– Typical baseline memory

usage● 500 kB for omniNames● 1.5 MB for nodeBooter● 1 MB for component

– Significant realtime issues● Cache management

● Non-volatile memory– Total file system

● 38 MB– SCA-related disk usage

● 2.6 MB

20204Component average

17856nodeBooter

9328omniNames

k bytesName

Maximum memory usage

Page 27: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Profiling

Use oprofile (http://oprofile.sourceforge.net)Can profile entire system, including kernelProvides detailed source annotationInstruction level profiling availableCall graphs available

Page 28: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

FM Receiver Test WaveformUSRP converts baseband RF to samplesTwo devices

USRP InterfaceSound Card Interface

Two components running in PCDecimatorFM Demodulator

Page 29: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Decimator Profilesamples % image name symbol name123395 84.2471 Decimator fir_filter::do_work(bool, short, short&)19979 13.6405 Decimator run_decimation(void*)1577 1.0767 Decimator dataIn_i::pushPacket(PortTypes::ShortSequence const&, PortTypes::ShortSequence const&)286 0.1953 libc-2.3.6.so memcpy42 0.0287 libomniORB4.so.0.6 omniCallHandle::upcall(omniServant*,omniCallDescriptor&)

● fir_filter::do_work has no CORBA content

● run_decimation loops over input data calling fir_filter::do_work and sends data via CORBA when done

● dataIn_i::pushPacket receives data from CORBA and makes a local copy

Page 30: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

FM Demodulator Profile

FM_in_i::pushPacket does all processingReimplementing NCO using tables should reduce CPU usage

5914 25.6606 FM_Demod FM_in_i::pushPacket(PortTypes::ShortSequence const&, PortTypes::ShortSequence const&)4915 21.3260 FM_Demod nco::do_work(short, short&, short&)3289 14.2708 FM_Demod phase_detect::do_work(short, short, short, short, short&)2780 12.0623 libm-2.3.6.so cos2674 11.6024 libm-2.3.6.so sin1625 7.0508 FM_Demod gain::do_work(float, short, short&)394 1.7096 FM_Demod dump_data::write_data(float, char const*)389 1.6879 FM_Demod dump_data::write_data(float, float, char const*)173 0.7506 libc-2.3.6.so memcpy

Page 31: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

USRP Device Profile

Need to look at data copyingInspection of mixed source/assembly suggests looking at CORBA sequences

3064 73.2664 USRP rx_data_process(void*)413 9.8757 libc-2.3.6.so memcpy39 0.9326 libstdc++.so.6.0.3 (no symbols)23 0.5500 libomniORB4.so.0.6 omniObjRef::_invoke(omniCallDescriptor&, bool)23 0.5500 libpthread-2.3.6.so pthread_mutex_lock22 0.5261 libomniORB4.so.0.6 omni::giopImpl12::marshalRequestHeader(omni::giopStream*)22 0.5261 libomniORB4.so.0.6 omni::giopImpl12::outputFlush(omni::giopStream*, bool)21 0.5022 libc-2.3.6.so ioctl19 0.4543 libc-2.3.6.so free17 0.4065 libc-2.3.6.so malloc16 0.3826 libusrp.so.0.0.0 fusb_devhandle_linux::_reap(bool)15 0.3587 libpthread-2.3.6.so pthread_mutex_unlock14 0.3348 USRP _0RL_cd_BA95E6CFFBD8C0F3_00000000::marshalArguments(cdrStream&)14 0.3348 libomniORB4.so.0.6 omniRemoteIdentity::dispatch(omniCall

Page 32: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Profiling Conclusions

SCA and CORBA do not dominate CPU usageNeed to review results carefully due to inlined functions

CORBA sequences are inlinedProfiling very useful for showing bottlenecksDevelop on a desktop and profile there before building for embedded target

Page 33: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Conclusions

OSK board is a useful target for SCA development

Forces engineer to pay attention to resourcesNIJ Project Specific recommendations

Investigate reducing sampling rate coming from the USRP further by changing FPGA imageStudy use of MCBSP serial ports on the OMAP s data can bypass USB interface.Attempt to route MCBSP port directly to DSP

Page 34: Implementation of OSSIE on OMAP - Virginia Tech | Electrical and

Acknowledgements

The following entities provided significant levels of funding for building OSSIE on the OSK

IC Postdoctoral Research FellowshipNational Institute of JusticeNational Science FoundationSAIC