Académique Documents
Professionnel Documents
Culture Documents
Technical notes on using Analog Devices DSPs, processors and development tools
a Visit our Web resources http://www.analog.com/ee-notes and http://www.analog.com/processors or
e-mail processor.support@analog.com or processor.tools.support@analog.com for technical support.
Introduction
Analog Devices, Inc. offers a port of the light-weight TCP/IP (LwIP) stack for the Blackfin® family of
embedded processors. The LwIP stack on Blackfin processors can be used to develop an embedded
networking application in combination with an audio/video or an industrial automation/control
application. LwIP is an attractive utility that allows you to quickly port a standalone embedded
application to a networked embedded application. Several steps are necessary in the integration process in
order to produce a highly efficient and robust application. This document provides guidelines to integrate
LwIP with other system peripherals or applications to minimize common pitfalls in designing LwIP-based
applications on Blackfin processors. This document also discusses system optimization techniques that
maximize the performance of applications integrated with LwIP on Blackfin processors. The processor
resources utilized by the LwIP port are also described to help you design an efficient system.
1 Motivation
Embedded networking applications are now increasingly geared toward transmitting multimedia content
over wired or wireless networks. Industrial automation and control applications are other areas where
adding network capability is desirable. Figure 1 shows applications in which Internet connectivity is
desired.
Analog Devices offers royalty free (under license agreements) software building blocks to aid in faster
development of complex embedded networking applications. The following is a list of essential and basic
software components that are available with Analog Devices processor development environment suite,
VisualDSP++® 4.5 and higher:
[1]
LwIP – A light-weight TCP/IP stack ported to ADSP-BF52x, ADSP-BF54x, ADSP-BF53x and
ADSP-BF56x processors1.
Device drivers and system services libraries (SSLs) – API functions for configuring and managing
system resources and peripheral devices [12].
1
The LwIP stack is not available on ADSP-BF535 Blackfin processors.
Copyright 2007-2008, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of
customers’ products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property
of their respective holders. Information furnished by Analog Devices applications and development tools engineers is believed to be accurate and reliable, however
no responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices Engineer-to-Engineer Notes.
a
[15]
VisualDSP++ Kernel (VDK) – A real-time kernel. Use this low-resource kernel to efficiently
manage system resources in a multi-tasking application environment.
MM SDK – Multimedia Software Development Kit [16]. This includes code examples of common real-
world multimedia applications.
Internet
Network
A real-world embedded networking application may involve the integration of these software building
blocks into a system. The integration of different software components may cause several software and
hardware resource conflicts. In addition, the use of software components with such a high level of
abstraction on a resource constrained embedded platform may lead to under-utilization and
mismanagement of system resources.
This EE-Note specifically describes several aspects of integrating LwIP with the software components
described above. Following the procedures described in this document will aid you in faster development
of LwIP-based applications on Blackfin processors. The remainder of the document is organized as
follows:
Section 2 provides an overview of LwIP.
Section 3 discusses benchmark results and memory requirements for LwIP on Blackfin processors.
Section 4 discusses software and hardware guidelines for integrating LwIP with other applications.
Section 5 describes optimization techniques specific to the Blackfin platform to help you increase
system and core performance.
This EE-Note is not a substitute for the LwIP manual, VDK manual, system services manual, or other
related documentation [1] [2] [3] [4] [5] [6] [7] [8].
12
10 TCP Read
8
M b y te /s
TCP Write
6 UDP Read
4 UDP Write
2
0
1400 1200 1024 512
Buffer size (Bytes)
Each software component may have its set of initialization routines, which may conflict on
integration. Common initialization routines include interrupt initialization, device initialization, clock
and system power settings, external memory, heap memory, and so on. The following code listing is
extracted from the sys_init() function of the default VisualDSP++ LwIP project.
/* initialize the interrupt manager */
adi_int_Init(intmgr_storage, sizeof(intmgr_storage), &response_count,
&critical_reg);
/* initialize the device manager */
adi_dev_Init(devmgr_storage, sizeof(devmgr_storage), &response_count,
&devmgr_handle, &imask_storage);
5 System Optimizations
This section presents several hardware and software optimization techniques that will help you to fully
take advantage of the Blackfin architecture. Users who are well versed with the Blackfin platform and the
VisualDSP++ debugging environment can skip to Section 6.
DMA
Input interface e.g. Rx Line0
PPI, SPORT Rx Line1
DMA
Tx Line0 Output
Tx Line1 interface
Internal L1 memory
receive
Additional Reading
[1] LwIP User Guide, <install_path>\Analog Devices\VisualDSP 5.0\Blackfin\lib\src\lwip\docs.
[2] BF537EthernetDeviceDriverDesign.doc, <install_path>Analog Devices\VisualDSP 5.0\Blackfin\lib\src\lwip\docs.
[3] SMSCLAN91C111_DeviceDriver.doc, <install_path>Analog Devices\VisualDSP 5.0\Blackfin\lib\src\lwip\docs.
[4] ADSP-BF533 Blackfin Processor Hardware Reference. Rev 3.2, July 2006. Analog Devices, Inc.
[5] ADSP-BF561 Blackfin Processor Hardware Reference. Rev 1.1, February 2007. Analog Devices, Inc.
[6] ADSP-BF537 Blackfin Processor Hardware Reference. Rev 3.0, December 2007. Analog Devices, Inc.
[7] ADSP-BF52x Blackfin Processor Hardware Reference (Volume 2 of 2). Rev 0.3, September, 2007. Analog Devices, Inc.
[8] ADSP-BF54x Blackfin Processor Hardware Reference (Volume 2 of 2). Rev 0.4, August 2008. Analog Devices, Inc.
[9] Embedded Media Processing. David Katz and Rick Gentile. Newnes Publishers., Burlington, MA, USA, 2005.
[10] Digital Video and HDTV. Charles Poynton. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2003.
[11] Video Framework Considerations for Image Processing on Blackfin Processors (EE-276). Rev 1, September 2005.
Analog Devices Inc.
[12] VisualDSP++ 5.0 Device Drivers and System Services Manual for Blackfin Processors. Rev 3.0, August 2007.
Analog Devices, Inc.
[13] Video Templates for Developing Multimedia Applications on Blackfin Processors (EE-301). Rev 1, September 2006.
Analog Devices Inc.
[14] PGO-Linker- A Code Layout Tool for the Blackfin Processors. (EE-306). Rev 1, December 2006. Analog Devices Inc.
[15] VisualDSP 5.0 Kernel (VDK) Users Guide. Rev 3.0, August 2007. Analog Devices, Inc.
[16] Multimedia Starter Kit. http://www.analog.com/processors/platforms/msk.html. Analog Devices Inc.
[17] VisualDSP++ 5.0 Linker and Utilities Manual, Rev 3.0, August 2007. Analog Devices Inc.
[18] VisualDSP++ 5.0 Blackfin C/C++ Compiler and Library Manual, Rev 5.0, August 2007, Analog Devices Inc.
[19] Blackfin Processor Troubleshooting Tips Using VisualDSP++ Tools (EE-307). Rev 1, December 2006,
Analog Devices Inc.
[20] System Optimization Techniques for Blackfin Processors (EE-324). Rev 1, July 2007, Analog Devices Inc.
Document History
Revision Description
Rev 2 – September 16, 2008 Updated supported processors and tools revision. Also included the latest version of the
by Kaushal Sanghai ADI-TTCP tool in the associated .ZIP file.