Implementation of OSSIE on OMAP - Virginia Tech | Electrical and
Transcript of 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
Implementation of OSSIE on OMAP
Max RobertPhilip BalisterJeffrey H. Reed
Wireless @ Virginia TechMobile and Portable Radio Research Group (MPRG)[email protected]@balister.com
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
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
OMAP Block Diagram
OMAP Capabilities
ARM926EJ-S Core operating at 192 MhzC55X DSP Core operating at 192 MhzUSB 1.1 controllerNumerous interfaces
GPIOI2CLCD Controller
OSK Block Diagram
USRP
4 A/D
4 D/A
FPGA
USB
Daughter Boards
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
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
OSK and USRP
Building OSSIE for the OSK
Development environmentOpen Embedded versus Buildroot
Supporting SoftwareomniORBxerces-c
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!
Some terms
PackageInstallable piece of software
rpm, ipk, deb etc
ImageSomething installed directly onto hardware
Flash file system imageskernel images
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
Why Open Embedded
Easy to support multiple machinesLarge package databaseHandles complex software dependenciesStrong developer and user communitySimple to use, if you are a genius
Open Embedded Basics
Open Embedded meta dataMachine configurationDistribution configurationPackage build data (bitbake files)
BitbakeProcesses the meta dataProduces desired output, such as images and packages
Machine Configuration
Kernel detailsRequired kernel modulesFlash sizesHardware details (such as serial ports)Processor specific compiler optionsMachine specific software
such as specific display server pakages
Distribution Configuration
Define software versionscompilerssystem libraries
Bitbake files
Package informationdescription, license, maintainer, etc
Source locationRequired bitbake modules
autotools, pkgconfig, etcSpecialized build scripts
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
}
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}
}
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
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
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
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
Profiling
Use oprofile (http://oprofile.sourceforge.net)Can profile entire system, including kernelProvides detailed source annotationInstruction level profiling availableCall graphs available
FM Receiver Test WaveformUSRP converts baseband RF to samplesTwo devices
USRP InterfaceSound Card Interface
Two components running in PCDecimatorFM Demodulator
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
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
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
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
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
Acknowledgements
The following entities provided significant levels of funding for building OSSIE on the OSK
IC Postdoctoral Research FellowshipNational Institute of JusticeNational Science FoundationSAIC