<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Embedded Computing Design</title>
	<atom:link href="http://embedded-computing.com/articles/feed/?tag=software" rel="self" type="application/rss+xml" />
	<link>http://embedded-computing.com</link>
	<description>Embedded Computing Design is targeted at engineers, architects, and decision makers looking at silicon, software, and strategies for embedded devices. With an estimated 15,000,000,000 devices in the world soon, we&#039;re out to help every designer working on one of them–this is where the next decade of embedded computing is going.</description>
	<lastBuildDate>Thu, 16 May 2013 13:48:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Application Life-cycle Management (ALM) software boosts testing and traceability for embedded product development</title>
		<link>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/</link>
		<comments>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/#comments</comments>
		<pubDate>Thu, 02 May 2013 15:00:00 +0000</pubDate>
		<dc:creator>Peter Varhol, Seapine Software</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[automate gui testing]]></category>
		<category><![CDATA[automated regression testing]]></category>
		<category><![CDATA[automated test tool]]></category>
		<category><![CDATA[automating software testing]]></category>
		<category><![CDATA[automation software testing tools]]></category>
		<category><![CDATA[automation test tools]]></category>
		<category><![CDATA[automation testing tool]]></category>
		<category><![CDATA[bug tracker]]></category>
		<category><![CDATA[bug tracking]]></category>
		<category><![CDATA[bug tracking software]]></category>
		<category><![CDATA[bug tracking tools]]></category>
		<category><![CDATA[defect tracking]]></category>
		<category><![CDATA[defect tracking in software testing]]></category>
		<category><![CDATA[defect tracking software]]></category>
		<category><![CDATA[development project management software]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[functional software testing]]></category>
		<category><![CDATA[functional testing tools]]></category>
		<category><![CDATA[issue tracking open source]]></category>
		<category><![CDATA[issue tracking tool]]></category>
		<category><![CDATA[issue tracking tools]]></category>
		<category><![CDATA[launching a new product]]></category>
		<category><![CDATA[manage software testing]]></category>
		<category><![CDATA[marketing product launch]]></category>
		<category><![CDATA[new launch product]]></category>
		<category><![CDATA[new product launch]]></category>
		<category><![CDATA[open source issue tracking]]></category>
		<category><![CDATA[product launching process]]></category>
		<category><![CDATA[product launching strategies]]></category>
		<category><![CDATA[project management for software development]]></category>
		<category><![CDATA[project management in software development]]></category>
		<category><![CDATA[project management software development]]></category>
		<category><![CDATA[qa automation tools]]></category>
		<category><![CDATA[qa testing tools]]></category>
		<category><![CDATA[requirement management]]></category>
		<category><![CDATA[requirement management software]]></category>
		<category><![CDATA[requirements management]]></category>
		<category><![CDATA[Seapine Software]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software automation testing]]></category>
		<category><![CDATA[software design methodology]]></category>
		<category><![CDATA[software dev life cycle]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software development test]]></category>
		<category><![CDATA[software functional testing]]></category>
		<category><![CDATA[software lifecycle development]]></category>
		<category><![CDATA[software load testing]]></category>
		<category><![CDATA[software qa testing]]></category>
		<category><![CDATA[software requirements management]]></category>
		<category><![CDATA[software test process]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[software testing in software engineering]]></category>
		<category><![CDATA[software testing lifecycle]]></category>
		<category><![CDATA[task tracking software]]></category>
		<category><![CDATA[test automation tools]]></category>
		<category><![CDATA[testing automation tools]]></category>
		<category><![CDATA[testing software tools]]></category>
		<category><![CDATA[web based project management]]></category>
		<category><![CDATA[what is a bug in software testing]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=d4e71cb1462433243a57306bfdda767c</guid>
		<description><![CDATA[Testing and traceability play a vital role in embedded product development. Traceability rendered via Application Life-cycle Management (ALM) software enables the team to automatically generate test cases that link back to requirements, and report defects that link back to test cases. By knowing that defects are addressed and test cases run successfully, the team can have an immediate and accurate accounting of the state of product requirements.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6010%2Ffigures%2F2" />Testing and traceability play a vital role in embedded product development. Traceability rendered via Application Life-cycle Management (ALM) software enables the team to automatically generate test cases that link back to requirements, and report defects that link back to test cases. By knowing that defects are addressed and test cases run successfully, the team can have an immediate and accurate accounting of the state of product requirements.</h3>
<p><span id="more-18678"></span><span class='body'><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> 	<head>  <meta http-equiv="content-type" content="text/html;charset=utf-8" /><br />
<style type="text/css" media="screen"><!--  p.headline {}  p.byline {}  p.abstract {}  p.body-text {}  p.heading-1 {}  p.figures {}  p.author-bio {}  p.contact-info {}  span.hyperlink {}  --></style>
<p> 	</head> 	<body>
<div id="freescale-may13-figs">
<div class="story">
<p class="abstract">Testing and traceability play a vital role in embedded product development. Traceability rendered&nbsp;via Application Life-cycle Management (ALM) software enables the team to automatically generate test cases that link back to requirements, and report defects that link back to test cases. By knowing that defects are addressed and test cases run successfully, the team can have an immediate and accurate accounting of the state&nbsp;of product&nbsp;requirements.</p>
<p class="body-text">Fifteen or 20 years ago, many embedded systems consisted of an 8-bit processor with a few KB of memory and perhaps a couple hundred lines of code. Today, the explosion of embedded systems in automobiles, ATMs, cell phones, and other devices has dramatically changed that dynamic. It&#8217;s not uncommon to see multiple 32- and 64-bit multicore processors on an Ethernet network, running multiple applications totaling hundreds of thousands of lines of code in these systems.</p>
<p class="body-text">As these devices grow in complexity, it has become a significant burden for project teams to confirm that software requirements have been tested and tests can be traced back to requirements. In many cases, even with extensive testing, teams might not know whether they have successfully met all of the product requirements.</p>
<p class="body-text">A high level of complexity and the need for greater system reliability also bring quality to the forefront. Older embedded systems were either simple enough or not important enough to spend time finding, tracking, and fixing software defects. Today, defects in embedded systems can be just as common and even more important than those in enterprise applications. And because of the greater complexity, it becomes more important to be able to trace defects back through test cases and to requirements so that teams have increased transparency into issues and the features they affect.</p>
<p class="body-text">Today&#8217;s complex embedded systems can have hundreds or thousands of requirements, with as many or more test cases. Tracking and executing these test cases, and using that information to make sure requirements have been satisfied, becomes a real concern for teams that have to gain better control over their processes. To address this challenge, teams need an automated way to link artifacts so that data about one artifact becomes information for others. Application Life-cycle Management (ALM) software can help.</p>
<p class="heading-1">The value of traceability</p>
<p class="body-text">Traceability is the practice of linking requirements to downstream artifacts like risk, test cases, defects, and even source code. Links enable two-way communication of change and progress between related artifacts.</p>
<p class="body-text">For example, once a product has requirements, those validating it need to write test cases that ensure the product under development is meeting the design requirements. If test cases fail, the resulting defects are recorded in an issue tracking system.</p>
<p class="body-text">Traceability enables product teams and stakeholders to understand and derive valuable information from the relationship between product development artifacts. By looking at defects, it is possible to determine which requirements haven&#8217;t yet been satisfied. Teams can use this information as an important guide to determine whether a product is ready to ship, and also to triage defects to satisfy the most important requirements first.</p>
<p class="body-text">But effective traceability can do a whole lot more for a project. If safety risks are identified as a part the product, these can be linked to nonfunctional requirements that can then be traced to downstream artifacts. Source code can be traced to defects and back to requirements, closing the loop between design, development, and testing. In the same vein, when defect fixes are checked back in to source control, and tests run to confirm the fixes, the team and other product stakeholders know very clearly that the corresponding requirements have been satisfied.</p>
<p class="body-text">Traceability also provides essential project information that often can&#8217;t be obtained in any other way. It provides testers with an easily understandable and reportable measure of product quality. By knowing which requirements remain unsatisfied, and whether they&nbsp;have issues logged against them, testers can estimate the time remaining to product completion. Last, traceability enables teams to better understand the work remaining, and in which functional areas of the product that work remains.</p>
<p class="body-text">Managing requirements, test cases, and defects using Microsoft Word or Excel is challenging enough. But tracing requirements through test cases to defects and back to requirements is impossible without a real tracking system.</p>
<p class="heading-1">Building traceability into an embedded project</p>
<p class="body-text">How does a product team go about building traceability? It starts with requirements. Once functional requirements are defined, risk analysis and mitigation begins, and testers generate test cases that will enable them to determine if the product under development meets those requirements.</p>
<p class="body-text">As testers run test cases, the cases that pass indicate that the related requirements have been satisfied. If test cases fail, testers record defects that are associated with those test cases and, by linkage, to the requirement under test. The defects are associated with the related test cases and test runs, providing a link back to the testing stage.</p>
<p class="body-text">Ideally, this linking is done automatically. While it is possible to manually create and maintain links between project artifacts, the work involved is detailed and constant. Whenever a requirement or test case changes, links have to be manually reestablished. The effort needed to manually create and maintain links between requirements, test cases, and defects is excessive, especially if those links have to be examined and updated almost daily.</p>
<p class="body-text">In most projects, testers execute test cases multiple times, in different test runs. Tests are rerun when an initial run fails, and the fix needs to be verified. Tests are also run additional times for regression purposes, as the embedded software product scope grows to meet more requirements.</p>
<p class="body-text">Tests may also be performed manually, or in an automated fashion using a testing harness. In practice, most teams do some of both. Manual testing is typically done the first time, and recorded using an automated tool. Subsequent tests are often run automatically, unless the functionality changes significantly. Test results provide the basis for traceability information, through either defects or successful test results. Both can trace back to requirements and other artifacts.</p>
<p class="body-text">With automated testing and traceability, testing teams have the opportunity to perform at a high level, accomplishing testing within the product schedule and providing valuable information on quality and requirements fulfillment to product stakeholders. This makes testing more relevant to all stakeholders, especially in the latter stages of product development.</p>
<p class="body-text">Ideally, this starts with requirements, but must also incorporate test management, defect tracking, and source code management. For products with safety implications, it should also incorporate risk management and mitigation. ALM software, such as TestTrack from Seapine Software, offers the ability to create, manage, and link artifacts from the beginning through the end of a design and development project. Figure&nbsp;1 illustrates how a traceability matrix can help teams easily determine how defects or requirement changes can affect other parts of a project.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=643,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6010%2Ffigures%2F1" title="Traceability in application life-cycle management solutions such as Seapine TestTrack provides embedded project teams the ability to quickly and easily understand how defects and other changes affect the project."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6010%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Traceability in application life-cycle management solutions such as Seapine TestTrack provides embedded project teams the ability to quickly and easily understand how defects and other changes affect the project.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Traceability and safety-critical projects</p>
<p class="body-text">Traceability has traditionally been used for large development projects with hundreds of engineers and testers, and thousands of requirements. This has been primarily the realm of commercial and military aviation and space systems, where the need for information to combat complexity overcame the cost of that information. These systems can take years to develop and bring to market, making the information gained through traceability especially valuable as team members leave and new ones arrive.</p>
<p class="body-text">But with automation, such as that provided by ALM software, the cost and effort of traceability can be driven down to the point where it makes sense for smaller projects, and with shorter schedules. Automatic traceability between requirements and downstream artifacts, and back upstream from defects to requirements, makes identifying and communicating development hurdles and issues faster and more transparent.</p>
<p class="body-text">Projects, such as smartphones, automotive systems, and smart industrial control equipment, benefit from better traceability. As more testing teams incorporate automated ALM methods to collect and disseminate traceability information, product quality will continue to improve, even as systems become more complex. </p>
<p class="author-bio">Peter Varhol is the solutions evangelist at Seapine Software and&nbsp;has authored dozens of articles and spoken during many industry conferences and webcasts. His past roles include technology journalist, software product manager, software developer, and university professor. He has advanced degrees in computer science, applied mathematics, and psychology. Contact&nbsp;Peter at varholp@seapine.com.</p>
<p class="contact-info">Seapine Software <span class="hyperlink"><a href="http://www.seapine.com/testtrack.html">www.seapine.com/testtrack.html</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/Seapine">Twitter</a></span> <span class="hyperlink"><a href="http://www.facebook.com/pages/Seapine-Software/124992884203183">Facebook</a></span> <span class="hyperlink"><a href="https://plus.google.com/110322695583005145011">Google+</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/seapine-software">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/user/seapineview">YouTube</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static analysis-enabled advanced program visualization eases the development process</title>
		<link>http://embedded-computing.com/articles/static-visualization-eases-development-process/</link>
		<comments>http://embedded-computing.com/articles/static-visualization-eases-development-process/#comments</comments>
		<pubDate>Wed, 01 May 2013 15:00:00 +0000</pubDate>
		<dc:creator>Paul Anderson, GrammaTech, Inc.</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[class diagram eclipse]]></category>
		<category><![CDATA[class diagram tool]]></category>
		<category><![CDATA[create uml class diagram]]></category>
		<category><![CDATA[create uml diagram]]></category>
		<category><![CDATA[create uml diagrams]]></category>
		<category><![CDATA[creating uml diagrams]]></category>
		<category><![CDATA[diagram software]]></category>
		<category><![CDATA[diagram uml]]></category>
		<category><![CDATA[different uml diagrams]]></category>
		<category><![CDATA[draw uml diagram]]></category>
		<category><![CDATA[draw uml diagrams]]></category>
		<category><![CDATA[eclipse class diagram]]></category>
		<category><![CDATA[eclipse uml class diagram]]></category>
		<category><![CDATA[eclipse uml diagram]]></category>
		<category><![CDATA[edraw uml diagram]]></category>
		<category><![CDATA[embedded software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[flow chart diagram]]></category>
		<category><![CDATA[flowcharting software]]></category>
		<category><![CDATA[free uml class diagram tool]]></category>
		<category><![CDATA[free uml diagram]]></category>
		<category><![CDATA[free uml diagram tool]]></category>
		<category><![CDATA[GrammaTech]]></category>
		<category><![CDATA[how to draw uml diagrams]]></category>
		<category><![CDATA[how would you solve this math problem]]></category>
		<category><![CDATA[java uml diagram]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[object oriented software development]]></category>
		<category><![CDATA[sample uml diagrams]]></category>
		<category><![CDATA[sequence diagram examples]]></category>
		<category><![CDATA[sequence diagram tool]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software analysis]]></category>
		<category><![CDATA[software design diagram]]></category>
		<category><![CDATA[software design diagrams]]></category>
		<category><![CDATA[software design methodology]]></category>
		<category><![CDATA[software design uml]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software for drawing uml diagrams]]></category>
		<category><![CDATA[software for uml diagrams]]></category>
		<category><![CDATA[software to draw uml diagrams]]></category>
		<category><![CDATA[software uml]]></category>
		<category><![CDATA[software uml diagram]]></category>
		<category><![CDATA[uml class diagram eclipse]]></category>
		<category><![CDATA[uml class diagrams java]]></category>
		<category><![CDATA[uml component diagrams]]></category>
		<category><![CDATA[uml diagram creator]]></category>
		<category><![CDATA[uml diagram editor]]></category>
		<category><![CDATA[uml diagram example]]></category>
		<category><![CDATA[uml diagram java]]></category>
		<category><![CDATA[uml diagram program]]></category>
		<category><![CDATA[uml diagram software]]></category>
		<category><![CDATA[uml diagram tool free]]></category>
		<category><![CDATA[uml diagram tools]]></category>
		<category><![CDATA[uml diagramming tool]]></category>
		<category><![CDATA[uml diagrams online]]></category>
		<category><![CDATA[uml diagrams software]]></category>
		<category><![CDATA[uml diagrams tool]]></category>
		<category><![CDATA[uml interaction diagram]]></category>
		<category><![CDATA[uml sequence diagram tool]]></category>
		<category><![CDATA[uml software]]></category>
		<category><![CDATA[uml system diagram]]></category>
		<category><![CDATA[uml timing diagram]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=b87e0410e60fa679e29d46c46e8ea0d5</guid>
		<description><![CDATA[Advances in static analysis and graphics technology have enabled new software visualization tools that can yield insights into the structure of complex programs, making the development process easier.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6011%2Ffigures%2F2" />Advances in static analysis and graphics technology have enabled new software visualization tools that can yield insights into the structure of complex programs, making the development process easier.</h3>
<p><span id="more-18671"></span><span class='body'>
<p class="body-text">It has long been evident that pictures are often better than text in helping developers understand complex programs and review code, so the use of program visualization in software development is widespread. UML and other primarily graphical formal design notations are now widely accepted as the best standard mechanisms for communicating various aspects of software design. Some model-based design tools can generate code directly from graphical representations. At the informal end of the spectrum, developers often sketch out flowcharts or call graphs to inform themselves or others of important aspects of the software.</p>
<p class="body-text">UML diagrams are all very well for designs, but suffer from two important drawbacks when used later in the development process to help developers understand existing code. First, as design abstractions they (correctly) omit some implementation details, but those details are often important if the goal is to understand the finished software. Second, design diagrams are very often stale with respect to the implementation, leading to an inaccurate or incomplete portrayal of the system as it actually exists.</p>
<p class="body-text">Informal visualizations tend to be ephemeral and rarely make it into the official record of documentation for the program.</p>
<p class="body-text">Very often, the only artifact that a developer has to work with is the code itself. Unfortunately, code visualization tools have historically been subject to problems such as confusing diagrams and difficulty in scaling to large programs. However, new tools are emerging that are beginning to solve these problems. The key advantage of these tools is their ability to generate useful visualizations directly from the code itself. As such they are guaranteed to be accurate and up to date.</p>
<p class="heading-1">Program structures</p>
<p class="body-text">Programs are made up of a large and complex web of dependences between lots of different kinds of components. A visualization that attempted to show all of these simultaneously would be too unwieldy to be useful. Indeed, there is no single ideal visualization. Instead, the most useful visualization for a particular task is the one that corresponds to the mental model used by the engineer undertaking that task. Some of the more useful program structures are the following:</p>
<p class="heading-2">Type hierarchy</p>
<p class="body-text">Developers usually find it very useful to see the various ways in which data types can relate to each other. The standard UML class diagram represents the&nbsp;class hierarchy in a form that is very easy to understand, with the association and containment relations at a higher level of abstraction than the code. While this is good from a design perspective, programmers often find it more helpful to see the concrete relations between types.</p>
<p class="heading-2">Include tree</p>
<p class="body-text">C and C++ programs often can make heavy use of the preprocessor. If done well, this can make programs easy to understand, but very often it interposes a layer that gets in the way of understanding. Undisciplined use of the preprocessor can lead to dependence tangles that cause build problems and hurt reusability potential. Consequently, being able to see which files are included where can help engineers unravel complex dependences.</p>
<p class="heading-2">Call graph</p>
<p class="body-text">The call graph, in which each node represents a subprogram and each edge indicates one or more calls to another subprogram, is often considered the most helpful program structure to visualize. Subprograms are convenient units for developers to reason about, and the calling relation captures data and control flow nicely. A call graph for even a small program can have hundreds of nodes and thousands of edges (see Sidebar 1), so it has long been recognized that it is essentially useless to visualize the entire call graph all at once. Instead, researchers have focused on ways to visualize the call graph in smaller, easily digestible parts.</p>
<p class="figures">
<figure>
<table width="300" border="0" align="right" cellpadding="2" cellspacing="0">
<tr>
<td align="center" style="padding-left:10px" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6011%2Fsidebars%2F1" title="It is possible to generate layouts for quite large graphs, though their usefulness is limited by the capacity of the human brain."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=290&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6011%2Fsidebars%2F1" alt="21" width="290" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Sidebar 1:</b> It is possible to generate layouts for quite large graphs, though their usefulness is limited by the capacity of the human brain.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 3.0x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">New call graph techniques and tools</p>
<p class="body-text">Because of the importance of call graphs in program understanding and the challenges involved in visualizing them, they have been the subject of much research. In particular, new techniques have been developed to help tame call graph complexity. This section describes some of the mechanisms that have been implemented in static analysis tools delivering advanced visualization capabilities. </p>
<p class="heading-2">Top-down views</p>
<p class="body-text">A top-down view of a call graph helps answer user questions such as &#8220;What are the high-level components of this program, and what are their properties and relationships?&#8221;</p>
<p class="body-text">To solve this problem in the context of program understanding, tool designers take inspiration from geographic mapping programs such as Google Maps. As the user zooms in, more detail starts to resolve: first cities, then towns, villages, and ultimately, individual buildings. The level of detail shown is coupled to the zoom level.</p>
<p class="body-text">Programs are made up of components that are themselves made up of smaller components, and so on, forming a hierarchy; although the direct calling relationship is between low-level subprograms, it can be projected up to higher-level components that contain those subprograms. In the top-down view of a call graph, the highest level items are directories. These can contain some combination of subdirectories and files, and the files will then contain subprograms. Thus, an edge from one box to another simply indicates that a subprogram contained in the first box calls a subprogram contained in the second. </p>
<p class="body-text">This approach turns out to be very effective at helping developers gain a deeper understanding of a program. </p>
<p class="body-text">In the left window, the user has selected the edge from component <span class="italics">find</span> to component <span class="italics">gnulib</span>. The function calls summarized by this aggregate edge are shown in the pane to the right. The right window illustrates that more detail is shown when the user zooms in to see a single function. This zoom level further illustrates an important feature: It is important for the developer to be able to relate the view to the code itself. Consequently, selecting one of those functions causes the source code of that function to be shown.</p>
<p class="heading-2">Bottom-up views</p>
<p class="body-text">Often a developer will want to take a bottom-up approach. This helps users answer questions such as &#8220;What does this procedure do, how does it fit into the structure of the program, and how is it invoked?&#8221;</p>
<p class="body-text">For example, say a program has crashed in a particular function. To find the cause of the crash and to plan a fix, the developer is likely to begin by focusing&nbsp;on that single function, then explore its immediate neighborhood to see what other functions it calls and is called by. Previously done manually on a whiteboard, a tool can handle the drudgery of drawing and layout automatically.</p>
<p class="heading-2">Metrics layers</p>
<p class="body-text">The utility of a visualization can be increased by adding layers to show the value of various metrics. An example is shown in Figure 1. This shows a particularly useful visualization &#8211; the treemap. In a treemap, the area of a node is proportional to a metric &#8211; usually a metric that encodes the size of the item. Subnodes are then tiled inside the top level node. Edges are usually not displayed. In this example, the color intensity of each item encodes the number of code vulnerability warnings issued by the static analysis tool.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6011%2Ffigures%2F1" title="A treemap for a medium-sized program (approx 200 KLOC). The strength of the color indicates the number of static-analysis warnings detected within each part."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD6011%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A treemap for a medium-sized program (approx 200 KLOC). The strength of the color indicates the number of static-analysis warnings detected within each part.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">From this view, it is easy to pick out the components of the program that are the most risky. Treemaps are very effective for showing deeply nested structure, and&nbsp;are also very amenable to the zooming paradigm discussed earlier, where more detail is shown at higher magnifications. </p>
<p class="body-text">These visualizations are most useful when developers use them interactively to pan around and zoom in and out, or even add and remove nodes and edges. Interacting with such an interface can be extremely frustrating if it is not sufficiently responsive. Showing hundreds of nodes and thousands of edges can be a challenge. </p>
<p class="author-bio">Paul Anderson is VP of Engineering at GrammaTech. He&nbsp;received&nbsp;his B.Sc. from Kings College, University of London and&nbsp;his Ph.D. in Computer Science from City University London. Contact him at paul@grammatech.com.</p>
<p class="contact-info"><span class="body">GrammaTech, Inc.  </span><span class="hyperlink"><a href="http://www.grammatech.com">www.grammatech.com</a></span></p>
<p class="contact-info"><span class="body">Follow: <a href="https://twitter.com/GrammaTech">Twitter</a> </span><span class="hyperlink"><a href="http://www.facebook.com/pages/GrammaTech-Inc/109918459032334">Facebook</a></span> <span class="hyperlink"><a href="http://www.grammatech.com/blog">Blog</a></span> <span class="hyperlink"><a href="https://plus.google.com/102184542944276243239">Google+</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/grammatech">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/watch?v=2NDv_hYUH0E">YouTube</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static analysis helps manage risk in Java</title>
		<link>http://embedded-computing.com/articles/static-helps-manage-risk-java/</link>
		<comments>http://embedded-computing.com/articles/static-helps-manage-risk-java/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 15:00:00 +0000</pubDate>
		<dc:creator>Jon Jarboe, Coverity</dc:creator>
				<category><![CDATA[application security threats]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[c code analysis tool]]></category>
		<category><![CDATA[c static code analyzer]]></category>
		<category><![CDATA[code analysis tool]]></category>
		<category><![CDATA[code analyze tool]]></category>
		<category><![CDATA[code analyzer tool]]></category>
		<category><![CDATA[code metrics tools]]></category>
		<category><![CDATA[coding standards java]]></category>
		<category><![CDATA[computer networks security]]></category>
		<category><![CDATA[computer physical security]]></category>
		<category><![CDATA[computer security policies]]></category>
		<category><![CDATA[computer security risk]]></category>
		<category><![CDATA[computer security risks]]></category>
		<category><![CDATA[Coverity]]></category>
		<category><![CDATA[data center security standards]]></category>
		<category><![CDATA[data security risks]]></category>
		<category><![CDATA[data security threats]]></category>
		<category><![CDATA[detect memory leak]]></category>
		<category><![CDATA[information security audits]]></category>
		<category><![CDATA[information security compliance]]></category>
		<category><![CDATA[information technology security policy]]></category>
		<category><![CDATA[internet security risks]]></category>
		<category><![CDATA[it security audits]]></category>
		<category><![CDATA[it security guidelines]]></category>
		<category><![CDATA[it security policies]]></category>
		<category><![CDATA[it security risks]]></category>
		<category><![CDATA[it security threat]]></category>
		<category><![CDATA[it security vulnerabilities]]></category>
		<category><![CDATA[java code analysis tool]]></category>
		<category><![CDATA[java coding programs]]></category>
		<category><![CDATA[java coding projects]]></category>
		<category><![CDATA[java development environments]]></category>
		<category><![CDATA[java programming coding]]></category>
		<category><![CDATA[java software development tools]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[manage multiple projects]]></category>
		<category><![CDATA[memory leak detect]]></category>
		<category><![CDATA[metrics software development]]></category>
		<category><![CDATA[network security attacks]]></category>
		<category><![CDATA[network security breaches]]></category>
		<category><![CDATA[network security issues]]></category>
		<category><![CDATA[network security risk]]></category>
		<category><![CDATA[network security risks]]></category>
		<category><![CDATA[network security threat]]></category>
		<category><![CDATA[network security vulnerabilities]]></category>
		<category><![CDATA[open source code analysis tools]]></category>
		<category><![CDATA[physical security computer]]></category>
		<category><![CDATA[programming development tools]]></category>
		<category><![CDATA[project risk identification]]></category>
		<category><![CDATA[security software development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software developer tool]]></category>
		<category><![CDATA[software lifecycle development]]></category>
		<category><![CDATA[software process metrics]]></category>
		<category><![CDATA[source code static analysis]]></category>
		<category><![CDATA[static code analyser]]></category>
		<category><![CDATA[static code analyzer c]]></category>
		<category><![CDATA[static code analyzers]]></category>
		<category><![CDATA[Static code/analysis tools]]></category>
		<category><![CDATA[static source code analysis]]></category>
		<category><![CDATA[tools for software development]]></category>
		<category><![CDATA[web security threats]]></category>
		<category><![CDATA[wireless security risks]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=8c9163b3bbadeefeb3317c13550e148d</guid>
		<description><![CDATA[When it comes to software development, the old adage is best spun in a slightly different way: better "early" than never. Accordingly, static analysis can help those developing in Java to stay one step ahead of potential coding problems.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="1" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5946%2Ffigures%2F1" />When it comes to software development, the old adage is best spun in a slightly different way: better &#8220;early&#8221; than never. Accordingly, static analysis can help those developing in Java to stay one step ahead of potential coding problems.</h3>
<p><span id="more-18305"></span><span class='body'>
<p class="body-text">Today&#8217;s software development teams are under immense pressure; the market demands high-quality, secure releases at a constantly increasing pace while security threats become more and more sophisticated. Considering the high cost of product failures and security breaches, it is more important than ever to address these risks throughout the software development process. Potential problems need to be spotted early to prevent release delays or, worse, post-release failures. </p>
<p class="body-text">Fortunately, there are numerous tools to help developers manage these risks, helping to identify potential problems early in the development phase when issues are less disruptive and easier to fix. They are readily accessible to developers and easy to use within many development environments. This applies to developers programming in any language; however, we focus on Java in this discussion (see Sidebar 1).</p>
<p class="figures">
<figure>
<table width="300" border="0" align="right" cellpadding="2" cellspacing="0">
<tr>
<td align="center" style="padding-left:10px" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5946%2Fsidebars%2F1" title="Though Java&amp;#8217;s mature ecosystem, numerous IDEs, and abundance of reference materials ease Java application development, they can also bestow a false sense of security upon developers, who should be watchful to mitigate Java&amp;#8217;s weaknesses."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=290&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5946%2Fsidebars%2F1" alt="21" width="290" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Sidebar 1:</b> Though Java&#8217;s mature ecosystem, numerous IDEs, and abundance of reference materials ease Java application development, they can also bestow a false sense of security upon developers, who should be watchful to mitigate Java&#8217;s weaknesses.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 3.0x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Static analysis helps mitigate risk </p>
<p class="body-text">When considering static analysis tools for Java or otherwise, it is important to understand what these tools are. The term &#8220;static analysis&#8221; refers to the approach of analyzing a program without executing it. As we&#8217;ll see in the next section, static analysis tools can be used to produce reports on anything from coding standard violations to specific errors or vulnerabilities. Simply put, static analysis tools analyze source code to find information useful for managing risk.</p>
<p class="body-text">One benefit of static analysis is that it can be performed early in the development cycle, often before the application will even execute. It is commonly integrated into an automated build, so that there is virtually no overhead to running frequent analyses. By integrating static analysis into the inner development loop, users maximize the value they get from such tools.</p>
<p class="body-text">When used in conjunction with a well-designed development process, static analysis tools provide crucial visibility into the state of the software. This enables development teams to understand the level of risk in their code and where the risk resides so they can take action to mitigate or remove it entirely (Table 1). Individual tools generally focus on specific problems faced by software development teams, and teams often use a combination of these tools to get a comprehensive view of their development effort.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5946%2Ftables%2F1" title="Static analysis tools typically find specific types of issues, with each type representing a different class of risk and requiring a different type of action."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5946%2Ftables%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Table 1:</b> Static analysis tools typically find specific types of issues, with each type representing a different class of risk and requiring a different type of action.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Developers have traditionally used static analysis tools via a simple IDE integration or as stand-alone tools. While the tools add significant value to the development effort, the proliferation of tools has created efficiency problems as developers spend more and more time using and maintaining different tools and sifting through more and more results. To wisely manage development resources, teams must be able to effectively manage, filter, and prioritize all those issues.</p>
<p class="body-text">To address these problems, development testing platforms have emerged to unify and manage all of this static analysis information in one place, simplifying the user experience and increasing visibility and efficiency at larger scales while providing relevant access controls and reporting. Development testing platforms are even starting to blur the line between static analysis and other types of analysis by utilizing &#8211; during the static analysis process &#8211; artifacts generated during earlier program runs. For example, these platforms can use code coverage information from test runs during static analysis to effectively identify missing test cases automatically. The traditional approach to this problem requires significant manual effort based on simple coverage thresholds. By leveraging data from different sources, these platforms are able to significantly reduce the manual effort and time required to accomplish this with other methods.</p>
<p class="heading-1">Selecting static analysis tools for Java</p>
<p class="body-text">The most popular, free, static analysis tools for Java are probably Checkstyle, PMD, and FindBugs. While they all fall under the &#8220;static analysis&#8221; umbrella, their strengths are so sufficiently different that many consider the tools to be complementary rather than alternatives.</p>
<p class="heading-2">Checkstyle</p>
<p class="body-text">Checkstyle is billed as &#8220;a development tool to help programmers write Java code that adheres to a coding standard[1],&#8221; although it does not strictly limit itself to coding standard enforcement. It provides a documented API for users to define their own custom checks. Typical coding standards utilize basic rules to make code more readable and reduce the likelihood that future code changes will introduce bugs. Standards tend to define conventions about formatting (white space, bracketing, naming, commenting, and so on), inheritance, and visibility. When adequately enforced, well-designed coding standards can help developers reduce risk. Enforcement can be difficult, though, since coding standards generate a lot of violations and there can be significant pressure to ignore noisy rules. With legacy code, this can make enforcing new coding standards unfeasible. While most of the issues identified by Checkstyle do not affect code correctness, robustness, or performance, there is real value in helping developers quickly understand code written by others. It is not always obvious how to quantify the risk represented by these violations and it is problematic to measure risk directly from violation counts, but changes in those counts can be a reasonable proxy for changes in risk.</p>
<p class="heading-2">PMD</p>
<p class="body-text">PMD is described as &#8220;&#8230;a source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth[2].&#8221; It, too, is evolving and the current checks focus mainly on syntactic oddities that might belie developer mistakes, such as overcomplicated expressions, empty blocks, unused variables, parameters, and class members. It also has a popular module to identify duplicated code. Because it is generally reporting &#8220;suspicious code&#8221; as opposed to specific coding errors or standards violations, the user will need to carefully select the checks enabled for everyday use. Because enforced rules are selected by the user, this tool can be useful for both legacy and greenfield projects, and it is often easy to correlate these counts with risk. Unfortunately, it might not be obvious whether reported issues should be considered defects or maintenance concerns.</p>
<p class="heading-2">FindBugs</p>
<p class="body-text">FindBugs is probably the most popular of these tools. It looks for actual bugs in the code, as well as suspicious code and standards violations. Because of the wide range of reported issues, it is important to use a configuration that includes the most relevant checks for the project. This is especially true for legacy projects, as it&#8217;s easier to keep new projects clean from the beginning. Like PMD, any team can benefit from using FindBugs and associating issue counts to risk can be straightforward.</p>
<p class="body-text">Commercial static analysis tools show similar diversity, identifying everything from standards violations to actual defects and security vulnerabilities. To illustrate how a commercial tool might compare to a free tool, I analyzed version 1.496 of the Jenkins job management system (www.jenkins-ci.org) using a proprietary static analysis solution and version 2.0.1 of FindBugs, with all checks enabled. On this code base, 852&nbsp;unique issues were identified &#8211; with only 28&nbsp;issues identified by both products. The proprietary solution found 197&nbsp;unique issues, with 188 of those coming from high-impact categories (security and concurrency bugs, resource leaks, and unhandled exceptions like null dereferences). FindBugs found 627&nbsp;unique issues, with 29 coming from those high-impact categories. In short, each of the tools found significant high-impact issues missed by the others, so using a proprietary solution or&nbsp;FindBugs alone will leave significant risk undetected.</p>
<p class="heading-1">Development testing &#8211; Tying&nbsp;it all&nbsp;together</p>
<p class="body-text">Static analysis tools are a powerful ally in the software development effort for Java developers, as these tools enable developers to gain insight into risk throughout the software development life cycle. They are typically easy to automate, enabling users to spend their time fixing problems rather than running the tools.</p>
<p class="body-text">When it comes to managing risk, more information is generally better &#8211; as long as that information illuminates actual sources of risk that developers care about. When deciding which tools to adopt, remember to consider not just the types of issues that analysis tools identify, but how those tools can work together to provide additional value. Also, be sure to configure them appropriately so that the number of issues doesn&#8217;t overwhelm your users.</p>
<p class="body-text">Modern development testing platforms take testing tools to another level by unifying the data in one place, simplifying the user experience, and creating opportunities to provide even more value.</p>
<p class="reference-heading">References</p>
<p class="references-list">[1] http://checkstyle.sourceforge.net/</p>
<p class="references-list">[2] http://pmd.sourceforge.net/</p>
<p class="author-bio">Jon Jarboe is Senior Technical Manager for Coverity, where&nbsp;he helps developers understand the value of adopting development testing and managing risk throughout the software development life cycle. </p>
<p class="contact-info">Coverity <span class="hyperlink"><a href="mailto:info@coverity.com">info@coverity.com</a></span>  <span class="hyperlink"><a href="http://www.coverity.com">www.coverity.com</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/Coverity">Twitter</a> <a href="https://communities.coverity.com/blogs/development-testing-blog/">Blog</a></span> <span class="hyperlink"><a href="http://www.facebook.com/Coverity">Facebook</a></span> <span class="hyperlink"><a href="https://plus.google.com/111847441226878488213/posts">Google+</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/coverity">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/user/CoverityInc">YouTube</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting down to business: Leveraging the right static analysis</title>
		<link>http://embedded-computing.com/articles/getting-leveraging-right-static-analysis/</link>
		<comments>http://embedded-computing.com/articles/getting-leveraging-right-static-analysis/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 15:00:00 +0000</pubDate>
		<dc:creator>Arthur Hicken, Parasoft</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[balanced scorecard metrics]]></category>
		<category><![CDATA[business performance metrics]]></category>
		<category><![CDATA[c code static analysis]]></category>
		<category><![CDATA[c static analysis tool]]></category>
		<category><![CDATA[c static analysis tools]]></category>
		<category><![CDATA[c static code analyzer]]></category>
		<category><![CDATA[customer satisfaction metrics]]></category>
		<category><![CDATA[detect memory leak]]></category>
		<category><![CDATA[efficiency metrics]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software entwicklung]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[erp implementation methodology]]></category>
		<category><![CDATA[erp implementations]]></category>
		<category><![CDATA[erp system implementation]]></category>
		<category><![CDATA[financial performance metrics]]></category>
		<category><![CDATA[Getting down to business]]></category>
		<category><![CDATA[hr performance metrics]]></category>
		<category><![CDATA[implementation erp]]></category>
		<category><![CDATA[implementation of erp]]></category>
		<category><![CDATA[implementing erp system]]></category>
		<category><![CDATA[key performance metrics]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[kpi metrics]]></category>
		<category><![CDATA[manufacturing performance metrics]]></category>
		<category><![CDATA[memory leak detect]]></category>
		<category><![CDATA[memory leak detector]]></category>
		<category><![CDATA[metrics software]]></category>
		<category><![CDATA[organizational performance measures]]></category>
		<category><![CDATA[parasoft]]></category>
		<category><![CDATA[performance management metrics]]></category>
		<category><![CDATA[performance measurement metrics]]></category>
		<category><![CDATA[performance metrics dashboard]]></category>
		<category><![CDATA[performance metrics examples]]></category>
		<category><![CDATA[process performance metrics]]></category>
		<category><![CDATA[productivity metrics]]></category>
		<category><![CDATA[project performance metrics]]></category>
		<category><![CDATA[quality software engineering]]></category>
		<category><![CDATA[real time embedded software]]></category>
		<category><![CDATA[real time embedded software development]]></category>
		<category><![CDATA[real time embedded systems]]></category>
		<category><![CDATA[sales performance metrics]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software complexity metrics]]></category>
		<category><![CDATA[software development system]]></category>
		<category><![CDATA[software embedded]]></category>
		<category><![CDATA[software for embedded systems]]></category>
		<category><![CDATA[software lifecycle development]]></category>
		<category><![CDATA[software lifecycle models]]></category>
		<category><![CDATA[software process metrics]]></category>
		<category><![CDATA[source code analysis tool]]></category>
		<category><![CDATA[source code static analysis]]></category>
		<category><![CDATA[static analysis java]]></category>
		<category><![CDATA[static analysis tools java]]></category>
		<category><![CDATA[static code analyser]]></category>
		<category><![CDATA[static code analyzers]]></category>
		<category><![CDATA[Static code/analysis tools]]></category>
		<category><![CDATA[static source code analysis tools]]></category>
		<category><![CDATA[successful erp implementation]]></category>
		<category><![CDATA[what is erp implementation]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=e35bd4d3c57663eaf3a89abb5ae7948b</guid>
		<description><![CDATA[Static analysis is a development testing activity with the potential to go far beyond simply checking code. When used as part of a policy-driven defect prevention strategy, static analysis can drive a software engineering team's productivity and minimize fiscal, legal, and ethical risks associated with potentially faulty code. The reason more organizations do not realize the benefits of static analysis, however, is that it's often homogeneously deployed as a tool for "finding bugs." But the truth is that there are different implementations of static analysis that serve different purposes in the development process. And while it's a foregone conclusion that software engineers should run static code analysis, the proper implementation of the right technologies is the difference between wasting time and money and reaching new software development heights.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5948%2Ffigures%2F2" />Static analysis is a development testing activity with the potential to go far beyond simply checking code. When used as part of a policy-driven defect prevention strategy, static analysis can drive a software engineering team&#8217;s productivity and minimize fiscal, legal, and ethical risks associated with potentially faulty code. The reason more organizations do not realize the benefits of static analysis, however, is that it&#8217;s often homogeneously deployed as a tool for &#8220;finding bugs.&#8221; But the truth is that there are different implementations of static analysis that serve different purposes in the development process. And while it&#8217;s a foregone conclusion that software engineers should run static code analysis, the proper implementation of the right technologies is the difference between wasting time and money and reaching new software development heights.</h3>
<p><span id="more-18308"></span><span class='body'>
<p class="body-text">Generally speaking, best practices are platform neutral &#8211; that&#8217;s why they&#8217;re called &#8220;best practices.&#8221; The subtleties endemic to embedded development notwithstanding, there are known standards for ensuring quality, regardless of platform. Avoiding memory leaks, for example, should be universal. Further, the relationship between static analysis and software isn&#8217;t necessarily defined by the application: It is defined by the purpose of the device. That said, running static analysis is a particularly important best practice for embedded software development.</p>
<p class="body-text">Traditionally, embedded software is very costly and painful to access post-release. For this reason, most quality or validation activities are focused on eliminating the need to patch or refactor embedded code. Fixing errors post-release poses the greatest risk not only to the brand but also the bottom line. In some industries, particularly in the safety-critical realm, the consequences associated with software defects are so substantial that quality and verification tasks must be executed flawlessly. Software embedded into critical devices such as insulin pumps, weapon control systems, automotive braking systems, and so on, require a preventive strategy that uses a full range of static analysis capabilities; otherwise consequences could include costly litigation, C-level resignations, and even loss of life. This is opposed to agile, continuous development, Web-driven software applications such as smartphones, televisions, and so on, for which a preventive strategy is less important. To this end, the following discussion takes place on the preventive strategy side of the software development spectrum, examining various static analysis implementations: </p>
<ul>
<li class="bullets">Integration-time static analysis</li>
<li class="bullets">Continuous Integration-Time (CI) static analysis</li>
<li class="bullets">Metrics analysis</li>
<li class="bullets">Edit-time static analysis</li>
<li class="bullets">Runtime static analysis</li>
</ul>
<p class="heading-1">Integration-time static analysis</p>
<p class="body-text">Running static analysis during integration to detect low-hanging fruit and egregious errors is a good starting point for implementing a preventive strategy. Integration-time static analysis simulates feasible application paths without actually executing the code, which is very helpful for systems in which runtime analysis isn&#8217;t possible. Static analysis can test across multiple functions and files and catch common memory problems, such as uninitialized memory, overflows, null pointers, and so on.</p>
<p class="body-text">Static analysis serves a few purposes in terms of the development strategy when organizations begin with testing during integration. First, engineers can review the test results and determine how important they are for the particular application. Static analysis might uncover potential defects that might have a serious impact on software security, reliability, or performance. On the other hand, it could return things that the business might not care about. For example, business probably doesn&#8217;t care about a defect in a gaming console that causes the software to crash when an unlikely sequence of operations occurs. The user can simply reboot and continue enjoying their system. Resolving the same sort of issue in other contexts, however, might be crucial to preventing catastrophic consequences.</p>
<p class="body-text">Static analysis can also help software engineers find potential defects that would have been very difficult to conceive of during the risk assessment phase. Engineers can catalog potential defects to improve future risk assessment iterations. </p>
<p class="heading-1">Continuous Integration-Time (CI) static analysis</p>
<p class="body-text">After running integration-time static analysis, software engineers should have a stronger sense of potential systemic problems in the code. The next step is to run CI static analysis to enforce the coding policy outlined in the planning phase. This prevents the types of defects discovered during integration-time analysis. </p>
<p class="body-text">For every issue discovered in static analysis, there are at least 10 more of the exact same thing in other places in the code. Static analysis is the ideal tool for addressing all violations of the same kind at the same time. This is opposed to chasing every possible path through the code. It&#8217;s far better to find the systemic problems in order to create an environment in which bugs cannot survive. </p>
<p class="body-text">When we talk about <span class="italics">static analysis,</span> in many cases we mean <span class="italics">anti-pattern analysis.</span> A positive pattern is something that should be in the code. For example, a policy that requires engineers to use a <span class="code-character">typedef</span> when declaring function pointers is a positive pattern static analysis rule[1]. This is in contrast to a policy that, for example, prohibits the use of the <span class="code-character">data()</span> member function from a string class when interfacing with the standard C library[2].</p>
<p class="body-text">Executing both types (positive- and anti-pattern) of static analysis is important, but it&#8217;s worth mentioning this distinction because if the organization spends the time to build a coding policy based on positive patterns, this ensures that software engineers are building code exactly how it should be per business objectives or compliance requirements.</p>
<p class="heading-1">Metrics analysis</p>
<p class="body-text">Metrics analysis is a static analysis implementation that evaluates code characteristics and provides insight about the code that can help software engineers identify weaknesses (Figure 1). It is a critical sensor that can highlight areas of the application that can be prone to logical errors. Metrics analysis is an essential baseline measurement that should trigger further analysis, such as code review or some other remediation activity. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, 'Figure1', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="Figure1" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5948%2Ffigures%2F1" title="A Parasoft static analysis metrics report"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5948%2Ffigures%2F1" alt="Figure1" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A Parasoft static analysis metrics report</figcaption>
</td>
</tr>
</table>
</figure>
<p class="body-text">Metrics analysis is best used as early as possible because it might affect how software engineers write their code. Avoid trying to implement metrics analysis reactively or during the QA phase. The goal with metrics analysis isn&#8217;t just to detect potential defects; it&#8217;s to detect them in such a way that allows engineers to follow a sustainable coding trajectory. Run metrics analysis on potential defect hotspots, remediate any violations, and implement a pattern-based analysis rule to prevent future occurrences. </p>
<p class="body-text">Any metric that correlates to potential problems is fair game. For example, a medical device company might use metrics analysis to measure cyclomatic complexity because a high score indicates that there are too many decision points for the device to handle during normal operation. Knowing that the complexity score exceeds the threshold set in the coding policy when there are 10 branches to cut, as opposed to finding out in the QA phase, will help keep the project on time and on budget. The organization might, for example, want to measure <span class="code-character">public</span> variables because a high number might correlate to too many dependencies in the code. Each organization will need to decide which metrics can be correlated to possible defects in the code.</p>
<p class="heading-1">Edit-time static analysis</p>
<p class="body-text">The static analysis sweet spot is <span class="italics">while the developer is working in the editor. </span>Running static analysis at edit time serves a few purposes. First, it points software engineers to potential problems. Second, it implements the risk assessment strategy by ensuring that any issues are remediated systemically.</p>
<p class="body-text">But when should static analysis be implemented? We&#8217;ve discussed why implementing static analysis too late is a problem; however, it can also be implemented too early because there must be enough context for static analysis to provide meaningful information. Running static analysis on a character, line, or even statement creates too much noise to be useful. Enforcing positive design patterns ensures that new code is built as intended &#8211; while it&#8217;s being written. Running static analysis at edit time is a powerful way to promote the correct behaviors within the development team because feedback is rapid and in context of the code being written. Leveraging this type of analysis makes code reviews more productive because engineers should be able to correct policy-based errors immediately. </p>
<p class="heading-1">Runtime static analysis</p>
<p class="body-text">Some static analysis patterns can detect defects at runtime. If the embedded target can accommodate the overhead, the organization should execute runtime static analysis to round out its preventive strategy. Runtime static analysis detects errors while the code is actually running, which enables software engineers to test real paths with real data. </p>
<p class="heading-1">Final note about static analysis and&nbsp;QA</p>
<p class="body-text">In an ideal preventive strategy, errors found when QA runs static analysis should already be known and determined acceptable. This is because software engineers should have already tested against and adjusted design patterns to enforce coding policies. Violations at this stage mean that there is a problem with the process, such as improper static analysis rules. In these cases, QA needs to send the code back to development so they can find the systemic cause of the defect and implement a rule to prevent future occurrences. From this perspective, static analysis is a much better quality gate than a bug finder. </p>
<p class="reference-heading">References</p>
<p class="references-list">[1] Joint Strike Fighter, Air Vehicle, C++ Coding Standards, chapter 4.22 &#8220;Pointers &amp; References&#8221;; AV Rule 176</p>
<p class="references-list">[2] PCI Data Security Standard Version 1.2; &#8220;Requirement 6: Develop and maintain secure systems and applications&#8221;</p>
<p class="author-bio">Arthur Hicken is Evangelist at Parasoft and can be contacted at Arthur.Hicken@parasoft.com.</p>
<p class="author-bio">Wayne Ariola is VP of Strategy at&nbsp;Parasoft&nbsp;and&nbsp;can be contacted at Wayne.Ariola@parasoft.com.</p>
<p class="author-bio">Adam Trujillo is Technical Writer at&nbsp;Parasoft&nbsp;and can be contacted at Adam.Trujillo@parasoft.com.</p>
<p class="contact-info">Parasoft <span class="hyperlink"><a href="mailto:info@parasoft.com">info@parasoft.com</a></span>  <span class="hyperlink"><a href="http://www.parasoft.com">www.parasoft.com</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/Parasoft">Twitter</a></span> <span class="hyperlink"><a href="http://blog.parasoft.com/default.aspx">Blog</a></span> <span class="hyperlink"><a href="http://www.facebook.com/parasoftcorporation">Facebook</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/parasoft">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/watch?v=uTQYE1GdU-I">YouTube</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Advanced static analysis meets contract-based programming</title>
		<link>http://embedded-computing.com/articles/advanced-meets-contract-based-programming/</link>
		<comments>http://embedded-computing.com/articles/advanced-meets-contract-based-programming/#comments</comments>
		<pubDate>Tue, 12 Mar 2013 15:00:00 +0000</pubDate>
		<dc:creator>S. Tucker Taft, AdaCore</dc:creator>
				<category><![CDATA[ada 95]]></category>
		<category><![CDATA[ada compiler]]></category>
		<category><![CDATA[ada compilers]]></category>
		<category><![CDATA[ada gnat]]></category>
		<category><![CDATA[AdaCore]]></category>
		<category><![CDATA[application penetration testing]]></category>
		<category><![CDATA[application penetration testing tools]]></category>
		<category><![CDATA[application security vulnerabilities]]></category>
		<category><![CDATA[application vulnerability testing]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[c code static analysis]]></category>
		<category><![CDATA[c static code analyzer]]></category>
		<category><![CDATA[code analyzer tool]]></category>
		<category><![CDATA[gnat ada]]></category>
		<category><![CDATA[gnat ada compiler]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[open source code analysis]]></category>
		<category><![CDATA[owasp application security]]></category>
		<category><![CDATA[owasp security]]></category>
		<category><![CDATA[penetration test tool]]></category>
		<category><![CDATA[penetration test tools]]></category>
		<category><![CDATA[penetration testing methodologies]]></category>
		<category><![CDATA[penetration testing tool]]></category>
		<category><![CDATA[penetration testing web applications]]></category>
		<category><![CDATA[precondition and postcondition]]></category>
		<category><![CDATA[precondition postcondition]]></category>
		<category><![CDATA[security pen testing]]></category>
		<category><![CDATA[security penetration testing tools]]></category>
		<category><![CDATA[security testing for web application]]></category>
		<category><![CDATA[security testing of web applications]]></category>
		<category><![CDATA[security testing web application]]></category>
		<category><![CDATA[security testing web applications]]></category>
		<category><![CDATA[security vulnerability testing]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[source code analysis tool]]></category>
		<category><![CDATA[source code static analysis]]></category>
		<category><![CDATA[spin model checking]]></category>
		<category><![CDATA[static analysis java]]></category>
		<category><![CDATA[static analysis of code]]></category>
		<category><![CDATA[static analysis tools c]]></category>
		<category><![CDATA[static analysis tools java]]></category>
		<category><![CDATA[static code analyser]]></category>
		<category><![CDATA[static code analyzer c]]></category>
		<category><![CDATA[static code analyzers]]></category>
		<category><![CDATA[static code checker]]></category>
		<category><![CDATA[Static code/analysis tools]]></category>
		<category><![CDATA[static source code analysis]]></category>
		<category><![CDATA[testing web application security]]></category>
		<category><![CDATA[the spin model checker]]></category>
		<category><![CDATA[vulnerability penetration testing]]></category>
		<category><![CDATA[vulnerability testing tools]]></category>
		<category><![CDATA[web app penetration testing]]></category>
		<category><![CDATA[web app security testing]]></category>
		<category><![CDATA[web application pen testing]]></category>
		<category><![CDATA[web application penetration test]]></category>
		<category><![CDATA[web application security scanner]]></category>
		<category><![CDATA[web application vulnerabilities]]></category>
		<category><![CDATA[web application vulnerability]]></category>
		<category><![CDATA[web application vulnerability scanner]]></category>
		<category><![CDATA[web application vulnerability scanners]]></category>
		<category><![CDATA[web application vulnerability scanning]]></category>
		<category><![CDATA[web application vulnerability testing]]></category>
		<category><![CDATA[web server penetration testing]]></category>
		<category><![CDATA[web server security scan]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=3ada9075641d596c82e56ca14dece204</guid>
		<description><![CDATA[Advanced static analysis tools are helping programmers say what they mean, and mean what they say.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5947%2Ffigures%2F3" />Advanced static analysis tools are helping programmers say what they mean, and mean what they say.</h3>
<p><span id="more-18492"></span><span class='body'>
<p class="body-text">Advanced static analysis tools are becoming a standard part of many professional programmers&#8217; toolkits. At the same time, a growing emphasis is being placed on <span class="italics">contract-based programming, </span>where explicit preconditions, postconditions, and other <span class="italics">contracts</span> are added to source code to help enhance software safety and security as embedded systems grow more complex and interdependent. As these two trends meet, some interesting opportunities arise. In particular, certain advanced static analysis tools are beginning to directly recognize contracts, and some are going so far as to help the programmer create contracts, by inferring them from existing code. A review of advanced static analysis helps set the stage for a discussion of contract-based programming.</p>
<p class="heading-1">Reviewing advanced static analysis</p>
<p class="body-text">Newer static analysis tools are no longer simply enforcing coding guidelines, but instead are delving into the semantics of program constructs, effectively simulating what might happen at runtime, to detect logic inconsistencies or security vulnerabilities. Typically based on compiler technology, these tools use advanced data flow analysis to determine where the program might go awry, by tracking the values that variables might have at runtime, and then checking whether those values are all properly handled by the program and whether possibly tainted data is properly vetted before being trusted. There are still challenges with such tools generating false positives, effectively false alarms, in places where the code is in fact safe and secure but the tool&#8217;s value tracking or taint tracking is inadequately precise. Nevertheless, improved automated error ranking algorithms and techniques, such as focusing only on differences between one analysis and the next, have made these tools valuable new weapons in the ongoing battle to improve safety and security at a reasonable expense.</p>
<p class="body-text">Figure 1 illustrates how a static analyzer can use data flow analysis to track the possible values of a variable such as <span class="code-character">Count</span> and determine whether any of these values might cause a problem at some later point. The values of a table are being displayed, followed by the average value. The classic &#8220;bug&#8221; here is to ignore the possibility that the table is empty, causing a possible division-by-zero error.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5947%2Ffigures%2F1" title="Advanced flow analysis example"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5947%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Advanced flow analysis example</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">In this example, to avoid a divide by zero, the programmer has included an assertion that the table has at least one element (that is, &#8220;<span class="code-character">Table&#8217;Length &gt;= 1)</span>&#8221;. However, some data flow analysis is needed to verify that <span class="code-character">Float(Count)</span> is non-zero in the division &#8220;<span class="code-character">Sum / Float(Count)</span>.&#8221; This requires the static analyzer to link the value of <span class="code-character">Float(Count)</span> to the value of <span class="code-character">Count</span>, the final value of <span class="code-character">Count</span> to the number of loop iterations determined by <span class="code-character">Table&#8217;Range</span>, and that number to <span class="code-character">Table&#8217;Length</span> (X&#8217;Range means &#8220;X&#8217;First .. X&#8217;Last,&#8221; while X&#8217;Length means &#8220;(if X&#8217;First &gt; X&#8217;Last then 0 else X&#8217;Last &#8211; X&#8217;First + 1)&#8221;). What is easy for the programmer can be more work for the static analyzer.</p>
<p class="body-text">So what does the static analyzer do with &#8220;<span class="code-character">pragma Assert(Table&#8217;Length &gt;= 1)</span>&#8221;? Here is where analyzers differ, depending on whether they adopt a largely bottom-up or top-down strategy for finding errors that cross procedure boundaries, and how they integrate this with the notion of contract-based programming.</p>
<p class="heading-1">Where contract-based programming fits in</p>
<p class="body-text"><span class="italics">Contract-based programming</span> is (among other things) the usage of preconditions and postconditions to express expectations about the inputs and outputs (respectively) of the functions and procedures (that is, the subprograms) that comprise the program. </p>
<p class="body-text">In the example in Figure 1, the programmer&#8217;s intent is clearly that &#8220;<span class="code-character">Table&#8217;Length &gt;= 1</span>&#8221; acts as a precondition for the procedure. Unfortunately, this <span class="code-character">Assert</span> is buried in the code for the procedure, rather than being readily visible to a caller. In languages such as Eiffel[1] or Ada 2012[2] where pre- and postconditions are part of the syntax, or in languages like C# or Java with extensions like Spec#[3] or Java Modeling Language (JML)[4], the programmer&#8217;s intent for the <span class="code-character">Table</span> input to the <span class="code-character">Display_Table</span> procedure can be expressed using an explicit precondition. For example, in Ada 2012, the specification for this procedure could be written as:</p>
<p class="code-paragraph">procedure Display_Table(Table: Float_Array) with Pre =&gt; Table&#8217;Length &gt;= 1;</p>
<p class="body-text">
<p class="body-text">This specifies the aspect <span class="code-character">Pre</span>, short for &#8220;precondition,&#8221; for the <span class="code-character">Display_Table</span> procedure, so that it is visible to the caller and effectively becomes a contract on <span class="code-character">Display_Table</span>, indicating that so long as <span class="code-character">Table</span> is of length at least one, <span class="code-character">Display_Table</span> can do its job correctly.</p>
<p class="heading-1">Static analysis: Checking and inferring contracts </p>
<p class="body-text">Now back to pragma <span class="code-character">Assert</span> in Figure&nbsp;1. Without an explicit contract requiring the caller to ensure that <span class="code-character">Table&#8217;Length &gt;= 1</span>, the static analyzer could rightly complain since there is nothing preventing the caller from passing in a zero-length Table. However, many static analyzers use a different strategy. Rather than immediately complaining about the <span class="code-character">Assert</span>, they rely on more global checks to determine whether or not there is a real problem, and only complain if there is a call that passes in a zero-length Table. As mentioned, these kinds of global, interprocedural checks can either be mostly bottom-up, or mostly top-down, as illustrated in Figure 2. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5947%2Ffigures%2F2" title="Top-down versus bottom-up interprocedural static analysis"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5947%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Top-down versus bottom-up interprocedural static analysis</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">In a top-down strategy, the analyzer walks down from the entry point of the program, with actual parameters substituted in for formals at each call, until every call of each subprogram is identified, accumulating a set of possible actual values that is passed in for each formal. This value set is then used to determine whether the <span class="code-character">Assert</span> might be violated via some particular chain of calls.</p>
<p class="body-text">In the bottom-up strategy, analysis starts at the <span class="italics">leaves</span> of the program (subprograms that make no calls), analyzing each subprogram to determine which requirements it imposes on its inputs. In this example, the <span class="code-character">Assert(Table&#8217;Length &gt;= 1)</span> is converted effectively into an implicit precondition for the procedure. The static analyzer is essentially inferring the unstated contracts for each subprogram, which are then propagated to each call point, where the preconditions become implicit Asserts on the actual parameters at the point of call. This process continues up through higher-level subprograms, until ultimately the whole program has been analyzed.</p>
<p class="body-text">The bottom-up approach can scale better than the top-down approach as programs grow large, but it depends on inferring potentially complex contracts, including conditional preconditions where the precondition for one input might depend on the value of another input. For example, for a procedure starting with &#8220;<span class="code-character">if X &gt; 0 then Assert(Y &gt; 0)</span>&#8221; the inferred precondition should be &#8220;<span class="code-character">X &gt; 0 ==&gt; Y &gt; 0</span>&#8221;. Two advanced static analysis tools that infer contracts via a bottom-up analysis are the CodePeer tool from AdaCore[5], which analyzes Ada source code, and the Clousot tool from Microsoft Research[6], which analyzes .NET programs.</p>
<p class="body-text">As explicit pre- and postconditions begin to appear in programs, using languages like Ada 2012, new synergies arise between these contracts and the capabilities of advanced static analysis tools. Explicit contracts can simplify interprocedural analysis, as the programmer has already done the hard work. The tool can simply check against the explicit precondition rather than having to propagate across the call. Within the subprogram, the tool can use the precondition as a precise description of the possible input values, with no need to guess the programmer&#8217;s intent. </p>
<p class="body-text">Explicit contracts can also assist other programmers hoping to make use of the subprogram, since they act as machine-checkable comments and low-level requirements embedded directly in the code. But they only help if programmers write them. Since some advanced static analysis tools can infer contracts from the source code, they can offer to automatically insert them into the source. Tools like Clousot[6] allow the programmer to &#8220;bless&#8221; an inferred contract, having it become a permanent part of the source code.</p>
<p class="heading-1">The future: Proving while programming</p>
<p class="body-text">The synergy between static analysis and contract-based programming may allow faster adoption of both technologies. As these two are integrated, a new approach to programming can emerge, where a programmer&#8217;s assistant is helping to infer and check contracts as the source code is created. Safety and security are being proved as the program is written, much as a spell-checker in a text editor can ensure that no misspelled words ever see the light of day. As these technologies mature, we can hope that insecure, unsafe programs will no longer be the norm, but rather safety and security will be built in from day one, with the bonus of machine-checkable, human-readable contracts accompanying code as it is written. Tools like CodePeer[5] and Clousot[6] are showing some of the possibilities. </p>
<p class="reference-heading">References</p>
<p class="references-list">[1] ECMA International, Standard ECMA-367, Eiffel: Analysis, Design&nbsp;and Programming Language, 2nd Edition, June 2006, <span class="hyperlink"><a href="http://www.ecma-international.org/publications/standards/Ecma-367.htm">www.ecma-international.org/publications/standards/Ecma-367.htm</a></span></p>
<p class="references-list">[2] Ada 2012 Language Reference Manual, <span class="hyperlink"><a href="http://www.ada-auth.org/standards/ada12.html">www.ada-auth.org/standards/ada12.html</a></span></p>
<p class="references-list">[3] Microsoft Research, Spec#, <span class="hyperlink"><a href="http://research.microsoft.com/en-us/projects/specsharp/">http://research.microsoft.com/en-us/projects/specsharp/</a></span></p>
<p class="references-list">[4] Patrice Chalin, Joseph R. Kiniry, Gary T. Leavens, and Erik Poll, &#8220;Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2,&#8221; Formal Methods for Components and&nbsp;Objects (FMCO) 2005, Revised Lectures, pages 342-363, Volume 4111 of LNCS, Springer Verlag, 2006, <span class="hyperlink"><a href="http://www.eecs.ucf.edu/%257Eleavens/JML/fmco.pdf">www.eecs.ucf.edu/%7Eleavens/JML/fmco.pdf</a></span></p>
<p class="references-list">[5] AdaCore, CodePeer: Automated Code Review and Validation, <span class="hyperlink"><a href="http://www.adacore.com/codepeer">www.adacore.com/codepeer</a></span></p>
<p class="references-list">[6] Manuel F&#228;hndrich and Francesco Logozzo, Clousot: Static Contract Checking with Abstract Interpretation, Microsoft Research, Redmond, WA, <span class="hyperlink"><a href="http://research.microsoft.com/pubs/138696/main.pdf">http://research.microsoft.com/pubs/138696/main.pdf</a></span></p>
<p class="author-bio">S. Tucker&nbsp;Taft is VP and Director of&nbsp;Language Research at AdaCore, a&nbsp;company&nbsp;focused on open-source tools to&nbsp;support the development of high-integrity software. He joined AdaCore in 2011 as part of a merger with SofCheck, which he had founded in 2002 to develop advanced static analysis technology. Prior to that Tucker was a Chief Scientist at Intermetrics, Inc. and its follow-ons for 22&nbsp;years, where he led the design of Ada 95. Tucker received&nbsp;an A.B. Summa Cum Laude degree from Harvard University, where he has more recently taught compiler construction and programming language design.</p>
<p class="contact-info">AdaCore  <span class="hyperlink"><a href="mailto:info@adacore.com">info@adacore.com</a></span> <span class="hyperlink"><a href="http://www.adacore.com/codepeer/">www.adacore.com/codepeer/</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/AdaCoreCompany">Twitter</a> <a href="http://www.facebook.com/pages/AdaCore/104074652961446?rf=108145865885859">Facebook</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/adacore">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/user/AdaCore05">YouTube</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Eating right at the open source buffet</title>
		<link>http://embedded-computing.com/articles/eating-open-source-buffet/</link>
		<comments>http://embedded-computing.com/articles/eating-open-source-buffet/#comments</comments>
		<pubDate>Fri, 08 Feb 2013 15:00:00 +0000</pubDate>
		<dc:creator>Bill Weinberg, Olliance Consulting</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[computer board]]></category>
		<category><![CDATA[computer on module]]></category>
		<category><![CDATA[eclipse ide for java developers]]></category>
		<category><![CDATA[embedded board]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded computer system]]></category>
		<category><![CDATA[embedded computer vision]]></category>
		<category><![CDATA[embedded computing design magazine]]></category>
		<category><![CDATA[embedded controller]]></category>
		<category><![CDATA[embedded development kit]]></category>
		<category><![CDATA[embedded devices]]></category>
		<category><![CDATA[embedded hardware]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux]]></category>
		<category><![CDATA[embedded linux board]]></category>
		<category><![CDATA[embedded linux development kit]]></category>
		<category><![CDATA[embedded linux hardware]]></category>
		<category><![CDATA[embedded operating system]]></category>
		<category><![CDATA[embedded operating systems]]></category>
		<category><![CDATA[embedded pc]]></category>
		<category><![CDATA[embedded processor]]></category>
		<category><![CDATA[embedded programming]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system software]]></category>
		<category><![CDATA[embedded system software design]]></category>
		<category><![CDATA[embedded systems]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems development]]></category>
		<category><![CDATA[embedded systems programming]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[embedded world]]></category>
		<category><![CDATA[embedding]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[embeded systems]]></category>
		<category><![CDATA[floss open source]]></category>
		<category><![CDATA[gnu open source license]]></category>
		<category><![CDATA[java development tools]]></category>
		<category><![CDATA[linux embedded]]></category>
		<category><![CDATA[linux embedded board]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[mini pc]]></category>
		<category><![CDATA[Olliance Consulting]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open source code analysis]]></category>
		<category><![CDATA[open source oss]]></category>
		<category><![CDATA[open source software licensing]]></category>
		<category><![CDATA[pc104]]></category>
		<category><![CDATA[project with source code]]></category>
		<category><![CDATA[protecting intellectual property]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computer linux]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[source code analysis tools]]></category>
		<category><![CDATA[source code for projects]]></category>
		<category><![CDATA[what is an embedded computer]]></category>
		<category><![CDATA[what is embedded system]]></category>
		<category><![CDATA[windows 7 embedded]]></category>
		<category><![CDATA[windows embedded]]></category>
		<category><![CDATA[windows xp embedded]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=59f75b03640e366534b16655b0fc25ea</guid>
		<description><![CDATA[With the smorgasbord of Open Source Software (OSS) available for developers to dine from, it's vital they "eat right" by choosing the OSS compatible with their existing project and IP needs.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5919%2Ffigures%2F3" />With the smorgasbord of Open Source Software (OSS) available for developers to dine from, it&#8217;s vital they &#8220;eat right&#8221; by choosing the OSS compatible with their existing project and IP needs.</h3>
<p><span id="more-17991"></span><span class='body'>
<p class="body-text">Open Source Software (OSS) offers intelligent systems designers a veritable smorgasbord of tools and technology. Spanning the entire software stack, from boot code and drivers to OSs, executives to middleware, and application components to development tools, OSS&nbsp;provides readily available alternatives to both legacy commercial software and also to in-house code developed from scratch. </p>
<p class="body-text">But dining at the open source table is not an embedded bean feast &#8211; code gathered<span class="interview-name"> </span><span class="italics">&#224; la carte </span>might not always integrate easily to make a well-formed &#8220;meal.&#8221; While literally millions of OSS projects are available on popular forges and hubs, developers must take care to choose the right technology ingredients and tidbits to fit project and intellectual property needs.</p>
<p class="body-text">The following examines resources and tools for discovering OSS projects and metrics for those projects. It also explores factors to consider when choosing OSS projects and components for embedded designs. And it serves up heuristic methods for choosing the OSS technology most appropriate to real-world embedded development needs.</p>
<p class="heading-1">Discovering embedded open source</p>
<p class="body-text">Finding open source software is easy. Finding the right piece of OSS can be much harder. Luckily, options for finding and evaluating OSS are plentiful, and come in five categories: search engines, hosting sites, individual project sites, dedicated OSS discovery tools, and embedded platform distributions.</p>
<p class="heading-2">Search engines</p>
<p class="body-text">Google, Yahoo!, Bing, Baidu, and other general-purpose search engines actually do an okay job at ferreting out OSS projects. A quick search on the string &#8220;open source embedded database,&#8221; for example, yields a rich mix of references and actual project sites and repositories. But while search engines are an okay starting point, using them can yield scattershot results.</p>
<p class="heading-2">Hosting sites, foundations </p>
<p class="body-text">Another path is to go right to the source &#8211; the forges and hubs that host multiple projects. Until a few years ago, <span class="hyperlink"><a href="http://sourceforge.net">SourceForge</a></span> would have been a developer&#8217;s prime destination, with its collection of 450,000 project repositories. But today, new projects are likely to find homes on <span class="hyperlink"><a href="https://github.com/">GitHub</a></span> (with 2.4M unique repositories), <span class="hyperlink"><a href="http://www.codeplex.com/">CodePlex</a></span> (32,000 projects), <span class="hyperlink"><a href="http://code.google.com/">Google Code</a></span> (10,000 projects), <span class="hyperlink">Gitorious</span>, and a long tail of other sites. </p>
<p class="body-text">Yet another type of locale for project hosting is the gamut of open source foundation forges &#8211; the Apache Foundation, the Outercurve Foundation, the Eclipse Foundation, and others. These sites bring together usually related bodies of code (for example, IDE elements and plug-ins for Eclipse) and can boast several hundred hosted projects.</p>
<p class="body-text">While repository aggregations and foundation sites are searchable by themselves, each still constitutes a distinct silo; however vast their portfolios may be, they don&#8217;t cover the entire universe of open source. </p>
<p class="heading-2">Project sites</p>
<p class="body-text">Some projects eschew the crowded forges and build their own dedicated Web sites and repositories. These may be projects of broad community interest, of greater maturity, or merely the result of technical vanity. In any case, the main challenge is still finding the project, not in the relatively limited haystack of a forge but in the larger universe of the World Wide Web.</p>
<p class="heading-2">Discovery portals and tools &#8211; The&nbsp;Michelin Guide of OSS</p>
<p class="body-text">Probably the shortest path to finding and also evaluating open source projects lies in portals that help developers discover, track, and compare open source code and the projects behind them. These free portals include <span class="hyperlink"><a href="http://www.ohloh.net/">Ohloh.net</a></span> (owned by Olliance Consulting parent company Black Duck), <span class="hyperlink"><a href="http://code.google.com/codesearch">Google Code Search</a></span>, and others. These services track the full gamut of open source software, and like the projects they monitor, they are themselves open, letting users introduce new project repositories for cataloging and analysis.</p>
<p class="body-text">OSS management platform tools also exist to help developers discover suitable homemade open source as well as &#8220;in the wild.&#8221; At companies with established policies for OSS use and deployment, developers can use these tools to peruse directories of vetted/approved open source code documented and/or maintained by their employers. These portfolios can also include code built and managed under the umbrella of &#8220;inner-source&#8221; and &#8220;corporate source&#8221; programs. </p>
<p class="heading-2">Embedded platform distributions &#8211; Prix fixe meals</p>
<p class="body-text">If the organization has already committed to a prepackaged embedded platform distribution &#8211; a commercial or community-based Linux tool kit, an Android SDK, or equivalent &#8211; then engineers already have a library of applications, middleware, and utilities at their fingertips. Embedded distributions typically comprise 250 to 500 packages, with each package containing one or more unique, ready-to-use pieces of project code. Unlike downloading code directly from project sites, embedded distributions and SDKs usually include prebuilt versions of project code, tested and vetted for integration compatibility across packages. In many cases, these versions might not be the latest and greatest, and developers might need to turn to the original project sites to access the more current features and bug fixes. However, switching to newer versions of projects, while attractive, can break compatibility with other code in your stack, and also fall outside Service-Level Agreements (SLAs) from commercial suppliers.</p>
<p class="heading-1">Evaluating options, refining the OSS&nbsp;palate</p>
<p class="body-text">Finding potentially useful code represents only half the challenge. Developers must also vet discovered code across a variety of parameters to determine if it&nbsp;is technically and legally viable. Factors to consider include code size, language, and quality; community history and dynamics; software licensing; and provenance.</p>
<p class="body-text"><span class="bold">Code size &#8211;</span> Legacy embedded designs face severe constraints on code size. While tumbling DRAM and flash memory prices have made parsimonious provisioning a concern of the past, embedded software still benefits from compact code. Memory and storage eaten up by utility and infrastructure code are unavailable for differentiating software and for end-user content.</p>
<p class="body-text">Because OSS starts with source code, the memory footprint of a given project or software component isn&#8217;t always obvious. Moreover, today&#8217;s device-based software stacks can contain ingredients cooked up in traditional compiled/assembled languages (C,&nbsp;C++, assembly), byte-code executed Java, and scripted/interpreted languages (PHP, Python, Lua, and so on).</p>
<p class="body-text">The sites and tools mentioned earlier report both the language of projects and the Lines of Code (LoC) in each. If a project is truly size-sensitive, the best approach is to download and build the source code to determine actual binary size (or just examine the total size of scripted/interpreted code). Figure 1 uses Ohloh reports to compare source code growth in three database projects over time.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5919%2Ffigures%2F1" title="Comparing code size (LoC) over time for three database projects"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5919%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Comparing code size (LoC) over time for three database projects</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text"><span class="bold">Language &#8211;</span> Implementation language is as important as functionality and size. If a project is being developed in&nbsp;C, projects in Java or Python probably won&#8217;t integrate well into the existing or planned software stack. </p>
<p class="body-text"><span class="bold">Code quality &#8211;</span> Code quality can prove rather difficult to gage. OSS discovery portals do report how well commented/documented OSS projects are. Other tools exist to vet the quality of code contained within a project, for example, open source <span class="hyperlink"><a href="http://www.sonarsource.org/">Sonar</a></span> and the popular <span class="hyperlink"><a href="http://www.coverity.com/">Coverity</a></span> suite.</p>
<p class="body-text"><span class="bold">Community dynamics &#8211;</span> Important metrics of the health and quality of open source projects lie in the size and activity of the community behind it. Some hosting sites offer historical participation metrics, and some sites include contributor data and activity over the lifetime of a project. Figure 2 uses Ohloh reports to compare the waxing and waning of the developer community over time for three database projects. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5919%2Ffigures%2F2" title="Comparing project contributors over time"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5919%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Comparing project contributors over time</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text"><span class="bold">Commit history &#8211;</span> Tied to community dynamics is the commit history for a project &#8211; how often are changes committed to project repositories, over the project lifetime and for recent timeframes? In an immature project, change can appear to be fast and furious; for moribund projects, commits drop away to zero. Viable, stable, mature projects lie somewhere in between.</p>
<p class="body-text"><span class="bold">Licensing &#8211;</span> Dealing with the diversity of open source license types and requirements is beyond the scope of this article. Of the 2,200+ recognized licenses, developers are most likely to encounter perhaps a dozen. (See a list of the top 20&nbsp;open source licenses at http://osrc.blackducksoftware.com/data/licenses/; these account for 90&nbsp;percent of all projects). The most important open source licenses are the GNU General Public Licenses (GPL, LGPL, AGLP), the Apache License (APL), the BSD license, the Mozilla Public License (MPL), the Eclipse Public License (EPL), and a handful of others. Learn more about these and others at the Open Source Initiative, <span class="hyperlink"><a href="http://opensource.org/">OpenSource.org</a></span>.</p>
<p class="body-text">A larger challenge lies in reconciling project licensing with a company&#8217;s Intellectual Property Rights (IPR) governance and compliance programs. A related challenge is reconciling the requirements of different licenses for diverse code integrated into a single software stack.</p>
<p class="body-text"><span class="bold">Provenance &#8211;</span> Knowing the actual origins of code can also help in finding support for code, as well as protecting the company from potential legal challenges. Many useful and important projects are associated with commercial organizations that help maintain the project and provide support for it. Most projects have a unified copyright (note: the Linux kernel does not), and many have established processes for determining provenance (for example, certificates of origin for code submission).</p>
<p class="heading-1">The choosy OSS diner</p>
<p class="body-text">The goal here has been to serve code-hungry developers useful pointers for discovering, vetting, and ingesting open source software. The diversity of options and the surfeit of licenses need not require a particularly adventuresome technology palate &#8211; OSS is today truly mainstream and it is a rare embedded project that does not use and/or deploy open source software tools and components.</p>
<p class="body-text">Matching the right OSS technology to your project is less like rocket science and more like pairing wines and food. More time &#8220;tasting&#8221; OSS will teach you where to look for compatible coding languages.  </p>
<p class="author-bio">Bill Weinberg is Senior Director of Olliance Consulting, a division of Black&nbsp;Duck Software. </p>
<p class="contact-info">Olliance Consulting,  a division of Black Duck Software <span class="hyperlink"><a href="mailto:info@blackducksoftware.com">info@blackducksoftware.com</a></span> <span class="hyperlink"><a href="http://www.ohloh.net">www.ohloh.net</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/Ohloh">Twitter</a> <a href="http://blog.blackducksoftware.com/">Blog</a></span> <span class="hyperlink"><a href="http://www.facebook.com/BlackDuckSoftware">Facebook</a></span> <span class="hyperlink"><a href="https://plus.google.com/107746957168874785639">Google+</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/black-duck-software">LinkedIn</a></span> <span class="hyperlink"><a href="http://www.youtube.com/user/BlackDuckSoftware">YouTube</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Developing Android-driven applications for automotive infotainment</title>
		<link>http://embedded-computing.com/articles/developing-android-driven-applications-automotive-infotainment/</link>
		<comments>http://embedded-computing.com/articles/developing-android-driven-applications-automotive-infotainment/#comments</comments>
		<pubDate>Thu, 06 Dec 2012 15:00:00 +0000</pubDate>
		<dc:creator>Andrew Patterson, Mentor Graphics</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[automobile manufacturing industry]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[download vm virtualbox]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux computer]]></category>
		<category><![CDATA[embedded linux hardware]]></category>
		<category><![CDATA[embedded linux software]]></category>
		<category><![CDATA[embedded linux training]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software services]]></category>
		<category><![CDATA[embedded software system]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system designs]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system operating system]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems developer]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems operating system]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[host virtual machine]]></category>
		<category><![CDATA[host virtual machines]]></category>
		<category><![CDATA[hotel a bangkok]]></category>
		<category><![CDATA[hotel a new york]]></category>
		<category><![CDATA[hotels a new york]]></category>
		<category><![CDATA[lenix operating system]]></category>
		<category><![CDATA[linux for embedded]]></category>
		<category><![CDATA[linux virtual machines]]></category>
		<category><![CDATA[Mentor Graphics]]></category>
		<category><![CDATA[real time embedded]]></category>
		<category><![CDATA[real time embedded software]]></category>
		<category><![CDATA[real time embedded software development]]></category>
		<category><![CDATA[real time embedded system]]></category>
		<category><![CDATA[real time embedded systems]]></category>
		<category><![CDATA[reservation hotel londres]]></category>
		<category><![CDATA[sip termination providers]]></category>
		<category><![CDATA[sip voip providers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software embedded]]></category>
		<category><![CDATA[software for embedded systems]]></category>
		<category><![CDATA[virtual machine workstation]]></category>
		<category><![CDATA[virtualbox linux server]]></category>
		<category><![CDATA[virtualbox sharing folders]]></category>
		<category><![CDATA[virtualbox vm download]]></category>
		<category><![CDATA[vm virtualbox download]]></category>
		<category><![CDATA[voip pbx providers]]></category>
		<category><![CDATA[voip providers business]]></category>
		<category><![CDATA[voip sip providers]]></category>
		<category><![CDATA[voip termination provider]]></category>
		<category><![CDATA[voip termination providers]]></category>
		<category><![CDATA[voip trunk provider]]></category>
		<category><![CDATA[voip wholesale provider]]></category>
		<category><![CDATA[voip wholesale providers]]></category>
		<category><![CDATA[wholesale voip termination provider]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=70516cc5f12a7e760c507a49a14c2c78</guid>
		<description><![CDATA[Google's Android mobile Operating System (OS) has quickly become the dominant platform for smartphone devices. Can Android be equally effective in the In-Vehicle Infotainment (IVI) sector? Despite Android's many functional advantages, software developers must take a careful look at Android's strengths and weaknesses before adopting the OS in modern IVI systems.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5882%2Ffigures%2F3" />Google&#8217;s Android mobile Operating System (OS) has quickly become the dominant platform for smartphone devices. Can Android be equally effective in the In-Vehicle Infotainment (IVI) sector? Despite Android&#8217;s many functional advantages, software developers must take a careful look at Android&#8217;s strengths and weaknesses before adopting the OS in modern IVI systems.</h3>
<p><span id="more-17342"></span><span class='body'>
<p class="body-text">Developers today can make a strong case that Android is now the most successful portable OS of all time. In terms of recent smartphone sales, according to research firm IDC, Android devices represent a 68 percent share of the global market (quarter ended September 2012). This compares to a 17 percent market share held by Apple. Within 12 months it is expected that more than 1 billion Android devices will be in use &#8211; an achievable goal considering that nearly 700,000 new smartphones are activated every day. Easy access to software and development tools for Android means just about anyone from an individual engineer to the largest R&amp;D department at a large corporation can get involved.</p>
<p class="body-text">For corporations selling online services, it&#8217;s almost a limitation not to have an appropriate Android smartphone app. During the past five years, user expectations have migrated from seeing a good website to seeing a good mobile website to having an Android or iPhone app available. According to AOL Tech, the download rate for Android apps in 2012 is 1.5 billion installs per month, with a total of nearly 20 billion installs to date.</p>
<p class="heading-1">Unfair to compare</p>
<p class="body-text">It was inevitable that individuals who own both a smartphone and a vehicle equipped with an IVI system would compare and contrast the two. The functionality of a typical infotainment system has evolved in the past 10 years, restricted by the lengthy development cycles of automakers and their traditionally conservative approach to product development. Quality and reliability are paramount, as well as the overwhelming need to keep costs low to ensure the final product stays competitive. </p>
<p class="body-text">At the recent Paris Motor Show, several automakers announced their latest models embodying the concept of the always connected automobile. One such system was Renault&#8217;s Android-based R-Link infotainment system featuring built-in Android apps such as navigation, multimedia, and phone support via an online store for Renault-approved apps. Despite these and other IVI enhancements, any driver today can look at a contemporary smartphone and find much more functionality and personalization on that device compared to an IVI system. Carmakers are becoming increasingly desperate to incorporate this level of functionality and flexibility into a vehicle without compromising its safety and security. Using Android, there are several ways to accomplish this endeavor, each with its own set of advantages and disadvantages.</p>
<p class="heading-1">Bring Your Own Device (BYOD) to your vehicle</p>
<p class="body-text">If the Android smartphone can be considered the ultimate infotainment device, then why not have it connected inside the car? This is the approach taken by the<span class="interview-name"> </span><span class="hyperlink"><a href="mailto:http://www.mirrorlink.com/">Car Connectivity Consortium</a></span>, an industry alliance established to allow smartphone screens to be displayed on the infotainment head unit. Several infotainment platform providers, including Mentor Graphics, offer this approach, whereby the head unit acts as a thin-client display, with apps running directly on the smartphone. Connectivity is provided through USB cable today, but Wi-Fi connections are emerging. Bluetooth 3.0 may also offer sufficient bandwidth for video streaming between smartphones and IVI systems.</p>
<p class="body-text">The advantage of this approach is that the phone connectivity technology will not become obsolete as the car ages, which is an important factor given that the typical smartphone enjoys a higher refresh rate over its lifetime. The concept of random IVI software updates is seen as too risky for the more permanent car-based system; OEMs want to keep the process under their strict control. Looking 10 years ahead, this means that the infotainment system can still be current and relevant because its functionality is based on the smartphone at the time. </p>
<p class="body-text">This approach also presents a cost advantage, as the permanently fixed infotainment system costs less for an OEM or Tier 1 developer to design and maintain. Another benefit is related to shared or rented vehicles &#8211; the smartphone immediately personalizes the vehicle to which it is tethered, without needing to learn a new user interface every time. One example showing the advantages of integrating a smartphone into the infotainment system is Android car mode, which turns an Android phone into a better driving companion by providing quick access to key applications such as GPS navigation, voice-activated commands, and a phone&#8217;s contact list.</p>
<p class="body-text">The main disadvantages of allowing smartphone screens to be displayed on the infotainment head unit are loss of control and marketability of the infotainment system as a car feature. High-end automobile manufacturers are now differentiating themselves through the sophistication of an infotainment system; they are not willing to pass that advantage over to phone makers. There is also the unknown security risk lurking in terms of the potential for someone to hack into the vehicle system via a smartphone.</p>
<p class="heading-1">Considerations for building in an Android OS</p>
<p class="body-text">Many designed-in infotainment systems such as the Renault&#8217;s R-Link build Android directly into the vehicle and pre-load a number of approved and tested apps. This offers a pre-built, tested, state-of-the-art infotainment system to a prospective car buyer. The idea here is that it&#8217;s now possible for the vehicle owner to download additional Android apps from an online store managed by the manufacturer. The Android OS is kept isolated from other vehicle functions and apps are only offered from manufacturer-approved repositories to help protect the system from malware. However, as Generation Y Android users start to dominate the car buyer population, they will want the freedom to download their favorite apps and won&#8217;t be happy with a pre-defined mix decided for them.</p>
<p class="body-text">Looking at this from an OEM perspective, adopting Android as a base OS poses a few significant business risks. Some OEMs are nervous about the omnipresence of Google as the owner and licensor of the Android OS platform. Because Google manages the release schedule and content of Android, many automotive strategists are wary about Android changes affecting their product release cycle. What would happen if the license or terms of use suddenly changed? </p>
<p class="body-text">The original Android OS was designed exclusively for mobile smartphones, and it must be modified to handle the wide variety of audio streams in the vehicle with signals coming from reversing sensors, radio, DVD player, navigation, phone, and external sources. The middleware in Android that covers audio stream routing has proved difficult to modify and re-test; the intended infotainment system has to link in at several points including the audio flinger (mixer providing a single output at a specified sample rate), underlying audio hardware, and audio manager. Some developers are questioning why they should commit to the technology when it&#8217;s possible to dock a smartphone into the vehicle. </p>
<p class="heading-1">Embedded Android architectures</p>
<p class="body-text">Developers can choose from several possible approaches to implement Android into a vehicle. Some vehicle manufacturers use Android as the core OS for the infotainment system, deeming that it&#8217;s secure and mature enough to fulfill this role. For designers who are not as bold and want to stick with Linux, Android can still be included as a guest OS in a &#8220;container&#8221; (see Figure 1). Using the Linux Container (LXC), resources can be assigned by the Linux host to the Android guest, which includes memory available for apps, access privileges, services available, and interaction with other domains. The container is intended to be a secure environment, so users can potentially download entrusted apps into this area.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=609,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5882%2Ffigures%2F1" title="When running Android in a Linux Container, privileges and permissions can be tightly controlled."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5882%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> When running Android in a Linux Container, privileges and permissions can be tightly controlled.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Another technique for including Android in an IVI system is to use a hardware or software virtualization layer (see Figure&nbsp;2). In this scenario, each OS or domain runs on a dedicated virtual machine, and the hardware resources available from the underlying host platform are shared. Communication is allowed in a controlled way between the different domains, and boot-ups may be independent, allowing safety-critical features running on a dedicated domain to be available more quickly than the infotainment or Android systems.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=674,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5882%2Ffigures%2F2" title="Android and Linux can run simultaneously on a virtualization layer or hypervisor."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5882%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Android and Linux can run simultaneously on a virtualization layer or hypervisor.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Several hardware platform providers provide isolated domains in hardware. Software virtualization is available using proprietary software from providers such as SYSGO, OpenSynergy, and Open Kernel Labs. These virtualization layers consume a small amount of overall resource (typically 1 percent to 4 percent) and allow a high degree of domain isolation and safety.</p>
<p class="body-text">In a few years, all drivers will expect their vehicles to be permanently connected to the Internet. This will allow access to cloud data services, telematics, video and audio streaming, and apps download. It is no longer a question of if this happens, but rather when all of this becomes available to the general public. The explosion of Android in smartphones has ensured that Android&nbsp;apps will need to be accessible in vehicles, and users will decide if these are built in or accessed via a BYOD solution. </p>
<p class="author-bio">Andrew Patterson is business development director for Mentor Graphics Embedded Software Division, specializing in the&nbsp;automotive&nbsp;market. </p>
<p class="contact-info">Mentor Graphics Embedded&nbsp;Software&nbsp;Division <span class="hyperlink"><a href="mailto:Andrew_patterson@mentor.com">Andrew_patterson@mentor.com </a></span>  <span class="hyperlink"><a href="http://www.mentor.com">www.mentor.com</a></span> </p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="http://twitter.com/#!/mentor_graphics">@mentor_graphics</a></span> <span class="hyperlink"><a href="http://www.mentor.com/embedded-software/blog/">Blog</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/mentor_graphics">Linkedin</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Distributed software execution using a Trusted Execution Environment</title>
		<link>http://embedded-computing.com/articles/distributed-using-trusted-execution-environment/</link>
		<comments>http://embedded-computing.com/articles/distributed-using-trusted-execution-environment/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 15:00:00 +0000</pubDate>
		<dc:creator>Asaf Shen, Discretix</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[discretix]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=ac4a42a2067d470226685ad500d8af9b</guid>
		<description><![CDATA[More sensitive commerce- and entertainment-related credentials assets are finding their way onto deviceswith open operating systems, creating a wider array of attack vectors. The prevalent approach to mitigatethis threat is based on hardware isolation of an execution environment for sensitive information, ensuringdata privacy for end users and services.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5843%2Ffigures%2F3" />More sensitive commerce- and entertainment-related credentials assets are finding their way onto devices<br />
with open operating systems, creating a wider array of attack vectors. The prevalent approach to mitigate<br />
this threat is based on hardware isolation of an execution environment for sensitive information, ensuring<br />
data privacy for end users and services.</h3>
<p><span id="more-16892"></span><span class='body'>
<p class="body-text">Mobile devices and associated security standards and protocols have been around for many years. It is common practice to secure inbound and outbound communications and to protect the permanent data stored on a device. Standards and technologies that address these requirements are well-defined and have been widely adopted &#8211;&nbsp;for example, standards defined by the Internet Engineering Task Force such as Internet Protocol security (IPsec) and Transport Layer Security (TLS) or persistent storage encryption technologies for disk or flash such as BitLocker for Windows and dm-crypt for Linux. However, as lifestyles have become increasingly digital and smart devices have become an inseparable part of our daily activities, the need for security has increased significantly.</p>
<p class="body-text">As technology has evolved and enabled additional use cases, more sensitive assets are finding their way onto devices such as commerce- and entertainment-related credentials. This development has increased the circle of potential hackers and created a wider array of attack vectors trying to exploit the vulnerabilities of modern embedded systems. </p>
<p class="body-text">A recent prominent class of threats has resulted from the proliferation of &#8220;rich and open&#8221; Operating Systems (OSs) such as Android. While Android&#8217;s intentional openness &#8211; manifested as code and documentation availability, as well as a built-in debug tool &#8211; leads to ground-breaking innovations by a massive developer community, it comes at the price of innovative attack vectors. These vectors typically lead to a state where a&nbsp;black hat has managed to gain privileged execution rights and full access to all assets available to the Android OS at runtime.</p>
<p class="body-text">The following discussion describes the prevalent approach to mitigate this threat or at least limit the scope of assets compromised and minimize the associated cost of such control loss on the rich OS. This approach, which is based on hardware isolation of an execution environment for sensitive information, is critical to ensure data privacy for end users and services, particularly in the case of video on demand, commerce, and banking services.</p>
<p class="body-text">It is important to note that the phenomenon of devices exposing an ever-growing attack surface is not limited to the mobile consumer electronic space. Other embedded systems that were justly classified as &#8220;closed&#8221; in the past, such as automotive control units or industrial systems, are becoming vulnerable to a similar type of attack. The main code execution entities in these devices are no longer safe due to OS openness, along with a multitude of external connections.</p>
<p class="heading-1">An isolated execution environment</p>
<p class="body-text">The key to this security approach is the introduction of a Trusted Execution Environment (TEE), as it is termed by the <span class="hyperlink"><a href="http://www.globalplatform.org/">GlobalPlatform</a></span>. This environment, depicted in Figure 1, is isolated from the feature-rich, performance-based Rich Execution Environment (REE). In a nutshell, the TEE is used to protect sensitive, software-based security services from the REE. Modern Systems-on-Chips (SoCs) typically base this isolation on one of the following hardware measures:</p>
<ul>
<li class="bullets"><span class="bold">A hardware-separated execution mode in the main SoC processor:</span> This approach is evident in TrustZone technology developed by ARM and available on all members of the Cortex-A processor series. Note that in this&nbsp;approach, a CPU core is either executing code belonging to the TEE or the REE (typically switching back and forth between the two domains).</li>
<li class="bullets"><span class="bold">A physically separated processing entity (a stand-alone CPU) dedicated to security tasks:</span> This approach, which is more intuitively understood, though not necessarily better (as always, the devil &#8211; aka the black hat &#8211; is in the details), has been around for a longer period of time and is still used in many devices. Note that in this approach, the dedicated security CPU core is only executing TEE-related code.</li>
</ul>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=631,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5843%2Ffigures%2F1" title="TEE architecture, as portrayed by the GlobalPlatform organization, is used to protect software-based security services from the REE. Source: GlobalPlatform white paper, &amp;#8220;The Trusted Execution Environment: Delivering Enhanced Security at a Lower Cost to the Mobile Market,&amp;#8221; February 2011."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5843%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> TEE architecture, as portrayed by the GlobalPlatform organization, is used to protect software-based security services from the REE. Source: GlobalPlatform white paper, &#8220;The Trusted Execution Environment: Delivering Enhanced Security at a Lower Cost to the Mobile Market,&#8221; February 2011.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">A comparison of the two approaches is tightly coupled with specific implementation details, and the right method can differ from system to system. Another approach to achieve such isolation that is currently less prevalent in the embedded space is based on a hypervisor or Virtual Machine Monitor (VMM). With this method, execution environments or virtual machines are separated by a software layer (the hypervisor) that is running at a higher privilege level. Assuming a robust, mathematically proven implementation of the hypervisor, this software-based approach can be very effective.</p>
<p class="body-text">An interesting term-related distinction in this context is parallel to the difference between a Trusted EE and a Secure EE. The term <span class="italics">Trusted</span> alludes to the basic assumption behind the usage model: Code that is placed in the TEE is trusted to be nonmalicious and bug-free. There is nothing inherent in the TEE that prevents ill-formed TEE code from revealing sensitive assets to the world outside the TEE&#8217;s &#8220;walled garden.&#8221; This trust implies the need for an exhaustive review and verification of code placed in the TEE, especially if this code is serving multiple unrelated security services running within the TEE.</p>
<p class="heading-1">TEE implementation</p>
<p class="body-text">The TEE typically offers generic security services known as <span class="italics">Secure OS</span>, which includes handling secure boot, communications, persistent data storage, cryptography, secure platform management, and more. In addition, specific Trusted Applications (TAs) run in the TEE using these services. A TA is typically a component of an application of wider scope that runs in the REE and interfaces with the user and other parts of the OS.</p>
<p class="body-text">An example of a usage scenario is one where the user tries to consume high-value content such as HD video obtained through a subscription service. The user interface and multimedia framework interface are performed in the rich OS while portions of the Digital Rights Management (DRM) scheme such as usage policy enforcement, content key extraction, and secure video path enforcement are handled in the TEE by a dedicated TA. This separation is required to comply with robustness rules published by the DRM scheme owner in an open environment.</p>
<p class="body-text">A single-usage scenario can involve several TAs. Along the lines of the HD content consumption example, a user might want to send video from a handheld device to a remote and perhaps larger display using a standard such as the Wi-Fi Alliance&#8217;s Miracast. To comply with Miracast security-related requirements on an open system, the Miracast software stack must be located on the REE, communicating with a TA in the TEE implementing the High-bandwidth Digital Content Protection (HDCP) 2.x specification as required by the Miracast specification.</p>
<p class="body-text">Careful attention must be given to the task of breaking down a use case into the parts benefiting from execution in the REE versus those mandated to be ported into the TEE (see Figure 2):</p>
<ul>
<li class="bullets">Excessive code pushed into the TEE could lead to performance degradation (throughput and power consumption), as well as potential security issues. As stated earlier, the trust in the TEE code originates from a careful review of what is placed there, a task favoring minimal code.</li>
<li class="bullets">Not having all the parts needed in the TEE could increase the risk of potential security breaches, resulting in a greater probability of financial sanctions. Licensees of most, if not all, content protection schemes accept liabilities in the multimillion-dollar range. It is a common misconception that only the cryptographic parts of a security-related protocol must be well secured, while leaving the logic that connects the crypto outside of the TEE. In fact, tweaking the &#8220;harmless&#8221; glue logic completely circumvents the security scheme.</li>
</ul>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=952,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5843%2Ffigures%2F2" title="Breaking down a content protection usage scenario between the TEE and the REE in an Android-based device reveals performance problems and security issues."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5843%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Breaking down a content protection usage scenario between the TEE and the REE in an Android-based device reveals performance problems and security issues.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The complexity level rises significantly when multiple TAs are needed in the TEE. The basic requirement is for mutual distrust between those TAs (assuring that a compromised TA cannot compromise others). Mutual distrust is typically handled by the Secure OS security services layer. Nevertheless, there are scenarios where different TAs must collaborate and exchange information securely, such as the aforementioned content protection scenario employing DRM and HDCP link protection.</p>
<p class="heading-1">The road ahead </p>
<p class="body-text">Notwithstanding its accompanying security benefit, the task of distributed embedded software development using TEE and REE is not trivial, and compared to traditional development actually hinders the development cycle. Being a relatively nascent technology, this finding is not surprising. The phenomenon could change once design teams become better acquainted with the concepts, related tools, and development environments. TEE usage adoption rates will be accelerated if service providers&#8217; requirements mandate it. </p>
<p class="body-text">One concern service providers have is the scalability of their systems due to the fragmentation of devices and their security capabilities. No one wants to redo an application repeatedly. This concern is currently being addressed by the GlobalPlatform standards organization. The GlobalPlatform plans to publish a formal process for TEEs entailing certification by accredited labs. </p>
<p class="body-text">The openness of modern devices, along with the extended connectivity introduced by new use cases, calls for higher levels of security in the embedded space. Distributed software execution using an REE alongside a hardware-based TEE has the potential to form a robust security solution, meeting stringent requirements without compromising the user experience.</p>
<p class="body-text">As with other technologies, the key for adoption is defragmentation through standardization, an ongoing process in which the concept of a TEE is gaining support. Stay tuned for more progress in TEE embedded software development.</p>
<p class="author-bio">Asaf Shen is VP of marketing and IP products at Discretix.</p>
<p class="contact-info">Discretix <span class="hyperlink"><a href="mailto:marketing-dx@discretix.com">marketing-dx@discretix.com</a></span>  <span class="hyperlink"><a href="http://www.discretix.com">www.discretix.com</a></span></p>
<p class="contact-info">Follow: <a href="https://twitter.com/trustembedded">Twitter</a> <a href="http://www.discretix.com/blog/">Blog</a> <a href="http://www.facebook.com/Discretix">Facebook</a> <a href="http://www.linkedin.com/company/discretix">Linkedin</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding security into data management</title>
		<link>http://embedded-computing.com/articles/embedding-security-data-management/</link>
		<comments>http://embedded-computing.com/articles/embedding-security-data-management/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 15:00:00 +0000</pubDate>
		<dc:creator>Sasan Montaseri, ITTIA</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[computer encryption]]></category>
		<category><![CDATA[computer security risks]]></category>
		<category><![CDATA[computer security threats]]></category>
		<category><![CDATA[data encryption security]]></category>
		<category><![CDATA[data protection and security]]></category>
		<category><![CDATA[data security and management]]></category>
		<category><![CDATA[data security and privacy]]></category>
		<category><![CDATA[data security breaches]]></category>
		<category><![CDATA[data security encryption]]></category>
		<category><![CDATA[data security information]]></category>
		<category><![CDATA[data security policies]]></category>
		<category><![CDATA[data security products]]></category>
		<category><![CDATA[data security risk assessment]]></category>
		<category><![CDATA[data security risks]]></category>
		<category><![CDATA[data security services]]></category>
		<category><![CDATA[data security software]]></category>
		<category><![CDATA[data security solution]]></category>
		<category><![CDATA[data security solutions]]></category>
		<category><![CDATA[data security threats]]></category>
		<category><![CDATA[des encryption example]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded operating system features]]></category>
		<category><![CDATA[embedded os for real-time applications]]></category>
		<category><![CDATA[embedded rtos]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded system operating system]]></category>
		<category><![CDATA[embedded systems operating system]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[encryption data]]></category>
		<category><![CDATA[encryption email]]></category>
		<category><![CDATA[hard disk encryption]]></category>
		<category><![CDATA[hard drive encryption]]></category>
		<category><![CDATA[information security compliance]]></category>
		<category><![CDATA[information security policies]]></category>
		<category><![CDATA[information security standards]]></category>
		<category><![CDATA[internet security]]></category>
		<category><![CDATA[internet security threat]]></category>
		<category><![CDATA[internet security threats]]></category>
		<category><![CDATA[it data security]]></category>
		<category><![CDATA[it security solutions]]></category>
		<category><![CDATA[it security threats]]></category>
		<category><![CDATA[ittia]]></category>
		<category><![CDATA[linux operating system features]]></category>
		<category><![CDATA[md5 decrypt]]></category>
		<category><![CDATA[network data security]]></category>
		<category><![CDATA[network security issues]]></category>
		<category><![CDATA[pointsec encryption]]></category>
		<category><![CDATA[real time embedded operating systems]]></category>
		<category><![CDATA[real time embedded system]]></category>
		<category><![CDATA[real time embedded systems]]></category>
		<category><![CDATA[safehouse encryption]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[security and data protection]]></category>
		<category><![CDATA[security encryption]]></category>
		<category><![CDATA[security in linux operating system]]></category>
		<category><![CDATA[security of data and information]]></category>
		<category><![CDATA[security of operating system]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software data security]]></category>
		<category><![CDATA[threats to data security]]></category>
		<category><![CDATA[triple des decrypt]]></category>
		<category><![CDATA[triple des decryption]]></category>
		<category><![CDATA[web security threats]]></category>
		<category><![CDATA[what is encryption of data]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=8137ebb17ff0b235038426765d0febbc</guid>
		<description><![CDATA[Securing data is becoming more critical and more difficult to accomplish as embedded application development has increased in complexity, especially when different communication protocols are incorporated into embedded designs. Developers need to know the options for managing data in a secure way and understand the role of a database in maintaining security over data management channels.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5844%2Ffigures%2F2" />Securing data is becoming more critical and more difficult to accomplish as embedded application development has increased in complexity, especially when different communication protocols are incorporated into embedded designs. Developers need to know the options for managing data in a secure way and understand the role of a database in maintaining security over data management channels.</h3>
<p><span id="more-16863"></span><span class='body'>
<p class="body-text">Security is an important consideration when mobile devices and other embedded systems interoperate with other systems and components. Unauthorized access, eavesdropping, session hijacking, and other security threats can result in irreversible damages such as data loss, intellectual property theft, and malfunction.</p>
<p class="body-text">Data management security is a fundamental requirement of applications developed for embedded systems. From industrial automation and medical devices to solar power inverters and even home entertainment systems, data must be protected both at rest on the device and during communication. But who bears responsibility for data security? All device components must employ a security-conscious design, from the application and embedded database down to the hardware.</p>
<p class="heading-1">Safeguarding embedded data</p>
<p class="body-text">Embedded application development is becoming more complex, and developers are interested in learning how to manage data securely across all phases of development for embedded systems. Whether an engineer is building a mobile device, solar inverter, medical equipment, or any other embedded system, data security is the riskiest part of a design.</p>
<p class="body-text">Authentication and encryption technologies are essential to secure data storage and distribution, but what does an embedded developer need to know to secure an embedded database? As securing data becomes more critical and regulators and consumers demand serious data protection, an application developer might ask: How do I ensure that my application will be secure? Should data be secured at the application level or at the database level? Can security be implemented by simply assembling the right combination of technologies?</p>
<p class="body-text">As long as data remains local to an embedded system with no communication layer, security management is not very complex. However, as communication protocols such as TCP/IP are added to the design, security supervision becomes more problematic, and developers must learn about various options such as securing the socket layer so data can be accessed safely.</p>
<p class="heading-2">Securing data at the application level</p>
<p class="body-text">Databases and applications can offer a safe haven to make data secure. Developers can encrypt data before it leaves the application and arrives in the database, but this is only viable for unsearchable data. For example, an embedded system that manages security for a gate will have a list of staff and their credentials, such as PINs or passwords. The credentials should be encrypted by the application so they can be verified individually. However, any information used to identify or list staff members must not be encrypted by the application.</p>
<p class="body-text">Physical security is also important. A gate security system should not store data on removable flash media that could be easily replaced to circumvent security. However, even if data is stored internally, a dedicated attacker with physical access to the device can almost always access the data stored there. Storage-level encryption is necessary to protect sensitive data in this scenario.</p>
<p class="heading-2">Securing data at the database level</p>
<p class="body-text">Encryption is a recognized security method where data is encoded with a specific encryption key and the same data can only be read by supplying the same key. File encryption is a way to keep the data secure, as it will block access to each database file until the application provides the correct key. This method protects data in case of media theft and, as long as access to data is limited to local connections, is a preferred method for offering security. </p>
<p class="body-text">In the past, encrypting data before it left the system was a common way to manage and secure data. However, this approach can make it difficult to analyze data and search for individual information. </p>
<p class="heading-2">Securing remote access and data&nbsp;distribution</p>
<p class="body-text">Database security is important to developers who are concerned with data confidentiality, integrity, and availability. While steps such as creating a procedure for end-user access can restrict physical access, database security requires special attention and greatly affects risk management for an embedded system. Developers of mission-critical applications and business intelligence systems experience critical safety vulnerabilities if malicious systems on the network or malware applications intercept access to confidential data. </p>
<p class="body-text">How can a developer secure remote access from an unauthorized session? Remote access requires protection from unauthorized access, as well as eavesdropping and session hijacking. These faults can be caused by a lack of security for data management and data&nbsp;distribution. </p>
<p class="body-text">When consumers access data remotely, they might connect to the database without authorization, allowing anyone to access this data online. Therefore, it is necessary to implement an authorization token so consumers can use passwords to access the database. This secures communications to prevent direct access to the database by an unauthorized party.</p>
<p class="heading-1">Embedded database security features</p>
<p class="body-text">Some applications collect data locally and periodically post that data to a server on the Internet. Other computers on the Internet or local network can observe or tamper with that connection if it is not encrypted. Developers often look for security and authentication features in the embedded database to offer flexible data safety techniques that address these problems. Using database security features, developers can achieve data security in embedded applications by encrypting both network communications and storage media.</p>
<p class="body-text">ITTIA DB SQL is a database software library for mobile devices and other embedded systems that offers secure file storage, remote access, and replication (see Figure 1). Whether a database file is only accessed locally or shared over a public TCP/IP network, the encryption features provided by ITTIA DB SQL ensure that data is protected from unauthorized access, eavesdropping, and session hijacking.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=908,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5844%2Ffigures%2F1" title="The ITTIA DB SQL embedded relational database management system offers secure file storage, remote access, and replication."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5844%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The ITTIA DB SQL embedded relational database management system offers secure file storage, remote access, and replication.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">To protect data at rest on a device, each database file can be encrypted with an&nbsp;AES-128 or AES-256 key. Advanced Encryption Standard (AES) is a data encryption specification that has been adopted by the U.S. government and other governing bodies across the world. Even if the database is removed from the device, it cannot be read or modified without the encryption key. As a result, sensitive data can be stored on or backed up to the removable media on a consumer mobile device without compromising security.</p>
<p class="body-text">Security becomes an even greater concern when an embedded device can share data with other devices and back-end systems. Whether data is shared over an active client/server connection or through passive replication, communications should be authenticated using a protocol such as Salted Challenge Response Authentication Mechanism (SCRAM) that does not require the database password to be transmitted over the network. This ensures that only authorized parties can initiate a connection and modify the embedded database.</p>
<p class="body-text">Connections over a public network such as the Internet should also secure the communication channel with Transport Layer Security (TLS) or its predecessor, Secure Sockets Layer (SSL). This prevents eavesdropping from other devices on the network and man-in-the-middle attacks such as session hijacking that can compromise security even after an authenticated connection is established.</p>
<p class="body-text">Whether an application targets Windows, Linux, Android, ThreadX, QNX, or one of the many other operating systems commonly found in embedded devices, software developers must consider the security implications of data sharing and storage. Selecting an embedded database that provides the required features is critical to the specification and design of secure applications. While it is ultimately up to the application to implement adequate security measures, an embedded database that offers the fundamentals for managing security is essential to protect embedded designs.</p>
<p class="author-bio">Sasan Montaseri is the founder of ITTIA.</p>
<p class="contact-info">ITTIA <span class="hyperlink"><a href="mailto:sasan@ittia.com">sasan@ittia.com</a></span> <span class="hyperlink"><a href="http://www.ittia.com">www.ittia.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://www.linkedin.com/groups/ITTIA-Embedded-Database-Group-3754617?gid=3754617">Linkedin</a> <a href="http://www.youtube.com/user/ittiavideo">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control issues: From protecting IP to monetizing it</title>
		<link>http://embedded-computing.com/articles/control-issues-protecting-to-monetizing-it/</link>
		<comments>http://embedded-computing.com/articles/control-issues-protecting-to-monetizing-it/#comments</comments>
		<pubDate>Thu, 08 Nov 2012 15:00:00 +0000</pubDate>
		<dc:creator>Michelle Nerlinger, SafeNet</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Control issues]]></category>
		<category><![CDATA[SafeNet]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=72e61d23bb2496d72b4be4ab2b54de3e</guid>
		<description><![CDATA[As technology is increasingly driven by software, protecting IP has become critically important. Proper software licensing can not only defend against IP security threats, but also provide avenues for software monetization.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5845%2Ffigures%2F3" />Beyond the challenges of a tough economy and fierce competition, embedded developers face problems with deliberate and unintentional misuse of their software, competitive IP theft, and tampering. While implementing an effective copy protection and IP theft prevention plan can guard against security threats, it&#8217;s only the first step needed to unlock the potential value of source code. Organizations must understand how to use advanced licensing systems to protect against risk and better monetize their work, all while reducing operating costs.</h3>
<p><span id="more-16866"></span><span class='body'>
<p class="body-text">Embedded developers are evolving. As embedded systems transition to become combinations of solution-specific software running on off-the-shelf hardware, the value of Intellectual Property (IP) has increasingly transitioned to software. This evolution marks a significant change in how these hardware-turned-software vendors must operate to maximize profitability and continue delivering a positive customer experience.</p>
<p class="body-text">To successfully monetize their IP, intelligent device manufacturers need to leverage the four aspects of a successful software monetization strategy: control, packaging, management, and tracking (see Figure 1). Each aspect directly affects profitability by either helping reduce costs or increase revenue.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=652,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5845%2Ffigures%2F1" title="A comprehensive software monetization strategy hinges on four key factors: how effectively software publishers can package, control, manage, and monitor their offerings."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5845%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A comprehensive software monetization strategy hinges on four key factors: how effectively software publishers can package, control, manage, and monitor their offerings.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The reality is that today&#8217;s embedded device manufacturers are facing a much more complex business environment that goes well beyond providing protection from tampering and reverse engineering of their products. Software monetization strategies for intelligent device manufacturers must take into account how these core elements are connected. Considerations such as profitability, user experience, and usage control directly affect each other and should be approached comprehensively. When software monetization strategies are implemented successfully, the intelligent device manufacturer can offer a more efficient experience for the user and a more profitable solution to the market. It all begins with controlling IP.</p>
<p class="heading-1">The key to controlling IP</p>
<p class="body-text">Intelligent device manufacturers put hours and hours of time and know-how into developing unique software code that meets the needs of their customers and drives their businesses. Controlling that IP is the foundation of software monetization, as intelligent device manufacturers face problems with deliberate and unintentional misuse of their software, product and feature overuse, competitive IP theft, product reverse engineering, and code tampering &#8211; all problems that have plagued traditional software organizations for years. The key to controlling access and use of a device involves controlling who is granted access to the software running the device, when they&#8217;re granted access, and to what extent.</p>
<p class="heading-2">Access control</p>
<p class="body-text">The software embedded within an intelligent device is typically a vendor&#8217;s most valuable asset. It not only holds all the development secrets hackers or competitors would love to gain access to, it also determines how the product functions. Stolen code can end up in the hands of competitors or be used to reproduce knockoff versions of a similar product. </p>
<p class="body-text">While theft of trade secrets is one threat, for many intelligent device manufacturers, so is tampering. Both scenarios have great potential to damage overall market share and therefore decrease revenue potential. Tampering with the software embedded within a device can change how the device functions. This can provide users with access to features they have not paid for or, even worse, result in regulatory compliance problems. Without proper protection, intelligent device vendors are unknowingly leaving their code vulnerable to tampering.</p>
<p class="body-text">By effectively controlling access to software source code, intelligent device vendors can protect revenue and safeguard the integrity of their brands and products by preventing product tampering, reverse engineering, and IP theft.</p>
<p class="heading-2">Usage control</p>
<p class="body-text">Usage control is the next piece of the monetization puzzle. Vendors must be able to control the use of their software at the product and feature level to prevent overuse of their offerings &#8211; deliberate or unintentional &#8211; and ensure that they are being fairly compensated. As the intelligent device market continues to mature, it will be critical for vendors to minimize manufacturing costs while achieving greater flexibility in their product packaging. This is accomplished through feature-based licensing. By providing customers the flexibility to license software features of intelligent devices already on premise, and by controlling access to that software, vendors can create new revenue opportunities.</p>
<p class="heading-1">Leveraging control to improve customer experience</p>
<p class="body-text">An effective software licensing strategy will not only give vendors the means to control how their software is accessed and by whom, it will also provide them with a tool to help develop sophisticated packaging and pricing strategies. In addition to preventing unauthorized access, these systems lay the groundwork to change how the intelligent device industry is able to do business. Control over software at the feature level enables vendors to consolidate hardware stock-keeping units and provide remote upgrade and support services, in addition to opening the door to a whole new world of marketing and sales tools.</p>
<p class="body-text">In the past, if a vendor wanted a premium and a standard version of a piece of equipment, they would build two applications for installation on two different hardware platforms. If a standard customer wanted to upgrade to a premium device, they would have to return their old device and wait for the vendor to ship them a new one. </p>
<p class="body-text">With feature-based licensing and entitlement management, device manufacturers can develop and maintain a feature-rich application installed on all devices. The functionality of the device is controlled through licensing. This enables software vendors to ship the same product with different functionality to different customers at varying price points and upgrade products remotely with lower support and fulfillment costs, thus delivering a better customer experience.</p>
<p class="heading-1">Tracking usage to evolve business strategies</p>
<p class="body-text">The benefits of software licensing do not stop with control or packaging enhancements. Implementing a sophisticated licensing and entitlement management system also provides a means to to track product activation and usage right down to the feature level. Intelligent device vendors can use this information to drive decision-making around product packaging, roadmap investment, sales, and marketing strategies. Product management and engineering teams can discontinue feature combinations that are unpopular and create software packages containing the most valued features that customers want.</p>
<p class="body-text">Marketing and sales teams can utilize customized reports to determine what, when, and how products are being used and leverage this data to plan, launch, and execute more effective sales and marketing activities (see Figure 2). End-user registration data can also help vendors who sell via multiple channels to identify and gain direct access to every individual who uses one of their products.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5845%2Ffigures%2F2" title="SafeNet&amp;#8217;s Sentinel EMS helps vendors monitor software usage to better understand their customers."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5845%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> SafeNet&#8217;s Sentinel EMS helps vendors monitor software usage to better understand their customers.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Licensing best practices: case studies</p>
<p class="body-text">Because most intelligent devices, software and licensing systems, end users, and ecosystems are all unique, examples of licensing best practices can help illustrate some key elements of an effective software monetization strategy.</p>
<p class="heading-2">Example 1: Protecting software code from theft and resale</p>
<p class="body-text">The first example is a software publisher who provides a compression algorithm that is nearly lossless. It is imperative that the algorithm not be deciphered because it is critical IP and unique in this company&#8217;s industry. The software publisher leveraged the code-wrapping feature of a software licensing solution to protect their code from reverse engineering and therefore protect their competitive IP from getting into the hands of pirates or the competition.</p>
<p class="heading-2">Example 2: Leveraging feature-based software licensing </p>
<p class="body-text">Another example is one of the largest networking companies in the world that decided to monetize the software that ships on their appliances. The company used a sophisticated software licensing and entitlement management implementation to protect their code and created smart, feature-based licensing packages for their enterprise customers to maximize the return on their IP.</p>
<p class="heading-2">Example 3: Protecting software from&nbsp;tampering</p>
<p class="body-text">The last example is a company in the manufacturing industry that develops machines that create end-to-end packaging of consumer food products such as milk and orange juice. The software that runs these machines is programmed to comply with dozens of public health and safety regulations. The company&#8217;s IP protection concerns centered around controlling access to the software running the machines and the ability to tamper with key parameters that control processes such as pasteurization. This company used a software monetization solution to protect the software from being accessed and control who can change the parameters that control the&nbsp;machines.</p>
<p class="heading-1">Confidence in greater protection</p>
<p class="body-text">Shifting from an equipment manufacturer business model to that of a software company does not happen overnight and typically occurs in phases. Intelligent device manufacturers who embrace the transition and use software monetization tactics to overcome the challenges they face will be able to vigorously pursue greater market share and reduce manufacturing and inventory costs with the confidence that they are protected against competitive threats to their IP. They will also be able to more cost-effectively expand their product lines and bring innovative devices to market. In short, those vendors making the transition to a software business model will be more nimble and better positioned for the future.</p>
<p class="author-bio">Michelle Nerlinger is&nbsp;director of product marketing for SafeNet&#8217;s software monetization solutions.</p>
<p class="contact-info">SafeNet<span class="interview-name"> </span><span class="hyperlink"><a href="mailto:sentinelquestions@safenet-inc.com">sentinelquestions@safenet-inc.com </a><a href="http://www.safenet-inc.com/software-monetization-solutions">www.safenet-inc.com/software-monetization-solutions</a></span></p>
<p class="contact-info">Follow: <span class="hyperlink"><a href="https://twitter.com/LicensingLive">TwitterLicensing</a></span> <span class="hyperlink"><a href="https://twitter.com/mnerlinger">TwitterNerlinger</a></span> <span class="hyperlink"><a href="http://www.safenet-inc.com/safenet-connected/">Blog</a></span> <span class="hyperlink"><a href="http://www.facebook.com/SafeNetInc">Facebook</a></span> <span class="hyperlink"><a href="https://plus.google.com/116148457618496701627/posts">Google+</a></span> <span class="hyperlink"><a href="http://www.linkedin.com/company/safenet">Linkedin</a></span> <span class="hyperlink"><a href="http://www.youtube.com/user/SafeNetInc?feature=watch">YouTube</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The need for embedded virtualization in real-time, multiprocessor, multi-OS systems</title>
		<link>http://embedded-computing.com/articles/the-multiprocessor-multi-os-systems/</link>
		<comments>http://embedded-computing.com/articles/the-multiprocessor-multi-os-systems/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 15:00:00 +0000</pubDate>
		<dc:creator>Chris Grujon, TenAsys Corporation</dc:creator>
				<category><![CDATA[applications embedded systems]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[design embedded hardware]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[distributed embedded systems]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded microcontroller systems]]></category>
		<category><![CDATA[embedded operating system features]]></category>
		<category><![CDATA[embedded rtos]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system designing]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system operating system]]></category>
		<category><![CDATA[embedded system rtos]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems operating system]]></category>
		<category><![CDATA[embedded systems processors]]></category>
		<category><![CDATA[embedded systems rtos]]></category>
		<category><![CDATA[lenix operating system]]></category>
		<category><![CDATA[linux computer operating system]]></category>
		<category><![CDATA[linux operating system kernel]]></category>
		<category><![CDATA[operating system embedded]]></category>
		<category><![CDATA[operating system rtos]]></category>
		<category><![CDATA[programming embedded system]]></category>
		<category><![CDATA[realtime embedded system]]></category>
		<category><![CDATA[realtime embedded systems]]></category>
		<category><![CDATA[realtime operating system]]></category>
		<category><![CDATA[realtime operating systems]]></category>
		<category><![CDATA[rtos embedded]]></category>
		<category><![CDATA[rtos embedded system]]></category>
		<category><![CDATA[rtos embedded systems]]></category>
		<category><![CDATA[rtos for embedded systems]]></category>
		<category><![CDATA[rtos in embedded system]]></category>
		<category><![CDATA[rtos operating system]]></category>
		<category><![CDATA[rtos task]]></category>
		<category><![CDATA[scheduling in rtos]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[TenAsys Corporation]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=759adcb63c0b97e70461078e97f320a7</guid>
		<description><![CDATA[Chris explains how partitioning processor resources to various operating environments can ensure real-time responsiveness for virtualized applications.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F4" />Virtualization means different things to users with different types of applications. Most forms of virtualization employed in IT server environments aren&#8217;t of interest to embedded system developers because they don&#8217;t ensure that processing of time-critical tasks is deterministic. Instead, the way for single and multiprocessor platforms to support multiple operating environments while maintaining real-time responsiveness is to functionally partition processor resources so that they are controlled by specific operating environments, which run directly on the processor silicon rather than on virtual machine implementations. </h3>
<p><span id="more-15967"></span><span class='body'>
<p class="body-text">The origin of embedded virtualization technology came about with the idea of creating an environment where a Real-Time Operating System (RTOS) could work alongside a General-Purpose Operating System (GPOS) such as Microsoft Windows. Embedded virtualization creates a partitioned environment in which the two OSs and the applications on them run on a single platform as if they were running on two separate platforms. The advantages of doing this are clear: system cost and complexity can be reduced if fewer processing platforms are required to serve the application&#8217;s computing needs. Product reliability can be enhanced as well if systems can be built with fewer hardware elements.</p>
<p class="body-text">Back in the early &#8217;80s, machine builders saw the opportunity to leverage the PC platform to build control systems for their machines. The first such applications were relatively simple, and the focus was mainly to leverage available hardware that was substantially lower in cost than specialized control hardware. </p>
<p class="body-text">As the PC evolved with the addition of Windows, numerous application software packages were introduced, driving a new standard of Human Machine Interface (HMI) with supporting graphic engines and software tools. Machine builders saw the opportunity to use Windows to create advanced HMIs that could simplify their machines&#8217; setup, operation, and maintenance. However, Windows-based PCs could not be used for portions of an application involving time-critical control because Windows, by itself, isn&#8217;t an RTOS and is not capable of performing control functions with determinism. Hence, embedded system designers would typically add a real-time computer subsystem to the machine in addition to the PC to deliver a full suite of product functionality.</p>
<p class="body-text">RTOS suppliers, on the other hand, have not had the resources to build the kind of graphic software tools and support that are available for Windows. A few saw the opportunity to couple their OSs to Windows in order to add RTOS functionality to Windows-based systems on a single computing platform.</p>
<p class="body-text">The benefits of combining an RTOS with Windows on one machine were obvious for embedded systems OEMs, but the technical issues associated with doing that were very complex. Running two OSs on one computer wasn&#8217;t a new concept; it had been done 10 years before on mainframes with virtualization technology. That technology virtualized the whole computer platform, essentially creating an interface layer between the OSs and the hardware much like modern&nbsp;server virtualization technology does today. </p>
<p class="body-text">The fundamental problem with this is that isolating the OS and application software from direct access to the hardware causes nondeterministic time delays when the application software needs to interact with its I/O. Real-time applications, however, must have direct access (sometimes called bare-metal access) to the devices that the applications need to control, so that the software can write or read data to and from the I/O devices in a timely, deterministic manner. </p>
<p class="heading-1">Embedded virtualization solves the multi-OS determinism problem</p>
<p class="body-text">A method must be devised to partition the platform resources so that the RTOS can gain direct access to I/O and interrupts that are necessary for it to run an application deterministically. GPOSs like Windows do not allow a co-resident RTOS to control its I/O devices. </p>
<p class="body-text">Instead, GPOSs typically take control of all available I/O on the platform during installation. Barring the option of modifying Windows, which would bring a whole new dimension of problems, a means of reserving I/O from Windows had to be devised. And since this was initially done back in the days of single-core processors (Figure 1), techniques had to be developed for the processor to switch context from the RTOS to the GPOS with minimum overhead. These are the principles of embedded virtualization, principles that have been validated in thousands of successful embedded system products.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=672,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F1" title="A GPOS and RTOS share a single-core processor with communication across environments."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A GPOS and RTOS share a single-core processor with communication across environments.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Interprocess communication enables task coordination</p>
<p class="body-text">Multiple OSs running applications in shared but separate environments create the need for applications to pass data to each other. This could easily be performed with a simple block of reserved memory, but would require some level of housekeeping by the applications and would be cumbersome to manage in real-time systems, where messages need to be delivered and read at particular times. </p>
<p class="body-text">The communication process needs to be&nbsp;structured in such a way that message delivery occurs when expected to maintain determinism. Communication has to take into consideration the priority of the message with respect to the priority of other real-time tasks that are running at the time, so that the message will be delivered at the right time or in the right sequence. This is particularly important when the communication is between an application running in a non-real-time GPOS environment and an application running on an RTOS in a real-time environment. An unprioritized event must not be allowed to interrupt a prioritized task. </p>
<p class="heading-1">Multicore processors aid functional partitioning</p>
<p class="body-text">The introduction of multicore processors caused some of the rules to change. In principle, processors no longer need to be shared. Each OS can have its own processor core (or multiple cores can be dedicated to a single OS); however, in practice, OSs such as Windows assume that all processor cores belong to them at installation. </p>
<p class="body-text">Setting up a multicore system so that the GPOS is in control of some cores and not in control of others requires a way to tell the GPOS which cores are not available to it. With the proper means of resolving this, a four-core processor could support several configurations of GPOS:RTOS, including 3:1; 2:2, and 1:3 (see Figure 2). This flexibility allows the user to optimize the platform&#8217;s computing resources depending on the application&#8217;s requirement. Whereas an application with a complex Windows portion and light real-time requirements could be configured with three cores running the GPOS application and one core running the RTOS, an application with multiple real-time control functions running simultaneously and communicating with a simple HMI might have one core dedicated to Windows and three to multiple instances of the RTOS.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=672,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F2" title="Embedded virtualization supports different functional partitioning strategies on multicore processors."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Embedded virtualization supports different functional partitioning strategies on multicore processors.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">With the possibility of running several RTOSs at the same time on a multicore processor, the communication system that was initially developed to communicate between the GPOS and the RTOS on a single shared processor can be extended to enable communication between multiple instances of the RTOS&nbsp;and GPOS. In theory the system architecture could be expanded to create a network of OSs talking to one another, each running application elements that are particularly suited to its own environment. As with the I/O needs of the system, the communications structure needs to maintain and support the real-time determinism requirements of the real-time subsystems. </p>
<p class="heading-1">Virtualization enables deterministic communication across platforms</p>
<p class="body-text">One embedded virtualization environment that has proven itself in mission-critical applications is the INtime RTOS family from TenAsys Corporation. INtime&#8217;s embedded virtualization technology encapsulates the principle of partitioning the PC platform to enable Windows and the RTOS to run side by side. INtime facilitates deterministic communications between instances of the RTOS and Windows with a global object networking system called GOBSnet. This consists of a built-in communication network that allows multiple applications on separate OSs to communicate at the process level in a deterministic way. </p>
<p class="body-text">Using Ethernet with an addressing scheme akin to that of a URL, GOBSnet was extended to enable separate system functional blocks, called nodes, to communicate deterministically with each other on the same multicore processor or across platforms that are physically distinct. In this manner, large and complex applications can be distributed across several nodes (see Figure 3), simplifying their creation, debugging, and optimization while leveraging the parallel processing capability of multicore processors. This allows OEMs to produce a range of products at different cost points or functionality levels by scaling the number of processors or processor cores that are employed.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=672,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F3" title="Global object networking facilitates communications between cores and across computing platforms in a complex embedded application such as an automotive test system."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5803%2Ffigures%2F3" alt="23" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 3:</b> Global object networking facilitates communications between cores and across computing platforms in a complex embedded application such as an automotive test system.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Embedded virtualization techniques have been developed over more than a decade of use in real-time applications, but the full potential of these methods to revolutionize embedded system design is just now becoming clear with the advent of processors that include increasing numbers of CPU cores. Along with global object networking support, embedded virtualization is primed to become the standard way of building large multi-OS systems. </p>
<p class="author-bio">Chris Grujon is marketing director for TenAsys Corporation.</p>
<p class="contact-info">TenAsys Corporation<span class="interview-name"> </span><span class="hyperlink"><a href="mailto:Chris.Grujon@tenasys.com">Chris.Grujon@tenasys.com</a></span>  <span class="hyperlink"><a href="http://www.tenasys.com">www.tenasys.com</a></span></p>
<p class="contact-info">Follow: <a href="http://www.linkedin.com/company/tenasys-corporation">LinkedIn</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtualization: A real weapon for embedded software development</title>
		<link>http://embedded-computing.com/articles/virtualization-real-weapon-embedded-software-development/</link>
		<comments>http://embedded-computing.com/articles/virtualization-real-weapon-embedded-software-development/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 15:00:00 +0000</pubDate>
		<dc:creator>Warren Webb, Editorial Director</dc:creator>
				<category><![CDATA[application of embedded system]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[blade servers virtualization]]></category>
		<category><![CDATA[computor running slow]]></category>
		<category><![CDATA[data center virtualization]]></category>
		<category><![CDATA[Editorial Director]]></category>
		<category><![CDATA[embedded application development]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded computer system]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux]]></category>
		<category><![CDATA[embedded operating systems]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system application]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems developer]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[high availability virtualization]]></category>
		<category><![CDATA[how to speed up computer]]></category>
		<category><![CDATA[increase computer speed]]></category>
		<category><![CDATA[internet speed booster]]></category>
		<category><![CDATA[linux embedded]]></category>
		<category><![CDATA[linux operating system]]></category>
		<category><![CDATA[operating system virtualization]]></category>
		<category><![CDATA[pc running slow]]></category>
		<category><![CDATA[realtime operating system]]></category>
		<category><![CDATA[server consolidation and virtualization]]></category>
		<category><![CDATA[server consolidation virtualization]]></category>
		<category><![CDATA[server for virtualization]]></category>
		<category><![CDATA[server storage virtualization]]></category>
		<category><![CDATA[server virtualization]]></category>
		<category><![CDATA[server virtualization and consolidation]]></category>
		<category><![CDATA[server virtualization best practices]]></category>
		<category><![CDATA[server virtualization consolidation]]></category>
		<category><![CDATA[server virtualization cost savings]]></category>
		<category><![CDATA[server virtualization disaster recovery]]></category>
		<category><![CDATA[server virtualization storage]]></category>
		<category><![CDATA[server virtualization white paper]]></category>
		<category><![CDATA[server virtualization white papers]]></category>
		<category><![CDATA[servers for virtualization]]></category>
		<category><![CDATA[servers virtualization]]></category>
		<category><![CDATA[slow computer performance]]></category>
		<category><![CDATA[slow internet speed]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[speed up computer]]></category>
		<category><![CDATA[speed up my computer]]></category>
		<category><![CDATA[speed up my computer for free]]></category>
		<category><![CDATA[speed up my computor]]></category>
		<category><![CDATA[storage virtualization technology]]></category>
		<category><![CDATA[virtual machine host]]></category>
		<category><![CDATA[virtual machine virtualization]]></category>
		<category><![CDATA[virtualbox guest additions]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[virtualization of servers]]></category>
		<category><![CDATA[virtualization operating systems]]></category>
		<category><![CDATA[virtualization server]]></category>
		<category><![CDATA[virtualization server software]]></category>
		<category><![CDATA[virtualization servers]]></category>
		<category><![CDATA[virtualized server]]></category>
		<category><![CDATA[why server virtualization]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=4f0f6f060b75764ca1016183a331aba5</guid>
		<description><![CDATA[Despite an altered design philosophy, virtualization has definite performance and security impacts for the embedded developer.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract">Along with multicore technology, virtualization software has become invaluable to developers seeking to combine several embedded functions in a single hardware platform that boosts system performance and decreases development costs. Warren describes the critical functions of hypervisors and processors with hardware-assist features and presents a few examples of platforms that show how virtualization can consolidate dissimilar functions while maintaining isolation and security. </h3>
<p><span id="more-16062"></span><span class='body'>
<p class="body-text">Virtualization is rapidly becoming one of the hottest technologies in the embedded space, offering designers a host of new hardware and software options for product development and future modifications. With the proper architecture, virtualization can be used to combine multiple embedded functions into a single hardware platform to minimize development costs, power requirements, and the number of system components. This consolidation feature allows designers to merge existing applications with diverse operating software into a single system without the need to modify legacy code. </p>
<p class="body-text">Combined with the recent popularity of multicore technology, virtualization can also boost the performance and responsiveness of individual software segments by assigning additional processing power. Similarly, virtualization allows General-Purpose Operating Systems (GPOSs) such as Windows or Linux to be easily combined with real-time software or safety/security-critical functions while retaining the required determinism and isolation. </p>
<p class="body-text">Originally introduced by IBM in the 1960s for enterprise servers, virtualization enables multiple copies of the OS to run in parallel on a single CPU, thereby reducing the number of machines required. Unlike the enterprise environment where hardware and operating software are consistent across platforms, the embedded industry employs a wide variety of processor architectures and I/O structures, so virtualization cannot be applied the same way. For example, enterprise-level applications typically create virtual copies that represent the entire machine environment to maximize CPU utilization. Unfortunately, this comes at the expense of responsiveness to external events, making this approach impractical for time-critical applications. </p>
<p class="body-text">The latest virtualization software now available for embedded applications allows the development team to independently allocate system resources including memory, additional processors, and I/O to each operating environment to optimize performance.</p>
<p class="heading-1">Hardware allocation</p>
<p class="body-text">Virtualization platforms are built by adding a real-time Virtual Machine Monitor (VMM) or hypervisor software layer directly above the hardware to create and manage individual partitions that contain guest OSs. The hypervisor allocates system hardware resources such as memory, I/O, and processor cores to each partition while maintaining the necessary separation between operating environments. </p>
<p class="body-text">A critical function of the hypervisor is to maintain isolation between partitions and continue running even if another OS crashes. Multicore processors allow hypervisors to create a variety of configurations to support embedded development. For example, an OS can run on a single core or be spread across multiple cores to increase performance. Similarly, multiple OSs can also run on a single core if timing is not an issue. </p>
<p class="body-text">Several variations of hypervisor software are available for virtualization applications. Full virtualization is a nearly complete simulation of the actual hardware, which allows a guest OS to run without modification. Partial virtualization simulates some but not the entire target environment, so guest software might need some modifications to run in this environment. Using paravirtualization, guest programs are executed in their own isolated domains without a simulated hardware environment. Although guest programs must be specifically modified to run in a paravirtualization environment, having the guest OS communicate directly with the hypervisor can improve performance and efficiency. </p>
<p class="body-text">The latest generations of embedded processors include built-in hardware functions to increase performance and speed up interaction between virtual environments. For example, Intel Virtualization Technology (Intel VT) includes facilities to trap certain VMM instructions in hardware and simplify the hypervisor functions to reduce virtualization overhead. Intel VT for Directed I/O adds hardware accelerators that allow secure assignment of specific I/O devices to specific OSs to decrease the load on the processor and accelerate data movement. For example, a hardware-based network controller can be used to offload the Ethernet stack processing to improve the performance of high-speed networks. </p>
<p class="body-text">Another improvement is to implement I/O queuing mechanisms so that operating software does not waste time waiting for operations to finish. In addition, specialized Intel functions such as Extended Page Table and Page Attribute Table provide a hardware-assist to the partitioning and allocation of physical memory among virtual machines.</p>
<p class="heading-1">Virtual platform examples</p>
<p class="body-text">Software vendors offer designers a variety of hypervisor-based products to capture the advantages of virtualization for embedded systems. For example, PikeOS from SYSGO incorporates paravirtualization technology to create a combination Real-Time OS (RTOS) and virtualization environment that enables multiple OS partitions to work on separate sets of resources within a single machine (see Figure 1). </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5802%2Ffigures%2F1" title="PikeOS enables virtual and secure execution of high-level OSs and native real-time tasks on a single CPU."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5802%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> PikeOS enables virtual and secure execution of high-level OSs and native real-time tasks on a single CPU.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The recently released PikeOS version 3.3 supports a wide range of operating software including Linux, ARINC 653, POSIX, Android, and others. PikeOS also runs on multiple single- and multicore processor architectures such as x86, PowerPC, MIPS, ARM, and SPARC/LEON. Multicore processor support offers flexibility to users who can select an execution model ranging from pure Asymmetric Multi-Processing (AMP) to full Symmetric Multi-Processing (SMP). PikeOS is certifiable to safety standards such as DO-178B/C, IEC 61508, EN 50128, and ISO 26262. The PikeOS microkernel architecture is small and compact, resulting in real-time performance that competes with conventional proprietary RTOS products.</p>
<p class="body-text">Virtual platforms that combine safety-critical embedded functions with a large GPOS must contain security provisions allowing unaffected partitions to continue operating in the event of a software failure or cyber attack. The recently released LynxSecure version 5.1 hypervisor from LynuxWorks offers military-grade protection features for customers building secure embedded systems. LynxSecure 5.1 provides two types of device virtualization including direct assignment of physical devices to individual guest OSs for maximum security and secure device sharing across selected guests for maximum functionality (see Figure 2).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5802%2Ffigures%2F2" title="The LynxSecure hypervisor from LynuxWorks allows data and applications with different security levels to co-reside on a single device without corruption."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5802%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> The LynxSecure hypervisor from LynuxWorks allows data and applications with different security levels to co-reside on a single device without corruption.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">LynxSecure also offers two virtualization schemes: para-virtualized guest OSs such as Linux for maximum performance and fully virtualized guests such as Windows, Solaris, Chromium, LynxOS-178, and LynxOS-SE, requiring no changes to the software. Another key performance feature LynxSecure delivers is the ability to run both fully virtualized and paravirtualized guest OSs with SMP capabilities across multiple cores.</p>
<p class="body-text">These products demonstrate how virtualization technology allows designers to consolidate dissimilar functions while maintaining the required isolation and security. Along with a multitude of new software offerings, companies selling off-the-shelf boards and modules are now implementing hardware configurations that are friendly to virtualization applications. These boards have onboard memory that is easily configured for virtualization, along with smaller form factors and lower power requirements to support consolidated systems. </p>
<p class="body-text">All of these products and design advantages point to a long-term, continuing trend in virtual technology for the embedded marketplace. Although it might require a change in embedded design philosophy, virtualization technology has developed into a valuable weapon in the developer&#8217;s toolkit. </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crunch time compiling: Q&amp;A with Joe Drzewiecki, Manager of Compilers and Software Development, Microchip Technology</title>
		<link>http://embedded-computing.com/articles/crunch-development-microchip-technology/</link>
		<comments>http://embedded-computing.com/articles/crunch-development-microchip-technology/#comments</comments>
		<pubDate>Mon, 10 Sep 2012 15:00:00 +0000</pubDate>
		<dc:creator>Jennifer Hesse, Editor, OpenSystems Media</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[c compiler arm]]></category>
		<category><![CDATA[c static code analyzer]]></category>
		<category><![CDATA[code analyzer tool]]></category>
		<category><![CDATA[code metrics tools]]></category>
		<category><![CDATA[code static analysis]]></category>
		<category><![CDATA[Compilers]]></category>
		<category><![CDATA[Crunch time compiling]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded computing design]]></category>
		<category><![CDATA[gcc options -c]]></category>
		<category><![CDATA[gcc warning flags]]></category>
		<category><![CDATA[gnu gcc c]]></category>
		<category><![CDATA[gnu gcc options]]></category>
		<category><![CDATA[klocwork tool]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[static code analyser]]></category>
		<category><![CDATA[static code analyzer c]]></category>
		<category><![CDATA[static code analyzers]]></category>
		<category><![CDATA[static code checker]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=8c119bbdaa530cca4c0238895170333a</guid>
		<description><![CDATA[Nobody likes a complainer, especially when you have to live with them day-in and day-out, and it seems that modern compilers spend a lot of time complaining about your code. Joe discusses how to live harmoniously with your compiler and generate the best results in the shortest possible time.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5774%2Ffigures%2F2" />Nobody likes a complainer, especially when you have to live with them day-in and day-out, and it seems that modern compilers spend a lot of time complaining about your code. Joe discusses how to live harmoniously with your compiler and generate the best results in the shortest possible time.</h3>
<p><span id="more-14841"></span><span class='body'>
<p class=Bodytext></p>
<p class=interviewquestion><span class=interviewname>ECD:</span> How can designers give themselves the best chance of having their compiler properly realize the intent of their source code?</p>
<p class=bodytext><span class=interviewname>DRZEWIECKI:</span> I&#8217;ve met a lot of engineers who thought that compiler error messages and warnings were criticisms of their coding style or practice. Now that I&#8217;ve been working with compiler developers for a while, I can tell you that an error or warning is most probably because the compiler doesn&#8217;t understand the source code that you&#8217;ve written. Now, that should strike you immediately as a big red flag, ensuring that what you wanted to happen is probably not going to happen with the code the compiler generates. So, turn on the errors and warnings and deal with them.</p>
<p class=interviewquestion><span class=interviewname>ECD:</span> Even good coders can routinely get the compiler to generate thousands of errors and warnings. Are you telling me that they have to wade through that mess and fix them all?</p>
<p class=bodytext><span class=interviewname>DRZEWIECKI:</span> Only if you want your code to work! Every single one of those messages is the compiler telling you that it&#8217;s not sure how to interpret what you&#8217;ve written, or worse, that the compiler is pretty sure that what you said is not what you meant. As miserable as cleaning up compiler errors and warnings is, I guarantee that finding the misbehaving code on your board is 10x worse. I&#8217;m sure many developers have found code that they meant to work one way and it worked another &#8211;&nbsp;usually after painstaking hours of debugging, late nights, and the boss breathing down your neck. That&#8217;s no fun! </p>
<p class=bodytext>There are a couple of techniques that you can use to deal with the whiny compiler. First, write small chunks of code and compile them frequently to make sure the compiler understands them. Some developers may be saying, &#8220;Yeah, yeah, I&#8217;ve heard it all before, but I&#8217;m late, and &#8230;&#8221; It&#8217;s your choice. Like the old oil-filter commercial said, &#8220;You can pay me now or pay me later.&#8221; If you think you&#8217;re late now, just wait.</p>
<p class=bodytext>The second tip is to start at the very beginning, clean up the first error or so, and then recompile. I&#8217;ve seen instances where a single missing semicolon can generate so many error messages that the compiler stops printing them. Fixing that one missing semicolon cleared up a thousand errors. It&#8217;s not as bad as it seems, and turning off compiler errors is the epitome of being penny wise and pound foolish with your time (see Figure 1).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5774%2Ffigures%2F1" title="It&amp;#8217;s a mistake to turn off error messages like this one from Microchip&amp;#8217;s MPLAB XC32 C compiler."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5774%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> It&#8217;s a mistake to turn off error messages like this one from Microchip&#8217;s MPLAB XC32 C compiler.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class=interviewquestion><span class=interviewname>ECD:</span> Is there anything else that can be done, besides ensuring that the compiler can properly interpret the source code?</p>
<p class=bodytext><span class=interviewname>DRZEWIECKI:</span> Almost everyone knows what they should do when coding&nbsp;&#8211; short functions with a single purpose, clean control flow, good encapsulation of data (no global variables), and limited pointer/array usage. If you have a tough time being disciplined in what you know would make your code work better, I strongly suggest using a Motor Industry Software Reliability Association (MISRA) checker. MISRA has a number of rules that limit the most often abused features of the C programming language. If you stick with MISRA, you&#8217;ll get more deterministic execution and much less opportunity for code that gets &#8220;lost in space.&#8221; You may even be surprised to see your code size shrink after you&#8217;ve coded things so cleanly.</p>
<p class=interviewquestion><span class=interviewname>ECD:</span> Even with clean coding and following best practices, the compiled code often still won&#8217;t fit in the designer&#8217;s chosen device. This often leads to the use of optimizations, which can break the code. Is there any way to avoid creating problems with the code when using optimizations?</p>
<p class=bodytext><span class=interviewname>DRZEWIECKI:</span> A compiler&#8217;s most important responsibility is to generate &#8220;correct&#8221; code based on the source you give it. You know what you wrote. The compiler knows what it read. Since they&#8217;re the same thing, how can they be different? One of several answers lies in the mystery of code that has &#8220;no effect.&#8221; When the compiler reduces the size of your code, it can&#8217;t arbitrarily throw things away, so one of the tricks the compiler uses is to look for code that has &#8220;no effect.&#8221; It&#8217;s important that you understand what a compiler means by this. You may have a timing loop that looks like this:</p>
<p class=bodytext align=left style='text-align:left;mso-prop-change:"Jennifer Hesse" 20120813T1227'><span class=codecharacter>Delay_ms(int NumberOfMilliseconds)</p>
<p> {</p>
<p> &nbsp;long long i;</p>
<p> &nbsp;for(i = 0; i &lt; 5280</li><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" >NumberOfMilliseconds; i++)</p>
<p> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NOP();</p>
<p> }<o:p></o:p></span></p>
<p class=bodytext> In this case, you have empirically and painstakingly determined that 5,280 (obviously a silly example) was the number of No Operations Performed (NOPs) that your machine needed to tie itself up for a millisecond (bonus points if you counted loop overhead, the long math, the function entry/exit, and the like). You know that a millisecond is an important amount of time, but the compiler doesn&#8217;t have any concept of the passage of time, so this entire construct (and every place that calls it and expects time to pass) will be eliminated by the optimizer because this code has &#8220;no effect.&#8221;</p>
<p class=bodytext>For anyone who has ever used such software timing loops and had them optimized out by a compiler, you know how badly this makes your code malfunction, especially at the last minute, where the final change has made the image too big for the device and the customer, VP, or regulatory agency is coming to inspect your work, forcing you to use more optimizations in a hurry. It&#8217;s not because your intent is wrong. It&#8217;s not that the compiler is misreading your code. The real misconception here is that the compiler has an understanding of time; it doesn&#8217;t. It only has an understanding of code that has &#8220;no effect,&#8221; and can therefore be safely removed. </p>
<p class=bodytext>There are many ways to work around this, some better and some worse, but that&#8217;s beyond the scope of this interview. The fact I&#8217;d like to consider here is that the compiler&#8217;s concept of code that has &#8220;no effect&#8221; had better be reflected in your thinking, or there will be severe consequences when you use the optimizer. Writing optimizer-safe code takes some doing and is another one of the signs of coding mastery, as it allows you to be a craftsperson with your tools and generate what you want every time.</p>
<p class=authorbio style='mso-prop-change:"Jennifer Hesse" 20120813T1229'>Joe Drzewiecki is manager of compilers and software development at Microchip Technology Inc.</p>
<p class=contactinfo>Microchip Technology<br /> <span style='font-weight:normal'><a href="http://www.microchip.com"><b style='mso-bidi-font-weight:normal'>www.microchip.com</b></a></span><br /> Follow:<br /> <a href="https://twitter.com/MicrochipTech">@MicrochipTech</a><br /> <a href="http://www.facebook.com/microchiptechnology">Facebook</a><br /> <a href="https://plus.google.com/107345500169709129206/posts">Google+</a><br /> <a href="http://www.linkedin.com/company/microchip-technology">Linkedin</a><br /> <a href="http://www.youtube.com/user/MicrochipTechnology">YouTube</a></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What free can cost you: Evaluating the caveats of open source</title>
		<link>http://embedded-computing.com/articles/what-you-evaluating-caveats-open-source/</link>
		<comments>http://embedded-computing.com/articles/what-you-evaluating-caveats-open-source/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 15:00:00 +0000</pubDate>
		<dc:creator>Ashish Kuthiala, Electric Cloud</dc:creator>
				<category><![CDATA[applications embedded systems]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[building leadership team]]></category>
		<category><![CDATA[building teamwork skills]]></category>
		<category><![CDATA[change management in an organization]]></category>
		<category><![CDATA[change management organisation]]></category>
		<category><![CDATA[change management organizations]]></category>
		<category><![CDATA[design embedded hardware]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[developing effective teams]]></category>
		<category><![CDATA[electric cloud]]></category>
		<category><![CDATA[embedded microcontroller systems]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system designing]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[google web accellerator]]></category>
		<category><![CDATA[open source network design software]]></category>
		<category><![CDATA[open-source software]]></category>
		<category><![CDATA[organizational management change]]></category>
		<category><![CDATA[propel web accelerator]]></category>
		<category><![CDATA[realtime embedded system]]></category>
		<category><![CDATA[realtime embedded systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software development prototyping]]></category>
		<category><![CDATA[software estimation methodologies]]></category>
		<category><![CDATA[strategic organisational change]]></category>
		<category><![CDATA[strategic organizational change]]></category>
		<category><![CDATA[strategic planning organization]]></category>
		<category><![CDATA[team building effectiveness]]></category>
		<category><![CDATA[teamwork activities workplace]]></category>
		<category><![CDATA[What free can cost you]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=d8a8973a231a0d7d847f6d6a8a014efc</guid>
		<description><![CDATA[On the surface, open-source software tools appear to be a free solution for today&#8217;s embedded application developers. Just download the software and you&#8217;re ready to go, with the entire open-source community there for support. Yet, as is often the case with free software, it&#8217;s not quite that simple. Developers must uncover the hidden costs and limitations of open-source software and find alternatives to using it.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5743%2Ffigures%2F3" />On the surface, open-source software tools appear to be a free solution for today&#8217;s embedded application developers. Just download the software and you&#8217;re ready to go, with the entire open-source community there for support. Yet, as is often the case with free software, it&#8217;s not quite that simple. Developers must uncover the hidden costs and limitations of open-source software and find alternatives to using it.</h3>
<p><span id="more-13583"></span><span class='body'>
<p class="body-text">To an embedded application developer, open-source software seems like a fantastic option, whether it is used as the basis for an application or if open-source tools are used to accelerate the development process and speed time to market. Open-source software is, by its very nature, free &#8211; meaning without cost or payment. In an environment where managers are constantly trying to limit the costs around development, open source sounds like a great idea, and depending on each developer&#8217;s unique&nbsp;situation, it could be just the solution needed to address budget constraints.</p>
<p class="body-text">Consider a few of the pros. First, open source is easy to acquire. With open source, developers just download and use the software. Code quality for open source can also be a positive. If the code is already decent, it will only improve as the community improves upon it. Leveraging the open-source community for help, support, and feature development is one of the greatest assets of open source. The feeling that &#8220;we&#8217;re all in this together&#8221; helps all boats rise.</p>
<p class="body-text">Taken together, these benefits can make a developer wonder if a downside to open source exists. As it turns out, open source does have hidden costs that only become apparent once an organization is in the thick of the development process. While open-source products may be the right fit for some developers, others using open source can experience a variety of pitfalls after it&#8217;s too late to consider alternatives.</p>
<p class="body-text">Let&#8217;s review open source&#8217;s impact on four key parts of the development process &#8211; using open-source code as the basis for developing embedded applications, customizing open-source platforms to accelerate builds, open-source sprawl and visibility, and support for time-sensitive issues. </p>
<p class="heading-1">Customizing open source for embedded environments</p>
<p class="body-text">When considering open source to serve as the basis for a network infrastructure platform, set-top box platform, medical device, or any other embedded application, consider the amount of customization required to address the specific industry&#8217;s needs.</p>
<p class="body-text">When implementing a new open-source project, a team either needs to customize the software to fit the needs of their environment using valuable resources from their own team or use funds to bring consultants in to do the same thing. The consultant route can save time that would have been spent customizing the software, but it still requires developers to spend time managing the process.</p>
<p class="body-text">Maintaining open-source software is another time sink. Nine times out of ten, scripting and fixes are doable but come at the cost of developer hours that could be spent more wisely on developing the product, not just fixing open-source software. With the high costs of developers, that could represent a significant portion of development resources allocated to the &#8220;free&#8221; solution.</p>
<p class="heading-1">Optimizing open source to accelerate&nbsp;builds</p>
<p class="body-text">Developers need to optimize their builds in a way that maximizes the productivity of the engineering organization. This means developers don&#8217;t sit around waiting for their individual builds to finish &#8211; a process that can typically take minutes or hours at best and days at worst. Build accelerator tools on the market today speed builds primarily through a process known as <span class="italics">dependency-aware parallelism</span> distributed across large-build clouds as well as clever caching and avoidance techniques, enabling fast and reliable incremental and full builds. Some large development organizations have optimized data centers employing these accelerators to speed builds for distributed global teams.</p>
<p class="body-text">Open-source options are available for managing and accelerating software builds, but they entail clear limitations and caveats. For example, when using common software construction tools such as GNU Make and SCons, it&#8217;s typically costly to build in the necessary scalability and reliability to support and accelerate software builds at the appropriate level. This problem multiplies as organizations scale up to more developers, more projects, and a greater need for faster feedback loops throughout the development life cycle. </p>
<p class="body-text">Another common problem with open-source build tools is the lack of visibility and &#8220;debugability&#8221; of the inner details of the software build structure, resulting in costly manual maintenance and long lead times for an organization looking to become more efficient and agile. The visibility to go back and identify what went wrong once the build failed simply isn&#8217;t there. As multiple teams combine their efforts to bring a product to market, this lack of visibility across teams slows down troubleshooting and therefore the ability to speed time to market. In an industry where time to market is everything and, increasingly, multiple releases and fixes for the embedded application are required, this level of support simply isn&#8217;t acceptable. </p>
<p class="body-text">When considering alternatives to open-source tools, teams should ensure that acceleration tools don&#8217;t lead to broken builds, can leverage their existing hardware resources for parallelization, and can work with their existing toolsets and&nbsp;processes.&nbsp;</p>
<p class="body-text">One such alternative is Electric Cloud&#8217;s ElectricAccelerator (Figure 1), which executes parallel builds on a single machine or across a cluster of standard servers, reducing full or incremental build times by up to 20x.&nbsp;The key to this acceleration lies in patented dependency management technology, which detects and manages dependencies at the file level to ensure accurate builds. ElectricAccelerator plugs into existing build and release architectures, without the need to modify existing build scripts and tools. As an add-on to the build tool, ElectricInsight provides an intuitive, graphical representation depicting how the builds are structured and run, giving build managers the ability to pinpoint performance problems or conflicts across all of their builds.&nbsp;Instead of manually pouring over thousands of lines of build output files, error detection and performance tuning can be done in seconds. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5743%2Ffigures%2F1" title="ElectricAccelerator parallelizes builds managing underlying complex dependencies. The inset report shows how hardware utilization can be optimized to reduce build times."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5743%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> ElectricAccelerator parallelizes builds managing underlying complex dependencies. The inset report shows how hardware utilization can be optimized to reduce build times.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Open-source sprawl and visibility</p>
<p class="body-text">Because open-source platforms are easy to acquire, most departments end up implementing their own individual versions, often customized to meet their specific needs. For larger organizations, this can mean dozens of instances of continuous integration tools implemented within the same development organization, creating an unmanaged, siloed environment, or in other words, an open-source sprawl.</p>
<p class="body-text">The resulting costs from such sprawls can be significant. First and foremost, this is not a model that scales easily. Second, management has little to no visibility as to the progress of the development effort. With a lack of standardization, there&#8217;s no way to truly assess progress or troubleshoot problems across interdependent projects. From a management standpoint, this is frustrating because efforts are uncoordinated and requests for costly resources come from all directions. </p>
<p class="heading-1">Open source and support</p>
<p class="body-text">When using open source, developers always face the question of support. When time-critical issues must be resolved, the questions may need to be directed to the community because there is no official support system. Mission-critical applications that affect an organization&#8217;s revenues must be solved in a time-sensitive manner in collaboration with professionals who can be held accountable. There is something to be said for having someone on call on to fix a problem instead of relying on&nbsp;a&nbsp;community.</p>
<p class="body-text">Taken together, all of these issues can easily compound to introduce significant issues in any embedded development process. That&#8217;s not to say open source can&#8217;t be a valuable tool for the embedded developer &#8211; it most certainly can. However, the cost of using open source for development efforts comes with limitations and requires time and effort for which organizations must budget. So when developers decide to depend on open-source technologies, they should make sure they&#8217;re aware of the true price of &#8220;free.&#8221; </p>
<p class="author-bio">Ashish Kuthiala is&nbsp;head of product marketing at Electric&nbsp;Cloud.</p>
<p class="contact-info">Electric Cloud <span class="hyperlink"><a href="mailto:kuthiala@electric-cloud.com">kuthiala@electric-cloud.com</a></span> <span class="hyperlink"><a href="http://www.electric-cloud.com">www.electric-cloud.com</a></span></p>
<p class="contact-info">Follow:  <a href="https://twitter.com/#!/ElectricCloud">Twitter</a> <a href="http://www.facebook.com/ElectricCloudInc">Facebook</a> <a href="https://plus.google.com/102438734891330352725/posts">Google+</a> <a href="http://www.linkedin.com/company/electric-cloud?trk=tabs_biz_home">LinkedIn</a> </p>
<p class="contact-info">Follow: <span class="hyperlink">Ashish Kuthiala <a href="http://www.linkedin.com/in/ashishkuthiala">LinkedIn</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The missing layer of security in connected embedded devices &#8211; Q&amp;A with Alan Grau, President and Cofounder, Icon Labs</title>
		<link>http://embedded-computing.com/articles/the-president-cofounder-icon-labs/</link>
		<comments>http://embedded-computing.com/articles/the-president-cofounder-icon-labs/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 15:00:00 +0000</pubDate>
		<dc:creator>Jennifer Hesse, Editor, OpenSystems Media</dc:creator>
				<category><![CDATA[8051 based project]]></category>
		<category><![CDATA[8051 development board]]></category>
		<category><![CDATA[application security threats]]></category>
		<category><![CDATA[arm development board]]></category>
		<category><![CDATA[arm eval board]]></category>
		<category><![CDATA[arm evaluation board]]></category>
		<category><![CDATA[arm evaluation boards]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[arm9 development board]]></category>
		<category><![CDATA[arm9 evaluation board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[atmel microcontroller projects]]></category>
		<category><![CDATA[attack ddos]]></category>
		<category><![CDATA[avr development board]]></category>
		<category><![CDATA[computer security information]]></category>
		<category><![CDATA[computer security issues]]></category>
		<category><![CDATA[computer security threat]]></category>
		<category><![CDATA[connected devices]]></category>
		<category><![CDATA[cyber security threat]]></category>
		<category><![CDATA[data security breach]]></category>
		<category><![CDATA[data security risks]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design embedded systems]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[development board microcontroller]]></category>
		<category><![CDATA[development boards arm]]></category>
		<category><![CDATA[dos ddos]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded microcontroller systems]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[internet security information]]></category>
		<category><![CDATA[it security risks]]></category>
		<category><![CDATA[it security threat]]></category>
		<category><![CDATA[latest internet security threats]]></category>
		<category><![CDATA[Managing Editor]]></category>
		<category><![CDATA[microcontroller and embedded system]]></category>
		<category><![CDATA[microcontroller arm]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[microcontroller development board]]></category>
		<category><![CDATA[microcontroller embedded system]]></category>
		<category><![CDATA[microcontrollers embedded systems projects]]></category>
		<category><![CDATA[network firewall security]]></category>
		<category><![CDATA[network security attacks]]></category>
		<category><![CDATA[network security issues]]></category>
		<category><![CDATA[network security risk]]></category>
		<category><![CDATA[network security risks]]></category>
		<category><![CDATA[network security threat]]></category>
		<category><![CDATA[pc security threats]]></category>
		<category><![CDATA[picaxe microcontroller]]></category>
		<category><![CDATA[protect against ddos]]></category>
		<category><![CDATA[protect from ddos]]></category>
		<category><![CDATA[protecting against ddos]]></category>
		<category><![CDATA[protection against ddos]]></category>
		<category><![CDATA[security threats in computer]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software security threats]]></category>
		<category><![CDATA[stepper motor microcontroller]]></category>
		<category><![CDATA[threats to computer security]]></category>
		<category><![CDATA[threats to data security]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=c14ec65a520168846c7fcac078e07cb0</guid>
		<description><![CDATA[IDC is predicting that 15 billion intelligent devices will be connected to the Internet by 2015. This explosion in connected embedded devices has spawned a new generation of hackers targeting mobile devices, automobiles, medical equipment, and other systems. Alan discusses what these latest security threats to embedded devices look like and what steps companies should take to protect their devices from attacks launched via the Internet.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5742%2Ffigures%2F2" />IDC is predicting that 15 billion intelligent devices will be connected to the Internet by 2015. This explosion in connected embedded devices has spawned a new generation of hackers targeting mobile devices, automobiles, medical equipment, and other systems. Alan discusses what these latest security threats to embedded devices look like and what steps companies should take to protect their devices from attacks launched via the Internet. </h3>
<p><span id="more-13594"></span><span class='body'>
<p class="body-text"></p>
<p class="interview-question"><span class="interview-name">ECD:</span> What are some common threats&nbsp;and attacks against connected embedded devices?</p>
<p class="body-text"><span class="interview-name">GRAU:</span> We are seeing a surge in attacks against embedded devices. Attacks range from simple automated probes to sophisticated attacks targeting specific features of the embedded devices.</p>
<p class="body-text">IP and Web attacks that have long been used against enterprise networks and Web servers are now being used to attack embedded devices. Hackers have compromised medical devices, reprogrammed printers, and even hacked antitheft and vehicle control systems in cars. The list of possible attacks is limited only by the creativity of hackers.</p>
<p class="body-text">A few other common threats are dictionary attacks, where hackers attempt to log in and gain control of the embedded device using weak or default passwords, and insider attacks, where disgruntled employees steal passwords and sell them to hackers.</p>
<p class="interview-question"><span class="interview-name">ECD:</span> What steps can designers take&nbsp;to protect their devices from these attacks?</p>
<p class="body-text"><span class="interview-name">GRAU:</span> Security needs to be considered from the very beginning of the design phase. Engineers must assess the possible attack vectors available to hackers. Each interface provided by the device is a potential attack vector for hackers. Wi-Fi, Ethernet, Bluetooth, serial communication, and even debug ports have been targeted by hackers. Once the risks are determined, engineers can begin designing security measures for the identified risks.</p>
<p class="body-text">Many embedded devices include security protocols such as Secure Shell (SSH) or Secure Socket Layer (SSL) to ensure secure communication with the device. While that is an important step, it is not sufficient. A firewall is the critical layer of security that is missing in most embedded devices. A firewall allows the creation of policies that define and enforce what communication is allowed with the device. The policies define, at a minimum, with whom the device communicates, which protocols are supported, and which ports are open. An embedded firewall is integrated into the communication stack and blocks packets at the lowest layers of the stack. By enforcing communication policies, many attacks are blocked before a connection is even established.</p>
<p class="body-text">Consider a Supervisory Control and Data Acquisition (SCADA) controller that incorporates the Icon Labs Floodgate firewall and is configured with communication policies that define a set of trusted senders and block all ports and protocols not used by the device (see Figure 1). If hackers attack the device, they will be blocked because the communication is not originating from a trusted sender. Even if hackers steal passwords from an insider, they will not be able to log in to the device because they are not trusted senders. The firewall will block packets at the IP layer before a log-in is attempted.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=642,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5742%2Ffigures%2F1" title="The Icon Labs Floodgate embedded firewall enforces communication policies, blocking unwanted packets and protecting embedded devices from attack."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5742%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The Icon Labs Floodgate embedded firewall enforces communication policies, blocking unwanted packets and protecting embedded devices from attack.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="interview-question"><span class="interview-name">ECD:</span> How difficult is it to port security software to an embedded system? What are the impacts on performance and memory size?</p>
<p class="body-text"><span class="interview-name">GRAU:</span> Most embedded systems require security software that is designed for use with the specific requirements of embedded systems in mind. Security systems for Linux or Windows are generally large, slow, and not easily ported. A product like Floodgate that is designed to be small, fast, and portable between Real-Time Operating Systems (RTOSs), on the other hand, can be easily ported between embedded systems. Floodgate has been ported to devices as small as 8-bit MCUs and can be configured to as little as 15 KB of RAM and 15 KB of ROM.</p>
<p class="body-text">Performance is another reason to use security software designed for embedded systems. These solutions will be faster and use fewer memory resources than desktop solutions.</p>
<p class="interview-question"><span class="interview-name">ECD:</span> If embedded devices are to be deployed on a closed network, should designers consider security?</p>
<p class="body-text"><span class="interview-name">GRAU:</span> Security needs to be designed into all embedded devices, regardless of how they will be deployed initially. Many devices originally designed for use on closed systems are later repurposed, and subsequently may be deployed on open networks. For example, many legacy SCADA systems were designed without security because they were built solely for use on closed networks. Today, many of these devices are connected to the Internet and have few, if any, security features to protect them from hackers. The result is scary; embedded devices are serving critical functions in our infrastructure and remain easy targets for&nbsp;hackers.</p>
<p class="body-text">Stuxnet showed us that closed networks can still be compromised. Hackers can penetrate the network, or, as with Stuxnet, viruses, worms, and other attacks can be introduced through USB drives and other physical media. In addition, there is always the risk of insider attacks. Someone with authorized access to the network could launch an attack against devices on the network.</p>
<p class="body-text">Enterprise networks are designed using multiple layers of security. Network firewalls protect against attacks from the Internet, security protocols protect communication, and endpoint firewalls and antivirus/antimalware software protect individual nodes on the network. Embedded devices need to follow a similar approach, adding a firewall to the device to provide an extra layer of protection, regardless of how the device will be deployed at the outset.</p>
<p class="interview-question"><span class="interview-name">ECD:</span> Are the built-in security provisions in OSs such as Android adequate for embedded applications?</p>
<p class="body-text"><span class="interview-name">GRAU:</span> As we all know, Android runs on the Linux OS. However, many people are surprised to learn that in various Android distributions, some Linux security features have been stripped out to reduce memory usage. For example, support for packet filtering using iptables is not included in many Android distributions, meaning that firewall support is not included. So Android may not be as secure as many people believe it to be.</p>
<p class="body-text">Security is about risk management. Hackers will break into a device or network for many reasons. Some are politically or financially motivated. Others just want to prove they can do it. The number and sophistication of attacks continue to rise. Any device with a network interface, even a device on a private network, is a potential target for attack. If the device has a Wi-Fi interface or is connected to the Internet, it almost certainly will be attacked. Devices with a Web interface will likely be targeted by automated Web hacking tools. Reports estimate that between 20 to 30 percent of all Web traffic is from hackers or other malicious packets.</p>
<p class="body-text">As engineers should assume their devices will be attacked, they face a number of questions. How difficult can they make it for hackers to breach the device? What security measures can be put into place, and what are the costs and benefits of each of these? Five years&nbsp;ago security protocols such as SSH and SSL were considered enough to protect an embedded device from hackers. They are no longer sufficient. An embedded firewall is a simple and effective way to protect embedded devices from hackers capitalizing on the openness of the&nbsp;Internet. </p>
<p class="author-bio">Alan Grau is president and cofounder of Icon Labs.</p>
<p class="contact-info">Icon Labs <span class="hyperlink"><a href="mailto:alan.grau@icon-labs.com">alan.grau@icon-labs.com</a></span> <span class="hyperlink"><a href="http://www.iconlabs.com">www.iconlabs.com</a></span></p>
<p class="contact-info">Follow: <a href="http://www.youtube.com/user/iconlabs?feature=watch">YouTube</a> </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accelerating high-performance computing applications using parallel computing</title>
		<link>http://embedded-computing.com/articles/accelerating-using-parallel-computing/</link>
		<comments>http://embedded-computing.com/articles/accelerating-using-parallel-computing/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 15:00:00 +0000</pubDate>
		<dc:creator>Uri Mishol, Xoreax</dc:creator>
				<category><![CDATA[about cloud computing]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[application of grid computing]]></category>
		<category><![CDATA[applications of parallel computing]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[business application software]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[cloud and grid computing]]></category>
		<category><![CDATA[cloud computing and grid computing]]></category>
		<category><![CDATA[cloud computing and virtualization]]></category>
		<category><![CDATA[cloud computing business]]></category>
		<category><![CDATA[cloud computing data center]]></category>
		<category><![CDATA[cloud computing for business]]></category>
		<category><![CDATA[cloud computing grid]]></category>
		<category><![CDATA[cloud computing infrastructure]]></category>
		<category><![CDATA[cloud computing is]]></category>
		<category><![CDATA[cloud computing resources]]></category>
		<category><![CDATA[cloud computing software]]></category>
		<category><![CDATA[cloud computing solution]]></category>
		<category><![CDATA[cloud computing system]]></category>
		<category><![CDATA[cloud computing systems]]></category>
		<category><![CDATA[cloud computing uses]]></category>
		<category><![CDATA[cloud computing what is]]></category>
		<category><![CDATA[cloud computing what is it]]></category>
		<category><![CDATA[cluster and grid computing]]></category>
		<category><![CDATA[cluster computing applications]]></category>
		<category><![CDATA[cluster computing architecture]]></category>
		<category><![CDATA[computing cloud]]></category>
		<category><![CDATA[computing in the cloud]]></category>
		<category><![CDATA[data center virtualization]]></category>
		<category><![CDATA[distributed parallel computing]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[erp implementation]]></category>
		<category><![CDATA[grid and cloud computing]]></category>
		<category><![CDATA[grid cloud computing]]></category>
		<category><![CDATA[grid computing architecture]]></category>
		<category><![CDATA[grid computing cloud computing]]></category>
		<category><![CDATA[grid computing software]]></category>
		<category><![CDATA[grid computing system]]></category>
		<category><![CDATA[high performance cluster]]></category>
		<category><![CDATA[high performance computer system]]></category>
		<category><![CDATA[high performance computer systems]]></category>
		<category><![CDATA[high performance computing cloud]]></category>
		<category><![CDATA[high performance computing on graphics processing units]]></category>
		<category><![CDATA[high performance computing research]]></category>
		<category><![CDATA[high performance computing software]]></category>
		<category><![CDATA[high performance computing solutions]]></category>
		<category><![CDATA[high performance computing system]]></category>
		<category><![CDATA[high performance grid computing]]></category>
		<category><![CDATA[le cloud computing]]></category>
		<category><![CDATA[open source grid computing]]></category>
		<category><![CDATA[parallel computers]]></category>
		<category><![CDATA[parallel computing algorithms]]></category>
		<category><![CDATA[parallel computing applications]]></category>
		<category><![CDATA[parallel distributed computing]]></category>
		<category><![CDATA[Process virtualization]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software cloud computing]]></category>
		<category><![CDATA[software consulting]]></category>
		<category><![CDATA[the cloud]]></category>
		<category><![CDATA[the cloud computing]]></category>
		<category><![CDATA[uses of cloud computing]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[was ist cloud computing]]></category>
		<category><![CDATA[web application developers]]></category>
		<category><![CDATA[what cloud computing]]></category>
		<category><![CDATA[XaaS]]></category>
		<category><![CDATA[Xoreax]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=88950afbcb1ba9adbcf675196b874ef5</guid>
		<description><![CDATA[Various technologies are available for accelerating applications with high-performance computing requirements, including parallel utilization of CPUs, cores, and GPUs; cluster computing; grid computing; and public cloud computing. A new distributed computing approach called process virtualization provides rapid acceleration of these applications and helps resolve some of the conventionally challenging aspects of converting an application to a distributed architecture.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story"><span id="more-13579"></span><span class='body'>
<div class="story">
<p class="body-text">In recent years, certain software fields that involve complex, large-scale data processing have reached increasingly high levels of complexity. Consequently, processing now takes hours and sometimes even days or weeks on modern hardware. This is notably the case for software dealing with various simulations, energy analytics, Computer-Aided Design and Computer-Aided Manufacturing (CAD/CAM), graphics rendering, life sciences, finances, and data conversion. Accelerating the processing functions in these software packages not only increases user satisfaction, but also enables higher accuracy, better decision-making, and more efficient work procedures in organizations using the software. Software acceleration has thus become a high priority for software organizations in these fields.</p>
<p class="body-text">One obvious approach to software acceleration is to invest in stronger computer hardware. As processor technology consistently improves, this approach is valid as a short-term decision. However, more often than not it fails in the long term because processing demands tend to consistently increase as well, and in many cases the results do not meet the application requirements. For software deployed on a large scale, investment in strong servers can be prohibitively expensive. Due to the these factors, software organizations are increasingly seeking parallel and distributed processing systems as a cost-effective way to accelerate time-consuming computational applications.</p>
<p class="heading-1">Parallel computing options</p>
<p class="body-text">Using parallel computing to accelerate highly complex computational processes is not a new concept. This approach has been tested and proven, and with the recent influx of affordable multicore and General-Purpose Graphics Processing Unit (GPGPU)-based technologies, it is more relevant now than ever before.</p>
<p class="body-text">However, choosing the right technology to accelerate time-consuming computational processes is far from a straightforward decision. The various options for implementing a parallel or distributed system offer substantial differences in the resulting acceleration potential, as well as in direct development costs and indirect/long-term costs (maintenance, infrastructure, energy, and so on). This is particularly true when considering platforms for migrating existing code to a parallel or distributed architecture. Choosing a less-than-ideal system may incur dramatically increased costs &#8211; both direct and indirect &#8211; compared to a better alternative.</p>
<p class="body-text">Part of the uncertainty around choosing the right parallel or distributed architecture lies in the<span style="mso-spacerun: yes">&nbsp; </span>diversity of time-consuming processes, each involving different requirements and considerations. When selecting an acceleration approach for a specific process, it is important to consider the characteristics and limitations of the scenario involved. Developers can use some parameters to characterize highly computational processes and then choose the appropriate acceleration methodology.</p>
<p class="heading-2">CPU-bound versus I/O-bound processes</p>
<p class="body-text">Certain types of applications such as data warehouses and enterprise resource planning are characterized by extensive data access, while others such as simulations, rendering, and terrain analysis typically place greater emphasis on algorithmic or CPU-bound complexity. If the portions of the application that are to be executed in parallel are algorithmic rather than data-intensive (that is, they are more CPU-bound than I/O-bound), parallel execution over the local network, or in some cases over a Wide Area Network (WAN), should be considered because it effectively utilizes the available hardware resources. For processes that are more data-bound and involve reading and writing very large amounts of data, the chosen architecture should address the expected data bottlenecks with an emphasis on high-throughput disc and network systems.</p>
<p class="heading-2">Highly isolated versus environment-dependent processes</p>
<p class="body-text">This characteristic refers to the level of interaction between the process that is to be executed in parallel and the host environment &#8211; specifically the size and complexity of the application to be run in parallel (executable, libraries, and binary dependencies), file system activity, and access to other environmental databases such as registry and environment blocks. A highly isolated application involves a minimal set of such interactions; however, an application dependent on the runtime environment typically requires the parallel computing architecture to either preconfigure the relevant computers with the complete set of required software and data files or include a virtualization component to emulate the running environment on each of the computing nodes. Several approaches to virtualization in parallel computing environments exist, and the selected parallel computing environment can significantly affect total system cost.</p>
<p class="heading-2">Embarrassingly parallel versus inherently serial processes (and everything in between)</p>
<p class="body-text">One issue that can complicate development efforts in building a parallel computing architecture is the application&#8217;s suitability for &#8220;slicing&#8221; into multiple, independently executable parts that can run in parallel. Some legacy applications require intensive code structure refactoring to allow this. Others require little or no work to prepare the application for parallel execution. The most common example is batch sequential data processing, in which the same process executes over and over again, each time with a different input set. Such examples are sometimes described as &#8220;embarrassingly parallel&#8221; to indicate the relative simplicity of converting them to a parallel execution model. On the other hand, some applications are &#8220;inherently serial&#8221; and are not well-suited for parallel execution. With these applications, it is still sometimes possible to gain performance improvements by converting certain processing micro-elements to GPU-based parallel execution using technologies such as OpenCL or CUDA.</p>
<p class="heading-2">High-end versus cost-effective acceleration requirements</p>
<p class="body-text">Commercial parallel computing platform costs vary greatly, with high-end systems being several orders of magnitude higher than low-end systems. Thus, it is important to define the performance improvement expectations by moving to a parallel computing environment. Acceleration through parallel computing is, by definition, a move with diminishing returns; in many cases, reducing execution time by 50 to 70 percent is sufficient to create a radical change in application performance, and the additional value of improving this to an 80 to 90 percent reduction is not worth the investment. While low- and mid-range parallel computing systems provide a reasonable performance improvement, high-end systems offer an additional 10 to 20 percent acceleration, but at a significant additional cost that does not always justify itself.</p>
<p class="heading-2">Legacy versus newly developed applications</p>
<p class="body-text">For obvious reasons, converting a legacy application that was originally designed for serial execution is significantly more time-consuming and expensive than designing a new application for parallel execution. Most parallel computing platforms offer APIs that allow software developers to modify the application code to utilize the platform. Some APIs are more complex than others, and previous developer experience with these APIs is recommended to allow effective integration with the platform.</p>
<h1>Approaches to software acceleration via parallel computing</h1>
<p class="body-text">As stated earlier, pricing of commercial parallel computing platforms varies substantially between low- and high-end products. In addition, higher-end systems require considerably more sophisticated adaptation and administration, and the combined costs of software licenses and professional services make the price differential even higher, with high-end systems sometimes costing orders of magnitude higher than simpler systems. </p>
<p class="body-text">Furthermore, when migrating existing applications to a parallel computing architecture, it is important to consider the migration costs involved with adapting the parallel computing platform (professional services, programming, and quality assurance). It is therefore recommended to choose an approach that will provide the minimal set of features to adequately answer the software project needs, without investing in an unnecessarily expensive higher-end system.</p>
<p class="body-text">The following overview examines current categories of parallel computing platforms and explains how each relates to the characteristics presented in the previous section.</p>
<p class="heading-2">Local parallelization using multiple cores and/or GPGPUs</h2>
<p class="body-text">In recent years, the potential for accelerating computational processes using parallel computing resources within a single machine has grown significantly with the introduction of strong multicore CPUs and GPGPUs. While the capability for local parallelization using these technologies is still limited by hardware specifications, in many cases they provide a cost-effective, low-end alternative to a full-scale distributed system. Parallel localization also works around the need to invest in virtualization technologies required by some distributed computing technologies. The benefits of using multicore and/or GPGPUs include:</p>
<ul>
<li class="bullets"><span class=bold>Multiple core utilization:</span> Applications that are more CPU-bound than I/O-bound can be modified to run different executable parts in parallel as separate processes. Modern Operating Systems (OSs) today are aware of multiple CPU cores and can automatically manage parallel processes and send each to run using a different core, allowing effective parallelization. In applications with potential for simple parallel separation, this is often a winning approach. The chief problems with this method are hardware restrictions, as the number of cores in each system is limited, and typically all processes share just one disk drive. However, these issues can be averted using a system like IncrediBuild-XGE (Figure 1), which allows applications utilizing multiple cores in parallel to automatically use all available cores in the local network.</li>
<li class="bullets"><span class=bold>GPGPUs:</span> These components are fast emerging as another way to achieve acceleration using existing parallel resources in PCs and servers. Originally designed to process graphics-oriented processing tasks in parallel with general processing tasks, GPUs can now be used to handle nongraphical processing tasks, with hardware vendors aiming at systems having multiple strong GPUs to promote this approach. GPU-based parallel computing is performed at the thread-level (multiple parallel threads per process each utilizing a different GPU) and involves the use of dedicated APIs such as OpenCL and CUDA, which require expertise and sometimes significant development effort.</li>
</ul>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5744%2Ffigures%2F1" title="Processes are distributed to idle resources on a local network using process virtualization."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5744%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Processes are distributed to idle resources on a local network using process virtualization.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-2">In-house (nongeneric) distributed computing implementations</h2>
<p class="body-text">In scenarios involving simple parallelization challenges in which the target application is highly isolated, embarrassingly parallel (or close to it), and can settle for reasonable acceleration results without requiring investment in high-end infrastructure, it may be practical to develop an application-specific distributed computing implementation. The simplest example would involve running different parts of the application in parallel on separate, predefined servers. The relative simplicity of the target application might make the development and maintenance costs involved in creating a proprietary system comparable to or even less expensive than adapting a commercial system. </p>
<p class="body-text">Another advantage to this approach is the high level of flexibility achieved in developing a proprietary system. However, for almost any scenario beyond the most simplistic ones, developing a parallel computing implementation in-house is likely to result in costly ongoing maintenance efforts and complications in handling issues that generic systems already address, such as error handling, availability, scalability, dynamic resource allocation, management requirements, and reporting.</p>
<p class="heading-2">Computing clusters</p>
<p class="body-text">A computing cluster is a group of servers dedicated to sharing an application&#8217;s workload. Servers in the cluster run a homogeneous environment that includes both an up-to-date version of the runtime environment (application and binary dependencies) and shared access to I/O files. Having a dedicated computing environment such as a computing cluster eliminates the need for virtualization (see the previous section on highly isolated versus environment-dependent processes) and offers effective central administration of the computing cluster. The downsides of this approach are:</p>
<ul>
<li class="bullets">Maintaining a dedicated farm of expensive servers running the software incurs additional costs and does not take advantage of unutilized computing power in existing hardware connected to the network.</li>
<li class="bullets">Clusters are often dedicated to a single application and cannot support several applications.</li>
<li class="bullets">Migrating an existing application to a computing cluster platform typically involves significant software development to adapt the application to use the cluster APIs.</li>
</ul>
<p class="body-text">Cluster-based systems can be combined with high-throughput storage as well as network hardware and software to optimize performance for data-bound applications with high-end performance requirements.</p>
<p class="heading-2">Grid computing</p>
<p class="body-text">Grid computing is similar to cluster computing in the sense that it involves a group of computers dedicated to solving a common problem, but differs from cluster computing by allowing a mixture of heterogeneous systems (different OSs and hardware) in the same grid. Grid systems also do not limit usage to a single application and enable more distributed control and administration of the systems connected to the grid. Finally, grids allow the largest scale of distributed system architecture in terms of the number of nodes involved, with large systems sometimes reaching many thousands of interconnected nodes. </p>
<p class="body-text">Some grid systems not only utilize the combined computing power of dedicated servers, but also allow PCs and workstations to contribute spare processor cycles to the grid even while they are running other computing tasks. For example, a user writing a document using a word processing tool such as Microsoft Word could simultaneously contribute 80 to 90 percent of idle processing power to computing tasks running on the grid. This simultaneous utilization can dramatically increase the grid&#8217;s potential computing power; however, in order to achieve this, the application running on the grid requires modification to use the grid system&#8217;s APIs. The more environment-dependent the application is, the more extensive the changes will be to the application code to allow it to utilize available computing power on nondedicated machines. </p>
<p class="body-text">Grid computing systems are, in general, the distributed parallel processing offering with the most comprehensive feature set and capabilities. As such, they also tend to be quite complex in terms of required expertise, both in development efforts (migrating existing code to the platform APIs) and ongoing maintenance and administration efforts. It is therefore recommended to evaluate these aspects when considering a grid-based approach.</p>
<p class="body-text">Grid systems can be commercial or open source. Open-source systems are less expensive but tend to leave open ends (scheduling, management, and physical implementation aspects) that are not covered by the project, and require either in-house development or collaboration with the project development community. It is therefore important to carefully assess the total cost of ownership involved in completing the missing components in open-source systems. Several commercial grid computing products provide fuller feature sets. </p>
<p class="body-text">Grid computing products tend to be at the highest end of the price range for parallel distributed systems. As with cluster-based systems, grid-based systems can be combined with high-end products to optimize network and storage bottlenecks. </p>
<p class="heading-2">Public compute clouds</p>
<p class="body-text">Public clouds such as Amazon&#8217;s EC2 and Microsoft&#8217;s Azure platform are a form of computing in which the cloud user purchases computing power from a virtualized compute farm over the Internet, as opposed to private clouds that run on computers stored on location at an organization. Payment models are flexible, allowing the user to grow and shrink in computing power according to requirements and pay only for the computing power that was used over time. This greatly reduces the need to make long-term investments in on-site hardware and infrastructure. Public clouds have traditionally been used for business applications with an emphasis on load-balancing requirements rather than accelerating computing processes, but public cloud high-performance computing systems are gaining popularity. </p>
<p class="body-text">The advantages of public cloud high-performance computing include:</p>
<ul>
<li class="bullets">Flexible, pay-as-you-go licensing</li>
<li class="bullets">No need to invest and maintain dedicated hardware</li>
<li class="bullets">Valid choice for applications in which high-end performance is not a requirement</li>
</ul>
<p class="body-text">Disadvantages include:</p>
<ul>
<li class="bullets">Cost of service can be quite high over time</li>
<li class="bullets">Raises security concerns when sensitive data is transferred from the organization&#8217;s servers to the Internet</li>
<li class="bullets">In some cases, the latency of uploading and downloading large amounts of data over a WAN connection can create performance bottlenecks</li>
<li class="bullets">Requires maintenance of virtual system images or modification of code to the platform APIs or both, which can be time-consuming and requires expertise</li>
<li class="bullets">Creates a dependency on the public cloud vendor and the availability of an open Internet connection</li>
</ul>
<p class="heading-1">A new approach to the heterogeneity challenge</p>
<p class="body-text">When accelerating applications that interact with the computing environment &#8211; read/write files, binary executables, dynamic link libraries, and read registry and environment values &#8211; a challenge surfaces for traditional distributed computing systems. </p>
<p class="body-text">One approach is to dedicate a compute cluster preinstalled with the required runtime environment and files for the distributed application. This answers the application&#8217;s requirements but requires investment in dedicated servers and does not take advantage of the computing power available in existing PCs and workstations connected to the network. It also requires maintaining the cluster and making sure it always runs an up-to-date version of the runtime and data environment. </p>
<p class="body-text">Virtualization allows servers to change the runtime environment on demand by loading a different system image each time, thereby improving manageability and increasing flexibility. However, virtual image initialization forms an additional bottleneck and, as in cluster systems, does not effectively utilize the sometimes vast amounts of idle processing power on existing computers. </p>
<p class="body-text">Some grid platforms provide APIs that, when integrated into the application code, allow the use of remote machine resources without requiring extensive preconfiguration of these machines. In some cases, this effectively enables nondedicated machines to connect to the grid and contribute their idle processing power. However, this is applicable only in certain scenarios and in most cases requires extensive modification of the application code.</p>
<p class="body-text">Process virtualization via a platform like IncrediBuild-XGE is a new approach to parallel distributed computing that enables software acceleration by combining the relative ease of migration and deployment characterizing cluster-based systems with the computing strength and flexibility of grid systems.</p>
<p class="body-text">With process virtualization, an initiator machine sends processes for parallel execution on other machines connected to the network. These processes will then run on these machines alongside any other processes running at the time on the OS, but will run in a special self-contained virtual environment that completely emulates the initiator&#8217;s environment, including installed applications, file system, registry, and environment. These virtual processes will only use the idle processing power of remote machines so as not to interfere with concurrently running processes not related to grid activity. The resource coordination module also ensures that processes are allocated to the strongest and most available nodes in the system at any time. </p>
<p class="body-text">Because virtualization is performed at the process level, there is no need to program code for the platform and integrate platform-specific APIs to application source code to migrate the application to the grid. Instead, IncrediBuild-XGE uses a compact XML definition file that specifies which processes should be farmed out to remote machines on the grid and which should always run on the initiator. This makes grid-enablement significantly faster compared to systems that require extensive modification of source code. For example, it typically takes less than an hour to convert an application that already uses local parallelization (processes running in parallel CPUs or cores on a single machine). Ongoing maintenance costs are also reduced because the need to maintain virtual image banks or a cluster environment is eliminated. </p>
<p class="body-text">The end result is a distributed processing application acceleration platform that effective accelerates both new and legacy applications, enables rapid integration, and reduces maintenance costs.</p>
<p class="author-bio">Uri Mishol is cofounder and chairman of Xoreax.</p>
<p class="contact-info">Xoreax <span class="hyperlink"><a href="mailto:UriM@incredibuild.com">UriM@incredibuild.com</a></span> <span class="hyperlink"><a href="http://www.incredibuild.com">www.incredibuild.com</a></span></p>
<p class="contact-info">Follow:  <a href="https://twitter.com/#!/incredibuild">Twitter</a> <a href="http://www.linkedin.com/company/xoreax-software">LinkedIn</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In the marriage of devices to networks, M2M developers hold the peace</title>
		<link>http://embedded-computing.com/articles/in-marriage-devices-networks-m2m-developers-hold-peace/</link>
		<comments>http://embedded-computing.com/articles/in-marriage-devices-networks-m2m-developers-hold-peace/#comments</comments>
		<pubDate>Wed, 15 Aug 2012 15:00:00 +0000</pubDate>
		<dc:creator>Steve Jahnke, Galixsys Networks</dc:creator>
				<category><![CDATA[arm embedded]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[computer board]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[device driver development]]></category>
		<category><![CDATA[device driver programming]]></category>
		<category><![CDATA[embedded board]]></category>
		<category><![CDATA[embedded boards]]></category>
		<category><![CDATA[embedded c]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded computer vision]]></category>
		<category><![CDATA[embedded computing design]]></category>
		<category><![CDATA[embedded cpu]]></category>
		<category><![CDATA[embedded design]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded device]]></category>
		<category><![CDATA[embedded devices]]></category>
		<category><![CDATA[embedded engineer jobs]]></category>
		<category><![CDATA[embedded hardware]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux]]></category>
		<category><![CDATA[embedded linux board]]></category>
		<category><![CDATA[embedded linux hardware]]></category>
		<category><![CDATA[embedded linux system]]></category>
		<category><![CDATA[embedded microprocessor systems]]></category>
		<category><![CDATA[embedded pc]]></category>
		<category><![CDATA[embedded processor]]></category>
		<category><![CDATA[embedded processors]]></category>
		<category><![CDATA[embedded programming]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software development]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system linux]]></category>
		<category><![CDATA[embedded system software]]></category>
		<category><![CDATA[embedded system software design]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems companies]]></category>
		<category><![CDATA[embedded systems development]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems jobs]]></category>
		<category><![CDATA[embedded systems linux]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[embedded systems technology]]></category>
		<category><![CDATA[embeded systems]]></category>
		<category><![CDATA[Galixsys Networks]]></category>
		<category><![CDATA[linux embedded]]></category>
		<category><![CDATA[linux embedded board]]></category>
		<category><![CDATA[linux embedded system]]></category>
		<category><![CDATA[m2m]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[Networking/Protocol]]></category>
		<category><![CDATA[pc embedded]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[what is an embedded computer]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=5f9c947c700dc383604f4c5544a5207e</guid>
		<description><![CDATA[M2M developers are embedded systems engineers who have teamed their skills with IT infrastructure and Internet technology. They face an emerging industry where a virtual private network of devices complicates the specific functions of individual devices. Choosing a network topology and using bandwidth efficiently are among the keys to success.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5745%2Ffigures%2F2" />M2M developers are embedded systems engineers who have teamed their skills with IT infrastructure and Internet technology. They face an emerging industry where a virtual private network of devices complicates the specific functions of individual devices. Choosing a network topology and using bandwidth efficiently are among the keys to success. </h3>
<p><span id="more-13581"></span><span class='body'>
<p class="body-text">Machine-to-Machine (M2M) operation, or any smart device in general, is characterized as a device that is accessible via a network connection. With recent increases in wireless capability and coverage &#8211;&nbsp;cellular, wireless LAN, and Near Field Communication (NFC) &#8211; plus the rapid reduction of both hardware and connection costs, the number of machines that can be connected is increasing significantly. These machines make up a range of devices, from smart thermostats that a homeowner can access from any device with a Web browser, to smart gas meters that automatically report gas usage to the utility company, to consumer devices such as smart picture frames that automatically stream pictures stored on a website to the frame.</p>
<p class="body-text">Current M2M capabilities are effectively the same as with any other computer operation; devices use the Web to send and receive data, usually from a cloud service or back-end server. Data is stored on these servers and then viewed by operators using general Web browsers. Mobile applications allow access to and transmission of data or commands from a smartphone or tablet to the smart device, with the cloud service or back-end server functioning as the control point in these operations.</p>
<p class="body-text">Designers face additional challenges when implementing M2M capability. The complexities of reliable networking weigh on the credibility of device function. Network practices that enhance security, reliability, and efficiency are added to the device design requirements.</p>
<p class="heading-1">M2M design challenges</p>
<p class="body-text">The challenges facing M2M designers today can be illustrated by comparing their tasks and responsibilities to those required of embedded systems engineers a few years ago. To build an embedded system, engineers would select the required sensors, actuators, keypad, and possibly a character display; interface them to I/O ports connected to a microprocessor; and get everything running with some combination of assembly and/or C program. They usually had the help of an in-circuit emulator and software that allowed breakpoints and single-step operation for debugging. If the device connected to anything outside, it was likely via RS-232 rather than a network. There was no real need to understand file system structure, user and group permissions, or the intricacies of network protocol. Those details were the domain of an IT department.</p>
<p class="body-text">By contrast, M2M designers have to bridge the gap between digital/analog/software engineers and IT network engineers. They must be comfortable working on the command line of a shell. Because an M2M system incorporates an embedded processor running a modern Operating System (OS) with a network stack, M2M designers must acquire or build and patch a kernel, acquire or write recognizable device drivers, and set up a multitude of boot-up and configuration scripts. They also must add code to read sensors or write to actuators required by the application. </p>
<p class="body-text">Another step in the M2M design process is to get connected and have a response ready when the device is dropped from the network or coming back online with a different IP address. This can be handled automatically by the OS in the case of Wi-Fi or Bluetooth on a LAN with Domain Name System (DNS), but will require intervention and specific command knowledge when RF or a cell modem is used for connection to the Internet. Power management cannot be ignored. The OS can put vital functions to sleep automatically or waste precious battery power if not set up properly for the application. File permissions and other security measures are not typically a concern for a local embedded system, but the M2M designer had better beware.</p>
<p class="body-text">Before finishing a device design, M2M engineers must gain a working knowledge of and most likely set up the server and database tables to which the system is connecting. If M2M designers are responsible for presenting data, then working knowledge of at least CSS, HTML, PHP, and Java should be in their toolkit.</p>
<p class="body-text">A desirable trait of an M2M designer is the ability to remain unperturbed by rapid changes. The consumer market for cell phone and tablet computing is driving the M2M industry, and the hardware and tools a designer may spend weeks or months getting familiar with will probably be updated or changed within a year. The good news is that with proper planning and care, all the work designers put into their connected devices will translate into newer, faster, and less expensive platforms in the future.</p>
<p class="heading-1">Software frameworks address M2M connectivity needs</p>
<p class="body-text">M2M development tools are becoming more user-friendly, and strong individual and corporate support communities are available online. The <span class="hyperlink"><a href="http://www.openembedded.org/wiki/Main_Page">OpenEmbedded software framework</a></span> and <span class="hyperlink"><a href="http://www.yoctoproject.org/">Yocto Project</a></span> support an array of hardware development platforms for Linux users and provide a means to manage kernel and file system work. Many engineers are already familiar with Microsoft&#8217;s <span class="hyperlink"><a href="http://msdn.microsoft.com/en-us/netframework/aa497273.aspx">.NET Compact Framework</a></span> and its capabilities. Furthermore, several modem manufacturers embed powerful processors into their products, making compact COTS M2M systems possible.</p>
<p class="body-text">Galixsys Networks provides a software framework for Linux or Android platforms that uses a Common Gateway Interface (CGI) protocol specifically designed to meet the needs of developers working with connected devices. The Andromeda framework (see block diagram in Figure 1) leverages the standard HTTP data stream to enable instant M2M communication capability and unique device identification. With a command and data payload structure, devices communicate in their natural binary, eliminating the need for markup languages. This results in greater security and reduced bandwidth with near real-time control over the Web.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=682,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5745%2Ffigures%2F1" title="A new command and data service layer transforms the typical client server model to an M2M configuration."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5745%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A new command and data service layer transforms the typical client server model to an M2M configuration.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">While M2M developers can easily write their own service routines and access them from programs with simple system calls, Andromeda comes with a range of services such as receiving, sending, and deleting files between devices and servers. A page server command directs a server to make service calls. Reading or writing data directly to an SQL database enables developers and M2M devices to get online quickly.</p>
<p class="body-text">The connected world is no longer coming; it has already been here for years. Thousands of new devices, phones, and tablets are connecting to the Internet every day. Across the globe, almost every industry imaginable has applications waiting to be developed to make them more efficient. How all these devices are managed and how effectively they use Web resources are the real challenges facing M2M developers. </p>
<p class="author-bio">Steve Jahnke is CTO of Galixsys Networks.</p>
<p class="author-bio">Richard Jahnke is director of engineering for Galixsys Networks.</p>
<p class="contact-info">Galixsys Networks 972-800-1301 <span class="hyperlink"><a href="mailto:jacquie.jahnke@galixsysnetworks.com">jacquie.jahnke@galixsysnetworks.com</a></span> <span class="hyperlink"><a href="http://www.galixsysnetworks.com">www.galixsysnetworks.com</a></span></p>
<p class="contact-info">Follow:  <a href="https://twitter.com/#!/Galixsys">Twitter</a> <a href="http://www.facebook.com/pages/Galixsys-Networks/136124846472745?ref=ts">Facebook</a> <a href="http://www.linkedin.com/company/939931?trk=tyah">LinkedIn</a> <a href="http://www.youtube.com/user/GalixsysNetworks?feature=watch">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging at the hardware/software interface</title>
		<link>http://embedded-computing.com/articles/debugging-the-hardwaresoftware-interface/</link>
		<comments>http://embedded-computing.com/articles/debugging-the-hardwaresoftware-interface/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 15:00:00 +0000</pubDate>
		<dc:creator>Frank Schirrmeister, Cadence</dc:creator>
				<category><![CDATA[8051 development board]]></category>
		<category><![CDATA[arm cortex development board]]></category>
		<category><![CDATA[arm development boards]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm11 development board]]></category>
		<category><![CDATA[arm7 development board]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic fpga]]></category>
		<category><![CDATA[asic verification]]></category>
		<category><![CDATA[atmel development board]]></category>
		<category><![CDATA[avr development board]]></category>
		<category><![CDATA[avr32 development board]]></category>
		<category><![CDATA[Cadence Design Systems]]></category>
		<category><![CDATA[computer organization patterson]]></category>
		<category><![CDATA[debugging in c]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design embedded systems]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[development board arm]]></category>
		<category><![CDATA[development board microcontroller]]></category>
		<category><![CDATA[development boards arm]]></category>
		<category><![CDATA[dsp development board]]></category>
		<category><![CDATA[electronic design services]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded development board]]></category>
		<category><![CDATA[embedded development boards]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded software architecture]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems developer]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[fpga design services]]></category>
		<category><![CDATA[fpga designer]]></category>
		<category><![CDATA[fpga dsp]]></category>
		<category><![CDATA[fpga implementation]]></category>
		<category><![CDATA[hardware and software development]]></category>
		<category><![CDATA[hardware design software]]></category>
		<category><![CDATA[hardware software design]]></category>
		<category><![CDATA[hardware software development]]></category>
		<category><![CDATA[jtag debugger]]></category>
		<category><![CDATA[microchip development board]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[microcontroller development board]]></category>
		<category><![CDATA[mipi d-phy]]></category>
		<category><![CDATA[msp430 development board]]></category>
		<category><![CDATA[pcb board design]]></category>
		<category><![CDATA[pcb design]]></category>
		<category><![CDATA[pcb layout design]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software and hardware development]]></category>
		<category><![CDATA[software development hardware]]></category>
		<category><![CDATA[software development tool]]></category>
		<category><![CDATA[Software/hardware debug]]></category>
		<category><![CDATA[vhdl coding]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=99bc865bc29f78c40c82e684ac97ae80</guid>
		<description><![CDATA[As the line between hardware and software continues to blur, debugging at the hardware/software becomes a necessity for delivering quality systems and meeting production goals.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F4" />The electronics industry has reached a point at which the dependencies between software and hardware have become so significant that they must be designed and debugged together. Efficient debug at the hardware/software interface requires full understanding of what is happening in the processor, as well as in the device registers, memory maps, and bus accesses that connect the processor to the peripherals, not to mention the internal state of these peripherals. This kind of debug capability has become crucial for delivering products successfully, at the right time, and at appropriate cost points.</h3>
<p><span id="more-4588"></span><span class='body'>
<p class="body-text">While design issues at the hardware/software interface have been discussed for the better part of a decade, increased software content in today&#8217;s application-driven designs has given these issues &#8211; specifically the dependency of software on hardware and efficient partitioning &#8211; new urgency. In the past, software developers performed their debugging tasks in a hardware-independent, &#8220;peripherally blind&#8221; fashion using embedded software debuggers connected to prototype boards. This offered great insight into the processor, but little to no information about the surrounding peripherals and on-chip interconnect structures. In contrast, hardware developers have focused on lower-level effects within the registers and interconnection of Systems-on-Chip (SoCs), which are growing more and more complex every year.</p>
<p class="body-text">When considering debug challenges, on-chip and in-system effects must be evaluated. On-chip debug needs to happen during the development phase to make sure the chip itself works correctly. In-system effects relate to how the chip behaves in its environment. Debugging in-system effects requires either complex modeling of the environment if the effects are to be considered during chip development, or control of the actual environment once the chip is available.</p>
<p class="body-text">Figure 1 shows a typical ARM core-based SoC with a processor subsystem containing various processors linked by a coherent fabric connection to the rest of the chip. The SoC also contains custom application-specific components for 3D graphics, digital signal processing, dedicated application-specific hardware accelerators, low-speed peripherals, and high-speed interfaces. Debug challenges include debugging multiple cores in lockstep, making sure IP block integration works correctly, debugging protocols like the AMBA 4 AXI Coherency Extensions (ACE) protocol, and debugging the overall chip interconnect.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F1" title="A typical ARM core-based SoC presents debug challenges such as debugging multiple cores in lockstep."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A typical ARM core-based SoC presents debug challenges such as debugging multiple cores in lockstep.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">In contrast, Figure 2 shows this same SoC in its system context. Connections between the SoCs and the actual system peripherals are established on the PCB and are often based on standards like DigRF, MIPI, and USB. Now the debug challenges shift from the on-chip areas to how the chip behaves in its environment. For instance, are the frames generated by the graphics engine correctly displayed by the external display? Various off-chip and in-system effects need to be considered in tandem with on-chip effects, as they often drive graphics content and control.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=602,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F2" title="An SoC in its system context presents debugging challenges regarding how the chip behaves in its environment."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> An SoC in its system context presents debugging challenges regarding how the chip behaves in its environment.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Approaches to hardware/software integration and debug</p>
<p class="body-text">During the development flow, design teams use several techniques that enable software debug and hardware/software integration.</p>
<p class="body-text">Once all the chips are available and integrated, the hardware team will typically build a limited number of prototyping boards so the software developers can begin bringing up their code on the device. After a product is released and it proliferates, these prototype boards are often referred to as development kits. They run at real-time speed and are fully accurate. Debuggers are connected to these boards via a JTAG (boundary scan) interface. That type of software debug is very common and well understood but has its challenges, as access to the depths of hardware is limited by the level of implemented on-chip instrumentation.</p>
<p class="body-text">FPGA-based prototypes of the chips that are to be integrated onto the board can be available several months prior to silicon. These prototypes run in the tens of MHz range, are hardware-accurate, and are often only feasible to use after stable Register Transfer Language (RTL) code is available. They allow limited debug capabilities. Connections to software debuggers are normally established via JTAG, but designers can enhance the RTL with debug information to enable hardware/software debug and analysis. Connecting the chip to the environment is possible depending on the prototype; speed rate adapters often need to be used, or the speed of the environment needs to be reduced to match the prototype speed.</p>
<p class="body-text">Hardware emulators are available even earlier in the design flow, and they execute the chip under development &#8211; or subsets of it &#8211; in the MHz speed range. They offer fast bring-up (compared to FPGA-based prototyping, which requires more modification of the code implementing the hardware) and much better hardware/software debug because a significant portion of the hardware emulator is dedicated to debug and control of the design. However, the size and price point of today&#8217;s emulators limit their ability to be replicated to large numbers of software developers.</p>
<p class="body-text">RTL simulation is the first execution environment in which accurate hardware and software can meet. It offers excellent hardware debug capabilities, but because it runs in the KHz range, its applicability for software development and hardware/software integration is very limited. RTL is focused on hardware verification and has traditionally been used only for very low-level, bare-metal software development. Given the complexity of modern on- and off-chip interfaces, commercial verification IP (which provides predefined test patterns to check interface correctness) can be used on-chip and within the system.</p>
<p class="body-text">Using less accurate, abstracted hardware models, virtual chip platforms under development can run at-speed and are sometimes available 9-12 months prior to silicon. They offer excellent software debug capabilities using standard interfaces like GNU Debugger (GDB) and Cycle-Accurate Debug Interface (CADI) to connect software debuggers to virtualized hardware. The same software debuggers can be used later at the board level. Depending on modeling efforts, the full chip and its environment can be made available for advanced hardware/software debug both on-chip and within the system.</p>
<p class="body-text">Finally, Software Development Kits (SDKs) are often the earliest available development platform. SDKs like the Apple iPhone SDK or the Android SDK enable many software developers to write their code for hardware that is very abstracted and, as such, cannot be debugged. Code developed on an SDK often needs to be recompiled to run on an actual device,&nbsp;in contrast to virtual prototypes and the other engines mentioned earlier, which load .elf files and run the same binary code that is later executed on the hardware target.</p>
<p class="heading-1">Debugging across the landscape of execution engines</p>
<p class="body-text">Electronics manufacturers are increasingly distributing software across multiple cores to keep within power envelopes for complex designs. As a result, multicore debug has become a bigger challenge. Fully synchronized heterogeneous software debug for multicore designs is ideal for setting break points in all software components and the hardware itself, which then allows inspection of states, the stack, variables in the software, and registers in the hardware.</p>
<p class="body-text">Using prototype boards, this is difficult if not impossible. If a break point triggers for the software of one processor and causes it to stop, all other processors continue to execute, changing the state of the environment in which the break point happened. In contrast, with a virtual prototype, all the participating elements &#8211;&nbsp;that is, all processors and hardware modules &#8211;&nbsp;can be stopped exactly when the break point occurred, thus allowing for efficient hardware/software debug.</p>
<p class="body-text">In addition, when developers work on actual hardware or with older generations of virtual prototypes, they see a variety of unsynchronized debugger windows. Modern virtual prototypes allow users to efficiently integrate processor models from different vendors via abstraction layers that enable fully synchronized debug and analysis in a single, uniform environment.</p>
<p class="body-text">Another effect that is difficult to analyze on the actual development board occurs when software has to be stopped based on conditions created by the state hardware is in. In the world of emulators, RTL simulators, and virtual prototypes, hardware debug is advanced, and both hardware and software can be efficiently halted based on break points representing the state or state transition within the hardware &#8211;&nbsp;like a specific counter value being reached or a specific transaction sent over a bus.</p>
<p class="body-text">Whenever software-based hardware execution is involved, software debug can also be efficiently synchronized with a mix of different hardware abstraction levels. This is valuable at the beginning of a derivative project, for which new hardware components are available as highly abstracted models at the transaction level and not yet as hardware implemented at the RTL.</p>
<p class="heading-1">Gaining full view of hardware/software</p>
<p class="body-text">The complexity of modern software and its dependency on the hardware upon which it is executing have made it unfeasible to delay debugging and hardware/software integration until all the chips are available and integrated onto the PCB. Several execution engines are available to chip and system development teams, but the capability to develop and debug software varies greatly among these engines. Figure 3 shows the previously introduced chip and board combined with engines to execute the chip under development as well as connections to hardware/software debug. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=660,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F3" title="Hardware/software execution engines combined with an SoC and board execute the chip while it is developed."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5688%2Ffigures%2F3" alt="23" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 3:</b> Hardware/software execution engines combined with an SoC and board execute the chip while it is developed.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Debug has several layers, often built on Integrated Development Environments (IDEs) like Eclipse. Users need to debug the actual hardware, the bare-metal software execution outside of operating systems, and the hardware and software in combination, as well as the performance of the overall system.</p>
<p class="body-text">With the hybrid combination of different engines and a new generation of software debuggers, the industry is approaching an era in which software developers can get a complete programmer&#8217;s view of the software and hardware much earlier in the design cycle than they ever could before. </p>
<p class="author-bio">Frank Schirrmeister is senior director of product&nbsp;marketing&nbsp;for&nbsp;the System and Software Realization&nbsp;Group&nbsp;at Cadence Design Systems.</p>
<p class="author-bio">Michael (Mac) McNamara is VP and general manager of system-level design at Cadence Design Systems.</p>
<p class="author-bio">Larry Melling is the product marketing manager for the Cadence&nbsp;Virtual System Platform&nbsp;at&nbsp;Cadence&nbsp;Design Systems.</p>
<p class="author-bio">Neeti Bhatnagar is the engineering director&nbsp;for&nbsp;the&nbsp;Cadence&nbsp;Virtual System Platform&nbsp;at&nbsp;Cadence&nbsp;Design Systems.</p>
<p class="contact-info">Cadence Design Systems 408-348-7025 <span class="interview-name"> </span><span class="hyperlink"><a href="mailto:franks@cadence.com">franks@cadence.com</a></span> <span class="hyperlink"><a href="mailto:mcnamara@cadence.com">mcnamara@cadence.com</a></span>  <span class="hyperlink"><a href="mailto:lmelling@cadence.com">lmelling@cadence.com</a></span> <span class="hyperlink"><a href="mailto:neeti@cadence.com">neeti@cadence.com</a></span> <span class="hyperlink"><a href="http://www.cadence.com">www.cadence.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/cadence">Twitter</a> <a href="http://www.facebook.com/pages/Cadence-Design-Systems-Inc/66598923031">Facebook</a> <a href="http://www.linkedin.com/company/cadence-design-systems">LinkedIn</a> <a href="http://www.youtube.com/user/CadenceDesign">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unified system design: Software and hardware on the same page</title>
		<link>http://embedded-computing.com/articles/unified-system-design-software-hardware-the-page-2/</link>
		<comments>http://embedded-computing.com/articles/unified-system-design-software-hardware-the-page-2/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 15:00:00 +0000</pubDate>
		<dc:creator>Colin Walls, Mentor Graphics Embedded Systems Division</dc:creator>
				<category><![CDATA[arm development board]]></category>
		<category><![CDATA[arm evaluation board]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic fpga]]></category>
		<category><![CDATA[asic verification]]></category>
		<category><![CDATA[atmel evaluation board]]></category>
		<category><![CDATA[avr development board]]></category>
		<category><![CDATA[blackfin evaluation board]]></category>
		<category><![CDATA[database application development]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[develop web applications]]></category>
		<category><![CDATA[eda]]></category>
		<category><![CDATA[electronic design services]]></category>
		<category><![CDATA[electronic system level design]]></category>
		<category><![CDATA[electronics design]]></category>
		<category><![CDATA[electronics design services]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded devices]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded software architecture]]></category>
		<category><![CDATA[embedded software development company]]></category>
		<category><![CDATA[embedded software development process]]></category>
		<category><![CDATA[embedded software development services]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded software entwicklung]]></category>
		<category><![CDATA[embedded software solutions]]></category>
		<category><![CDATA[embedded software system]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system design projects]]></category>
		<category><![CDATA[embedded system designing]]></category>
		<category><![CDATA[embedded system designs]]></category>
		<category><![CDATA[embedded system hardware design]]></category>
		<category><![CDATA[embedded system software design]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems designer]]></category>
		<category><![CDATA[embedded systems developer]]></category>
		<category><![CDATA[embedded systems engineering]]></category>
		<category><![CDATA[fpga asic]]></category>
		<category><![CDATA[fpga dsp]]></category>
		<category><![CDATA[hardware design software]]></category>
		<category><![CDATA[hardware design verification]]></category>
		<category><![CDATA[hardware system design]]></category>
		<category><![CDATA[Mentor Graphics]]></category>
		<category><![CDATA[microchip development boards]]></category>
		<category><![CDATA[microchip evaluation board]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[rtos embedded systems]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software and hardware development]]></category>
		<category><![CDATA[software consulting]]></category>
		<category><![CDATA[software development consultant]]></category>
		<category><![CDATA[software development consulting]]></category>
		<category><![CDATA[software system development]]></category>
		<category><![CDATA[system development software]]></category>
		<category><![CDATA[system software design]]></category>
		<category><![CDATA[Unified system design]]></category>
		<category><![CDATA[web application developers]]></category>
		<category><![CDATA[web based application development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=f5cc7002f962cef3447e4299d296a5dd</guid>
		<description><![CDATA[Virtual prototypes and hardware emulators improve design hardware, accelerate software bring-up, and bridge the designer/engineer gap in embedded systems.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5690%2Ffigures%2F2" />Although capable of running embedded software through emulation and simulation, traditional electronic design automation tools do not focus on the critical concerns of embedded systems design. This deficiency, in addition to software developers&#8217; unfamiliarity with hardware tools, requires a new approach. Software developers can interact with hardware earlier by implementing the same native tools used to develop applications that run on FPGA prototypes and final silicon. This allows for early investigation, which improves hardware design and accelerates software debug and bring-up for embedded systems.</h3>
<p><span id="more-16203"></span><span class='body'>
<p class="body-text">Long gone are the days when embedded software development commenced when hardware was ready. The ever-increasing size and complexity of software necessitate an earlier starting date to have a chance of shipping on time. Companies must ensure proper software integration ahead of silicon tape-out given the investment and risk associated with software development. Ever-shortening time-to-market windows further exacerbate these challenges.</p>
<p class="body-text">The only solution is to look for ways to execute, and hence, test and debug software before the final target hardware is available. Development often must start in earnest even before the hardware design is finalized. One way to improve hardware design and verification and accelerate software bring-up is to deploy the application on hardware that is either virtual or emulated.</p>
<p class="heading-1">Virtual prototypes</p>
<p class="body-text">There is no single, precise definition of the term &#8220;virtual prototype.&#8221; For the purposes of this article, the term will be used to describe any environment in which embedded code may run, thus enabling useful development prior to the availability of actual target systems. Let&#8217;s take a closer look at each of these&nbsp;possibilities.</p>
<p class="heading-2">Native code running on a PC</p>
<p class="body-text">It&#8217;s an obvious first step to compile and run code on a PC. Tools are readily available, cheap, or even free, and a PC offers high levels of functionality. This environment is fine for testing algorithms and basic logic. The code will probably run faster on a PC compared to the real target, as a PC&#8217;s CPU is likely to be more powerful than an embedded processor. </p>
<p class="body-text">Apart from clock speed, code timing is not useful, as the instruction mix on an x86 processor is very different from most embedded devices. As soon as the code needs to interact with hardware or the Real-Time Operating System (RTOS), this execution environment stops being useful.</p>
<p class="heading-2">Native code run with peripheral/system models</p>
<p class="body-text">Most RTOS manufacturers provide a host execution environment that enables either a special version of the RTOS to be run or its functionality to be emulated under Windows. This, along with a means of providing functional models of peripherals, enables further progress to be made. Timing is still misleading, however.</p>
<p class="heading-2">Execution on an evaluation board</p>
<p class="body-text">Most semiconductor vendors provide low-cost evaluation boards to facilitate fast deployment of their CPUs. Commercial RTOS products such as Mentor Embedded&#8217;s Nucleus RTOS may be available preconfigured for such boards, thus enabling rapid production.</p>
<p class="body-text">This execution environment is attractive, as the CPU speed and instruction mix is likely to be very close to the final target, which makes the testing of time-sensitive code viable. The accuracy of such an environment depends upon the similarity of the peripheral devices to those on the target.</p>
<p class="heading-2">Use of an Instruction Set Simulator</p>
<p class="body-text">Although executing a real chip&#8217;s code seems attractive, it has the drawback of requiring code to be added in order to gain visibility of some software functionality. This is called &#8220;instrumenting&#8221; the code. An alternative approach is to use an Instruction Set Simulator (ISS), which simulates code execution on an instruction-by-instruction basis. An ISS can run close to real-time speed and offers precise, highly visible code execution. In effect, real time can be stopped as the ISS tracks clock cycles consumed during simulation.</p>
<p class="body-text">Most ISS products allow some kind of functional peripheral modeling, which allows significant progress to be made with software development.</p>
<p class="heading-2">An ISS with Hardware Description Language models of peripherals (co-simulation)</p>
<p class="body-text">Hardware is designed using a Hardware Description Language (HDL) such as VHDL or Verilog. Designers routinely use simulators to verify their HDL designs, and many of today&#8217;s development tools merge an ISS with an HDL simulator. This enables code to be executed in an accurate CPU environment that interacts with what appears to be real hardware. The software developer can use the HDL models of the final target system to develop software components such as drivers and boot code that interact closely with the hardware.</p>
<p class="body-text">The downside of co-simulation is that greater precision comes at the cost of reduced execution speed.</p>
<p class="heading-2">An HDL model of the complete system, including CPU</p>
<p class="body-text">It would seem logical that the most accurate virtual prototype would be an HDL model of the complete system, including the CPU and peripherals. Three reasons explain why this is not really the case:</p>
<ol>
<li class="numbered-bullets">The code execution speed on such a model would be&nbsp;glacial. It would not be fast enough to get anything useful done.</li>
<li class="numbered-bullets">An HDL for the CPU is unlikely to be available.</li>
<li class="numbered-bullets">Since an ISS is likely to be designed carefully, its use does not have any downside, but does increase performance to&nbsp;a useful level.</li>
</ol>
<p class="heading-2">An ISS with SystemC models of peripherals</p>
<p class="body-text">To allow proper simulation speed that can accommodate software execution, a system can be modeled with higher abstraction languages such as SystemC (C/C++ class library). Modeling at higher abstraction levels uses loose or approximated timing. Such timing is appropriate for software execution and performance analysis. </p>
<p class="heading-1">Hardware emulation</p>
<p class="body-text">The virtual prototyping technologies discussed thus far can be plotted on a graph of code execution speed against precision and essentially yield a straight line (see Figure 1). Developers can choose from a range of possibilities: fast, abstract simulation at one extreme and slow, exact simulation at the other. However, another technology bucks this trend and strays away from the straight line.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=653,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5690%2Ffigures%2F1" title="Virtual prototype environments, with the exception of emulation, form a straight line in a graph of code execution speed versus precision."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5690%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Virtual prototype environments, with the exception of emulation, form a straight line in a graph of code execution speed versus precision.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Although the speed limitations of HDL simulation can be reduced by simply using a powerful desktop computer, this has limits and designers always want more. The response from the Electronic Design Automation (EDA) community was to develop emulation. An emulator is specialized hardware that, in effect, offers a dedicated environment to run an HDL simulation. This is typically achieved using FPGAs.</p>
<p class="body-text">An integrated platform built with an ISS, SystemC models, and an emulator that simulates some of the peripheral hardware breaks the mold and provides a precise, high-performance execution environment. Running a virtual target and emulation offers much deeper visibility into hardware and software execution threads and enables more efficient debug as well as system performance analysis. </p>
<p class="heading-1">Beyond debug</p>
<p class="body-text">Embedded software developers traditionally have focused on getting their code to function correctly. At the highest level of abstraction, this results in the device responding to stimuli in a predicable fashion in line with design specifications. This has not changed, but the developer&#8217;s brief is becoming wider. The most significant addition to the software developer&#8217;s workload is the consideration of power.</p>
<p class="body-text">Low-power design is topical for several reasons. While this historically has been a hardware issue, today&#8217;s complex designs offer numerous opportunities for power consumption to be tuned according to the system&#8217;s current state, software, and real-time context. That state is determined by the software; hence, power management is becoming a software issue.</p>
<p class="body-text">It is a tall order to develop and debug power management code ahead of hardware availability using a virtual prototype, but that is exactly what is required. Of course, it is all possible in principle;&nbsp;hardware simulation can yield power consumption figures, and the actual power consumed by a CPU can be measured. It is simply a question of communicating this information to the software developer in a meaningful way.</p>
<p class="heading-1">The way forward</p>
<p class="body-text">Any thought of software and hardware development being separate activities must be dismissed. The good news is that System-on-Chip (SoC) producers now recognize the need for embedded software development ahead of silicon. The bad news is that although traditional EDA hardware tools can run embedded software through emulation and simulation, they do not focus on the critical concerns of embedded systems design, including operating system context, multicore and thread handling, and caching considerations.</p>
<p class="body-text">An integrated approach is needed to provide tools that are engineered to work in a well-coordinated fashion and present information in a way that is familiar to both hardware and software teams. Software developers must be able to interact with hardware earlier using the same native tools they leverage to develop applications that will run on FPGA prototypes and final silicon with integrated technologies. One such unified approach is available in the Mentor Embedded Platform, which incorporates familiar technologies from Mentor Graphics such as virtual prototyping using Vista hardware debug and analysis and the Sourcery CodeBench Integrated Development Environment (IDE) for software development. By using this integrated embedded platform for early software development, developers can conduct performance analysis with virtual and emulated hardware, as well as investigate cache, process, thread, and core activities before silicon is available. </p>
<p class="body-text">This early investigation between disciplines improves design hardware and accelerates software debug and bring-up for SoCs and embedded systems. Software developers and hardware engineers can all agree this is a move in the right direction. </p>
<p class="author-bio">Colin Walls is a member of the&nbsp;marketing&nbsp;department at Mentor&nbsp;Graphics&nbsp;Embedded Software&nbsp;Division.</p>
<p class="contact-info">Mentor Graphics Embedded Software&nbsp;Division<span class="interview-name"> </span><span class="hyperlink"><a href="mailto:colin_walls@mentor.com">colin_walls@mentor.com</a></span> <span class="hyperlink"><a href="http://www.mentor.com">www.mentor.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/mentor_graphics">Twitter</a> <a href="http://www.mentor.com/embedded-software/blog/">Blog</a> <a href="http://www.linkedin.com/company/mentor_graphics">LinkedIn</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FPGA and ASIC debug made easy with on-chip instrumentation and logic analysis</title>
		<link>http://embedded-computing.com/articles/fpga-asic-easy-on-chip-instrumentation-logic-analysis/</link>
		<comments>http://embedded-computing.com/articles/fpga-asic-easy-on-chip-instrumentation-logic-analysis/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 15:00:00 +0000</pubDate>
		<dc:creator>Brad Quinton, Tektronix</dc:creator>
				<category><![CDATA[מהנדס fpga]]></category>
		<category><![CDATA[application specific integrated circuit asic]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic and fpga]]></category>
		<category><![CDATA[asic application specific integrated circuit]]></category>
		<category><![CDATA[asic assp]]></category>
		<category><![CDATA[asic chip design]]></category>
		<category><![CDATA[asic design methodology]]></category>
		<category><![CDATA[asic design service]]></category>
		<category><![CDATA[asic design verification]]></category>
		<category><![CDATA[asic flow]]></category>
		<category><![CDATA[asic fpga]]></category>
		<category><![CDATA[asic fpga design]]></category>
		<category><![CDATA[asic integrated circuit]]></category>
		<category><![CDATA[asic synthesis]]></category>
		<category><![CDATA[asic verification]]></category>
		<category><![CDATA[design flow of asic]]></category>
		<category><![CDATA[design flow of fpga]]></category>
		<category><![CDATA[ethercat asic]]></category>
		<category><![CDATA[fpga and asic]]></category>
		<category><![CDATA[FPGA and ASIC debug]]></category>
		<category><![CDATA[fpga asic]]></category>
		<category><![CDATA[fpga flow]]></category>
		<category><![CDATA[fpga verification]]></category>
		<category><![CDATA[gate array asic]]></category>
		<category><![CDATA[mixed signal asic]]></category>
		<category><![CDATA[mixed signal asic design]]></category>
		<category><![CDATA[soc asic]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[standard cell asic]]></category>
		<category><![CDATA[tektronix]]></category>
		<category><![CDATA[vlsi design flow]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=7d4948153cb6763ae734bb03b02e55e8</guid>
		<description><![CDATA[Including an on-chip capture infrastructure in FPGA and ASIC designs offers a "closer look" at debugging.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ffigures%2F3" />Modern ASICs and FPGAs are tedious and time-consuming to verify and validate. Adding small, highly efficient on-chip capture infrastructure to the design makes this job much easier by providing 10x the visibility of instrumentation points for a given area. In addition, by using compression algorithms, logic analysis capture stations can capture data for 10x or more capture depth.</h3>
<p><span id="more-4589"></span><span class='body'>
<p class="body-text">ASICs and FPGAs have become massively complex, particularly for System-on-Chip (SoC) designs involving multiple cores. With this complexity comes longer and more tedious debug and validation cycles. Unfortunately, when something fails or goes wrong, gaining access to test points in highly integrated designs is next to impossible. Unless you want to spend weeks shooting in the dark at random errors while running through multiple prototypes, on-chip instrumentation is no longer optional; it&#8217;s a critical must-have. Figure 1 shows an overview of the debug process using on-chip instrumentation.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ffigures%2F1" title="The instrumentation and debug cycle is critical to detect errors in FPGA prototypes."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The instrumentation and debug cycle is critical to detect errors in FPGA prototypes.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">While there are a number of ways to add instrumentation to FPGAs, a distributed approach using an instrument network is emerging as the preferred method, as it maximizes the number of potential observation points while minimizing silicon area or look-up table utilization requirements. Also critical to efficient debug is deep trace capture to see how the various parts of a system interact over time. Finally, designers must be able to observe the interactions of multiple devices and clock domains, both on- and off-chip, all fully time correlated for a true system-level perspective.</p>
<p class="body-text">Taken together, innovations including flexible and complete access to observation points, deep trace captures, and system-level views have the potential to change the game for FPGA and ASIC debug from long and arduous to fast and efficient.</p>
<p class="heading-1">Debug challenges</p>
<p class="body-text">Before reviewing different approaches to implementing embedded instrumentation, it&#8217;s helpful to understand why instrumentation is necessary in the first place. The biggest reason is simply the ever-growing functionality in each system.</p>
<p class="body-text">Whereas in the past there were plenty of probe points (external I/O on the devices) to choose from, it&#8217;s no longer possible to observe what&#8217;s going on since in most cases the key interfaces are now inside devices. Current-generation FPGAs have 100x the number of functions running in parallel compared to five years ago, yet the number of external outputs has stayed the same. From the perspective of a developer attempting to debug unexpected behavior, modern chips are nothing more than a big black box. </p>
<p class="body-text">As if that weren&#8217;t enough, while the power of simulators continues to improve in a linear fashion, every increase in parallel functionality adds an exponential increase in potential combinations. Since simulations run on one combination at a time, it&#8217;s not possible to cover all the functionality in pre-silicon simulation runs.</p>
<p class="body-text">This inability to adequately simulate all the possible permutations in pre-silicon has led to FPGA-based prototyping before design completion. Particularly at the prototype level, access to observation points is extremely helpful in debugging functional issues quickly and efficiently.</p>
<p class="body-text">Another debug challenge is the emergence of embedded software on silicon. More and more FPGA and ASIC designs include one or more processor cores. Such systems can include a complex mix of software, firmware, embedded processors, GPUs, memory controllers, and other high-speed peripherals. This increased functional integration combined with faster internal clock speeds and complex, high-speed I/O is making it harder than ever for developers to deliver a functional and fully validated system.</p>
<p class="heading-1">On-chip signal capture</p>
<p class="body-text">Back when systems involved multiple chips and components it was easy to move logic analyzer probes around to look at different signal combinations. Even with the move to on-chip instruments, the need to flexibly move virtual logic analyzer probes to different signal points remains a constant. Since the designer can&#8217;t anticipate every variable or potential application for a given chip, the more signal capture points available, the better.</p>
<p class="body-text">A traditional ASIC approach uses a mux network with shared select signals (one per mux level) and provides n/m different signal combinations, where n is the number of probe points and m is the number of signals viewed concurrently (debug bus width). This is the most restrictive but simplest option, as it leverages simple multiplexers. To be effective, this approach requires significant up-front time to create groups of signals that correspond to every possible debug scenario, and once the capture points are in play, designers can only look at signals that are in the same group. This process is demanding, time-consuming, and highly unlikely to capture all debug scenarios.</p>
<p class="body-text">The other extreme is to create a full crossbar mux that gives complete signal flexibility, which requires m muxes of n:1 in size. This can get expensive relative to area very fast, making this approach impractical for all but the smallest cases.</p>
<p class="body-text">The middle ground is to either increase the number of select signals inside the mux structure or create a number of duplicate groups with different signal ordering. The shared select mux and the mux with additional select signals are both implemented in many homegrown approaches. While shared select mux schemes can handle common and expected debug scenarios, they still fall short of the ideal complete coverage. Thus, they are ill-suited for unexpected problems and can often lead to inefficient implementations, as signals are repeatedly connected to multiple multiplexers.</p>
<p class="body-text">It is possible to find a more elegant and efficient solution by leveraging multistage, unordered networks, often called <span class="italics">concentrator networks</span>. This new approach effectively creates an observation network and is becoming commercially available. Using a unique network architecture and complementary routing algorithms, an observation network provides the signal flexibility of a full crossbar mux while in most cases requiring no more die area than shared simple muxes. Table 1 shows a comparison of signal visibility calculated using the different approaches.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ftables%2F1" title="An observation network provides the same level of signal visibility as muxes while requiring similar or less die area."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ftables%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Table 1:</b> An observation network provides the same level of signal visibility as muxes while requiring similar or less die area.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">With an observation network, designers use automated tools to implement on-chip signal capture probes in the Register Transfer Language (RTL). At the design stage, there is no need to worry about different signal combinations or ordering since every combination will be available. The result is an observation network that grows linearly with the number of signals. This approach moves the complexity of determining routing off the silicon and into software. While producing a significant area/performance improvement, an observation network requires sophisticated algorithms to determine routing, making it difficult to use without commercial software to control signal selection.</p>
<p class="body-text">How significant an advantage does the network approach offer over a simple mux in terms of observation point visibility? Take this example, where 256 signals are probed (n) with 32 signals visible concurrently (m):</p>
<ul>
<li class="bullets"><span class="bold">Simple mux:</span> Number of signal&nbsp;combinations (visibility) = 256/32 = 32</li>
<li class="bullets"><span class="bold">Observation network:</span> Number of&nbsp;signal combinations (visibility) = 2^256 = 1.2 x 10^77</li>
</ul>
<p class="body-text">The difference is 76 orders of magnitude. While the first approach is highly restrictive, the observation network approach provides any possible combination of signals. For roughly the same cost, the observation network provides a huge advantage with its increased flexibility.</p>
<p class="heading-1">Maximizing capture depth </p>
<p class="body-text">For debug challenges that span hardware and software, the ability to capture long traces is critical to track down problems that show up over thousands or millions of clock cycles. Post-silicon and on FPGAs, deep capture is vital to see how the overall system works, as many of the bugs that escape verification take a long time to emerge. Furthermore, most software-driven functionality spans hundreds of thousands to millions of clock cycles.</p>
<p class="body-text">Traditional instrumentation approaches capture the information as it is received from the observation probe using one entry in the internal RAM for each clock cycle of data captured. With this approach it is difficult or impossible to capture more than a few thousand clock cycles at a time without putting an unacceptable strain on internal memory resources. For that reason, compression techniques are now starting to be used to boost capture depth.</p>
<p class="body-text">However, most well-known compression algorithms are poorly suited to trace compression, having been developed for visual media and communications applications. Specialized trace compression layers that use multiple compression techniques together, each specifically tailored to common trace data patterns, are now commercially available. For most real-life applications this provides 10-1,000x more depth with no loss in resolution.</p>
<p class="heading-1">Efficient system-wide debug</p>
<p class="body-text">The last piece of the puzzle to more efficient FPGA and ASIC debug is a time-correlated, system-wide view that spans multiple clock domains running in parallel. When problems require correlation across multiple instrumented areas, the designer is looking at a time-consuming process of obtaining individual traces and then correlating events manually. For instance, an average ASIC prototype on an FPGA-based prototyping platform consists of two to three clock domains per FPGA across four to eight FPGAs. This means the designer will need to debug anywhere from eight to 24 clock domains individually. Tracing each of these 24 domains one at a time and manually piecing together the results is time-consuming and error-prone.</p>
<p class="body-text">A much more efficient approach is to use logic analyzer software to produce a time-correlated view from independent instruments operating in multiple clock domains and across multiple devices, as shown in Figure 2. Specialized debug software can collect data from each instrumented area of the chip, reverse the compression algorithms, and then align the captured data to produce a system-wide, time-correlated view. This leads to a single trace capture and debug scenario, both saving time and providing simultaneous hardware debug of many functional units and clock domains. This process often reveals emergent system behaviors that were never considered when the device was architected.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ffigures%2F2" title="Time-correlated views speed system-level debug."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5689%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Time-correlated views speed system-level debug.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Innovations handle the unexpected</p>
<p class="body-text">With increasing complexity and limited access to probe points, ASIC and FPGA validation and debug has become tedious and time-consuming. As more and more functionality is integrated into each chip, physical access to probe points has become impossible. The challenge then is to incorporate enough on-chip observation points to not only handle expected debug scenarios, but unexpected ones as well.</p>
<p class="body-text">A key innovation that enables faster and more efficient validation and debug of even the most complex designs is an observation network. Compared to traditional shared select mux approaches for observing signals, the observation network delivers significantly more signal combinations with similar die area requirements.</p>
<p class="body-text">Other innovations supporting more efficient debug scenarios include the use of advanced compression algorithms to boost on-chip memory capture depth and the emergence of logic&nbsp;analyzer software that produces a time-correlated, system-wide view that spans multiple devices and off-chip instruments. </p>
<p class="author-bio">Brad Quinton is the chief architect&nbsp;for&nbsp;the&nbsp;Tektronix Embedded Instrumentation Group.</p>
<p class="author-bio">Tektronix <span class="hyperlink"><a href="mailto:brad.quinton@tektronix.com">brad.quinton@tektronix.com</a></span></p>
<p class="contact-info"><span class="hyperlink"><a href="http://www.tektronix.com">www.tektronix.com</a></span></p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/tektronix">Twitter</a> <a href="http://www.facebook.com/tektronix">Facebook</a> <a href="https://plus.google.com/108274506630531952633/posts">Google+</a> <a href="http://www.linkedin.com/company/tektronix">LinkedIn</a> <a href="http://www.youtube.com/user/tektronix">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unified system design: Software and hardware on the same page</title>
		<link>http://embedded-computing.com/articles/unified-system-design-software-hardware-the-page/</link>
		<comments>http://embedded-computing.com/articles/unified-system-design-software-hardware-the-page/#comments</comments>
		<pubDate>Fri, 08 Jun 2012 15:00:00 +0000</pubDate>
		<dc:creator>Colin Walls, Mentor Graphics Embedded Systems Division</dc:creator>
				<category><![CDATA[abstraction]]></category>
		<category><![CDATA[arm development board]]></category>
		<category><![CDATA[arm evaluation board]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic fpga]]></category>
		<category><![CDATA[asic verification]]></category>
		<category><![CDATA[atmel evaluation board]]></category>
		<category><![CDATA[avr development board]]></category>
		<category><![CDATA[blackfin evaluation board]]></category>
		<category><![CDATA[database application development]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[develop web applications]]></category>
		<category><![CDATA[eda]]></category>
		<category><![CDATA[electronic design automation]]></category>
		<category><![CDATA[electronic design services]]></category>
		<category><![CDATA[electronic system level design]]></category>
		<category><![CDATA[electronics design]]></category>
		<category><![CDATA[electronics design services]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded devices]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded software architecture]]></category>
		<category><![CDATA[embedded software development]]></category>
		<category><![CDATA[embedded software development company]]></category>
		<category><![CDATA[embedded software development process]]></category>
		<category><![CDATA[embedded software development services]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded software entwicklung]]></category>
		<category><![CDATA[embedded software solutions]]></category>
		<category><![CDATA[embedded software system]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system design projects]]></category>
		<category><![CDATA[embedded system designing]]></category>
		<category><![CDATA[embedded system designs]]></category>
		<category><![CDATA[embedded system hardware design]]></category>
		<category><![CDATA[embedded system software design]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems designer]]></category>
		<category><![CDATA[embedded systems developer]]></category>
		<category><![CDATA[embedded systems engineering]]></category>
		<category><![CDATA[fpga]]></category>
		<category><![CDATA[fpga asic]]></category>
		<category><![CDATA[fpga dsp]]></category>
		<category><![CDATA[FPGAs]]></category>
		<category><![CDATA[hardware design software]]></category>
		<category><![CDATA[hardware design verification]]></category>
		<category><![CDATA[hardware system design]]></category>
		<category><![CDATA[level of abstraction]]></category>
		<category><![CDATA[Mentor Graphics]]></category>
		<category><![CDATA[microchip development boards]]></category>
		<category><![CDATA[microchip evaluation board]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[Model]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[nucleus]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[real time]]></category>
		<category><![CDATA[real-time operating system]]></category>
		<category><![CDATA[rtos]]></category>
		<category><![CDATA[rtos embedded systems]]></category>
		<category><![CDATA[sensitive]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software and hardware development]]></category>
		<category><![CDATA[software consulting]]></category>
		<category><![CDATA[software debug]]></category>
		<category><![CDATA[software development consultant]]></category>
		<category><![CDATA[software development consulting]]></category>
		<category><![CDATA[software system development]]></category>
		<category><![CDATA[system development software]]></category>
		<category><![CDATA[system software design]]></category>
		<category><![CDATA[systemc]]></category>
		<category><![CDATA[Unified system design]]></category>
		<category><![CDATA[verilog]]></category>
		<category><![CDATA[vhdl]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtual prototype]]></category>
		<category><![CDATA[web application developers]]></category>
		<category><![CDATA[web based application development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=23849205986a030ce47e74d256b187db</guid>
		<description><![CDATA[Virtual prototypes and hardware emulators improve design hardware, accelerate software bring-up, and bridge the designer/engineer gap in embedded systems.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FDSP5690%2Ffigures%2F2" />Although capable of running embedded software through emulation and simulation, traditional electronic design automation tools do not focus on the critical concerns of embedded systems design. This deficiency, in addition to software developers&#8217; unfamiliarity with hardware tools, requires a new approach. Software developers can interact with hardware earlier by implementing the same native tools used to develop applications that run on FPGA prototypes and final silicon. This allows for early investigation, which improves hardware design and accelerates software debug and bring-up for embedded systems.</h3>
<p><span id="more-4684"></span><span class='body'>
<p class="body-text">Long gone are the days when embedded software development commenced when hardware was ready. The ever-increasing size and complexity of software necessitate an earlier starting date to have a chance of shipping on time. Companies must ensure proper software integration ahead of silicon tape-out given the investment and risk associated with software development. Ever-shortening time-to-market windows further exacerbate these challenges.</p>
<p class="body-text">The only solution is to look for ways to execute, and hence, test and debug software before the final target hardware is available. Development often must start in earnest even before the hardware design is finalized. One way to improve hardware design and verification and accelerate software bring-up is to deploy the application on hardware that is either virtual or emulated.</p>
<p class="heading-1">Virtual prototypes</p>
<p class="body-text">There is no single, precise definition of the term &#8220;virtual prototype.&#8221; For the purposes of this article, the term will be used to describe any environment in which embedded code may run, thus enabling useful development prior to the availability of actual target systems. Let&#8217;s take a closer look at each of these&nbsp;possibilities.</p>
<p class="heading-2">Native code running on a PC</p>
<p class="body-text">It&#8217;s an obvious first step to compile and run code on a PC. Tools are readily available, cheap, or even free, and a PC offers high levels of functionality. This environment is fine for testing algorithms and basic logic. The code will probably run faster on a PC compared to the real target, as a PC&#8217;s CPU is likely to be more powerful than an embedded processor. </p>
<p class="body-text">Apart from clock speed, code timing is not useful, as the instruction mix on an x86 processor is very different from most embedded devices. As soon as the code needs to interact with hardware or the Real-Time Operating System (RTOS), this execution environment stops being useful.</p>
<p class="heading-2">Native code run with peripheral/system models</p>
<p class="body-text">Most RTOS manufacturers provide a host execution environment that enables either a special version of the RTOS to be run or its functionality to be emulated under Windows. This, along with a means of providing functional models of peripherals, enables further progress to be made. Timing is still misleading, however.</p>
<p class="heading-2">Execution on an evaluation board</p>
<p class="body-text">Most semiconductor vendors provide low-cost evaluation boards to facilitate fast deployment of their CPUs. Commercial RTOS products such as Mentor Embedded&#8217;s Nucleus RTOS may be available preconfigured for such boards, thus enabling rapid production.</p>
<p class="body-text">This execution environment is attractive, as the CPU speed and instruction mix is likely to be very close to the final target, which makes the testing of time-sensitive code viable. The accuracy of such an environment depends upon the similarity of the peripheral devices to those on the target.</p>
<p class="heading-2">Use of an Instruction Set Simulator</p>
<p class="body-text">Although executing a real chip&#8217;s code seems attractive, it has the drawback of requiring code to be added in order to gain visibility of some software functionality. This is called &#8220;instrumenting&#8221; the code. An alternative approach is to use an Instruction Set Simulator (ISS), which simulates code execution on an instruction-by-instruction basis. An ISS can run close to real-time speed and offers precise, highly visible code execution. In effect, real time can be stopped as the ISS tracks clock cycles consumed during simulation.</p>
<p class="body-text">Most ISS products allow some kind of functional peripheral modeling, which allows significant progress to be made with software development.</p>
<p class="heading-2">An ISS with Hardware Description Language models of peripherals (co-simulation)</p>
<p class="body-text">Hardware is designed using a Hardware Description Language (HDL) such as VHDL or Verilog. Designers routinely use simulators to verify their HDL designs, and many of today&#8217;s development tools merge an ISS with an HDL simulator. This enables code to be executed in an accurate CPU environment that interacts with what appears to be real hardware. The software developer can use the HDL models of the final target system to develop software components such as drivers and boot code that interact closely with the hardware.</p>
<p class="body-text">The downside of co-simulation is that greater precision comes at the cost of reduced execution speed.</p>
<p class="heading-2">An HDL model of the complete system, including CPU</p>
<p class="body-text">It would seem logical that the most accurate virtual prototype would be an HDL model of the complete system, including the CPU and peripherals. Three reasons explain why this is not really the case:</p>
<ol>
<li class="numbered-bullets">The code execution speed on such a model would be&nbsp;glacial. It would not be fast enough to get anything useful done.</li>
<li class="numbered-bullets">An HDL for the CPU is unlikely to be available.</li>
<li class="numbered-bullets">Since an ISS is likely to be designed carefully, its use does not have any downside, but does increase performance to&nbsp;a useful level.</li>
</ol>
<p class="heading-2">An ISS with SystemC models of peripherals</p>
<p class="body-text">To allow proper simulation speed that can accommodate software execution, a system can be modeled with higher abstraction languages such as SystemC (C/C++ class library). Modeling at higher abstraction levels uses loose or approximated timing. Such timing is appropriate for software execution and performance analysis. </p>
<p class="heading-1">Hardware emulation</p>
<p class="body-text">The virtual prototyping technologies discussed thus far can be plotted on a graph of code execution speed against precision and essentially yield a straight line (see Figure 1). Developers can choose from a range of possibilities: fast, abstract simulation at one extreme and slow, exact simulation at the other. However, another technology bucks this trend and strays away from the straight line.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, 'Figure1', 'width=875,height=653,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="Figure1" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FDSP5690%2Ffigures%2F1" title="Virtual prototype environments, with the exception of emulation, form a straight line in a graph of code execution speed versus precision."><br />
					<img width="470" border="0" alt="Figure1" src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FDSP5690%2Ffigures%2F1" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top: 11px; line-height: 1em;">
<figcaption><b>Figure 1:</b> Virtual prototype environments, with the exception of emulation, form a straight line in a graph of code execution speed versus precision.</figcaption>
<div style="color: #336600; padding-top: 4px; font-size: 9px;"><b>(click graphic to zoom by 1.9x)</b></div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Although the speed limitations of HDL simulation can be reduced by simply using a powerful desktop computer, this has limits and designers always want more. The response from the Electronic Design Automation (EDA) community was to develop emulation. An emulator is specialized hardware that, in effect, offers a dedicated environment to run an HDL simulation. This is typically achieved using FPGAs.</p>
<p class="body-text">An integrated platform built with an ISS, SystemC models, and an emulator that simulates some of the peripheral hardware breaks the mold and provides a precise, high-performance execution environment. Running a virtual target and emulation offers much deeper visibility into hardware and software execution threads and enables more efficient debug as well as system performance analysis. </p>
<p class="heading-1">Beyond debug</p>
<p class="body-text">Embedded software developers traditionally have focused on getting their code to function correctly. At the highest level of abstraction, this results in the device responding to stimuli in a predicable fashion in line with design specifications. This has not changed, but the developer&#8217;s brief is becoming wider. The most significant addition to the software developer&#8217;s workload is the consideration of power.</p>
<p class="body-text">Low-power design is topical for several reasons. While this historically has been a hardware issue, today&#8217;s complex designs offer numerous opportunities for power consumption to be tuned according to the system&#8217;s current state, software, and real-time context. That state is determined by the software; hence, power management is becoming a software issue.</p>
<p class="body-text">It is a tall order to develop and debug power management code ahead of hardware availability using a virtual prototype, but that is exactly what is required. Of course, it is all possible in principle;&nbsp;hardware simulation can yield power consumption figures, and the actual power consumed by a CPU can be measured. It is simply a question of communicating this information to the software developer in a meaningful way.</p>
<p class="heading-1">The way forward</p>
<p class="body-text">Any thought of software and hardware development being separate activities must be dismissed. The good news is that System-on-Chip (SoC) producers now recognize the need for embedded software development ahead of silicon. The bad news is that although traditional EDA hardware tools can run embedded software through emulation and simulation, they do not focus on the critical concerns of embedded systems design, including operating system context, multicore and thread handling, and caching considerations.</p>
<p class="body-text">An integrated approach is needed to provide tools that are engineered to work in a well-coordinated fashion and present information in a way that is familiar to both hardware and software teams. Software developers must be able to interact with hardware earlier using the same native tools they leverage to develop applications that will run on FPGA prototypes and final silicon with integrated technologies. One such unified approach is available in the Mentor Embedded Platform, which incorporates familiar technologies from Mentor Graphics such as virtual prototyping using Vista hardware debug and analysis and the Sourcery CodeBench Integrated Development Environment (IDE) for software development. By using this integrated embedded platform for early software development, developers can conduct performance analysis with virtual and emulated hardware, as well as investigate cache, process, thread, and core activities before silicon is available. </p>
<p class="body-text">This early investigation between disciplines improves design hardware and accelerates software debug and bring-up for SoCs and embedded systems. Software developers and hardware engineers can all agree this is a move in the right direction. </p>
<p class="author-bio">Colin Walls is a member of the&nbsp;marketing&nbsp;department at Mentor&nbsp;Graphics&nbsp;Embedded Software&nbsp;Division.</p>
<p class="contact-info">Mentor Graphics Embedded Software&nbsp;Division<span class="interview-name"> </span><span class="hyperlink"><a href="mailto:colin_walls@mentor.com">colin_walls@mentor.com</a></span> <span class="hyperlink"><a href="http://www.mentor.com">www.mentor.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/mentor_graphics">Twitter</a> <a href="http://www.mentor.com/embedded-software/blog/">Blog</a> <a href="http://www.linkedin.com/company/mentor_graphics">LinkedIn</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flexible hardware in software: Enabling customization through concurrent real-time programming</title>
		<link>http://embedded-computing.com/articles/flexible-customization-concurrent-real-time-programming-2/</link>
		<comments>http://embedded-computing.com/articles/flexible-customization-concurrent-real-time-programming-2/#comments</comments>
		<pubDate>Fri, 18 May 2012 15:00:00 +0000</pubDate>
		<dc:creator>Henk Muller, XMOS</dc:creator>
				<category><![CDATA[analogue to digital audio converter]]></category>
		<category><![CDATA[arm development boards]]></category>
		<category><![CDATA[arm embedded board]]></category>
		<category><![CDATA[arm embedded boards]]></category>
		<category><![CDATA[arm evaluation board]]></category>
		<category><![CDATA[arm evaluation boards]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm11 development board]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[arm9 development board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic and fpga]]></category>
		<category><![CDATA[asic fpga design]]></category>
		<category><![CDATA[audio optical cable]]></category>
		<category><![CDATA[audio optical converter]]></category>
		<category><![CDATA[coaxial optical converter]]></category>
		<category><![CDATA[development board arm]]></category>
		<category><![CDATA[development boards arm]]></category>
		<category><![CDATA[digital optical audio cable]]></category>
		<category><![CDATA[digital optical cable]]></category>
		<category><![CDATA[digital optical cables]]></category>
		<category><![CDATA[digital optical converter]]></category>
		<category><![CDATA[digital optical splitter]]></category>
		<category><![CDATA[digital to analogue audio converter]]></category>
		<category><![CDATA[dsp in fpga]]></category>
		<category><![CDATA[dsp on fpga]]></category>
		<category><![CDATA[dsp processor design]]></category>
		<category><![CDATA[embedded development board]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[Flexible hardware in software]]></category>
		<category><![CDATA[fpga and asic]]></category>
		<category><![CDATA[fpga dsp]]></category>
		<category><![CDATA[mcu development board]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[optical audio adaptor]]></category>
		<category><![CDATA[optical audio cable]]></category>
		<category><![CDATA[optical audio cables]]></category>
		<category><![CDATA[optical audio converter]]></category>
		<category><![CDATA[optical cable adaptor]]></category>
		<category><![CDATA[optical cable spdif]]></category>
		<category><![CDATA[optical cable splitter]]></category>
		<category><![CDATA[optical cables audio]]></category>
		<category><![CDATA[optical digital audio cable]]></category>
		<category><![CDATA[optical digital audio converter]]></category>
		<category><![CDATA[optical digital cable]]></category>
		<category><![CDATA[optical splitter audio]]></category>
		<category><![CDATA[optical splitter cable]]></category>
		<category><![CDATA[optical toslink cables]]></category>
		<category><![CDATA[s pdif converter]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software optimization]]></category>
		<category><![CDATA[spdif optical audio cable]]></category>
		<category><![CDATA[spdif optical cable]]></category>
		<category><![CDATA[toslink audio converter]]></category>
		<category><![CDATA[toslink converter]]></category>
		<category><![CDATA[toslink digital optical cable]]></category>
		<category><![CDATA[toslink optical cable]]></category>
		<category><![CDATA[toslink optical cables]]></category>
		<category><![CDATA[usb gpio board]]></category>
		<category><![CDATA[usb phy chip]]></category>
		<category><![CDATA[XMOS Ltd.]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=d6fb6da7398dfdbc1cc81b3b89c78d07</guid>
		<description><![CDATA[Software as a (complete) system: software-based design flows can provide economy and near limitless adaptability and optimization unattainable in silicon architectures.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5635%2Ffigures%2F3" />Customization and adaptability are important considerations when designing industrial and consumer electronics. Although ASICs and reference designs can be a good starting point for a system, lack of flexibility makes it hard to use ASICs for a complete solution. Using software for customization, even when it involves hardware interfaces, enables unrivalled design flexibility and thus greater product  differentiation.</h3>
<p><span id="more-16167"></span><span class='body'>
<p class="body-text">To understand why customization is important, consider the following three examples where a reference design can be used as a starting point, but the designer might want to make changes to the design, even at a late stage:</p>
<ol>
<li class="numbered-bullets">A design implements part of a communications stack (for example, USB audio), but the hardware interface on the audio side can be customized to communicate with a specific type of codec such as I2S&nbsp;master or slave S/PDIF, or it can&nbsp;be customized with an extra control endpoint.</li>
<li class="numbered-bullets">An industrial controller implements one of the many standard protocols; for example, a vendor of industrial motors might want to include&nbsp;an Ethernet PHY, but defers the decision whether to run EtherCAT or any other real-time Ethernet stack.</li>
<li class="numbered-bullets">An embedded Web server can be used to configure either of the previous examples, provided that the designer can implement the control logic inside the Web server. </li>
</ol>
<p class="body-text">The ease with which designs can be customized depends on the technology used to implement the core of the design. Did it use an ASIC, an FPGA, or a real-time processor?</p>
<p class="body-text">If the design is implemented as an ASIC, then the only feasible way to customize it is to modify parameters built into the ASIC. Considering the first example, a USB audio ASIC will have a method to set the product name of the USB device and might provide a choice between left- and right-aligned I2S. However, it might not offer the options to add an extra control endpoint or to use S/PDIF as an output interface. Indeed, it is not possible to develop an ASIC that supports all plausible interfaces, and it is not economical to develop a family of ASICs that supports well-chosen, small sets of interfaces.</p>
<p class="body-text">If the design is implemented in an FPGA then, in theory, customization can be as extreme as the user wants it to be. However, a hardware design flow might make customization a not-so-straightforward process. Implementing an additional interface such as S/PDIF is not difficult for hardware designers, but implementing an extra control endpoint requires software to be re-implemented as a piece of hardware. Furthermore, the result must be synthesized, and until the&nbsp;customized design is completely synthesized, placed, and routed it is not clear as to whether the original timing constraints are all still met.</p>
<p class="body-text">The third option is to implement the design entirely as software. This is often considered difficult to accomplish because of the many conflicting real-time requirements involved. However, a software implementation can be perfectly manageable, provided that the programmer can split the problem into a set of independent real-time tasks that run on a bucket of independent real-time processors.</p>
<p class="body-text">This gives the designer the flexibility to implement a hardware protocol simply as a software task by dedicating one of the real-time processors to implementing that hardware protocol. For example, one can implement I2S in software by wiggling the clock and data lines in an appropriate manner. Also, USB can be implemented by reading and writing data to the USB PHY. If these two activities are executed as two independent tasks, then all real-time deadlines can be met individually.</p>
<p class="body-text">The latter is a programming model known as concurrent real-time programming. Figure&nbsp;1 shows how a single XMOS XCore processor can execute eight threads simultaneously. Each thread can be seen as an individual processor with a guaranteed real-time execution rate. Each instruction will execute within a known amount of time; hence the programmer can predict whether programs will meet timing deadlines or not.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5635%2Ffigures%2F1" title="Concurrent real-time programming executes multiple threads simultaneously."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5635%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Concurrent real-time programming executes multiple threads simultaneously.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The beauty of this model is that timing prediction is entirely self-contained to the task. As an example, consider the I2S task mentioned before. Once the program has been written in a way that it will execute on, for example, a 50 MIPS processor, then regardless of modifications to other threads, this I2S thread will always meet its timing. The only way to break the timing is by not providing data at the appropriate rate. This is to be expected; if data is not provided at 48 kHz, then the codec cannot be given the data at 48 kHz, and something must break.</p>
<p class="body-text">Software is not a panacea. Two obvious limitations are interfaces that require too much instantaneous bandwidth and hardware interfaces that need very short turnaround times. For example, it would not be feasible to write a multi-GHz SERDES in software on today&#8217;s processing hardware, but many commonly found interfaces can be formulated in software.</p>
<p class="body-text">There are three reasons why a software implementation is preferable over a hardware interface:</p>
<p class="contact-info"><span class="bold">1. Economics:</span> It is not possible to provide all interfaces available as hardware blocks. A processor can model any type of interface as required.</p>
<p class="contact-info"><span class="bold">2. Adaptability:</span> An interface built in hardware is set in silicon. If a standard evolves,&nbsp;or if a particular device is not completely compliant or is required to perform some extra operations, then a silicon interface will not do the job. A&nbsp;software-defined interface can be adapted to meet the requirements.</p>
<p class="contact-info"><span class="bold">3. Optimization:</span> A software-defined interface can be optimized to address the problem at hand. Consider the EtherCAT application mentioned previously. If a&nbsp;hardware Media-Independent Interface (MII) is used, then the packet is stored and forwarded, which does not meet, for example, latency requirements. If the interface is defined in software, then the buffering requirements can be tailored to the problem.</p>
<p class="body-text">The third reason is important, as many standard blocks dealing with UARTs, I2S, MII, and other standards must have built-in FIFO buffers to decouple the interface, and those buffers in many cases are unwanted because they add delay.</p>
<p class="body-text">Once the designer chooses a software-based design flow, the possibilities are endless. Figure 2 shows a USB board that simultaneously supports an analog interface using a stereo I/O codec (over I2S), a differential digital interface (using S/PDIF), and a Musical Instrument Digital Interface (MIDI).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=674,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5635%2Ffigures%2F2" title="On a USB board, the same processor can drive any mixture of interfaces simply by changing the software."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5635%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> On a USB board, the same processor can drive any mixture of interfaces simply by changing the software.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The embedded processor implements the USB stack and the audio-over-USB protocol. In this particular configuration, three audio interfaces are driven: MIDI, I2S/analog, and S/PDIF. The latter can be changed to a different protocol such as ADAT by a mere software change. More importantly, variations of the product can be made with different sets of interfaces, such as a multitude of coaxial outputs or I2S-based codecs. The software on the embedded processor can be tailored to the specifics of the interfaces with only minor alterations. There are no predefined numbers of each interface. </p>
<p class="body-text">Flexible hardware can enable greater product differentiation, allowing developers and product managers to deliver distinguishable value to their customers. Concurrent real-time programming allows tight timing requirements to be guaranteed, with embedded processors such as the XMOS XCore providing the silicon and development tools required to take advantage of this programming method.  </p>
<p class="author-bio">Henk Muller is principal technologist at XMOS Ltd.</p>
<p class="contact-info">XMOS Ltd.  <span class="hyperlink"><a href="mailto:henk@xmos.com">henk@xmos.com</a></span>  <span class="hyperlink"><a href="http://www.xmos.com/">www.xmos.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/xmos">Twitter</a> <a href="http://www.facebook.com/pages/XMOS/99202198165">Facebook</a> <a href="https://plus.google.com/108103041377525785200/posts">Google+</a> <a href="http://www.linkedin.com/company/xmos-semiconductor-ltd">LinkedIn</a> <a href="http://www.youtube.com/user/MyXMOS?feature=watch">YouTube</a> <span class="bold"><a href="http://www.xcore.com">Community forum</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Peer review: The best technique embedded developers aren&#8217;t using</title>
		<link>http://embedded-computing.com/articles/peer-developers-arent-using/</link>
		<comments>http://embedded-computing.com/articles/peer-developers-arent-using/#comments</comments>
		<pubDate>Fri, 18 May 2012 15:00:00 +0000</pubDate>
		<dc:creator>John Lockhart, SmartBear Software</dc:creator>
				<category><![CDATA[a little help from my friends]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Peer review]]></category>
		<category><![CDATA[SmartBear Software]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software optimization]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=81c0a2020c4086fb7c885b03a5dc0881</guid>
		<description><![CDATA[A little help from my friends? Tool-assisted peer review reduces the painstaking, time-consuming aspects of manual peer review while providing improved productivity, cost savings, and streamlined workflows.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Ffigures%2F3" />Peer review can help embedded hardware designers and software engineers find and fix problems earlier in the development cycle, saving money and time. As opposed to a manual approach, tool-assisted peer review provides reportable data that enables development teams to benchmark and improve their processes.</h3>
<p><span id="more-370"></span><span class='body'>
<p class="body-text">It&#8217;s a common scenario in the software development world: A&nbsp;company pins a lot of hope on a new device, hoping to ride the wave of progress in the industry by getting it to market ahead of the competition. The hardware and software teams work long and hard to make it happen. Once the product reaches consumers, though, a problem quickly arises: it doesn&#8217;t integrate well with a market-leading peripheral. </p>
<p class="body-text">As engineers think back to where things might have broken down, they realize it couldn&#8217;t have been during the spec review phase because they routinely review requirements documents, specifications, and test cases. Therefore, the problem most likely occurred during the coding process (see Figure 1). And it probably happened because the software and hardware teams were out of sync and unaware of changes during the design and development phase because they didn&#8217;t have a simple way to stay connected.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=700,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Ffigures%2F1" title="Defects often arise during the coding process due to a disconnect between the software and hardware teams. (Source: The State of Software Quality in 2011 &amp;#8211; Caper&amp;#8217;s Jones 12/6/2011)"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Defects often arise during the coding process due to a disconnect between the software and hardware teams. (Source: The State of Software Quality in 2011 &#8211; Caper&#8217;s Jones 12/6/2011)</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Hardware designers and software engineers who have been working with embedded code for any length of time have probably encountered a situation like this. If not, it&#8217;s certainly an embedded developer&#8217;s worst fear: A problem with a product that has already reached the marketplace or is about to be released. It could be an integration issue, a connectivity problem, or a security glitch. Whatever the problem, the outcome is the same;&nbsp;time and money are lost while the code is fixed and the company&#8217;s reputation suffers.</p>
<p class="body-text">When so many embedded teams have experienced these problems, why are they still occurring? The reasons are simple: lack of peer and code review and lack of collaboration between software and hardware teams. </p>
<p class="body-text">Although reviewing artifacts early in the design phase is a common practice and known to be the best way to detect problems early, automating this process between hardware and software engineers has largely been impossible. Although few would disagree that code reviews are always a good idea, other pressures often take precedence. Of course, there are exceptions, mainly in regulated and safety-critical products. However, according to embedded code expert Jack Ganssle, about 98 percent of embedded developers aren&#8217;t doing peer review. That&#8217;s a stunning statistic given what&#8217;s at stake.</p>
<p class="body-text">While ignoring code review might have worked in a less complicated, less connected world, using that method today leaves companies open to security, interoperability, and connectivity issues. That can lead to expensive recalls requiring time-consuming fixes after products have reached the market.</p>
<p class="body-text">Peer review &#8211;&nbsp;a process by which team members inspect design documents, artifacts, and source code &#8211;&nbsp;helps both software and firmware developers, as well as hardware designers, find more bugs or related design errors earlier in the design and prototyping stages, improving product quality and minimizing costly rework later in the development process. It&#8217;s a process where software and firmware developers as well as the hardware design teams can share and review both technical documents and programming code in a timely manner, keeping the teams in sync when issues are found and changes are made.</p>
<p class="body-text">Put simply, studies show that peer reviews work. Research by Philip Koopman, an Associate Professor from Carnegie Mellon University, found that peer reviews are the most cost-effective way to find bugs, and 40 to 60 percent of defects are found by such reviews. Koopman also found that reviews cost only about 5 to 10 percent of the project cost.</p>
<p class="body-text">Peer review helps ensure:</p>
<ul>
<li class="bullets">Higher-quality products in the short term as defects are identified </li>
<li class="bullets">Higher-quality products in the long term as technical debt&nbsp;is better managed </li>
<li class="bullets">Compliance with applicable regulations</li>
<li class="bullets">Interoperability with all potential products, peripherals, and&nbsp;software it may be used with</li>
<li class="bullets">Crisper, better documented, and better organized code</li>
<li class="bullets">Transfer of knowledge across the entire development team</li>
</ul>
<p class="body-text">The peer review process also saves money, as evidenced by a study comparing bug defects before and after code review authored by SmartBear Software in conjunction with Cisco&nbsp;Systems. In both cases, the product had 463 bugs remaining after development. Without code review, getting the bug count down to 194 cost $368,000. The code review process not only fixed more bugs, getting the bug count down to 32,&nbsp;but it did so for $152,000.</p>
<figure>
<table width="240" border="0" align="right" cellpadding="2" cellspacing="0">
<tr>
<td align="center" style="padding-left:10px" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=997,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Fsidebars%2F1" title=""><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=230&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Fsidebars%2F1" alt="21" width="230" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Sidebar 1</b></figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Tool-assisted peer review makes&nbsp;sense</p>
<p class="body-text">On the surface, manual methods of peer review seem like a good way to introduce peer review without spending the money for an automated tool. But these manual methods, while certainly better than no peer review at all, are time-consuming. Furthermore, it can be difficult to collaborate with team members in different locations or time zones. What&#8217;s more, manual methods like <span class="italics">ad hoc</span> meetings, water cooler discussions, sending code snippets or PDFs via e-mail, and cutting and pasting code into Word documents tend to be disorganized, and critical points can be lost in the process.</p>
<p class="body-text">Another consideration is that manual peer review does not produce reportable data. One key to creating support for process improvement is quantifiable results. This is one reason teams wonder if the hours spent in meetings are really worth&nbsp;it.</p>
<p class="body-text">Automated peer review (also called tool-assisted peer review) solves these problems. With tool-assisted peer review, hardware designers and software engineers can participate in reviews at any time, not on a set schedule. That saves time and increases engineer productivity. Developers also can share and collaborate with team members in different locations. And because all materials are in one place, gathering the right files and design documents is never a problem. In addition, having the review materials and results managed in a reportable database, as well as providing accountability within the review process, helps adhere to multiple regulatory compliance mandates.</p>
<p class="body-text">Tool-assisted peer review is more efficient and effective than manual peer review. It enables software developers and hardware engineers to catch defects, whether stand-alone or based on changes one team must make that affects the other, earlier in the development process at a time when they are easier and faster to fix. The general rule of thumb is that defects detected later in the process take longer and are more complicated and expensive to fix.</p>
<p class="body-text">Tool-assisted peer review also provides developers with a host of standard and customizable reports on metrics like defect density, inspection rate, defect detection rate, recent and open defects, lines of code added/modified/deleted, and reviews by change list. These reports and metrics can make a significant difference in the software and hardware development process. With the right metrics, the respective teams can benchmark and improve their processes. For example, it could flag reviews considered trivial or stalled, saving the team valuable time.</p>
<p class="body-text">Some tools, like SmartBear&#8217;s PeerReview Complete, also allow development teams to use a variety of review formats such as Word and PDF documents, 2D drawings, schematics, VHDL code and images; develop custom workflows; create custom reports and metrics; integrate with Eclipse and Visual Studio; create customizable fields for tracking and reporting key Capability Maturity Model Integration (CMMI) audit metrics; and implement administrative and security controls. It also integrates with a development team&#8217;s existing issue tracking, development environments, and version control tools. A schematic review is shown in Figure 2.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=680,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Ffigures%2F2" title="Using SmartBear PeerReview Complete, an author and reviewers discuss the final aspects of a mechanical drawing before it is used in production."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5634%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Using SmartBear PeerReview Complete, an author and reviewers discuss the final aspects of a mechanical drawing before it is used in production.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Tool-assisted peer review for all development artifacts</p>
<p class="body-text">With these types of capabilities, tool-assisted peer review tools can serve as a comprehensive solution that works with code and all artifacts created during the development process. Requirements documents, hardware and software design documents, schematics, 2D drawings, and test specifications can all be reviewed using the same time-saving tool.</p>
<p class="body-text">The entire review process comes together in one place, simplifying the existing document review process and extending the review process into code review. The long-established benefits of peer review for design documents can be expanded to the coding process. Code review becomes a normal part of the development cycle, and early detection of defects in code becomes as natural as early detection of defects in design specifications.</p>
<p class="body-text">A move toward peer review is a positive one for any embedded development team. It eliminates guesswork, improves productivity, saves money, and streamlines workflows. While it generally takes time to implement even a manual review process, tool-assisted peer review provides an immediately impactful peer review process without the headaches of traditional manual approaches. </p>
<p class="author-bio">John Lockhart is the product manager of PeerReview products for SmartBear Software.</p>
<p class="contact-info">SmartBear Software <span class="hyperlink"><a href="mailto:john.lockhart@smartbear.com">john.lockhart@smartbear.com</a></span> | <span class="hyperlink"><a href="http://www.smartbear.com">www.smartbear.com</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/SmartBear">Twitter</a> <a href="http://blog.smartbear.com/">Blog</a> <a href="http://www.facebook.com/smartbear">Facebook</a> <a href="https://plus.google.com/112549653237106886127">Google+</a> <a href="http://www.linkedin.com/company/smartbear-software">LinkedIn</a> <a href="http://www.youtube.com/user/SmartBearSoftware">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model-based approaches close the gap between development and testing</title>
		<link>http://embedded-computing.com/articles/model-based-approaches-close-gap-development-testing/</link>
		<comments>http://embedded-computing.com/articles/model-based-approaches-close-gap-development-testing/#comments</comments>
		<pubDate>Fri, 18 May 2012 15:00:00 +0000</pubDate>
		<dc:creator>Dominic Tavassoli, IBM Rational</dc:creator>
				<category><![CDATA[agile automation testing]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[automate software testing]]></category>
		<category><![CDATA[automated functional test]]></category>
		<category><![CDATA[automated functional testing]]></category>
		<category><![CDATA[automated functional testing tools]]></category>
		<category><![CDATA[automated gui test]]></category>
		<category><![CDATA[automated regression testing]]></category>
		<category><![CDATA[automated regression testing software]]></category>
		<category><![CDATA[automated software testing]]></category>
		<category><![CDATA[automated testing software]]></category>
		<category><![CDATA[automated testing software tools]]></category>
		<category><![CDATA[automated testing tools]]></category>
		<category><![CDATA[automation software testing]]></category>
		<category><![CDATA[automation test tool]]></category>
		<category><![CDATA[automation test tools]]></category>
		<category><![CDATA[automation testing software]]></category>
		<category><![CDATA[automation testing tool]]></category>
		<category><![CDATA[automation testing tools]]></category>
		<category><![CDATA[automation tools in testing]]></category>
		<category><![CDATA[design optimization software]]></category>
		<category><![CDATA[embedded software design]]></category>
		<category><![CDATA[embedded software development]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[functional automation testing tools]]></category>
		<category><![CDATA[functional testing methodology]]></category>
		<category><![CDATA[functional testing tools]]></category>
		<category><![CDATA[gui automation test]]></category>
		<category><![CDATA[gui test automation tools]]></category>
		<category><![CDATA[gui testing tools]]></category>
		<category><![CDATA[IBM Rational]]></category>
		<category><![CDATA[load testing software]]></category>
		<category><![CDATA[qa automation tool]]></category>
		<category><![CDATA[qa automation tools]]></category>
		<category><![CDATA[qa load testing]]></category>
		<category><![CDATA[qa performance testing]]></category>
		<category><![CDATA[qa regression testing]]></category>
		<category><![CDATA[qa test plan]]></category>
		<category><![CDATA[qa test tool]]></category>
		<category><![CDATA[qa testing methodologies]]></category>
		<category><![CDATA[qa testing software]]></category>
		<category><![CDATA[qa testing tools]]></category>
		<category><![CDATA[real time embedded systems]]></category>
		<category><![CDATA[regression test automation]]></category>
		<category><![CDATA[regression testing tools]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software automation testing]]></category>
		<category><![CDATA[software development test]]></category>
		<category><![CDATA[software functional testing]]></category>
		<category><![CDATA[Software optimization]]></category>
		<category><![CDATA[software qa automation]]></category>
		<category><![CDATA[software qa testing]]></category>
		<category><![CDATA[software regression testing tools]]></category>
		<category><![CDATA[software test automation tool]]></category>
		<category><![CDATA[software testing automation]]></category>
		<category><![CDATA[software testing lifecycle]]></category>
		<category><![CDATA[software testing tools]]></category>
		<category><![CDATA[test automation tools]]></category>
		<category><![CDATA[testing automation process]]></category>
		<category><![CDATA[testing automation software]]></category>
		<category><![CDATA[testing automation tools]]></category>
		<category><![CDATA[testing software tools]]></category>
		<category><![CDATA[testing tools software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=5527c5828dae6578c1cc9a60ef445dab</guid>
		<description><![CDATA[To bring testing on par with design, development teams are turning to model-based testing approaches for increased QA and reduced cost.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5633%2Ffigures%2F3" />While model-based development has helped developers identify defects earlier and cope with increasing design complexity, testing is now the elephant in the room. How can automation, integration, and collaboration around testing deliver the required efficiencies? New approaches are moving the embedded testing challenge from code to models, allowing businesses to gain a competitive edge as a result.</h3>
<p><span id="more-190"></span><span class='body'>
<p class="body-text">An age of smarter products is ushering in embedded product designs with increased functionality, rising complexity, and compressed delivery windows. These products often need to comply with strict development regulations for use in safety- or mission-critical applications such as aircraft, automobiles, or medical devices. </p>
<p class="body-text">Model-based development has boosted developer productivity with graphical notations such as Unified Modeling Language (UML) and Systems Modeling Language (SysML) to help manage complexity and uncover design anomalies earlier in the development life cycle. In many cases this has left testing struggling to catch up. It is frequently the biggest time and budget item in projects, and therefore the first to be cut. Despite this, testing costs are increasing; much testing has remained rooted in manual, code-based approaches that do not easily scale to today&#8217;s demands.</p>
<p class="heading-1">The proven power of model-driven development</p>
<p class="body-text">Using models, software engineers can more clearly understand and analyze requirements, make architectural trade-offs, define design specifications, validate and verify behavior with simulation, and generate code for direct deployment on target hardware. A key benefit of a model is that consistency and correctness are maintained across the design as it changes. With UML, each diagram can capture different views of the model at different levels of abstraction while remaining consistent across these views. The semantics of the modeling language enforce team consistency and help automate life-cycle tasks, including code generation.</p>
<p class="body-text">Repeatable processes are the key to improving collaboration and productivity while reducing the cost of demonstrating regulatory compliance. A 2011 embedded development study by Jerry Krasner of Embedded Market Forecasters found that model-driven development reduced development time typically lost to delays by more than 40 percent, delivering typical project savings of $250,000.</p>
<p class="heading-1">Enhancing quality at every step of the&nbsp;life cycle</p>
<p class="body-text">The next natural step to maximize productivity and agility is to improve the testing process. The &#8220;usual suspects&#8221; addressing this are the late detection (and resolution) of defects, as well as the communication and consistency issues between teams as changes occur and defects are detected.</p>
<p class="body-text">Early identification of defects is critical to reduce development costs and meet time-to-market objectives. Many defects are introduced in the design during the early stages of development, but repair costs increase exponentially as defect resolution is delayed. Not only can late defect resolution harm project financial performance, a high intensity of late rework can also derail delivery schedules and delivered quality. Defect resolution must be closely linked to defect discovery, as it is typically much easier to fix a defect that has just been discovered than to attempt a repair after further changes have obscured the original cause.</p>
<p class="body-text">Successful development projects must deliver products that address customer needs to the required level of quality. Linking unit, integration, validation, and verification tests to requirements is fundamental, and automating traceability is key to efficiently execute projects as changes occur and defects are detected.</p>
<p class="heading-1">Model-based testing and the UML&nbsp;Testing Profile </p>
<p class="body-text">Model-based testing uses modeling to construct and execute the necessary artifacts to perform software testing. The UML Testing Profile[1] extends the applicability of UML to include model-based testing. Using this profile, test architectures can be automatically created for a system from the definition of its interfaces. Test cases consistent with the latest requirements can be defined graphically using sequence diagrams, state charts, or activity diagrams, providing a common modeling language to define test inputs and expected results (see Figure 1). This approach tightens the linkage between requirements, design elements, and tests, thus facilitating better traceability that can benefit both agility and impact analysis. Test cases can be executed on the developer&#8217;s desktop and on the target, improving testing productivity.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5633%2Ffigures%2F1" title="Model-based testing specifies test cases using diagrams."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5633%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Model-based testing specifies test cases using diagrams.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Strengthening the bond between&nbsp;development and quality management</p>
<p class="body-text">This move to model-based developer testing doesn&#8217;t directly benefit the Quality Assurance (QA) team, as QA engineers typically don&#8217;t want, nor should they be forced to become UML specialists. What is needed is a way to allow QA engineers to make use of model-based testing resources without the need to author and own them. This can be achieved through model-driven testing tools that link the tests to the QA test management environment. The tools allow tests to be executed in place from the test management tool and the results to be passed automatically to the test management repository. Tests are then managed in a single location, avoiding the inconsistencies and inefficiencies of duplication, and are available for execution at any point in the development process.</p>
<p class="body-text">Bringing test result data back into the test management environment can automate the defect resolution process, further optimizing the development and testing process. The QA test management environment should also support linkage to requirements management tooling to ensure that tests can be linked back to specific requirements. This will facilitate test coverage automation, enabling test sets to be automatically defined against requirements or&nbsp;changes.</p>
<p class="heading-1">Taking a project to the next level</p>
<p class="body-text">By implementing a model-based testing tool connected to test management, embedded development teams can take the following tangible steps to make their projects more successful while freeing up valuable time for innovation:</p>
<ul>
<li class="bullets"><span class="bold">Consistency:</span> A central test repository across the development organization will improve efficiency and lead to higher quality. Rather than individual test engineers creating multiple versions of tests through error-prone, manual replication processes, tests are written once and reused as required throughout the development process. A single source of truth for tests can also aid collaboration and ultimately improve delivered quality, as tests are more available throughout the development life&nbsp;cycle, encouraging more frequent&nbsp;testing.</li>
<li class="bullets"><span class="bold">Communication:</span> Model-based test execution within the quality management environment means that QA engineers can run tests and act upon results without having&nbsp;to be modeling specialists. They can navigate from a failed test to the related requirements and to the source of the problem in the design mode or associated code. This can be particularly useful in distributed and offshore development environments where it&nbsp;can help engender collaboration and build empathy between otherwise isolated&nbsp;developers, testers, and quality professionals.</li>
<li class="bullets"><span class="bold">Automation:</span> Improved automation of test creation, execution, and results management will significantly reduce the cost and time of testing. This allows more testing to take place, reducing the risk of regression issues in complex projects. In the same vein, automated defect tracking/resolution connects model-based testing to quality management with a backbone of traceability from requirements through to code. This&nbsp;ensures developers have timely and quantitative information to fix defects, and that the effects of defects on delivered functionality are understood. As teams strive to become more agile, it is imperative to prioritize defect resolution over new functionality to avoid accumulating technical debt.</li>
<li class="bullets"><span class="bold">Agility:</span> Model-based testing conducted using the same modeling&nbsp;notation and tools as design activities facilitates test-driven development. Traceability from requirements to testing will be the key to quantifying results, helping answer the critical question in any project: &#8220;Are we ready to ship?&#8221;</li>
</ul>
<p class="heading-1">A call to action</p>
<p class="body-text">Model-based testing can be considered a first step to bring testing efficiency on par with model-driven development. While its immediate effects are in automating the developer testing environment (with correct linkage to the QA environment), it can enable much wider benefits (see Figure 2). By providing tool support for test execution, test version management, and results management within the QA environment, coupled with life-cycle traceability, a greater degree of test automation can be implemented, eliminating a key bottleneck in the development life cycle.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5633%2Ffigures%2F2" title="Linking model-based testing to QA and the software design life cycle enables a high degree of test automation."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5633%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Linking model-based testing to QA and the software design life cycle enables a high degree of test automation.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">To realize these benefits, embedded development teams should:</p>
<ul>
<li class="bullets">Extend their modeling capabilities from design to testing with tools that support the UML Testing Profile, such as IBM Rational Rhapsody.</li>
<li class="bullets">Ensure their modeling and test management environments are closely linked through tools, such as the IBM Rational solution for real-time and embedded software development.</li>
<li class="bullets">Adopt, enforce, and continually improve repeatable processes supported through development and&nbsp;testing tools.</li>
</ul>
<p class="body-text">In this way, teams can achieve improved collaboration, productivity, and agility, helping them deliver higher-quality products more rapidly at reduced cost.</p>
<p class="reference-heading">References</p>
<p class="references-list">[1] UML Testing Profile, OMG, June 2011: <span class="hyperlink"><a href="http://www.omg.org/spec/UTP/1.1/Beta2/PDF/">www.omg.org/spec/UTP/1.1/Beta2/PDF/</a></span></p>
<p class="author-bio">Dominic Tavassoli is director of industry and systems&nbsp;marketing at&nbsp;IBM Rational. </p>
<p class="author-bio">Jonathon Chard is systems market&nbsp;manager at&nbsp;IBM Rational.</p>
<p class="contact-info">IBM Rational <span class="hyperlink"><a href="mailto:jon.chard@uk.ibm.com">jon.chard@uk.ibm.com</a></span>  <span class="hyperlink"><a href="http://www.ibm.com/software/rational">www.ibm.com/software/rational</a></span> </p>
<p class="contact-info">Follow: <a href="http://twitter.com/#!/ibmrational">Twitter</a> <a href="http://rationaltester.wordpress.com/">Blog</a> <a href="http://www.facebook.com/IBMRational">Facebook</a> <a href="http://www.linkedin.com/company/ibm">LinkedIn</a> <a href="http://www.youtube.com/ibmrational/">YouTube</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Attack the stack: Identifying unauthorized code execution caused by buffer overflows</title>
		<link>http://embedded-computing.com/articles/attack-stack-execution-caused-buffer-overflows/</link>
		<comments>http://embedded-computing.com/articles/attack-stack-execution-caused-buffer-overflows/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 15:00:00 +0000</pubDate>
		<dc:creator>Rutul Dave, Coverity</dc:creator>
				<category><![CDATA[application penetration testing]]></category>
		<category><![CDATA[application security tools]]></category>
		<category><![CDATA[application security vulnerabilities]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Attack the stack]]></category>
		<category><![CDATA[Buffer overflows]]></category>
		<category><![CDATA[code analysis tool]]></category>
		<category><![CDATA[code analysis tools]]></category>
		<category><![CDATA[Coverity]]></category>
		<category><![CDATA[ddos protect]]></category>
		<category><![CDATA[debug memory leak]]></category>
		<category><![CDATA[debugging memory leaks]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[detect memory leak]]></category>
		<category><![CDATA[dos ddos]]></category>
		<category><![CDATA[embedded design systems]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[ids intrusion]]></category>
		<category><![CDATA[ids intrusion detection]]></category>
		<category><![CDATA[ids intrusion detection system]]></category>
		<category><![CDATA[intrusion detection system ids]]></category>
		<category><![CDATA[it security vulnerabilities]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[memory leak detect]]></category>
		<category><![CDATA[memory leak detection]]></category>
		<category><![CDATA[memory leak detector]]></category>
		<category><![CDATA[network based ids]]></category>
		<category><![CDATA[pen testing tools]]></category>
		<category><![CDATA[penetration test tools]]></category>
		<category><![CDATA[penetration testing]]></category>
		<category><![CDATA[penetration testing methodology]]></category>
		<category><![CDATA[penetration testing tool]]></category>
		<category><![CDATA[penetration testing tools]]></category>
		<category><![CDATA[security penetration testing]]></category>
		<category><![CDATA[security testing of web applications]]></category>
		<category><![CDATA[security testing tools]]></category>
		<category><![CDATA[security testing web applications]]></category>
		<category><![CDATA[security vulnerability assessment tools]]></category>
		<category><![CDATA[security vulnerability testing]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software security vulnerability]]></category>
		<category><![CDATA[source code analysis tool]]></category>
		<category><![CDATA[source code static analysis]]></category>
		<category><![CDATA[sql injection security]]></category>
		<category><![CDATA[sql injection vulnerabilities]]></category>
		<category><![CDATA[static code analyzer]]></category>
		<category><![CDATA[testing web application security]]></category>
		<category><![CDATA[vulnerability scanning tools]]></category>
		<category><![CDATA[web application penetration test]]></category>
		<category><![CDATA[web application penetration testing]]></category>
		<category><![CDATA[web application penetration testing tools]]></category>
		<category><![CDATA[web application scanning]]></category>
		<category><![CDATA[web application security assessment]]></category>
		<category><![CDATA[web application security penetration testing]]></category>
		<category><![CDATA[web application security tool]]></category>
		<category><![CDATA[web application vulnerabilities]]></category>
		<category><![CDATA[web application vulnerability]]></category>
		<category><![CDATA[web application vulnerability scanner]]></category>
		<category><![CDATA[web application vulnerability testing]]></category>
		<category><![CDATA[web applications security]]></category>
		<category><![CDATA[xss sql injection]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=5e66c5052f55f00976a85071e76c70c2</guid>
		<description><![CDATA[Static analysis testing has evolved into a best practice for eliminating overflows that compromise software security.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="6" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Ffigures%2F6" />Nearly half of all critical security leaks in embedded software are due to heap overflows. Stack-based buffer overflows account for a smaller percentage, but are exploited with the same technique to inject and execute unauthorized code or change execution flow. Instead of policing such attacks to manage security risk, a better approach is to use the strength of quality software development and code testing with static analysis to find and fix the underlying defects that lead to security vulnerability.</h3>
<p><span id="more-146"></span><span class='body'>
<p class="body-text"><span class="italics">&#8220;Because that&#8217;s where the money is.&#8221;</span></p>
<p class="body-text">That&#8217;s what Willie Sutton, a prolific bank robber in the United&nbsp;States from the late &#8217;20s to the early &#8217;50s, reputedly said when asked why he robbed banks.</p>
<p class="body-text">Embedded systems typically don&#8217;t suffer from popular sources of Web application security exploits like cross-site scripting and SQL injection. However, security threats are real and ever-present in embedded systems. So where&#8217;s the &#8220;money&#8221; when it comes to security in embedded software?</p>
<p class="body-text">When reading through the release notes of most software vendors, developers will notice that security patches often contain fixes to a variety of buffer overflow defects. For example, take a look at the security update for Mac OS X at <span class="hyperlink"><a href="http://support.apple.com/kb/HT4723">http://support.apple.com/kb/HT4723</a></span>. It contains a good number of string and heap buffer overflows. </p>
<p class="body-text">On average, about half of all critical security leaks are caused by heap overflows. Stack-based buffer overflows in embedded software are also a major source of security exploits from altered code. Even without the security risk, buffer overflows are still problematic, as they can cause program execution to halt or produce unexpected values that can be tough to trace at execution time.</p>
<p class="body-text">With a large amount of software services moving to the cloud, embedded systems at the core of cloud computing infrastructures are more exposed to threats from unauthorized code execution, arbitrary control of resources, corruption of sensitive information, and Denial of Service (DoS) attacks. Developers can benefit from looking at what goes on behind the scenes in a simple buffer overflow and seeing how it allows hackers to change program flow or execution.</p>
<p class="heading-1">What happens in a buffer overflow?</p>
<p class="body-text">Memory management lies at the heart of buffer overflow exploits. At its most basic level, the problem arises from the fact that Operating Systems (OSs) mix variables and buffers from the program with program execution data. If developers can overflow the program data buffer and overwrite program execution data, they usually can alter program execution.</p>
<p class="body-text">In its simplest form, a program in memory is organized in three sections/segments: text, data, and stack (Figure 1). The text section, also known as the <span class="italics">code segment</span>, is the fixed-size, read-only area that contains code and instructions on executing the program. Similarly, the data section is a fixed-size segment that contains the global variables and static variables initialized in the program.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=696,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Ffigures%2F1" title="Program memory is organized in text, data, and stack sections."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Program memory is organized in text, data, and stack sections.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The stack is the area most relevant to this discussion. It starts at a fixed address, with a register pointing to the top of the stack. Elements called <span class="italics">stack frames</span> are PUSHed when calling a function and POPed when returning. A stack frame contains the value of the instruction pointer when the function is called. This instruction pointer is necessary to alter an execution flow from a buffer overflow.</p>
<p class="body-text">A simple example can illustrate what a stack looks like:</p>
<p class="code-paragraph">void password (char *buf) {  char var[16];  strcpy(var, buf); }</p>
<p class="code-paragraph">void main () {  password(&#8220;mypassword&#8221;);  printf(&#8220;This should be executed first\n&#8221;);</p>
<p class="code-paragraph"> printf(&#8220;This should be executed next\n&#8221;); }</p>
<p class="body-text">When this program is executed, it will show the following:</p>
<p class="code-paragraph">This should be executed first This should be executed next</p>
<p class="body-text">The key to understanding what can be done with the stack is to look at the assembler code generated by the compiler. For this discussion, assume this program is executing on an Intel x86 CPU and the OS is Linux.</p>
<p class="body-text">In <span class="code-character">main()</span>, it shows:</p>
<p class="code-paragraph"> call password &#8592; This will push the instruction pointer (IP) on to the stack so that it can be used as a return address (RET)</p>
<p class="body-text">And in <span class="code-character">password()</span>, it shows:</p>
<p class="code-paragraph"> pushl ebp &#8592; This pushes the frame pointer (EBP) on to the stack  movl ebp, esp &#8592; This copies the stack pointer&nbsp;(SP) onto EBP  making it the new frame pointer (SFP)</p>
<p class="body-text">Now when <span class="code-character">password()</span> is called, the stack looks as depicted in Figure 2.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=696,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Ffigures%2F2" title="A call to mypassword() alters the program stack."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> A call to mypassword() alters the program stack.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Analyzing the attack</p>
<p class="body-text">In lieu of this example, how can the stack be attacked, considering that there is a fixed-sized buffer on the stack that can overflow? Notice that just before the buffer <span class="code-character">var[16]</span> on the stack is the stack frame pointer, and before that is the return address. So if <span class="code-character">var[16]</span> could be modified and filled with a value larger than the 16 characters allocated, code could then be executed at the address filled with the return address. In this simplistic example, <span class="code-character">password()</span> calls an unprotected string-copy function (<span class="code-character">strcpy()</span>), allowing <span class="code-character">var[16]</span> to overflow and thus change the return address.</p>
<p class="body-text">Using GDB can obtain the address of an instruction to execute:</p>
<p class="code-paragraph"> (gdb) disassemble main Dump of assembler code for function main: 0x0804840e &lt;main+0&gt;: lea 0&#215;4(%esp),%ecx 0&#215;08048412 &lt;main+4&gt;: and $0xfffffff0,%esp 0&#215;08048415 &lt;main+7&gt;: pushl -0&#215;4(%ecx) 0&#215;08048418 &lt;main+10&gt;: push %ebp 0&#215;08048419 &lt;main+11&gt;: mov %esp,%ebp 0x0804841b &lt;main+13&gt;: push %ecx 0x0804841c &lt;main+14&gt;: sub $0&#215;4,%esp 0x0804841f &lt;main+17&gt;: movl $0&#215;8048514,(%esp) 0&#215;08048426 &lt;main+24&gt;: call 0x80483f4 &lt;password&gt; 0x0804842b &lt;main+29&gt;: movl $0x804851f,(%esp) 0&#215;08048432 &lt;main+36&gt;: call 0&#215;8048324 &lt;puts@plt&gt; &#8592; Call to first&nbsp;printf() 0&#215;08048437 &lt;main+41&gt;: movl $0x804853d,(%esp) 0x0804843e &lt;main+48&gt;: call 0&#215;8048324 &lt;puts@plt&gt; &#8592; Call to second printf() 0&#215;08048443 &lt;main+53&gt;: add $0&#215;4,%esp 0&#215;08048446 &lt;main+56&gt;: pop %ecx 0&#215;08048447 &lt;main+57&gt;: pop %ebp 0&#215;08048448 &lt;main+58&gt;: lea -0&#215;4(%ecx),%esp 0x0804844b &lt;main+61&gt;: ret End of assembler dump.</p>
<p class="body-text">Now it&#8217;s a matter of passing a string larger than 16 characters that contains the address <span class="code-character">0x0804843e</span>, overflowing the buffer and changing the program execution flow.</p>
<p class="heading-1">Sophisticated code testing</p>
<p class="body-text">Writing embedded code that works, does what it is supposed to do efficiently, and is simple to understand and maintain is not an easy task. While higher-level security concerns like these are often addressed later in the development process, they can&nbsp;be tackled earlier by using proven practices to build quality software. </p>
<p class="body-text">Defects like string buffer overflows that open possible exploits can be mitigated by not using functions like <span class="code-character">strcpy()</span> that produce unprotected copies of character arrays to fixed-size buffers. In addition, techniques such as automated code testing using static analysis provide a more sophisticated approach to avoiding static and dynamic buffer overflows.</p>
<p class="body-text">The following techniques make static analysis an extremely powerful tool for finding programming errors accurately and efficiently at compile time.</p>
<p class="heading-2">Data flow analysis</p>
<p class="body-text">Modern static analysis tools use data flow analysis to identify the execution path during compile time by creating a control flow graph representation of the source code.</p>
<p class="equations">
<figure>
<table width="280" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=587,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F1" title="Data flow analysis"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=270&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F1" alt="21" width="270" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Equation 1:</b> Data flow analysis</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 2.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">In Example 1, the <span class="code-character">if</span> statements have four possible execution paths through the code. When the value of <span class="code-character">x</span> passed into the function is not zero, <span class="code-character">p</span> is assigned a null pointer with <span class="code-character">p=0</span>. Then the next conditional check (<span class="code-character">x != 0</span>) takes a true branch, and <span class="code-character">p</span> is dereferenced in the next line, leading to a null pointer dereference.</p>
<p class="heading-2">Interprocedural analysis</p>
<p class="body-text">Another useful technique that static analysis employs is interprocedural analysis for finding defects across function and&nbsp;method boundaries.</p>
<p class="equations">
<figure>
<table width="280" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=1156,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F2" title="Interprocedural analysis"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=270&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F2" alt="22" width="270" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Equation 2:</b> Interprocedural analysis</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Example 2 contains three functions: <span class="code-character">example_leak()</span>, <span class="code-character">create_S()</span>, and <span class="code-character">zero_alloc()</span>. To analyze the code and&nbsp;identify the memory leak, the analysis engine traces the&nbsp;execution to understand that memory is allocated in <span class="code-character">zero_alloc()</span>, initialized in <span class="code-character">create_S()</span>, and leaked when variable <span class="code-character">tmp</span> goes out of scope when it is returned from function <span class="code-character">example_leak()</span>.</p>
<p class="heading-2">False path pruning</p>
<p class="body-text">A third technique that smart static analysis uses is false path pruning. Regardless of the type of defect or its impact on the embedded system&#8217;s security or quality, automated defect-reporting tools must be accurate. This expectation is the same for static analysis; the tool should report critical defects and not false positives. A key to ensuring that the reported defects are real is to only analyze the executable paths.</p>
<p class="equations">
<figure>
<table width="280" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F3" title="False path pruning"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=270&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5566%2Fequations%2F3" alt="23" width="270" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Equation 3:</b> False path pruning</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 2.7x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Example 3 is slightly modified from Example 1. In this case, the execution path simply cannot be executed. Consider the case where the first conditional check (<span class="code-character">if (x != 0)</span>) results in the false case being evaluated. This will assign variable <span class="code-character">p</span>&nbsp;the&nbsp;value&nbsp;of <span class="code-character">0</span>. At the next conditional check, if the analysis engine looks at the true path it will report a null pointer dereference defect, but that would be a false positive because the execution logic will never traverse this path. It is not possible to evaluate the same conditional check (<span class="code-character">if (x != 0)</span>) in two different ways. By pruning a path that can never be executed (a false path), good analysis can report up to 50 percent fewer incorrect defects.</p>
<p class="body-text">Data flow analysis, interprocedural analysis, and false path pruning are only a few of the tricks that a good static analysis tool uses to provide a list of actionable defects that, left unchecked, can have a direct impact on software security &#8230; and that&#8217;s &#8220;where the money is.&#8221; </p>
<p class="author-bio">Rutul Dave is senior development manager at Coverity.</p>
<p class="contact-info">Coverity <span class="hyperlink"><a href="mailto:coverity@lewispulse.com">coverity@lewispulse.com</a></span>  <span class="hyperlink"><a href="http://www.linkedin.com/company/coverity">www.linkedin.com/company/coverity</a></span> <span class="hyperlink"><a href="http://www.fb.com/Coverity">www.facebook.com/Coverity</a></span>  <span class="bold">www.twitter.com/</span><span class="hyperlink"><a href="https://twitter.com/#!/coverity">@Coverity</a></span> <span class="hyperlink"><a href="http://www.coverity.com">www.coverity.com</a></span> </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pitfalls of multicore software: Why data races are never benign</title>
		<link>http://embedded-computing.com/articles/pitfalls-multicore-data-races-never-benign/</link>
		<comments>http://embedded-computing.com/articles/pitfalls-multicore-data-races-never-benign/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 15:00:00 +0000</pubDate>
		<dc:creator>Paul Anderson, GrammaTech</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[c static code analyzer]]></category>
		<category><![CDATA[code analyzer tool]]></category>
		<category><![CDATA[gnu c compilers]]></category>
		<category><![CDATA[GrammaTech]]></category>
		<category><![CDATA[klocwork tool]]></category>
		<category><![CDATA[Pitfalls of multicore software]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[static analysis]]></category>
		<category><![CDATA[static code analyzer c]]></category>
		<category><![CDATA[static code checker]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=48edf2cc366f65f8a7278bb09a86a271</guid>
		<description><![CDATA[Static analysis tools build models to help single out race conditions that would otherwise run away with software integrity.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="1" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5568%2Ffigures%2F1" />Despite the widespread misconception that some data races are entirely harmless, modern optimizing compilers generate code that can cause incorrect execution when data races exist. Using static and dynamic analysis, programmers can find and eliminate these defects that are often inadvertently introduced into their code.</h3>
<p><span id="more-283"></span><span class='body'>
<p class=Bodytext><span id="Ad-ABD-1" style="display: none; float: left;"></span>Programming multicore processors to take advantage of their power means writing multithreaded code. C and C++ were not designed for concurrency, so developers must use a library such as pthreads for those languages. Multithreaded code is more difficult to get right than single-threaded due to the risk posed by entirely new classes of programming defects. </p>
<p class=Bodytext><span id="Ad-ABD-1" style="display: none; float: left;"></span>In the rogue&#8217;s gallery of concurrency bugs, the race condition is a notorious repeat offender. A race condition occurs when a program checks a resource property and performs an action on the assumption that the property has not changed, even though an external actor has slipped in and changed that property.</p>
<p class=bodytext>A data race is a particular type of race condition that involves concurrent access to memory locations in a multithreaded program. This defect occurs when there are two or more execution threads that access a shared memory location, at least one thread is changing the data at that location, and there is no explicit mechanism for coordinating access. If a data race occurs, it can leave the program in an inconsistent state.</p>
<h1>The insidious nature of data races</h1>
<p class=bodytext>It is widely assumed that some data races are harmless and can be safely ignored. Unfortunately, this is only true in very rare circumstances. It is best to explain why by introducing an example.</p>
<p class=bodytext>The <span class=italics>singleton pattern</span> is a commonplace idiom where the program maintains a reference to a single underlying object and a Boolean variable encodes it if it has been initialized. This pattern is also known as <span class=italics>lazy initialization</span>. The following code is an example of the pattern:</p>
<p class=codeparagraph style='text-indent:12.0pt'>if (!initialized) {</p>
<p class=codeparagraph style='margin-left:24.0pt;text-indent:12.0pt'>object = create();</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>initialized = true;</p>
<p class=codeparagraph style='text-indent:12.0pt'>}</p>
<p class=codeparagraph style='margin-bottom:6.0pt;text-indent:12.25pt'>&#8230; object &#8230;</p>
<p class=bodytext>This code is perfectly adequate for a single-threaded program, but it is not thread-safe because it has a data race on the variable named <span class=codecharacter>initialized</span>. If called by two different threads, there is a risk that both threads will observe <span class=codecharacter>initialized</span> as false at essentially the same time, and both will call <span class=codecharacter>create()</span>, thus violating the singleton property.</p>
<p class=bodytext>To make this thread safe, the natural approach is to protect the entire <span class=codecharacter>if</span> statement with a lock. However, acquiring and releasing locks can be costly, so programmers try to avoid the expense by using the <span class=italics>double-checked locking</span> idiom &#8211; a check outside the scope of the lock and another inside. The inner check is there to confirm that the first check still holds after the lock has been acquired:</p>
<p class=codeparagraph style='text-indent:12.0pt'>if (!initialized) {</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>lock();</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>if (!initialized) {</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count: 2'>&nbsp;&nbsp;&nbsp; </span>object = create();</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count: 2'>&nbsp;&nbsp;&nbsp; </span>initialized = true;</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>}</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>unlock();</p>
<p class=codeparagraph style='text-indent:12.0pt'>}</p>
<p class=codeparagraph style='margin-bottom:6.0pt'><span style="mso-spacerun: yes">&nbsp; </span>&#8230; object &#8230;</p>
<p class=bodytext>Superficially, this looks like it will suffice, and indeed, it will as long as the statements are guaranteed to execute in that order. However, an optimizing compiler might generate code that essentially switches the order of <span class=codecharacter>object = create()</span> and <span class=codecharacter>initialized = true</span>. After all, there is no explicit dependence between those two statements. In that case, if a second thread enters this code any time after the assignment to <span class=codecharacter>initialized</span>, that thread would then use the value of <span class=codecharacter>object</span> before it has been initialized.</p>
<p class=bodytext>Optimizing compilers are inscrutable beasts. Those that optimize for speed will take many esoteric considerations into account, few of which are obvious to a programmer. It is common for them to generate instructions that are apparently out of order because doing so might result in fewer cache misses, or because fewer instructions are needed.</p>
<p class=bodytext>It is wrong to assume that because the reordering introduced a race condition in the previous example that the compiler is at fault. The compiler is doing exactly what it is allowed to do. The language specification is perfectly clear and unambiguous about this: The compiler is allowed to assume that there are no data races in the program.</p>
<p class=bodytext>In actuality, the specification is somewhat broader: Compilers are allowed to do anything in the presence of undefined behavior. This is sometimes facetiously referred to as <span class=italics>catch fire</span> semantics; the specification gives the compiler permission to set a computer on fire if the program has undefined behavior. As well as data races, many traditional bugs such as buffer overruns, dereferences of invalid addresses, and so on constitute undefined behavior. Because compilers are free to do anything, rather than burn the building down they typically do the sensible thing, which is to assume that the undefined behavior will never happen and optimize accordingly.</p>
<p class=bodytext>The consequences of this can sometimes be surprising, even to those who are experts in concurrency and compilers. It can be difficult to convince programmers that code that looks completely correct can be compiled into code that has serious errors.</p>
<p class=bodytext>Another example is worth describing. Suppose there are two threads where one reads a shared variable and the other writes to it. Let&#8217;s assume that it does not matter to the reader if it sees the value before or after it has been changed by the writer (this is not an uncommon pattern). If those accesses are not protected by a lock, then there is clearly a data race. Notwithstanding the catch fire rule, however, most programmers would conclude that this is completely benign.</p>
<p class=bodytext>As it turns out, there are at least two plausible ways in which this code could be compiled where the reader would see a value that is wrong. The first way is easy to explain: Suppose the value were a 64-bit quantity on an architecture that can only read 32-bit words. Then both the reader and the writer need two instructions, and an unlucky interleaving might mean that the reader sees the top 32 bits of the old value and the bottom 32 bits of the new, which when combined can be a value that is neither the old nor the new.</p>
<p class=bodytext>The second way in which wrong code could be generated is more subtle. Suppose the reader did the following, where the data race is on the variable named <span class=italics>global</span>:</p>
<p class=codeparagraph style='text-indent:12.0pt'>int local = global;<span style="mso-spacerun: yes">&nbsp; </span>// Take a copy of<br /> <span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>// the global</p>
<p class=codeparagraph style='text-indent:12.0pt'>if (local == something) {</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp; </span>&#8230;</p>
<p class=codeparagraph style='text-indent:12.0pt'>}</p>
<p class=codeparagraph style='text-indent:12.0pt'>&#8230; // Some non-trivial code that does<br /> <span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>// not change global or local</p>
<p class=codeparagraph style='text-indent:12.0pt'>if (local == something) {</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp; </span><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp; </span>&#8230;</p>
<p class=codeparagraph style='text-indent:12.0pt'>}</p>
<p class=bodytext>Here the reader is making a local copy of the racy variable and referring to that value twice. It is reasonable to expect that the value will be the same in both places, but again, the optimizing compiler can generate code where that expectation is unmet. If <span class=codecharacter>local</span> is assigned to a register then it will have one value for the purposes of the first comparison, but if the code between the two conditionals is sufficiently nontrivial then that register may get <span class=italics>spilled</span> &#8211; in other words, reused for a different purpose. In that case, at the second conditional, the value of <span class=codecharacter>local</span> will be reloaded from the global variable into the register, by which time the writer might have changed it to a different value.</p>
<p class=bodytext>Programmers should be very skeptical of claims that some data races are acceptable and should strive to find and remove all of them from their code.</p>
<h1>Techniques for finding risky defects</h1>
<p class=bodytext>When it comes to finding concurrency defects, traditional dynamic testing techniques might be inadequate. A program that passes a test a hundred times is not guaranteed to pass the next time, even with the same inputs and the same environment. Whether these bugs manifest or not is exquisitely sensitive to the timing, and the order in which operations in threads are interleaved is essentially nondeterministic.</p>
<p class=bodytext>New dynamic testing techniques for finding data races are emerging. These techniques work by monitoring the applications as they execute and observing the locks held by each thread, as well as the memory locations being accessed by those threads. If an anomaly is found, then a diagnostic is issued. Other tools help diagnose data races suspected of causing failures. Some companies now offer tools to facilitate diagnosis of data races that allow the replay of events leading up to an anomaly.</p>
<p class=bodytext>Static analysis tools can also be useful for finding data races and other concurrency errors. Whereas dynamic testing tools find defects that occur for particular executions of a program with a fixed set of inputs, static analysis tools check all possible executions and all possible inputs. For performance reasons, tools might place limits on how much exploration is done and thus might not be completely exhaustive; even so, they can cover much more than can ever be feasible with dynamic testing. The advantage of static analysis is that test cases are not required because the program is never actually executed.</p>
<p class=bodytext>Instead, these tools work by creating a model of the program and then exploring the model in various ways to find anomalies. GrammaTech&#8217;s CodeSonar finds data races by creating a model that represents the set of locks held by each thread and by performing a symbolic execution of the program that explores execution paths. It records the sets of variables protected by locks and uses this information to find interleavings that can result in shared variables being used without proper synchronization. Similar techniques can be used to find other concurrency defects such as deadlock and lock mismanagement.</p>
<p class=bodytext>Once found, data races are usually easy to fix, albeit doing so correctly can incur a performance penalty. In some cases, there might be a temptation to use the C volatile keyword to correct the data race, but this is not recommended because volatile was not designed to solve concurrency problems, and in any case is a poorly understood construct that is frequently miscompiled. The latest versions of C and C++ have embraced concurrency and support atomic operations. Compiler support for these operations is slowly emerging, and until it becomes readily available, the best approach is to use locks.</p>
<p class=bodytext>To achieve high-quality software for multicore processors, a zero-tolerance policy for data races is recommended. Find them using a combination of both static and dynamic techniques, and take care not to rely too heavily on esoteric compiler techniques to fix them. These defects are so risky and unpredictable that eliminating them systematically is the only safe way to be sure that they do not cause harm.</p>
<p class=authorbio>Paul Anderson is VP of Engineering at GrammaTech.</p>
<p class=contactinfo>GrammaTech<br /> 607-273-7340<br /> <span style='font-weight:normal'><a href="mailto:paul@grammatech.com"><b style='mso-bidi-font-weight:normal'>paul@grammatech.com</b></a></span> <br /> <span style='font-weight:normal'><a href="http://www.grammatech.com"><b style='mso-bidi-font-weight:normal'>www.grammatech.com</b></a></span> </p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The value of usability: Getting developers to &#8216;push the button&#8217; on static analysis &#8211; Q&amp;A with Gwyn Fisher, CTO, Klocwork</title>
		<link>http://embedded-computing.com/articles/the-fisher-cto-klocwork/</link>
		<comments>http://embedded-computing.com/articles/the-fisher-cto-klocwork/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 15:00:00 +0000</pubDate>
		<dc:creator>Jennifer Hesse, Editor, OpenSystems Media</dc:creator>
				<category><![CDATA[advanced microsoft office training]]></category>
		<category><![CDATA[advanced microsoft project training]]></category>
		<category><![CDATA[application development process]]></category>
		<category><![CDATA[application development tools]]></category>
		<category><![CDATA[application software developer]]></category>
		<category><![CDATA[applications software development]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[c software development]]></category>
		<category><![CDATA[computer training courses]]></category>
		<category><![CDATA[computer training online courses]]></category>
		<category><![CDATA[custom software developer]]></category>
		<category><![CDATA[custom software developers]]></category>
		<category><![CDATA[database application development]]></category>
		<category><![CDATA[database software development]]></category>
		<category><![CDATA[development tools software]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software projects]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Klocwork]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[metrics software development]]></category>
		<category><![CDATA[microsoft access 2007 training courses]]></category>
		<category><![CDATA[microsoft publisher training courses]]></category>
		<category><![CDATA[mobile software developer]]></category>
		<category><![CDATA[ms office online courses]]></category>
		<category><![CDATA[ms project training classes]]></category>
		<category><![CDATA[online training courses]]></category>
		<category><![CDATA[product software development]]></category>
		<category><![CDATA[programming and software development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software application developer]]></category>
		<category><![CDATA[software application development process]]></category>
		<category><![CDATA[software applications development]]></category>
		<category><![CDATA[software database development]]></category>
		<category><![CDATA[software development application]]></category>
		<category><![CDATA[software development applications]]></category>
		<category><![CDATA[software development c]]></category>
		<category><![CDATA[software development consultant]]></category>
		<category><![CDATA[software development consulting]]></category>
		<category><![CDATA[software development custom]]></category>
		<category><![CDATA[software development environments]]></category>
		<category><![CDATA[software development from home]]></category>
		<category><![CDATA[software development home]]></category>
		<category><![CDATA[software development microsoft]]></category>
		<category><![CDATA[software development net]]></category>
		<category><![CDATA[software development platforms]]></category>
		<category><![CDATA[software development product]]></category>
		<category><![CDATA[software development products]]></category>
		<category><![CDATA[software development programming]]></category>
		<category><![CDATA[software development technology]]></category>
		<category><![CDATA[software development tools for]]></category>
		<category><![CDATA[software development windows]]></category>
		<category><![CDATA[software system development]]></category>
		<category><![CDATA[software tool development]]></category>
		<category><![CDATA[source code static analysis]]></category>
		<category><![CDATA[static analysis]]></category>
		<category><![CDATA[static code analyzer]]></category>
		<category><![CDATA[The value of usability]]></category>
		<category><![CDATA[tools for software development]]></category>
		<category><![CDATA[web application developers]]></category>
		<category><![CDATA[web application security testing]]></category>
		<category><![CDATA[web based application development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=613e6ca77fb16bd10117d309c0b0e20c</guid>
		<description><![CDATA[In and exclusive Q&#38;A session with Embedded Computing Design, Gwyn Fisher of Klocwork comments on static code analysis and its growth as a staple of embedded software development.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5567%2Ffigures%2F3" />The ubiquitous nature of embedded software has made source code analysis a critical component of the development process. Gwyn discusses the impact this technology has on software security and reliability, and emphasizes the importance of making static analysis a natural part of a developer&#8217;s coding practice.</h3>
<p><span id="more-285"></span><span class='body'>
<p class="body-text"></p>
<p class="interview-question"><span class="interview-name">ECD:</span> As embedded developers turn to multicore processors to optimize performance, how can analysis tools help control inevitable cost and schedule problems?</p>
<p class="body-text"><span class="interview-name">FISHER:</span> Any new development is an exercise in balancing expectation against risk. In the case of multicore, the naive expectation is always linear acceleration tempered perhaps by some jocular &#8220;wouldn&#8217;t that be nice&#8221; acceptance that the final result won&#8217;t be quite that good, but no real understanding of the reality that without significant effort (read: time, money, angst) the result might be slower than the old, interrupt-driven single-core code. So tools have a role to play in terms of helping developers understand the impact of what they&#8217;re doing, what pitfalls they&#8217;re unwittingly leaving themselves open to, and how to mitigate the associated risks.</p>
<p class="body-text">Dynamic analysis in this space has received the lion&#8217;s share of attention for obvious reasons. If I can see a nice set of graphs over time that shows the performance of my code in action, I can presumably narrow in on problem areas quickly and apply my own knowledge to figuring out what&#8217;s going on. The challenge with dynamic analysis is that it depends on a) defining a test set that shows execution problems, and b) the reviewer&#8217;s intimate knowledge and understanding of what to do about those problems.</p>
<p class="body-text">Static analysis, by contrast, assumes little knowledge on behalf of the reviewer and requires no effort to be expended in defining test cases. Every conceivable code path through the application is exercised with as much rigor as every other path. This approach is therefore far more likely to show complex and costly issues such as data races, deadlocks, and resource contention than any constructed test bench. That speaks directly to the bottom line of cost control in what is inevitably a large, over-budget project. Leaving issues such as these in a code base until late in the validation process will cost exponentially more to address than doing so during initial development.</p>
<p class="body-text">In addition, due to the way that static analysis works by modeling the expected program execution, the finding is accompanied by a detailed walk-through of how the situation is predicted to occur, allowing even a relatively junior resource to interpret the issue at hand, determine whether or not it&#8217;s likely to happen, and apply an appropriate design fix. In one example we like to describe in seminars on the subject, a design flaw in a popular open-source database kernel resulted in months of effort expended to identify a deadlock and eventually rewrite key modules to avoid the data race at its heart. This same problem was identified during the first analysis using our tools, which provided a walk-through description enabling developers to easily see that the data race was causing the problem and that the deadlock was merely the symptom.</p>
<p class="body-text">Contrast a few hours to run the tool to analyze the code and an hour at most to interpret and act upon the result (what turns out to be a one-line fix) with months of community effort to determine an appropriate set of tests, followed by design effort attempting to fix the deadlock, and finally requiring the designer to rewrite the whole thing from scratch.</p>
<p class="interview-question"><span class="interview-name">ECD:</span> How is static analysis introduced in the software development cycle, and how can it be used with existing Integrated Development Environment (IDE) tools?</p>
<p class="body-text"><span class="interview-name">FISHER:</span> There&#8217;s absolutely no doubt that any developer-facing tool that doesn&#8217;t integrate seamlessly with any existing tooling is going to face significant friction in deployment. We&#8217;ve been selling this message effectively for years, with development managers almost asking the &#8220;why wouldn&#8217;t you do it this way?&#8221; question for us.</p>
<p class="body-text">Whether developers have migrated to IDEs or their idea of an IDE is a bunch of gVim macros or emacs lisp modules, to them it&#8217;s where they live and work. And woe betide any vendor who tries to get them to change. Even if you&#8217;re not suggesting that they change tools, and instead asking them to visit somewhere else to see what they might have done wrong in some retrospective manner, your tool is going to suffer waves of disinterest and ultimately become shelfware.</p>
<p class="body-text">Thus, static analysis has to be part of the developer&#8217;s native habitat, and more importantly, it has to work in a way that feels natural and follows the way other tools in that habitat work. For a gVim developer, issuing a &#8216;:&#8217; command is second nature, so tools in that environment should follow suit. Put that same interaction mechanism in front of a Visual Studio user, and that will make for a fun-filled afternoon of derisive commentary.</p>
<p class="body-text">At Klocwork we&#8217;ve gone through various iterations of technology design, getting closer to the developers themselves. It&#8217;s one thing to be resident as a tool within an IDE; it&#8217;s another to get the developer to &#8220;push the button&#8221; to use it. Making a button available is only changing geography, and it does nothing to help with the tool&#8217;s fundamental usability.</p>
<p class="body-text">With this in mind, we&#8217;ve recently introduced a new technology that allows static analysis to take place in much the same way as spell checking in a Word document or e-mail. That is, as you&#8217;re writing your code and the tool detects a problem with what you&#8217;re doing, it can point out the problem in a perceptually instant manner, highlight it with a squiggly underline, and deliver all the value of static analysis with none of the &#8220;what do I have to do to use it?&#8221; resistance that is typically encountered during any new tool&#8217;s introduction (see&nbsp;Figure 1).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5567%2Ffigures%2F1" title="Following in the footsteps of word processors, Klocwork Insight highlights coding issues with a squiggly line the instant they&amp;#8217;re introduced."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5567%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Following in the footsteps of word processors, Klocwork Insight highlights coding issues with a squiggly line the instant they&#8217;re introduced.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Getting a tool into an IDE is tough; getting it to be useful in the part of the IDE the developer truly lives in (the editor component, whatever that looks like in the environment at hand) is really&nbsp;tough. But until you&#8217;re there, you&#8217;re a&nbsp;distraction.</p>
<p class="interview-question"><span class="interview-name">ECD:</span> Can source code analysis be used to protect embedded devices against potential security threats?</p>
<p class="body-text"><span class="interview-name">FISHER:</span> Absolutely, source code analysis has a significant role to play in threat identification and validating whatever threat model is being used to determine vulnerability in the device. The connectivity requirement is common in the embedded world today. That connection might be to another chip, or another device, or the whole Internet. In any case, there&#8217;s somebody else either sending you information or receiving information you&#8217;re sending. That&#8217;s the starting point for having to worry about your entire application design.</p>
<p class="body-text">Static analysis doesn&#8217;t typically know, or try to know, anything about your surrounding environment. Tools can sometimes be tuned to perform their analysis within certain data boundaries, for example, such as knowing that a particular input will only range between -20 and +30 because it&#8217;s a temperature sensor intended for use in Western Europe. But that kind of thing is discouraged because you&#8217;re allowing the user to define limits to what the modeling technology naturally does &#8211; that is, assume nothing and point out everything that looks wrong.</p>
<p class="body-text">In the case of threat detection, we&#8217;re most worried about how the data you&#8217;re interacting with from the outside world is used internally. Is it used to create a buffer into which you&#8217;ll read data (code or value injection), or is it used for memory allocation (Denial of Service or DoS), or perhaps interpreted as a reference into an internal data structure (hijacking or redirection)? This kind of data and path validation &#8211; that is, the path that tainted data follows from the outside world to its point of use within the code &#8211; is natural for source code analysis, as it accomplishes this modeling in order to perform everything else it does.</p>
<p class="body-text">As a wonderful gentleman at a defense contractor once said to me, &#8220;Son, it&#8217;s a bomb; it&#8217;s supposed to blow up. We just want to be sure it doesn&#8217;t get hijacked on its way.&#8221;</p>
<p class="interview-question"><span class="interview-name">ECD:</span> What educational events or online classes does Klocwork offer to help embedded designers get started with its code analysis tools?</p>
<p class="body-text"><span class="interview-name">FISHER:</span> Like any commercial organization attempting to encourage users to gain value from its tools, Klocwork provides a full suite of educational and professional services, running the gamut from introductory materials aimed at first-time users, to more advanced courses targeting secure coding and threat modeling, to full-on deployment services and mentoring.</p>
<p class="body-text">We also recently introduced the Klocwork Developer Network (<span class="hyperlink"><a href="http://developer.klocwork.com">http://developer.klocwork.com</a></span>), a website serving our users and acting as a repository for online courses, video tutorials, in-depth courseware, and the usual variety of community forums and ticketing.</p>
<p class="body-text">Each customer has something unique they wish to gain from a tool such as source code analysis, so a large part of our educational focus is on internal champions, people who take knowledge of how the tools work and how other organizations have applied them and leverage those lessons in deploying our tools for their own use. A large part of that is learning from the community, so I&#8217;ve been thrilled to see the fast uptake that the Klocwork Developer Network has seen amongst users, both as a less formal mechanism for interacting with our staff, but most importantly as a way to learn from other customers.</p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5567%2Ffigures%2F2" title="ECD in 2D: Klocwork Insight&amp;#8217;s plug-in for Visual Studio continuously runs data flow analysis to accurately identify defects and security vulnerabilities. Use your smartphone, scan this code, watch a video: http://opsy.st/zdEhC1. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5567%2Ffigures%2F2" alt="22" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: Klocwork Insight&#8217;s plug-in for Visual Studio continuously runs data flow analysis to accurately identify defects and security vulnerabilities. Use your smartphone, scan this code, watch a video: http://opsy.st/zdEhC1. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio">Gwyn Fisher is CTO of Klocwork.</p>
<p class="contact-info">Klocwork <span class="hyperlink"><a href="mailto:info@klocwork.com">info@klocwork.com</a></span>  <span class="hyperlink"><a href="http://www.klocwork.com/blog">www.klocwork.com/blog</a></span> <span class="hyperlink"><a href="http://www.fb.com/klocwork">www.facebook.com/klocwork</a></span>  <span class="bold">www.twitter.com/</span><span class="hyperlink"><a href="https://twitter.com/#!/klocwork">@klocwork</a></span> <span class="hyperlink"><a href="http://www.klocwork.com">www.klocwork.com</a></span> </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real-time performance: Build or buy?</title>
		<link>http://embedded-computing.com/articles/real-time-performance-build-buy/</link>
		<comments>http://embedded-computing.com/articles/real-time-performance-build-buy/#comments</comments>
		<pubDate>Tue, 07 Feb 2012 15:00:00 +0000</pubDate>
		<dc:creator>Warren Webb, Editorial Director</dc:creator>
				<category><![CDATA[8051 development board]]></category>
		<category><![CDATA[arm development board]]></category>
		<category><![CDATA[arm development boards]]></category>
		<category><![CDATA[arm microcontroller]]></category>
		<category><![CDATA[arm11 development board]]></category>
		<category><![CDATA[arm9 board]]></category>
		<category><![CDATA[arm9 development board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[atmel development board]]></category>
		<category><![CDATA[avr development board]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[embedded application development]]></category>
		<category><![CDATA[embedded design systems]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded development board]]></category>
		<category><![CDATA[embedded development tools]]></category>
		<category><![CDATA[embedded device]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux]]></category>
		<category><![CDATA[embedded linux development board]]></category>
		<category><![CDATA[embedded linux devices]]></category>
		<category><![CDATA[embedded rtos]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software design]]></category>
		<category><![CDATA[embedded software developer]]></category>
		<category><![CDATA[embedded software development tools]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system application]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system linux]]></category>
		<category><![CDATA[embedded system software]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems development]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems projects]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[linux embedded]]></category>
		<category><![CDATA[linux network operating system]]></category>
		<category><![CDATA[linux open source operating system]]></category>
		<category><![CDATA[microcontroller board]]></category>
		<category><![CDATA[microcontroller development board]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[microcontrollers embedded systems]]></category>
		<category><![CDATA[open source operating system linux]]></category>
		<category><![CDATA[open source software operating system]]></category>
		<category><![CDATA[OpenSystems Media]]></category>
		<category><![CDATA[operating system embedded]]></category>
		<category><![CDATA[operating system rtos]]></category>
		<category><![CDATA[operating systems linux]]></category>
		<category><![CDATA[operating systems open source]]></category>
		<category><![CDATA[Real-time OSs]]></category>
		<category><![CDATA[Real-time performance]]></category>
		<category><![CDATA[realtime operating system]]></category>
		<category><![CDATA[realtime operating systems]]></category>
		<category><![CDATA[rtos embedded systems]]></category>
		<category><![CDATA[rtos operating system]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[system development tools]]></category>
		<category><![CDATA[vxworks rtos]]></category>
		<category><![CDATA[wind river vxworks]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=4eeea068122c248fac8f704316c81c09</guid>
		<description><![CDATA[Ever-growing demands and challenges could render in-house OS development a thing of the past.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5527%2Ffigures%2F3" />As more and more embedded devices evolve from single-function controllers to complex platforms supporting high-speed graphics, user interfaces, and network communications in addition to the primary application, real-time responsiveness is becoming a critical performance requirement. Although developing in-house software offers some advantages, the benefits of reduced complexity and shorter development schedules often justify the purchase of a commercial Real-Time Operating System.</h3>
<p><span id="more-16372"></span><span class='body'>
<p class="body-text">The average person interacts with hundreds of embedded processors every day in phones, automobiles, home appliances, toys, cash registers, entertainment electronics, security systems, environmental controls, and personal electronics. The common link among all of these products is their ability to react in real time to the user, external events, and the communications channel. </p>
<p class="body-text">The software for these embedded devices can be divided into application software and Operating System (OS) software. Application software makes the product unique and contains the data collection, signal processing, and hardware control routines required to make the product perform to its specification. The OS allows the programmer to break up large application programs into smaller, individually developed processes or tasks. </p>
<p class="body-text">At the heart of an OS is the kernel, which schedules programs for execution and manages shared resources. A Real-Time OS (RTOS) processes hardware requests or interrupts from timers or external events within a guaranteed maximum time. Programmers interact with the OS&nbsp;through an API and set up the priorities and data dependencies. During execution, the RTOS manages the application software with a flurry of external real-time activity. </p>
<p class="heading-1">In-house code</p>
<p class="body-text">Even with the advantages of an RTOS, homegrown OSs still occupy a non-trivial percentage of embedded real-time products. Developers have multiple incentives for bypassing a commercial RTOS entirely and writing their own real-time routines. The biggest reason developers cite for not choosing a commercial OS is lack of need. With only one task running, designers think they can easily keep track of the required hardware interaction. </p>
<p class="body-text">Special situations sometimes justify in-house software. For example, the design objectives of a portable health care device can include low cost, low power, and a one-year battery standby life without extra memory and processing power to support a commercial RTOS. Furthermore, if a new project is an upgrade of a previous project, developers likely will want to use as much legacy code as possible.</p>
<p class="body-text">Components that aren&#8217;t invented at the same company might also be one reason why many developers write their own OSs. Installing software from a third party into their showpiece product is like admitting they are somehow not up to the task. In addition, developers might think they&#8217;ll lose the ability to make software adjustments to compensate for hardware changes or to correct bugs. The designer can easily adjust the order of execution or drop to assembly language to solve critical timing problems with in-house developed software. However, with a commercial RTOS, the scheduler handles many of the timing issues, so developers lose the perception of being in total control. And finally, programmers list sticker shock as another reason to write their own operating software. The initial license for a full commercial RTOS and associated tools can be in the $15,000 to $20,000&nbsp;range for a single development seat, plus recurring royalties for every unit shipped.</p>
<p class="heading-1">Software shortcuts</p>
<p class="body-text">As embedded systems grow in complexity and project schedules shrink, software has displaced hardware as the highest-priced item in most embedded development projects. If design teams can buy an RTOS and eliminate the coding, debug, and documentation of the most complicated portion of the software structure, then the purchase decision should receive careful consideration. Although a commercial RTOS can be expensive, a smaller development team and shorter project time frame might create more than enough savings to justify the purchase. </p>
<p class="body-text">An RTOS allows programmers to write independent, reusable modules to reduce software complexity and shorten the development schedule. Programmers can write each software routine independently without getting bogged down with intertask timing problems. Most RTOS vendors provide a full interactive development environment including a source code editor, code manager, linker, downloader, runtime tools, and one or more debuggers. Software vendors also supply software performance analysis tools to help profile and visualize real-time activity in application routines. Programmers can monitor which tasks are running, observe the stream of data flow, and detect when and how often a task is interrupted by a higher-priority item. RTOS vendors agree that high-quality development tools can dramatically shorten debug time.</p>
<p class="body-text">Along with the cost savings, RTOS vendors cite multiple technical reasons to justify their products. For example, if an application involves heavy data processing, many RTOSs can be scaled easily to spread tasks across several processors for a significant performance boost. The RTOS provides communication and synchronization services to make multiprocessing transparent. In addition, an off-the-shelf RTOS working alongside multicore processors simplifies legacy code integration within new designs or products updates. </p>
<p class="body-text">A commercial RTOS is modular, so users can select only those portions or features of the OS that they need. Specifying a subset of the full-blown commercial RTOS can reduce acquisition costs and the required memory footprint. With the current connectivity trend, even the simplest embedded products might need to connect to and send data over the Internet. A graphical user interface could also become standard in small embedded systems, even if just for maintenance. These features are included or optionally available in most commercial RTOSs, but can be very expensive or impossible to&nbsp;add to a proprietary OS. Vendors also promote product on-demand technical support as a major benefit of a commercial RTOS. </p>
<p class="heading-1">Off-the-shelf platforms</p>
<p class="body-text">Commercial RTOSs are constantly upgraded to add new features and keep up with changing technology. For example, the popular VxWorks OS from Wind River was recently revised to deliver 64-bit computing support along with improved multicore features. VxWorks includes a shell, debugging functions, memory management, performance monitoring, and support for multiprocessing. Real-time features include a kernel for preemptive multitasking, interrupt response, interprocess communication, and a file system (see block diagram in Figure 1). Software development is enabled by the Wind&nbsp;River Workbench development tools suite and Intel Integrated Performance Primitives for VxWorks.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=977,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5527%2Ffigures%2F1" title="The VxWorks RTOS from Wind River fits many embedded applications and features 32-bit or 64-bit processing, multicore support, and numerous connectivity options."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5527%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The VxWorks RTOS from Wind River fits many embedded applications and features 32-bit or 64-bit processing, multicore support, and numerous connectivity options.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The RTOS supports various multicore configurations in Symmetrical Multi-Processing (SMP) and Asymmetrical Multi-Processing (AMP) modes or as a guest OS on top of Wind River Hypervisor. VxWorks also has a configurable and tunable small memory footprint, allowing the user to control how much of the OS to employ for each project.</p>
<p class="body-text">In addition to offering a multitude of commercial RTOS products, the embedded systems community maintains an open-source OS based on a real-time kernel that is free for use in commercial applications. The FreeRTOS&nbsp;Project is under continuous active development and is distributed under the GNU General Public License with an optional exception that allows users to keep their proprietary software confidential. Free source code and the lack of recurring royalties are popular features for small, low-budget embedded projects. FreeRTOS has been ported to multiple microcontroller platforms and has minimal ROM, RAM, and processing overhead, resulting in a typical kernel binary image in the 4 KB to 9 KB range. Although FreeRTOS source code for the kernel is contained in only three C&nbsp;code files, the zip file download includes numerous demonstration applications to help new users get started. </p>
<p class="body-text">The biggest complaint among potential open-source software users is the lack of a central resource to provide support similar to that offered by a commercial software vendor; however, the FreeRTOS website has an active free support forum where developers can find answers to their technical questions. In support of the open-source platform, Microchip Technology offers the FreeRTOS Microchip PIC32 Education Kit (see Figure 2). This $95 kit includes a development board that enables users to develop USB embedded host, device, and On-The-Go applications on the PIC32 microcontroller family.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=738,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5527%2Ffigures%2F2" title="The Microchip PIC32 Education Kit includes the hardware, software, and tutorials needed to get started using the open-source FreeRTOS platform."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5527%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> The Microchip PIC32 Education Kit includes the hardware, software, and tutorials needed to get started using the open-source FreeRTOS platform.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Real-time future</p>
<p class="body-text">Although programmers might get excited when considering the challenge of developing an in-house OS, the &#8220;roll&nbsp;your own&#8221; days might be fading away. Designers can look forward to real-time software as the norm in future embedded products. </p>
<p class="body-text">Customer demand for faster response times, complex functionality, and instant data access continues to increase the challenge of embedded design. Advancing technology also dictates that embedded products be capable of periodic software updates as requirements change, along with the possible transfer to the next-generation hardware platform. </p>
<p class="body-text">Developers should take the time to analyze their system requirements, development schedule, software support, expandability, communications, scalability, and future growth before embarking on an in-house software development project. An off-the-shelf commercial RTOS or even an open-source operating system could be in your future. </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Transaction-Level Models to ensure hardware and software are in sync</title>
		<link>http://embedded-computing.com/articles/use-models-ensure-hardware-software-in-sync/</link>
		<comments>http://embedded-computing.com/articles/use-models-ensure-hardware-software-in-sync/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 15:00:00 +0000</pubDate>
		<dc:creator>Michael McNamara, Cadence Design Systems</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[asic chip design]]></category>
		<category><![CDATA[asic design jobs]]></category>
		<category><![CDATA[asic design verification]]></category>
		<category><![CDATA[asic fpga design]]></category>
		<category><![CDATA[asic verification]]></category>
		<category><![CDATA[asic verification jobs]]></category>
		<category><![CDATA[Cadence Design Systems]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design engineering product]]></category>
		<category><![CDATA[design fpga]]></category>
		<category><![CDATA[design of embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[electronic software development]]></category>
		<category><![CDATA[electronics design services]]></category>
		<category><![CDATA[embedded design systems]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software developers]]></category>
		<category><![CDATA[embedded software development services]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded software services]]></category>
		<category><![CDATA[embedded software system]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system hardware design]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems engineering]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[engineering product design]]></category>
		<category><![CDATA[engineering product development]]></category>
		<category><![CDATA[engineering software design]]></category>
		<category><![CDATA[hardware and software development]]></category>
		<category><![CDATA[hardware design services]]></category>
		<category><![CDATA[hardware design software]]></category>
		<category><![CDATA[hardware design verification]]></category>
		<category><![CDATA[hardware software design]]></category>
		<category><![CDATA[high fidelity prototype]]></category>
		<category><![CDATA[lifecycle software development]]></category>
		<category><![CDATA[low fidelity prototype]]></category>
		<category><![CDATA[product development design]]></category>
		<category><![CDATA[product development engineering]]></category>
		<category><![CDATA[product engineering design]]></category>
		<category><![CDATA[prototyping software development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software and hardware development]]></category>
		<category><![CDATA[software design engineering]]></category>
		<category><![CDATA[software design methodology]]></category>
		<category><![CDATA[software development engineering]]></category>
		<category><![CDATA[software development prototype]]></category>
		<category><![CDATA[software development prototyping]]></category>
		<category><![CDATA[software embedded]]></category>
		<category><![CDATA[software embedded systems]]></category>
		<category><![CDATA[software engineering development]]></category>
		<category><![CDATA[software engineering services]]></category>
		<category><![CDATA[software product design]]></category>
		<category><![CDATA[step-wise refinement]]></category>
		<category><![CDATA[system software design]]></category>
		<category><![CDATA[tlm systemc]]></category>
		<category><![CDATA[transaction-level modeling]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=3096959a3a91784901b70382581aabaf</guid>
		<description><![CDATA[SystemC-based Transaction-Level Models (TLMs) ease communication and synchronization between software and hardware design teams.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5458%2Ffigures%2F2" />Companies today are seeking to own more of the vertical design chain by bringing chip design in-house. If not done properly, this will create more problems than it solves. The key is to use a common high-level model of the hardware for software development and debugging that can also be taken into an automated hardware implementation flow. By developing hardware models in SystemC-based Transaction-Level Modeling (TLM), software teams can debug against virtual prototypes long before a hardware prototype is available.</h3>
<p><span id="more-155"></span><span class='body'>
<p class="body-text">The consumer and wireless communications markets are more competitive than ever. The ongoing battle between aggregation and disaggregation of companies is in full swing. One example of aggregation is a decision to own more of the vertical design chain by bringing chip design in-house. This has helped companies like Apple differentiate by controlling more of the overall product design and thus not being limited by off-the-shelf chips that are available to everyone else.</p>
<p class="body-text">While Apple has demonstrated the potential reward of vertical differentiation, this approach does pose significant risk, whether a company has experience designing chips or not. Specifically, how does the software team develop software that works with the hardware as shipped? </p>
<p class="body-text">On the other side of the equation, complete disaggregation is enabled by software abstraction layers like Google&#8217;s Android operating system. It has somewhat democratized the design space, allowing all system companies to participate and differentiate using software. Android allows semiconductor vendors to participate equally by providing supporting hardware. Again, the way the software works with the hardware determines product success.</p>
<p class="body-text">Traditional solutions to this problem do not work in today&#8217;s market. Companies used to be able to start software development based on specifications and wait for chip prototypes to be available for testing. That works if the software is very simple, independent of hardware, and has a straightforward specification, but not with today&#8217;s consumer electronics that require everything be connected. </p>
<p class="body-text">Furthermore, waiting a long time to begin testing pushes the debug cycle out far too late in the schedule. Many companies addressed this in recent years by moving to standard off-the-shelf chips, but that approach limits the ability to differentiate. What if you want to add a power-saving sleep mode but there&#8217;s no way to shut down the chip?</p>
<p class="body-text">In an aggregated scenario, companies are looking to differentiate not only in software and industrial design, but also in electronic hardware. Embarking on a chip design project poses its own risks; couple that with embedded software development, and overall project risks go up exponentially. Most companies are careful enough to spend ample time up front architecting the system, testing it, partitioning it into software and hardware, and specifying the behavior of both. But once each team begins designing, certain implementation assumptions are made, bugs are introduced, and features can be added.</p>
<p class="body-text">The scenario is even worse in a disaggregated world, as the responsibility now spans across company borders. Companies from the systems and semiconductor world might decide to work together to optimize hardware/software interaction and create a chip optimized for system needs. Even if there are constant synchronization meetings, design changes will sneak in unbeknownst to the software team and might not be seen until the first time the software is run on the actual hardware. This cycles back to the problem of the hardware not being available soon enough. How do engineers solve this conundrum?</p>
<p class="heading-1">A golden model for prototyping</p>
<p class="body-text">Virtual prototypes (or virtual platforms) of hardware that come&nbsp;in the form of software models give the software team a model of system hardware earlier in the process. This enables developers to begin testing on a model of the hardware specification. However, it is only a model of the specification. Most hardware design today starts with engineers reading and interpreting the specification, then writing low-level Register-Transfer Language (RTL) models in a hardware design language such as Verilog to begin the verification and implementation process. Due to the factors mentioned previously, hardware behavior will likely diverge from the specification.</p>
<p class="body-text">The solution is to use a common &#8220;golden model&#8221; on which the software team can develop and with which the hardware team can begin their implementation. This is now possible with the availability of the Open SystemC Initiative (OSCI) Transaction-Level Modeling (TLM) 2.0 standard.</p>
<p class="body-text">In short, SystemC is a class library that enables hardware design using C/C++ by modeling hardware data types and concurrency. Because hardware can now be modeled in C, that same model can be run by the software team. The TLM extensions are important because they abstract away all the signal-level protocol details the hardware needs to ensure that it communicates properly with the system bus. An excess of these details makes the model too slow for running the software. TLM abstracts those details to higher-level models that can be mapped to detailed hardware during high-level synthesis.</p>
<p class="heading-1">Resolutions to high-level synthesis limitations</p>
<p class="body-text">High-level synthesis provides the automated link between the C model and the actual hardware that gets built. This removes the human factor of the hardware designers interpreting the specification and manually writing their own model to begin building the hardware. Until recently, this had rarely been used in practice because of some key limitations that have now been addressed:</p>
<ul>
<li class="bullets"><span class="bold">Quality of results:</span> The first two generations of high-level synthesis were never able to produce hardware that met the same performance, power consumption, and size that&nbsp;could be achieved by manually writing RTL. Modern high-level synthesis technology has resolved this issue. </li>
<li class="bullets"><span class="bold">Refinement methodology:</span> The high-level virtual prototype for software development is described with SystemC&nbsp;TLM, but it still requires that the hardware team refine it by adding in hardware architecture details so that high-level synthesis can produce optimal hardware microarchitectures. These details are too low-level for software testing and would slow down its speed, but they are important for building efficient hardware. This methodology now exists and has been proven by early adopter customers.</li>
<li class="bullets"><span class="bold">Verification:</span> Until very recently, engineers lacked a&nbsp;mature&nbsp;methodology to verify the correctness of the&nbsp;hardware architecture in SystemC TLM and the rest of the&nbsp;hardware implementation flow. This is mainly because&nbsp;an automated path into implementation did not exist, so most&nbsp;verification was done at lower levels. Thus verification became the bottleneck in the hardware development schedule. Now that the automated path exists, verification&nbsp;methodology has been developed. </li>
</ul>
<p class="body-text">Hardware design teams are familiar with these traditional barriers to designing and verifying hardware using SystemC&nbsp;TLM. Most, however, are not aware that these barriers have been addressed. Those who are aware now enjoy a significant competitive advantage. They can describe their hardware much more efficiently, verify it more rapidly, and reuse it in derivative chips more easily.</p>
<p class="heading-1">Virtual platform in practice</p>
<p class="body-text">A common model of the hardware is now available as part of a virtual platform much earlier so hardware/software interactions can be addressed sooner. This common model can be delivered as part of the bigger system in a virtual platform either within the company in an aggregated development scenario or across companies in a disaggregated world.</p>
<p class="body-text">One example of the way this works in practice is captured in Figure 1, which illustrates the flow provided by the Cadence System Development Suite, an integrated set of hardware/software development platforms.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5458%2Ffigures%2F1" title="A hardware model is refined from concept to product within the Cadence System Development Suite."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5458%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A hardware model is refined from concept to product within the Cadence System Development Suite.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The system concept is first described as a SystemC TLM virtual prototype. In the Cadence flow, this virtual prototype is used by the Virtual System Platform to run the software on this hardware model. In parallel, the hardware design team will refine the TLM to add hardware architecture details for C-to-Silicon Compiler high-level synthesis, which is the beginning of the implementation process that will lead to silicon.</p>
<p class="body-text">If bugs are uncovered during testing, the Virtual System Platform is integrated with the Incisive Verification Platform so that debug can happen on both software and hardware. This means that issues can be addressed at their source without cumbersome firmware patches. As the hardware implementation process progresses, more detailed RTL models become available to create hardware emulation models in the Verification Computing Platform or an FPGA prototype in the Rapid Prototyping Platform.</p>
<p class="body-text">This entire process is a successive set of refinements that begins with a fast TLM model, adding more hardware detail as it becomes available while maintaining runtimes that are fast enough for software development. This ultimately enables the software and hardware teams &#8211; even across company borders&nbsp;&#8211; to have a common model that enables earlier communication and constant synchronization. This is the type of collaboration needed to keep pace with the innovation and delivery schedules required in today&#8217;s consumer market. It is only achievable if the hardware team evolves its design and verification methodology to encompass SystemC TLM. </p>
<p class="author-bio">Michael (Mac)&nbsp;McNamara is VP and general manager of system-level design at Cadence Design Systems. In the early 1990s, he helped start Chronologic, which brought compiled Verilog simulation to the world; thereafter, he cofounded SureFire Verification (which became part of Verisity) to improve the state of verification software. After Cadence acquired Verisity, Mac led the effort to improve high-level design, and currently manages Cadence&#8217;s C-to-Silicon Compiler and Virtual System Platform product lines.</p>
<p class="contact-info">Cadence Design Systems 408-348-7025 &#8226; <span class="hyperlink"><a href="mailto:mcnamara@cadence.com">mcnamara@cadence.com</a></span>  Linkedin: <span class="hyperlink"><a href="http://www.linkedin.com/company/cadence-design-systems">www.linkedin.com/company/cadence-design-systems</a></span> Facebook: <span class="hyperlink"><a href="http://www.facebook.com/pages/Cadence-Design-Systems-Inc/66598923031">www.facebook.com/pages/Cadence-Design-Systems-Inc/66598923031</a></span> Twitter: <span class="hyperlink"><a href="http://twitter.com/#!/Cadence">@Cadence</a></span> <span class="hyperlink"><a href="http://www.cadence.com">www.cadence.com</a></span> </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedded goes virtual</title>
		<link>http://embedded-computing.com/articles/embedded-goes-virtual/</link>
		<comments>http://embedded-computing.com/articles/embedded-goes-virtual/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 15:00:00 +0000</pubDate>
		<dc:creator>Warren Webb, Editorial Director</dc:creator>
				<category><![CDATA[about embedded systems]]></category>
		<category><![CDATA[application of embedded system]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[computer operating systems comparison]]></category>
		<category><![CDATA[computer runs slow]]></category>
		<category><![CDATA[computer speed increase]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[embedded application development]]></category>
		<category><![CDATA[embedded computer system]]></category>
		<category><![CDATA[embedded computer systems]]></category>
		<category><![CDATA[embedded design systems]]></category>
		<category><![CDATA[embedded development]]></category>
		<category><![CDATA[embedded devices]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded linux]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software architecture]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded system architecture]]></category>
		<category><![CDATA[embedded system design services]]></category>
		<category><![CDATA[embedded system designs]]></category>
		<category><![CDATA[embedded system development]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded system linux]]></category>
		<category><![CDATA[embedded system software]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[embedded systems application]]></category>
		<category><![CDATA[embedded systems architecture]]></category>
		<category><![CDATA[embedded systems development]]></category>
		<category><![CDATA[embedded systems software]]></category>
		<category><![CDATA[embedded x86 board]]></category>
		<category><![CDATA[how to speed up computer]]></category>
		<category><![CDATA[improve computer speed]]></category>
		<category><![CDATA[increase computer speed]]></category>
		<category><![CDATA[lenix operating system]]></category>
		<category><![CDATA[linux embedded]]></category>
		<category><![CDATA[linux embedded system]]></category>
		<category><![CDATA[linux virtual machines]]></category>
		<category><![CDATA[my pc is running slow]]></category>
		<category><![CDATA[OpenSystems Media]]></category>
		<category><![CDATA[operating system embedded]]></category>
		<category><![CDATA[operating system rtos]]></category>
		<category><![CDATA[optimize computer performance]]></category>
		<category><![CDATA[optimizing computer performance]]></category>
		<category><![CDATA[optimizing pc performance]]></category>
		<category><![CDATA[pc 104 motherboard]]></category>
		<category><![CDATA[pc running slow]]></category>
		<category><![CDATA[pc104 vga]]></category>
		<category><![CDATA[rtos embedded systems]]></category>
		<category><![CDATA[rtos operating system]]></category>
		<category><![CDATA[slow computer fix]]></category>
		<category><![CDATA[slow computer performance]]></category>
		<category><![CDATA[slow computer speed]]></category>
		<category><![CDATA[slow pc fix]]></category>
		<category><![CDATA[slow pc performance]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[speed my computer]]></category>
		<category><![CDATA[speed up computer]]></category>
		<category><![CDATA[speed up my computer]]></category>
		<category><![CDATA[speed up my computer for free]]></category>
		<category><![CDATA[virtual machine host]]></category>
		<category><![CDATA[virtualbox guest additions]]></category>
		<category><![CDATA[virtualization software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=629d61b896e902b60fb5fa8be2604cdd</guid>
		<description><![CDATA[Virtualization software facilitates the simplified design, easy upgradability, and increased optimization of embedded systems.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F4" />In embedded applications, virtualization software can be used to combine a real-time deterministic operating system with a high-level interactive operating system like Windows or Linux. Using virtualization platforms and tools such as those mentioned in the following discussion simplifies system upgrades and optimizes performance by independently allocating system resources to each operating environment.</h3>
<p><span id="more-16373"></span><span class='body'>
<p class="body-text">As embedded technology and market expectations evolve, design engineers are constantly pressured to pack expanded functionality into smaller, reduced-power devices. In addition to the added complexity of the application software for these new projects, customers demand an interactive interface, ubiquitous connectivity, absolute security, and extreme reliability. </p>
<p class="body-text">Embedded designers also face the challenge of combining slower legacy interface circuitry with the latest high-speed control devices and multiple displays. The resulting system often includes the original hardware with its Operating System (OS) and application software, plus a completely separate controller with software to handle the newer requirements. This approach increases component count and power requirements and does nothing to increase legacy application performance. </p>
<p class="body-text">To deal with this increased complexity, designers are utilizing virtual processors hosting multiple OSs to ensure unimpeded, deterministic response to real-time events while simultaneously providing users and operators with a high-level, graphics-based interface. Virtualization is achieved by adding a Virtual Machine Monitor (VMM) software layer or hypervisor that isolates individual partitions and executes guest operating software. The hypervisor creates one or more simulated computer environments or virtual machines that can simultaneously host independent OSs and applications on a single processor. </p>
<p class="body-text">To speed up virtual component interaction, silicon manufacturers are incorporating hardware-assisted virtualization in processor architectures tailored for extended life-cycle embedded applications. For example, the second-generation Intel Core and Intel Atom E6xx processors support Intel Virtualization Technology (Intel VT). This technology improves software-based virtualization performance and security by using hardware assist to trap and execute certain VMM instructions. Intel VT allows the VMM to allocate&nbsp;memory and I/O devices to specific partitions, thus decreasing the processor load and reducing virtual machine switching times.</p>
<p class="heading-1">Virtual isolation</p>
<p class="body-text">Virtual platforms that combine real-time or safety-critical embedded functions with a large graphics-based OS must contain security provisions that allow unaffected partitions to continue operation in the event of a software failure or cyber attack. For example, LynuxWorks updated the LynxSecure separation kernel and hypervisor for various virtual machine configurations, as shown in Figure 1. This virtualization software is designed to operate in secure defense environments where data and applications with different security levels must co-reside on a single device without corruption. LynxSecure uses a hypervisor to create a virtualization layer that maps physical system resources to each guest OS, which is assigned dedicated resources such as memory, CPU time, and I/O peripherals. Another key feature is the ability to run fully virtualized 64-bit guest OSs such as Windows 7, Linux, and Solaris across multiple cores.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F1" title="The LynxSecure embedded hypervisor allows multiple dissimilar OSs to share a single physical hardware platform."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The LynxSecure embedded hypervisor allows multiple dissimilar OSs to share a single physical hardware platform.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">TenAsys Corporation offers eVM for Windows, another embedded virtualization platform that hosts an embedded OS or Real-Time OS (RTOS) alongside Windows on the same processor platform. To ensure that critical hardware interfaces are not virtualized, eVM partitions the platform, thus guaranteeing maximum performance and deterministic response to real-time events. Installed as a standard Windows application, eVM includes all of the integration tools needed to set up, start, and stop multiple RTOS guest configurations. The Windows-based control panel also allows users to assign interrupts, allocate I/O devices, and set up disk boot images. After the system is set up, eVM provides the guest RTOS with the lowest possible interrupt latency, direct access to I/O, and non-paged RAM.</p>
<p class="heading-1">Multicore virtualization </p>
<p class="body-text">Although virtualization allows designers to combine OSs and applications to reduce system power requirements and form factors, it does little to increase the performance of individual software components. One of the latest trends among designers is to incorporate multicore processors along with virtualization to boost performance through parallel processing. </p>
<p class="body-text">With virtualization, the hypervisor isolates and allocates system resources between operating environments so that real-time, general-purpose, and legacy software can be readily integrated in a multicore system. In addition to memory and hardware device allocation, virtualization allows developers to assign multiple cores to compute-intensive applications as needed to maximize overall system performance. </p>
<p class="body-text">Extending virtualization to multicore applications, the Wind River Hypervisor allows designers to configure and partition hardware devices, memory, and cores into virtual boards, each with its own OS, while maintaining the necessary separation (see Figure 2). These virtual boards can be run on a single processor core or distributed across multiple cores based on system needs. The Wind River Hypervisor has been applied in safety-critical applications where the system&#8217;s safety-certified and noncertified components traditionally had to be physically separated. However, embedded virtualization allows system designers to isolate the safety-certified components while still operating on a single hardware platform utilizing a certified hypervisor. Virtualization also improves the potential uptime of embedded applications by enabling individual partitions to be rebooted or even reprogrammed while other services on the same device are not affected.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F2" title="The Wind River Hypervisor provides a virtualization layer that partitions a single or multicore chip into multiple partitions with varying levels of protection and capabilities."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> The Wind River Hypervisor provides a virtualization layer that partitions a single or multicore chip into multiple partitions with varying levels of protection and capabilities.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Real-Time Systems also provides virtualization support for multicore processors. Leveraging Intel VT for security, the RTS Real-Time Hypervisor allows completely independent execution of more than one OS on a single multicore platform. Designers can assign individual processor cores, memory, and devices to each OS. Through a configuration file, the boot sequence can be specified, and when desired, an operating system can be rebooted independently of the others. To facilitate communication between OSs, the hypervisor also provides configurable user-shared memory, as well as a TCP/IP-based virtual network driver. The system can run multiple instances of RTOSs mixed with high-level operating software such as Windows XP/CE/7/Embedded, QNX, Linux, On Time RTOS-32, VxWorks, Microware OS-9, and Android.</p>
<p class="heading-1">Development and debug </p>
<p class="body-text">No matter if virtual applications run on a single processor or across multiple cores, software development and debug tools must be configured to support more than one OS and memory partition. For example, Green Hills Software updated its INTEGRITY RTOS and MULTI Integrated Development Environment (IDE) to support the latest virtualization microarchitecture. INTEGRITY RTOS is built around a partitioning architecture to provide embedded systems with enhanced reliability, security, and real-time performance. Secure partitions guarantee each task the resources it needs to protect the OS and user tasks from errant and malicious code. INTEGRITY architecture provides Asymmetrical Multi-Processing (AMP) and Symmetrical Multi-Processing (SMP) support optimized for embedded and real-time multicore processors.</p>
<p class="body-text">MULTI IDE software tools include several C compiler options, a debugger, editor, configuration manager, code browser, and debugger in a single package. MULTI also features DoubleCheck, an integrated static analyzer that isolates bugs caused by complex interactions between code segments that might not be in the same source file. In addition, Green Hills Probe provides a multicore debug control for board bring-up, device driver development, and system-level debugging.</p>
<p class="body-text">The next step is to incorporate multicore support by updating and streamlining the software development tool set while minimizing modifications to current code creation practices. Various software vendors provide advanced development tools and board support packages for products based on second-generation Intel Core devices. For example, the Prism software analysis tool from CriticalBlue (Figure 3) allows developers to analyze existing software applications, evaluate benefits of the new architecture, and select the appropriate processor.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=762,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F3" title="The Prism analysis package allows developers to emulate the numbers of cores, threads, and dependencies in the system to streamline the transition from sequential to parallel programming."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5457%2Ffigures%2F3" alt="23" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 3:</b> The Prism analysis package allows developers to emulate the numbers of cores, threads, and dependencies in the system to streamline the transition from sequential to parallel programming.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Prism analyzes the behavior of existing code running on simulators or hardware development boards to assess opportunities that introduce or add further parallel code structures. For example, developers can select the appropriate member of the second-generation Intel Core processor family and analyze the impact of Intel Hyper-Threading Technology, data cache misses, and instruction throughput. Prism gives developers an estimate of the performance gain achievable by partitioning the program into multiple threads.</p>
<p class="heading-1">Design simplified, performance&nbsp;optimized</p>
<p class="body-text">Virtualization is a proven way to simplify embedded designs with fewer components while integrating the framework needed to easily combine disparate operating software or future updates. Virtualization also simplifies system upgrades by isolating the hardware and software layers so that designers can easily add or modify peripherals, memory, and cores without restructuring the software architecture. A virtual machine hypervisor enables designers to optimize performance by tweaking resource mapping even after deployment. </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maximizing the benefits of Model-Based Design through early verification</title>
		<link>http://embedded-computing.com/articles/maximizing-benefits-model-based-design-early-verification/</link>
		<comments>http://embedded-computing.com/articles/maximizing-benefits-model-based-design-early-verification/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 15:00:00 +0000</pubDate>
		<dc:creator>Guido Sandmann, MathWorks</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[automated functional testing]]></category>
		<category><![CDATA[automated regression testing]]></category>
		<category><![CDATA[automated testing software]]></category>
		<category><![CDATA[automated testing tools]]></category>
		<category><![CDATA[automation software testing]]></category>
		<category><![CDATA[automation testing software]]></category>
		<category><![CDATA[automation testing tools]]></category>
		<category><![CDATA[configuration management in software engineering]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embedded software design]]></category>
		<category><![CDATA[embedded software development process]]></category>
		<category><![CDATA[embedded software engineering]]></category>
		<category><![CDATA[embedded software engineers]]></category>
		<category><![CDATA[embedded software system]]></category>
		<category><![CDATA[embedded software test]]></category>
		<category><![CDATA[embedded software testing]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system software]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems engineering]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[functional software testing]]></category>
		<category><![CDATA[functional testing tools]]></category>
		<category><![CDATA[load testing software]]></category>
		<category><![CDATA[MathWorks]]></category>
		<category><![CDATA[Model-Based Design (MBD)]]></category>
		<category><![CDATA[qa testing software]]></category>
		<category><![CDATA[regression testing tools]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software automation testing]]></category>
		<category><![CDATA[software configuration management software]]></category>
		<category><![CDATA[software consulting]]></category>
		<category><![CDATA[software developer testing]]></category>
		<category><![CDATA[software development engineering]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software development system]]></category>
		<category><![CDATA[software engineering software testing]]></category>
		<category><![CDATA[software engineering testing tools]]></category>
		<category><![CDATA[software engineers]]></category>
		<category><![CDATA[software functionality testing]]></category>
		<category><![CDATA[software qa testing]]></category>
		<category><![CDATA[software test automation]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[software testing automated]]></category>
		<category><![CDATA[software testing automation]]></category>
		<category><![CDATA[software testing development]]></category>
		<category><![CDATA[software testing in software engineering]]></category>
		<category><![CDATA[software testing lifecycle]]></category>
		<category><![CDATA[software testing requirements]]></category>
		<category><![CDATA[software testing service]]></category>
		<category><![CDATA[software testing services]]></category>
		<category><![CDATA[software testing software]]></category>
		<category><![CDATA[software verification validation]]></category>
		<category><![CDATA[test software development]]></category>
		<category><![CDATA[testing of software]]></category>
		<category><![CDATA[testing software development]]></category>
		<category><![CDATA[testing software development life cycle]]></category>
		<category><![CDATA[testing software tools]]></category>
		<category><![CDATA[testing tools software]]></category>
		<category><![CDATA[the software development life cycle]]></category>
		<category><![CDATA[verification validation software testing]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=46caa859da18ead6bf7710d8700d5c4b</guid>
		<description><![CDATA[Implementing these four best practices in Model-Based Design leads to early verification and decreased testing at the end of the development cycle.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5428%2Ffigures%2F3" />Engineers are turning to verification and validation methods that allow them to find errors in their design and the code as early as possible. Applying these methods gives engineers confidence that their processes are robust in typical production projects where exhaustive testing is neither practical nor possible due to application complexity. Engineers can achieve early verification by maximizing the benefits of Model-Based Design.</h3>
<p><span id="more-553"></span><span class='body'>
<p class=Bodytext>Model-Based Design (MBD) performs verification and validation through testing in simulation. Although many organizations use some form of modeling, too many apply simulation in an <span class=italics>ad hoc</span> manner that does not take advantage of the potential verification benefits (see Figure 1). </p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=621,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5428%2Ffigures%2F1" title="Costs of fault propagation throughout the phases of development illustrate how some organizations do not take advantage of the verification benefits of simulation."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5428%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Costs of fault propagation throughout the phases of development illustrate how some organizations do not take advantage of the verification benefits of simulation.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>To maximize the benefits of MBD, successful organizations have implemented four key practices that help accomplish early verification:</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Create and simulate a high-level system model during the specification stage.</span> In MBD, the system model serves as an executable specification. Early simulations of this model highlight incomplete and inconsistent requirements and specifications.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Test from day one with multidomain simulations.</span> By developing multidomain models and performing closed-loop simulations, engineers can start testing while the product idea is taking shape. These simulations enable engineers to investigate all aspects of the system, including algorithms, components, the plant model, and the environment.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Create virtual test suites that stress the system.</span> Simulations enable engineers to conduct a range of tests that would be difficult or impossible to perform on the embedded system itself. Like all tests, these should be run as early as possible.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Use the model and test suites as a reference design throughout the development process.</span> Well-constructed models can be used throughout development and then reused for future enhancements and derivative designs.[1]</p>
<p class=bodytext>These practices should be employed in parallel as four dimensions to successful usage of MBD for early verification.</p>
<h1>Create and simulate a high-level system model</h1>
<p class=bodytext>To serve as an executable specification, a high-level system model must mirror the system&#8217;s abstract behavior. The model might not include the full interface definition, but it must specify the system&#8217;s dynamic behavior. Simulating system behavior in the requirements specification stage helps ensure that the team has a complete and shared understanding of what the system is required to do.</p>
<p class=bodytext>With MBD, engineers start by assembling the architecture using either subsystems or discrete states. The dynamics within these subsystems should initially be modeled using the easiest possible approach. In parallel with this activity, other engineers can create scenarios or formalized requirements in preparation for testing the dynamics as early as possible.</p>
<p class=bodytext>When the first tests are run, the engineers who modeled the functional behavior will learn more about the system and the real meaning of the requirements. Likewise, the engineers who created the test scenarios or formalized requirements will learn whether the requirements are consistent and complete. Each group should communicate their findings to the other to make sure there are no misunderstandings.</p>
<h1>Test from day one with multidomain simulations</h1>
<p class=bodytext>System behavior is defined not only by the embedded control software, but also by the electronic and mechanical components, including the connected sensors and actuators. Early simulations in which the architecture is executed provide more insight when they are performed in a closed loop with plant or environment models. </p>
<p class=bodytext>Closed-loop simulations with plant models offer several advantages over open-loop simulations or testing on actual plant hardware. One advantage is that models are easier to change than metal, wires, and C code. Closed-loop simulations with plant and environment models reduce costs in multiple phases of development. A model is easier to reconfigure and replicate than a mechanical and electrical device built from steel, wires, circuits, and other hardware. Engineers can rapidly switch between versions of the physical model without incurring manufacturing costs. By simply changing parameters such as the length of a rod or the maximum torque of an electric drive, teams can evaluate trade-offs and optimize the complete system for cost, speed, power, and other requirements.</p>
<p class=bodytext>System-level optimization requires multidomain simulations. It is impossible to optimize today&#8217;s sophisticated systems by tuning one parameter at a time. To deliver maximum energy efficiency and highest performance at minimal material cost, engineers must optimize the system as a whole, and not just the embedded software.</p>
<p class=bodytext>Plant models provide another perspective on the system. Modeling the nonsoftware parts of the system gives engineers another view into system behavior. Engineers can often learn more about system dynamics through simulation than from the real system because simulation provides details on force, torque, current, and other values that are difficult or impossible to measure on the actual hardware.</p>
<p class=bodytext>Creating plant models requires engineering effort, but this effort is often overestimated, while the value provided by plant modeling is underestimated. When developing plant models, it is a best practice to start at a high level of abstraction and add details as needed. Choosing a level of abstraction that is just detailed enough to produce the needed results saves modeling effort as well as simulation time (see Figure 2).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5428%2Ffigures%2F2" title="Early verification as part of Model-Based Design streamlines embedded control design with modeling, simulation, and automatic code generation."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5428%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Early verification as part of Model-Based Design streamlines embedded control design with modeling, simulation, and automatic code generation.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<h1>Create virtual test suites that stress the system</h1>
<p class=bodytext>Efficient testing requires a separation of concerns. Organizations should test different aspects of the software implementation at different stages of development. Testing communications and hardware effects before the algorithms have been tested makes it difficult to isolate and identify the source of defects in the design. </p>
<p class=bodytext>Applying tests where and when they are most appropriate enables teams to evaluate the design at the right level for each phase of development. At each phase, test results should be fed back to development immediately to enable continued refinement of the design.</p>
<p class=bodytext>Functional testing involves simulating the controller model with the multidomain environment model. Test vectors used in functional testing are based on either formalized requirements[1] or scenarios such as recorded driving maneuvers. These test vectors can be reused for regression testing and full model coverage testing.</p>
<p class=bodytext>Rapid Control Prototyping (RCP) adds real-time verification and the user experience to the test regimen. RCP helps engineers quickly deploy algorithms and test them in the vehicle to determine whether the functionality feels right. Enabled by on-target rapid prototyping and functional rapid prototyping platforms, RCP can be a rich source of design ideas, but it should not serve as the primary method of verifying functionality.</p>
<p class=bodytext>Robustness testing aims to evaluate system robustness amid changes in software parameters, manufacturing process variances, mechanical and electrical hardware degeneration over the system&#8217;s lifetime, and similar effects. It is a best practice to run parameter sweeps on the virtual system, including the controller and environment. With a more thorough understanding of how the system performs at boundary conditions, engineers can choose to narrow the specification for their hardware vendors or conclude that a less expensive part with slightly higher variances meets their design needs.[2]</p>
<p class=bodytext>Hardware-In-the-Loop (HIL) testing enables engineers to test the real controller or controller networks in the lab rather than in a real-world environment. HIL testing can be used to test robustness (for example, by inserting failures) or diagnose intercontroller communication in large controller networks. It covers hardware and communication effects that cannot be modeled easily.</p>
<p class=bodytext>Like RCP, HIL testing is necessary for system verification, but it should not be used as the principal means of functional testing. This is because HIL testing is conducted at a very low abstraction level &#8211; close to the real system &#8211; and therefore combines many different effects that prevent efficient functional testing.[3]</p>
<p class=bodytext>HIL testing requires an investment in hardware that ranges from standard PCs with specialized data cards to high-end hardware racks. Fewer tests can be executed on such a system than in pure software because software testing can be more easily replicated on multiple computers. This is another reason to ensure that functionality is verified before HIL testing. If engineers find algorithmic defects during HIL testing, then the upstream verification process is probably inadequate.</p>
<h1>Use the model and test suites as a reference design</h1>
<p class=bodytext>In MBD, all key development tasks are performed at the model level. This means that any modification made to the generated code must also be made in the model. Using the model and test suites as a single source of truth throughout development promotes clear communication and efficient reuse of models and tests, not only for the current project, but also for future enhancements and derivative designs.</p>
<h2>Put all artifacts under configuration management</h2>
<p class=bodytext>Software engineers recognize the value of versioning code in a Configuration Management System (CMS). The key artifacts in MBD &#8211;&nbsp;models, tests, and simulation results &#8211; should also be maintained in a CMS. Managing artifacts in a CMS makes it easy for teams to rerun virtual tests and compare the current test harness with a former model state or former test vectors.</p>
<p class=bodytext>Versioning models works best when the model structure is modular rather than monolithic. A modular model structure can also accelerate development by allowing multiple engineers to work on different parts of the same system in parallel and by enabling parallelized code generation.</p>
<h2>Perform regression tests</h2>
<p class=bodytext>Software engineers use nightly builds to compile and test the most up-to-date version of the source code. This approach should be applied to modeling and simulation as well. Once an engineer defines a new test to verify a specific model behavior, that test should be integrated into the nightly build to ensure that the specific behavior still works in all subsequent modeling iterations. If the test fails at some point, then either a defect has been identified or the functionality has fundamentally changed and the test is no longer applicable.</p>
<h1>Verify early and often</h1>
<p class=bodytext>The best practices outlined in this article allow engineers to achieve early verification, lessening the time spent at the end of the development cycle testing and debugging their designs. Key to this process is MBD, which enables the use of verification as a parallel activity that occurs throughout the development process. Performing test and verification along every step of the development process means finding errors at their point of introduction. The design can be reiterated, fixed, and verified faster than in the traditional process.</p>
<p class=referenceheading><span lang=DE style='mso-ansi-language:DE'>References:<o:p></o:p></span></p>
<p class=referenceslist style='mso-list:none;tab-stops:12.0pt'><span lang=DE style='mso-ansi-language:DE'>[1] Holzapfel, Florian, et al. <i style='mso-bidi-font-style:normal'>Autopilotenentwicklung als Benchmark f&#252;r einen durchg&#228;ngigen System- und Softwareentwicklungsprozess</i>. Garching: DGLR, 2009. Workshop: Br&#252;cke zwischen Systemdesign und Softwareentwicklung in der Luft- und Raumfahrt.<o:p></o:p></span></p>
<p class=referenceslist style='mso-list:none;tab-stops:12.0pt'>[2] Friedman, Jonathan, Prabhu, Sameer M., and Smith, Paul F. <i style='mso-bidi-font-style: normal'>Best Practices for Establishing a Model-Based Design Culture</i>. 2007. SAE World Congress.</p>
<p class=referenceslist style='mso-list:none;tab-stops:12.0pt'><span lang=DE style='mso-ansi-language:DE'>[3] Schlosser, Joachim. <i style='mso-bidi-font-style: normal'>Architektursimulation von verteilten Steuerger&#228;tesystemen</i>. </span>Berlin: Logos Verlag, 2006.</p>
<p class=authorbio><span class=bold>Guido Sandmann</span> is the automotive marketing manager, EMEA, at MathWorks. He has more than 10 years of experience applying MathWorks products in various application areas. Guido has a degree in Computer Science from the University of Oldenburg.</p>
<p class=authorbio><span class=bold>Joachim Schlosser</span> is senior team leader in the Application Engineering Group at MathWorks. He has experience as a process and methodology consultant as well as an application engineer for a MOST simulation/emulation tool. Joachim has a degree in Computer Science from the Augsburg University of Applied Sciences and a PhD in Computer Science from Technical University Munich.</p>
<p class=authorbio><span class=bold>Brett Murphy</span> is technical marketing manager at MathWorks. He has extensive controls analysis, real-time software development, and systems engineering experience in the aerospace and embedded systems industries. Brett holds BS and MS degrees in Aerospace Engineering from Stanford University.</p>
<p class=contactinfo><span class=bold>MathWorks<i style='mso-bidi-font-style: normal'><br /> </i></span>Linkedin: <a href="http://www.linkedin.com/company/the-mathworks_2">www.linkedin.com/company/the-mathworks_2</a><span class=MsoHyperlink><br /> </span>Facebook: <a href="http://www.facebook.com/MathWorks">www.facebook.com/MathWorks</a><span class=MsoHyperlink> </span><br /> Twitter: <a href="http://twitter.com/#!/MathWorks">@MathWorks</a><br /> <a href="http://www.mathworks.com">www.mathworks.com</a><span class=MsoHyperlink> <b style='mso-bidi-font-weight:normal'><i style='mso-bidi-font-style: normal'><o:p></o:p></i></b></span></p>
</p></div>
<div style='mso-element:comment-list'><![if !supportAnnotations]><br />
<hr class=msocomoff align=left size=1 width="33%">  <![endif]></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating error-detection techniques to find more bugs in embedded C software</title>
		<link>http://embedded-computing.com/articles/integrating-error-detection-techniques-find-bugs-embedded-software/</link>
		<comments>http://embedded-computing.com/articles/integrating-error-detection-techniques-find-bugs-embedded-software/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 15:00:00 +0000</pubDate>
		<dc:creator>Marek Kucharski, Parasoft</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[automate software testing]]></category>
		<category><![CDATA[automated functional testing]]></category>
		<category><![CDATA[automated regression testing]]></category>
		<category><![CDATA[automated software test tools]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[automated testing tools]]></category>
		<category><![CDATA[automated unit testing]]></category>
		<category><![CDATA[automation testing]]></category>
		<category><![CDATA[automation testing tools]]></category>
		<category><![CDATA[code coverage analysis]]></category>
		<category><![CDATA[code static analysis]]></category>
		<category><![CDATA[embedded design systems]]></category>
		<category><![CDATA[embedded software architecture design]]></category>
		<category><![CDATA[embedded software projects]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system software design]]></category>
		<category><![CDATA[embedded system software development]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[embedded systems testing]]></category>
		<category><![CDATA[functional testing tools]]></category>
		<category><![CDATA[parasoft]]></category>
		<category><![CDATA[regression testing tools]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software automated test tools]]></category>
		<category><![CDATA[software automation testing]]></category>
		<category><![CDATA[software design verification]]></category>
		<category><![CDATA[software development quality assurance]]></category>
		<category><![CDATA[software development system]]></category>
		<category><![CDATA[software development test]]></category>
		<category><![CDATA[software development tools for]]></category>
		<category><![CDATA[software functional testing]]></category>
		<category><![CDATA[software qa testing]]></category>
		<category><![CDATA[software quality assurance and testing]]></category>
		<category><![CDATA[software quality assurance testing]]></category>
		<category><![CDATA[software system development]]></category>
		<category><![CDATA[software systems testing]]></category>
		<category><![CDATA[software test automation]]></category>
		<category><![CDATA[software test methods]]></category>
		<category><![CDATA[software test tool]]></category>
		<category><![CDATA[software test tools]]></category>
		<category><![CDATA[software tester]]></category>
		<category><![CDATA[software testing]]></category>
		<category><![CDATA[software testing automated]]></category>
		<category><![CDATA[software testing automation]]></category>
		<category><![CDATA[software testing development]]></category>
		<category><![CDATA[software testing lifecycle]]></category>
		<category><![CDATA[software testing quality]]></category>
		<category><![CDATA[software testing service]]></category>
		<category><![CDATA[software testing services]]></category>
		<category><![CDATA[software testing software]]></category>
		<category><![CDATA[software testing system]]></category>
		<category><![CDATA[software testing systems]]></category>
		<category><![CDATA[software testing unit]]></category>
		<category><![CDATA[software unit testing]]></category>
		<category><![CDATA[software verification]]></category>
		<category><![CDATA[static analysis tools]]></category>
		<category><![CDATA[static code analysis tool]]></category>
		<category><![CDATA[system software testing]]></category>
		<category><![CDATA[system testing in software testing]]></category>
		<category><![CDATA[system testing software]]></category>
		<category><![CDATA[testing tools]]></category>
		<category><![CDATA[what is system testing in software testing]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=77c2158f57f21c6579b8a12442c1bc7d</guid>
		<description><![CDATA[Integrating several automated verification techniques as a best practice in embedded C software testing.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="8" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F8" />Although software verification techniques can help developers find specific types of defects in embedded C software, they can overlook some errors. To rest assured that defects aren&#8217;t slipping through the cracks, developers should apply these complementary techniques in concert.</h3>
<p><span id="more-164"></span><span class='body'>
<p class=Bodytext>Automated techniques such as pattern-based static code analysis, runtime memory monitoring, unit testing, and flow analysis can be used together to find bugs in an embedded C application. The following discussion will demonstrate these techniques using Parasoft C/C++test, an integrated solution for automating a broad range of best practices to improve C and C++ software development team productivity and software quality.</p>
<h1>Sample sensor application</h1>
<p class=bodytext>The recommended bug-finding strategies can be explored in the context of a simple sensor application running on an ARM<span style="mso-spacerun: yes">&nbsp; </span>Cortex-M3 board. An application is created and uploaded to the board, but when it&#8217;s run, it doesn&#8217;t render the expected output on the LCD screen.</p>
<p class=bodytext>It&#8217;s not working, and the reason why is unclear. Debugging on the target board would be time-consuming and tedious, as debugger results would need to be analyzed manually to try to determine the real problems. Alternatively, certain tools or techniques could be applied to pinpoint errors automatically.</p>
<p class=bodytext>At this point, the two options are to debug the application with the debugger or apply an automated testing strategy to peel errors out of the code. If the application still does not work after applying the automated techniques, the debugger can be used as a last resort.</p>
<h1>Pattern-based static code analysis</h1>
<p class=bodytext>Instead of debugging, pattern-based static analysis &#8211; which is fast, easy to use, and can be applied at almost every code<span style="mso-spacerun: yes">&nbsp; </span>change &#8211;&nbsp;is applied. One problem is identified by performing static analysis (see Figure 1).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F1" title="Static code analysis identifies a MISRA coding standard violation."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Static code analysis identifies a MISRA coding standard violation.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>This is a violation of a MISRA rule that says using assignment operators inside Boolean expressions can be risky. The intention was not to use an assignment operator, but rather a comparison operator. So this problem is fixed and the program is rerun.</p>
<p class=bodytext>There is improvement as some output is displayed on the LCD. However, the application crashes with an access violation. Once again, there is a choice to make: Use the debugger or continue applying automated error detection techniques. Given that automated error detection is very effective at finding memory corruptions such as this, performing runtime memory monitoring is the best option.</p>
<h1>Runtime memory monitoring of the complete application</h1>
<p class=bodytext>Runtime memory monitoring can be performed by applying lightweight instrumentation suitable for running on the target board. After uploading and running the instrumented application and downloading results, an error is reported (see Figure 2).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F2" title="Runtime memory monitoring reports reading an array out of range."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Runtime memory monitoring reports reading an array out of range.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>This indicates reading an array out of range at line 48. Obviously, the <span class=codecharacter>msgIndex</span> variable must have had a value that was outside the bounds of the array. Going up the stack trace reveals that this print message with an out-of-range value was caused by putting an improper condition for it before calling function <span class=codecharacter>printMessage()</span>. This can be fixed by relaxing the value range control inside the <span class=codecharacter>if</span> statement and taking away the unnecessary condition<span class=codecharacter>(value &lt;= 20)</span>.</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void handleSensorValue</b>(<b style='mso-bidi-font-weight:normal'>int</b> value)</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>initialize();</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>int</b> index = -1;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>if</b> (value &gt;= 0 &amp;&amp; value &lt;= 10) { </p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span>index = VALUE_LOW;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>} <b style='mso-bidi-font-weight:normal'>else if</b> ((value &gt; 10) <s>&amp;&amp; (value &lt;= 20)</s>) { </p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span>index = VALUE_HIGH;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>}</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>printMessage(index, value);</p>
<p class=codeparagraph>}</p>
<p class=bodytext>Now, when rerunning the application, no memory errors are reported. After the application is uploaded to the board, it seems to work as expected. However, some concerns remain.</p>
<p class=bodytext>One instance of a memory overwrite was found in the code paths that were exercised, but does that mean there are no memory overwrites in the code that wasn&#8217;t exercised? Coverage analysis shows that some code has not been exercised at all. The <span class=codecharacter>reportSensorFailure()</span><span style="mso-spacerun: yes">&nbsp; </span>function is not covered, and one branch inside the <span class=codecharacter>mainLoop</span> function that calls <span class=codecharacter>reportSensorFailure</span> has not been exercised at all (see again Figure 2). One way to test this code is to create a unit test (for the <span class=codecharacter>mainLoop</span> function) in combination with a user stub (for the <span class=codecharacter>readSensor</span> function) to simulate conditions that are difficult to reproduce during functional testing.</p>
<h1>Unit testing with runtime memory monitoring</h1>
<p class=bodytext>A test case skeleton is created and then filled with test code.<span style="mso-spacerun: yes">&nbsp; </span>Also, a stub is added for the <span class=codecharacter>readSensor</span> function to simulate a reading error. The test case is run &#8211; exercising just this one previously untested function &#8211; with runtime memory monitoring enabled. The results show that the function is now covered, but new errors are reported (see Figure 3).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F3" title="Unit testing with runtime memory monitoring enabled exposes memory errors."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F3" alt="23" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 3:</b> Unit testing with runtime memory monitoring enabled exposes memory errors.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>The test case uncovered more memory-related errors. There is a clear problem with memory initialization (null pointers) when the failure handler is being called. Further analysis shows that an order of calls was mixed in <span class=codecharacter>reportSensorValue()</span>, such that <span class=codecharacter>finalize()</span> is being called before <span class=codecharacter>printMessage()</span> is called, but <span class=codecharacter>finalize()</span> actually frees memory used by <span class=codecharacter>printMessage()</span>.</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void finalize</b>()</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>if</b> (messages) {</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[0]);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[1]);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[2]);</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>}</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages);</p>
<p class=codeparagraph>}</p>
<p class=codeparagraph><o:p>&nbsp;</o:p></p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'><span style='mso-fareast-font-family:"Courier New"'>void printMessage</span></b><span style='mso-fareast-font-family:"Courier New"'>(<b style='mso-bidi-font-weight: normal'>int</b> msgIndex, <b style='mso-bidi-font-weight:normal'>int</b> value)<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'>{<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight: normal'>const char</b>* msg = messages[msgIndex];<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight: normal'>printf</b>(&quot;Value: %d, State: %s\n&quot;, value, msg);<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight: normal'>fflush</b>(stdout);<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'>}<o:p></o:p></span></p>
<p class=codeparagraph><o:p>&nbsp;</o:p></p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'><span style='mso-fareast-font-family:"Courier New"'>void reportSensorFailure</span></b><span style='mso-fareast-font-family:"Courier New"'>()<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'>{<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>finalize();<span style="mso-spacerun: yes">&nbsp; </span><o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>printMessage(ERROR_MSG, 0);<o:p></o:p></span></p>
<p class=codeparagraph><span style='mso-fareast-font-family:"Courier New"'>}</span></p>
<p class=bodytext>This order is fixed, and the test case is rerun one more time.</p>
<p class=bodytext>That resolves one of the errors reported. The next step is to address the second problem reported: AccessViolationException in the print message. This occurs because these table messages are not initialized. To resolve this, the <span class=codecharacter>initialize()</span> function is called before printing the message. The repaired function looks as follows:</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void reportSensorFailure</b>()</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>initialize();</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>printMessage(ERROR, 0);</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>finalize(); </p>
<p class=codeparagraph>}</p>
<p class=bodytext>When rerunning the test, only one task is reported: an invalidated unit test case, which is not really an error. The outcome must be verified to convert this test into a regression test (see Figure 4).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '24', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="24" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F4" title="The test must be configured for regression testing."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F4" alt="24" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 4:</b> The test must be configured for regression testing.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>Next, the entire application is run again. Coverage analysis shows that almost the entire application was covered, and the results indicate that no memory error problems occurred.</p>
<p class=bodytext>Even though the entire application was run and unit tests were created for an uncovered function, there are still some paths that are not covered. Unit test creation can continue to be employed, but it would take some time to cover all of the paths in the application. Instead, those paths can be simulated with flow analysis. </p>
<h1>Flow analysis</h1>
<p class=bodytext>Flow analysis is run to simulate different paths through the system and check if there are potential problems in those paths. Several issues are reported (see Figure 5).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '25', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="25" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F5" title="Flow analysis discovers several problems in the paths."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F5" alt="25" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 5:</b> Flow analysis discovers several problems in the paths.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>There is a potential path &#8211;&nbsp;one that was not covered &#8211;&nbsp;where there can be a double free in the <span class=codecharacter>finalize()</span> function. The <span class=codecharacter>reportSensorValue()</span> function calls <span class=codecharacter>finalize()</span>, then <span class=codecharacter>finalize()</span> calls <span class=codecharacter>free()</span>. Also, <span class=codecharacter>finalize()</span> is called again in the <span class=codecharacter>mainLoop()</span>. This can be fixed by making <span class=codecharacter>finalize()</span> more intelligent:</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void finalize</b>()</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>if</b> (messages) {</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[0]);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[1]);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages[2]);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span><b style='mso-bidi-font-weight:normal'>free</b>(messages);</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span>messages = 0;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>}</p>
<p class=codeparagraph>}</p>
<p class=bodytext>Flow analysis is then run one more time. Only two problems are reported (see Figure 6).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '26', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="26" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F6" title="Flow analysis detects two remaining problems."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F6" alt="26" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 6:</b> Flow analysis detects two remaining problems.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>A table with the <span class=codecharacter>index</span> -1 is possibly being accessed here. This is because the integral index is set initially to -1, and there is a possible path through the <span class=codecharacter>if</span> statement that does not set this integral to the correct value before calling <span class=codecharacter>printMessage()</span>. Runtime analysis did not lead to this path, and this path might never be taken in real life. That is the major weakness of flow analysis compared to actual runtime memory monitoring. Flow analysis shows potential paths, not necessarily paths that will be taken during actual application execution. This potential error is fixed easily by removing the unnecessary condition <span class=codecharacter>(value &gt;= 0)</span>.</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void handleSensorValue</b>(<b style='mso-bidi-font-weight:normal'>int</b> value)</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>initialize();</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>int</b> index = -1;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span><b style='mso-bidi-font-weight:normal'>if</b> (value &lt;= 10) {</p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span>index = VALUE_LOW;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>} <b style='mso-bidi-font-weight:normal'>else</b> { </p>
<p class=codeparagraph><span style='mso-tab-count:2'>&nbsp;&nbsp;&nbsp;&nbsp; </span>index = VALUE_HIGH;</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>}</p>
<p class=codeparagraph><span style='mso-tab-count:1'>&nbsp; </span>printMessage(index, value);</p>
<p class=codeparagraph>}</p>
<p class=bodytext>The final error reported is fixed in a similar way. Now, when rerunning flow analysis, no issues are reported.</p>
<h1>Regression testing</h1>
<p class=bodytext>To ensure that everything is still working, the entire analysis is rerun. First, the application is run with runtime memory monitoring and everything seems fine. Then unit testing is run with memory monitoring and a task is reported (see Figure 7).</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '27', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="27" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F7" title="Unit testing perceives a regression failure."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5449%2Ffigures%2F7" alt="27" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 7:</b> Unit testing perceives a regression failure.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>The unit test detected a change in the behavior of the <span class=codecharacter>reportSensorFailure()</span> function. This was caused by modifications in <span class=codecharacter>finalize()</span>, a change that was made to correct one of the previously reported issues. This task draws attention to the change and indicates that the test case must be reviewed. Then either the code should be corrected or the test case should be updated to show that this new behavior is actually the expected behavior. After looking at the code, it is apparent that the latter is true, and the assertion&#8217;s condition is updated.</p>
<p class=codeparagraph><b style='mso-bidi-font-weight:normal'>void</b> sensor_tests_test_reportSensorFailure()</p>
<p class=codeparagraph>{</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>{</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>messages<span style="mso-spacerun: yes">&nbsp; </span>= 0 ;</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>{</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>reportSensorFailure();</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>CPPTEST_ASSERT(0 == ( messages ));</p>
<p class=codeparagraph><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>}</p>
<p class=codeparagraph>}</p>
<p class=bodytext>As a final sanity check, the entire application is run on its own, building it in the integrated development environment without any runtime memory monitoring. The results confirm that it is working as expected.</p>
<h1>Complementary tools</h1>
<p class=bodytext>All of the testing methods applied &#8211; pattern-based static code analysis, memory analysis, unit testing, flow analysis, and regression testing &#8211; do not compete with one another, but rather complement one another. Used together, they provide an amazingly powerful tool that delivers an unparalleled level of automated error detection for embedded C software.</p>
<p class=authorbio><span class=bold>Marek Kucharski</span>, president of Parasoft SA and VP of development, directs operations, sales, and development at Parasoft Corporation&#8217;s Polish subsidiary. Marek has been developing and managing software systems since he graduated from Jagiellonian University in Krakow in 1994. His professional experience includes building a wide range of software, from retail client server systems to cutting-edge development tools.</p>
<p class=authorbio><span class=bold>Miros&#322;aw Zieli</span><span class=bold><span style='font-family:"Times New Roman"'>n</span>ski</span>, C++test product development manager, is responsible for developing embedded applications of Parasoft&#8217;s C/C++test embedded testing product. Miros&#322;aw has been developing and supporting embedded systems testing frameworks since he graduated from AGH University of Science and Technology in Krakow in 2002, where his studies of automation systems and applied robotics gave him key insight into embedded software industry quality challenges.</p>
<p class=contactinfo><span class=bold>Parasoft<br /> </span>626-256-3680 <b style='mso-bidi-font-weight:normal'><br /> </b><span class=MsoHyperlink><a href="mailto:info@parasoft.com">info@parasoft.com</a> <b style='mso-bidi-font-weight:normal'><br /> </b></span>Linkedin: <span class=MsoHyperlink><a href="http://www.linkedin.com/company/parasoft">www.linkedin.com/company/parasoft</a></span><b style='mso-bidi-font-weight:normal'><br /> </b>Facebook: <span class=MsoHyperlink><a href="http://www.facebook.com/parasoftcorporation?ref=s">www.facebook.com/parasoftcorporation?ref=s</a><b style='mso-bidi-font-weight:normal'><br /> </b></span>Twitter: <a href="http://twitter.com/#!/Parasoft">@Parasoft</a><b style='mso-bidi-font-weight:normal'><br /> </b><span class=MsoHyperlink><a href="http://www.parasoft.com">www.parasoft.com</a> </span><b style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>
<p class=footnote><o:p>&nbsp;</o:p></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-intrusive code coverage for safety-critical software</title>
		<link>http://embedded-computing.com/articles/non-intrusive-code-coverage-safety-critical-software/</link>
		<comments>http://embedded-computing.com/articles/non-intrusive-code-coverage-safety-critical-software/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 15:00:00 +0000</pubDate>
		<dc:creator>Benjamin M. Brosgol, PhD, AdaCore</dc:creator>
				<category><![CDATA[ada 95]]></category>
		<category><![CDATA[ada compiler]]></category>
		<category><![CDATA[ada compilers]]></category>
		<category><![CDATA[ada gnat]]></category>
		<category><![CDATA[ada safety critical]]></category>
		<category><![CDATA[AdaCore]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[branch coverage testing]]></category>
		<category><![CDATA[business performance metrics]]></category>
		<category><![CDATA[business performance scorecard]]></category>
		<category><![CDATA[c code coverage tool]]></category>
		<category><![CDATA[c code coverage tools]]></category>
		<category><![CDATA[code analyze tool]]></category>
		<category><![CDATA[code analyzer tool]]></category>
		<category><![CDATA[code coverage analysis tool]]></category>
		<category><![CDATA[code coverage analysis tools]]></category>
		<category><![CDATA[code coverage analyzer]]></category>
		<category><![CDATA[code coverage tool .net]]></category>
		<category><![CDATA[code coverage tool c]]></category>
		<category><![CDATA[code static analysis]]></category>
		<category><![CDATA[coverage analysis tool]]></category>
		<category><![CDATA[dashboard performance measures]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[do-178b certification]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded software applications]]></category>
		<category><![CDATA[embedded software design]]></category>
		<category><![CDATA[embedded software systems]]></category>
		<category><![CDATA[embedded software test]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[employee performance metrics]]></category>
		<category><![CDATA[financial performance metrics]]></category>
		<category><![CDATA[gnat ada]]></category>
		<category><![CDATA[gnat ada compiler]]></category>
		<category><![CDATA[hr measurement metrics]]></category>
		<category><![CDATA[hr performance metrics]]></category>
		<category><![CDATA[kpi metrics]]></category>
		<category><![CDATA[measuring business performance]]></category>
		<category><![CDATA[metrics measure]]></category>
		<category><![CDATA[metrics software development]]></category>
		<category><![CDATA[organizational performance measures]]></category>
		<category><![CDATA[performance management metrics]]></category>
		<category><![CDATA[performance measurement metrics]]></category>
		<category><![CDATA[performance metrics reporting]]></category>
		<category><![CDATA[performance metrics training]]></category>
		<category><![CDATA[process performance metrics]]></category>
		<category><![CDATA[rtca do-160f]]></category>
		<category><![CDATA[rtca do-254]]></category>
		<category><![CDATA[sales metrics scorecard]]></category>
		<category><![CDATA[scorecard metrics]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software embedded]]></category>
		<category><![CDATA[software process metrics]]></category>
		<category><![CDATA[source code analysis tool]]></category>
		<category><![CDATA[source-level coverage metrics]]></category>
		<category><![CDATA[static analysis tools c]]></category>
		<category><![CDATA[static code analysis tool]]></category>
		<category><![CDATA[static code analyzer]]></category>
		<category><![CDATA[static source code analysis]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=fc9f2cb22cb98d3142e441fb09e61a13</guid>
		<description><![CDATA[A coupled target emulator and non-intrusive coverage analyzer tool enhances safety-critical structural coverage verification and simplifies certification.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F4" />Using traditional tools to verify that structural coverage meets safety-critical standards can be complicated since the code being tested is not the same code that will finally execute. A tool that derives precise source-level coverage metrics from execution trace data for a noninstrumented program offers a simpler alternative that supports all levels of safety certification.</h3>
<p><span id="more-84"></span><span class='body'>
<p class=Bodytext>Certification standards such as DO-178B for commercial avionics require evidence that the system source code is completely exercised by tests derived from requirements. Traditional tools obtain the coverage data through code instrumentation, but this complicates analysis since the code being tested is not the code that will finally execute. </p>
<p class=bodytext>A host-resident two-part technology offers an efficient and cost-effective alternative solution: a target emulator coupled with a non-intrusive coverage analyzer. The emulator is not an interpreter; instead, it dynamically translates the object code into native host instructions. As a result, test suites typically execute faster than on the actual target hardware. The coverage analyzer derives source coverage data from object branch information retrieved from program execution on the emulator, and performs any additional analysis needed for compliance with the most stringent coverage requirements. </p>
<p class=bodytext>Final verification on the target platform is simplified; it entails rerunning the tests and showing that the results are the same as on the emulator. This approach fully supports all levels of safety certification for DO-178B and for its upcoming revision, DO-178C.</p>
<h1>Verification challenges</h1>
<p class=bodytext>A major verification activity specified in safety certification standards such as DO-178B[1] is test coverage analysis, which involves demonstrating that each software requirement is met and showing that the requirements-based tests completely cover the source code. Coverage analysis raises several issues: </p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Instrumentation:</span> A common approach is to use a tool that generates a modified (instrumented) version of the application source code, or to compile the application with a special switch to generate instrumented object code. The added code contains calls to appropriate logging functions. However, the instrumented code is not the code that will run on the final system. To use the coverage data, the developer must demonstrate that it also applies to the uninstrumented executable. This is not necessarily a simple task.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Target hardware:</span> Although final software/hardware integration testing must be performed on the actual configuration to be deployed, it is both expensive and inconvenient to require the target board during component development. A host-based solution is simpler and more cost-effective.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Source versus object coverage:</span> DO-178B requires coverage of the source code, but the coverage data is computed from the executing program. At the highest safety criticality (Level A), special analysis might be needed to demonstrate Modified Condition/Decision Coverage (MC/DC).</p>
<p class=bodytext>The technology described here addresses these issues. It is based on deriving source coverage metrics from execution trace data produced by a host-resident target emulator running an uninstrumented version of the application software.</p>
<h1>DO-178B test coverage analysis</h1>
<p class=bodytext>DO-178B specifies two types of test coverage analysis [1, &#167;6.4.4]:</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Requirements-based test coverage analysis:</span> The developer must show traceability from each requirement to the source code that implements the requirement, and to a test suite whose execution provides confidence that the requirement is implemented correctly. </p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Structural coverage analysis:</span> The developer must show that the code structure has been completely exercised by the requirements-based tests. If these tests do not completely cover the source code, then the developer must add further requirement(s), add further test(s), and/or remove code &#8211; referred to as &#8220;dead code&#8221; (DO-178B) or &#8220;extraneous code&#8221; (DO-178C) &#8211; that is not traceable to requirements.</p>
<p class=bodytext>The extent of the needed coverage depends on the software component&#8217;s safety criticality level. At Level C, only <span class=italics>statement coverage</span> is required; that is, each statement in the program must be executed at least once.</p>
<p class=bodytext>At Level B, <span class=italics>decision coverage</span> is required. In DO-178B parlance, a <span class=italics>decision</span> is a complete Boolean expression consisting of atomic Boolean terms (<span class=italics>conditions</span>) and Boolean operators. For example, the following Boolean expression is a decision with three conditions:</p>
<p class=codeparagraph>(B1 <b style='mso-bidi-font-weight:normal'>and then</b> B2) <b style='mso-bidi-font-weight:normal'>or else</b> B3</p>
<p class=bodytext>This example uses the Ada <span class=codecharacter><b style='mso-bidi-font-weight:normal'>and then</b></span> and <span class=codecharacter><b style='mso-bidi-font-weight:normal'>or else</b></span> short-circuit forms that evaluate their right operand only when necessary, corresponding respectively to the &amp;&amp; and || operators in C. Decision coverage requires each decision in the program to be exercised by tests for both true and false.</p>
<p class=bodytext>At Level A, MC/DC is required: </p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Each condition in the program must be exercised by tests for both true and false.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Each decision in the program must be exercised by tests for both true and false.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Each condition must be shown to independently affect the decision&#8217;s outcome (with that condition varying while all other conditions remain fixed).</p>
<p class=bodytext>MC/DC does not require each decision to be tested with every possible combination of truth-values for its constituent conditions. This would be unrealistic for complex decisions and perhaps impossible when conditions are coupled (when the same input variable appears in multiple conditions).</p>
<p class=bodytext>Figure 1 shows a program fragment that illustrates the differences among the various kinds of structural coverage. MC/DC, which has some subtle characteristics, is discussed comprehensively in a tutorial by Hayhurst <span class=italics>et al</span>[2] and a detailed study by Chilenski[3].</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=1489,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F1" title="A program fragment shows different kinds of DO-178B structural coverage."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A program fragment shows different kinds of DO-178B structural coverage.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<h1>Source versus object coverage </h1>
<p class=bodytext>A commonly misunderstood requirement in DO-178B concerns the type of coverage (source versus object code) that must be demonstrated at Level A. Section 6.4.4.2 states:</p>
<p class=bodytext style=margin-left:20px>The structural coverage analysis may be performed on the Source Code, unless the software level is A and the compiler generates object code that is not directly traceable to Source Code statements. Then, additional verification should be performed on the object code to establish the correctness of such generated code sequences. A compiler-generated array-bound check in the object code is an example of object code that is not directly traceable to the Source Code.</p>
<p class=bodytext>This requirement, whose wording is being revised in DO-178C, does not say that object coverage must be demonstrated for Level A. Instead, it addresses the issue of source language constructs whose compiled object code contains conditional branches or side effects not apparent from the source code. In such cases the developer must verify the generated code, for example by explaining the effect of each non-traceable object code sequence. But coverage analysis still must relate to the source code structures. Showing object code coverage is not sufficient unless further analysis can demonstrate its equivalence to source code coverage.</p>
<h1>Target emulation through virtualization</h1>
<p class=bodytext>The concept of simulating a target processor on a host system is not new, but recent advances in virtualization technology have spawned an efficient and portable approach exemplified by the open-source Quick EMUlator (QEMU) tool[4]. QEMU supports full system emulation with guest operating systems and allows simulation of specific embedded devices through machine descriptions. It runs on a host platform and, in a two-stage process, dynamically translates object code into native host instructions, using a caching scheme for efficiency. The tool first translates target code into an intermediate language and then compiles the intermediate representation into host binary instructions.</p>
<p class=bodytext>The dynamic translator operates on sections of uninstrumented target code at a time, interleaving translation (or cache fetch) with execution of the translated instructions. When QEMU starts processing a section of target code, it translates the instructions to host code until it reaches the next branch. The translated target code, known as a <span class=italics>translated block</span>, is stored in a cache if not already there, and its corresponding host instructions are executed. QEMU then continues translating where it left off. Because of the caching, blocks of target instructions only need to be decoded once. And in practice, because host processors are typically faster than the embedded target hardware, QEMU&#8217;s virtualization approach provides better performance than direct execution on the target.</p>
<p class=bodytext>QEMU is open-source technology that can be extended to provide additional functionality. To handle structural coverage analysis as required by DO-178B, a useful enhancement is support for generating execution traces. Two kinds of trace information are relevant:</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Summary traces:</span> The output identifies the address ranges of the instructions that were executed, and, for conditional branches, which branch(es) was (were) taken. The output data has bounded size (actually linear with respect to object program size), as it only reveals which instructions/branches were executed and not the entire execution history.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]><span class=bold>Full historical traces for specified address ranges:</span> In addition to indicating the instructions that were executed, the output shows which branch was taken at each evaluation of the relevant conditional expressions. The size of the output data depends on the execution history.</p>
<p class=bodytext>An adapted version of QEMU that produces these execution traces is a key component of coverage analysis technology.</p>
<h1>Coverage analysis</h1>
<p class=bodytext>Although the execution trace data supplies object instruction coverage and object branch coverage information, further analysis is needed to satisfy DO-178B&#8217;s coverage objectives:</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>The traces must be mapped to source code structure, particularly to constructs in the source code (statements, decisions, conditions) that have coverage requirements.</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>The level of coverage achieved &#8211; statement, decision, MC/DC &#8211; must be assessed.</p>
<p class=bodytext>To enable this analysis, the compiler can preserve the source program&#8217;s decision structure in the object control flow graph and generate two kinds of output:</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Debugging information (DWARF), which relates each object code instruction to a source code location (file, line, column).</p>
<p class=bullets><![if !supportLists]><span style='font-family:Symbol; mso-fareast-font-family:Symbol;mso-bidi-font-family:Symbol'><span style='mso-list:Ignore'>&#183;<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Source Coverage Obligations (SCOs), which provide a compact representation of the program&#8217;s constructs that require evidence of fulfilling some coverage objective. SCOs capture the structure of all decisions in the program.</p>
<p class=bodytext>Using trace data from the emulator as well as the DWARF and SCO information provided by the compiler, a coverage analysis tool can deduce whether the test&#8217;s execution accomplished the desired level of coverage (statement, decision, MC/DC).</p>
<p class=bodytext>Determining whether the execution trace data implies MC/DC presents some challenges. One issue is how to infer source condition evaluation from object branch coverage. This can be handled if the program uniformly uses short-circuit forms (&#8220;<span class=codecharacter><b style='mso-bidi-font-weight: normal'>and then</b></span>&#8221;, &#8220;<span class=codecharacter><b style='mso-bidi-font-weight: normal'>or else</b></span>&#8221;) instead of the non-short-circuited operators (&#8220;<span class=codecharacter><b style='mso-bidi-font-weight:normal'>and</b></span>&#8221;, &#8220;<span class=codecharacter><b style='mso-bidi-font-weight:normal'>or</b></span>&#8221;)[5]. The compiler, as directed by an option, preserves the source code&#8217;s conditional structure in the generated object code. A second issue is whether it is possible, for efficiency reasons, to use only the summary traces and not the full historical traces. In general, the answer is &#8220;no,&#8221; and a relatively simple decision shows why:</p>
<p class=codeparagraph>(B1 <b style='mso-bidi-font-weight:normal'>and then</b> B2) <b style='mso-bidi-font-weight:normal'>or else</b> B3</p>
<p class=bodytext>The object code for this decision can be branch-covered by just three test cases, as shown in Table 1.</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ftables%2F1" title="Tests for object branch coverage of (B1 and then B2) or else B3."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ftables%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Table 1:</b> Tests for object branch coverage of (B1 and then B2) or else B3.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>However,<span style="mso-spacerun: yes">&nbsp; </span>MC/DC requires at least <span class=italics>n+1</span> tests when there are <span class=italics>n</span> independent conditions[2], and thus four here (see again Figure 1). This means that the trace summary data (object branch coverage) is not sufficient; full historical trace data is needed. A mathematical characterization of when object branch coverage is sufficient to deduce MC/DC is given in Bordin <span class=italics>et al</span>[6] and Comar <span class=italics>et al</span>[7]. </p>
<p class=bodytext>Further issues to be addressed when object code coverage is proposed as evidence for MC/DC are documented in several certification authority reports[8, Section 20][9].</p>
<h1>Putting it all together</h1>
<p class=bodytext>The target virtualization approach has been implemented as part of an effort &#8211; the Couverture (Coverage) Project[6] &#8211; to provide an open framework for coverage analysis for safety-critical software development. AdaCore&#8217;s GNATemulator tool is an adaptation of QEMU that collects the execution trace data. The GNAT compiler compiles an application source program with switches that preserve the conditional control flow in the object code and generate the DWARF and SCO data. The uninstrumented executable is then run on GNATemulator, producing the execution trace data. Using the information generated by the compiler and the emulator, the GNATcoverage tool assesses whether the required structural coverage has been achieved. If necessary, the tool analyzes the full historic trace data to verify MC/DC. Figure 2 depicts a typical development scenario.</p>
<p class=figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F2" title="Virtualization and coverage analysis accurately assess structural coverage."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Virtualization and coverage analysis accurately assess structural coverage.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=bodytext>These tools currently work on applications written in Ada, a language that is used frequently in the safety-critical domain. Future versions will support other languages, including C. Target architectures currently supported include PowerPC and LEON. </p>
<p class=bodytext>Efficient target virtualization, coupled with a tool that deduces precise source-level coverage metrics from execution trace data for a non-instrumented/unmodified user program, mark an advance in the state of the art. This technology is especially valuable in safety-critical contexts, supporting safety certification at all levels while simplifying the certification effort.</p>
<p class=figures>
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F3" title="ECD in 2D: AdaCore sales and business development manager Micha&amp;#235;l Friess explains how GNATcoverage and GNATemulator help programmers develop certifiable applications. Use your smartphone, scan this code, watch a video: http://opsy.st/prvI14. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5429%2Ffigures%2F3" alt="23" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: AdaCore sales and business development manager Micha&#235;l Friess explains how GNATcoverage and GNATemulator help programmers develop certifiable applications. Use your smartphone, scan this code, watch a video: http://opsy.st/prvI14. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class=referenceheading>References:</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[1]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>RTCA SC-167/EUROCAE WG-12. DO-178B &#8211; <span class=italics><span style='mso-ansi-font-size:8.5pt'>Software Considerations in Airborne Systems and Equipment Certification</span></span>; December 1992.</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[2]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>K. Hayhurst, D. Veerhusen, J, Chilenski, L. Rierson. <span class=italics><span style='mso-ansi-font-size:8.5pt'>A Practical Tutorial on Modified Condition/Decision Coverage</span></span>. NASA/TM-2001-210876; May 2001.</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[3]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>J. Chilenski. <span class=italics><span style='mso-ansi-font-size:8.5pt'>An Investigation of Three Forms of the Modified Condition Decision Coverage (MCDC) Criterion</span></span>. DOT/FAA/AR-01/18; April 2001. </p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[4]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>QEMU open-source processor emulator. <a href="http://wiki.qemu.org/Index.html">wiki.qemu.org/Index.html</a> </p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[5]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>G. Romanski. <span class=italics><span style='mso-ansi-font-size:8.5pt'>MCDC Coverage Analysis Using Short-Circuit Conditions</span></span>; White Paper; Verocel, Inc.</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[6]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>M. Bordin, C. Comar, T. Gingold, J. Guitton, O. Hainque, T. Quinot. &#8220;Object and Source Coverage for Critical Applications with the Couverture Open Analysis Framework.&#8221; <span class=italics><span style='mso-ansi-font-size:8.5pt'>Embedded Real-Time Software and Systems (ERTS&#178;) 2010</span></span>; Toulouse, France.</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[7]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>C. Comar, J. Guitton, O. Hainque, T. Quinot. &#8220;Formalization and Comparison of MCDC and Object Branch Coverage Criteria.&#8221; Submitted to <span class=italics><span style='mso-ansi-font-size:8.5pt'>Embedded Real-Time Software and Systems (ERTS&#178;) 2012</span></span>.</p>
<p class=referenceslist><![if !supportLists]><span style='mso-fareast-font-family: Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[8]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>European Aviation Safety Agency. <span class=italics><span style='mso-ansi-font-size: 8.5pt'>Certification Memorandum EASA CM-SWCEH-002, Issue 01; Software Aspects of Certification</span></span>. August 2011.</p>
<p class=referenceslist style='mso-prop-change:"Jennifer Hesse" 20110930T1623'><![if !supportLists]><span style='mso-fareast-font-family:Times;mso-bidi-font-family:Times'><span style='mso-list:Ignore'>[9]<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]>Certification Authorities Software Team (CAST). <span class=italics><span style='mso-ansi-font-size: 8.5pt'>Position Paper CAST-17, Structural Coverage of Object Code (Rev 3)</span></span>; June 2003.</p>
<p class=authorbio><span class=bold>Benjamin M. Brosgol</span> is a senior member of the technical staff at AdaCore. He has been involved with programming language design and implementation for more than 30 years, serving in the design team for Ada 95 and in expert groups for several Java Specification Requests. Ben holds a BA in Mathematics from Amherst College and MS and PhD degrees in Applied Mathematics from Harvard University.</p>
<p class=contactinfo><span class=bold>AdaCore<br /> </span>212-620-7300<br /> <span class=MsoHyperlink><a href="mailto:brosgol@adacore.com">brosgol@adacore.com</a><br /> </span>Linkedin: <a href="http://www.linkedin.com/company/adacore">www.linkedin.com/company/adacore</a><br /> Facebook: <span class=MsoHyperlink><a href="http://www.facebook.com/pages/AdaCore/104074652961446">www.facebook.com/pages/AdaCore/104074652961446</a></span><br /> Twitter: <a href="http://twitter.com/AdaCoreCompany">@AdaCoreCompany</a><br /> <span class=MsoHyperlink><a href="http://www.adacore.com">www.adacore.com</a> <b style='mso-bidi-font-weight:normal'><o:p></o:p></b></span></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LTE in the driver&#8217;s seat</title>
		<link>http://embedded-computing.com/articles/lte-the-drivers-seat/</link>
		<comments>http://embedded-computing.com/articles/lte-the-drivers-seat/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:00:00 +0000</pubDate>
		<dc:creator>Pierre Teyssier, Sierra Wireless</dc:creator>
				<category><![CDATA[arm9 development board]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[computer on module]]></category>
		<category><![CDATA[driving seat]]></category>
		<category><![CDATA[fanless computer]]></category>
		<category><![CDATA[in the driving seat]]></category>
		<category><![CDATA[In-vehicle infotainment systems]]></category>
		<category><![CDATA[industrial computer]]></category>
		<category><![CDATA[industrial pc]]></category>
		<category><![CDATA[panel pc]]></category>
		<category><![CDATA[Sierra Wireless]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board pc]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=569fc2ea14a3669973e4aad85819e7e7</guid>
		<description><![CDATA[Long-Term Evolution (LTE) In-Vehicle Infotainment (IVI): From problems to possibilities.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5382%2Ffigures%2F3" />While Long-Term Evolution (LTE) cellular technology enables a variety of supercharged automotive infotainment applications, the novel technology introduces a number of engineering challenges regarding network handoff and antenna complexities. Designers need to evaluate these considerations before they can unlock LTE&#8217;s potential for advanced data management, cost savings, and a better user experience.</h3>
<p><span id="more-21"></span><span class='body'>
<p class="body-text"><span class="interviewer">Imagine being able to take your Netflix account on your next road trip and letting your kids stream their favorite movies on demand. Imagine jumping onto a video conference for some last-minute prep for a big meeting while getting a ride to the airport. Imagine watching real-time video of upcoming traffic problems taken from other drivers&#8217; vehicles and streamed right to your dashboard.</span></p>
<p class="body-text"><span class="interviewer">You don&#8217;t have to imagine much longer. High-quality video streaming to the vehicle is almost here, and new Long-Term Evolution (LTE) cellular technologies are making it happen. Network-based In-Vehicle Infotainment (IVI) systems such as Ford SYNC have been on the market for several years, offering a variety of cloud-based media, maintenance information, emergency assistance, and other services. These applications are about to get supercharged with the wide-scale deployment of LTE technology.</span></p>
<p class="body-text"><span class="interviewer">LTE networks operate at data rates up to 100x faster than today&#8217;s 2G and 3G cellular connections, bringing the horsepower of fixed-line home broadband connections to the vehicle. They also provide much better range, especially in rural areas that are underserved by 3G data networks.</span></p>
<p class="body-text"><span class="interviewer">However, LTE introduces some significant challenges for system designers and automotive engineers, including more complex network handoffs and antenna requirements and the need for ample flexibility to accommodate evolving standards and technologies. What do system designers need to know about LTE, and what can they do to make the most of it?</span></p>
<p class="heading-1"><span class="interviewer">LTE advantages</span></p>
<p class="body-text"><span class="interviewer">While today&#8217;s IVI systems use an assortment of network connectivity technologies, current trends indicate that LTE is the future of networking. The Global Mobile Suppliers Association reports that, as of September 2011, 237 operators in 85 countries are deploying LTE, with 26 networks now commercially launched. In fact, LTE is the fastest developing mobile system rollout in the history of the industry, and for good reason.</span></p>
<p class="body-text"><span class="interviewer">First, LTE can enable a superior user experience, with increased capacity and theoretical peak download/upload speeds of 100&nbsp;Mbps/50 Mbps. LTE also operates with as little as one-tenth the latency of current 3G technologies. This means that an LTE-equipped vehicle can load a standard Web page in less than a second,&nbsp;compared to a typical 3G network with 100 millisecond latency, which takes five seconds to load the same page regardless of connection speed. For in-car video services, this reduced latency translates to a significant and immediately noticeable improvement in the user experience.</span></p>
<p class="body-text"><span class="interviewer">As an IP-based technology, LTE also has a more advanced control plane and data plane system. This enables IVI systems to employ sophisticated data management and prioritization schemes and allows drivers to access multiple network services and applications simultaneously.</span></p>
<p class="body-text"><span class="interviewer">Unlike previous-generation cellular systems, LTE is extremely&nbsp;flexible and can be deployed over several different frequency bands, including frequencies currently used for 2G&nbsp;and 3G services. As operators refarm their spectrum for LTE, many are deploying new high-speed networks in lower spectra (especially the 1,800 MHz frequency), improving the range of cellular data services considerably when compared to 3G technologies.</span></p>
<p class="body-text"><span class="interviewer">Finally, LTE&#8217;s simplified IP core and transport networks, as well as its ability to reuse existing 2G cell sites for LTE services, allow operators to deploy LTE networks more quickly and inexpensively. Ultimately, this cost savings gets passed down the line, lowering the cost per bit for in-car connected services and making high-quality HD video applications a viable business proposition.</span></p>
<p class="body-text"><span class="interviewer">The potential of LTE for IVI services is considerable. However, LTE technology also introduces some significant engineering challenges &#8211; most notably, more complex handoffs between LTE and non-LTE networks. </span></p>
<p class="heading-1"><span class="interviewer">Shifting between operating modes</span></p>
<p class="body-text"><span class="interviewer">On today&#8217;s roads, any LTE-equipped vehicle will enjoy pockets of high-speed LTE connectivity separated by long stretches with only 3G or even 2G network coverage. In this environment, having a good LTE radio is not enough. Designers need a system that can effectively navigate complicated handoffs between different technologies and maintain a consistently high-quality user experience across the network as it is today, as well as the network of the future.</span></p>
<p class="body-text"><span class="interviewer">In any viable IVI system, the LTE module or modem must be capable of functioning with combinations of 3G, 2G, and evolved High-Speed Packet Access (HSPA+) networks as well as LTE,&nbsp;potentially in multiple frequency bands depending on where the vehicle will be sold. And it&#8217;s not enough to simply hand off the session in a way that is transparent to the user. The system also must employ some intelligent decision-making capacity to choose the best possible connection at all times. If you&#8217;re videoconferencing with your team on the way to an important meeting, for example, and your car switches from LTE to 2G even though 3G service is available, it will be little consolation that you still technically have a data connection.</span></p>
<p class="body-text"><span class="interviewer">All of these potential modes and frequencies raise basic engineering challenges. Operating with 2G, 3G, and LTE,&nbsp;as well as managing handoffs from each mode to all others is a much more complex proposition. Engineers must integrate radios for each connectivity type (possibly in multiple frequencies) and test each one individually, in addition to all possible handoffs. </span></p>
<p class="body-text"><span class="interviewer">Given these complexities, it is essential to look for cellular solutions from vendors with broad expertise not just in LTE, but also in other 2G and 3G technologies. LTE suppliers should demonstrate their success developing solutions that operate in multimode environments.</span></p>
<p class="body-text"><span class="interviewer">Because LTE is being implemented in many different ways over many different frequencies, it&#8217;s also a good idea to work with a supplier who has developed a broad range of successful LTE solutions (modules, hotspots, USB modems, and so on) in different markets. Along those lines, system designers should seek global suppliers who can pursue certifications with multiple network operators worldwide and offer precertified LTE solutions for many markets.</span></p>
<p class="heading-1"><span class="interviewer">Thinking about antennas </span></p>
<p class="body-text"><span class="interviewer">Antennas have been a mature, reliable technology for many years in 2G and 3G systems, but for LTE in-vehicle systems, they can be a significant challenge. LTE relies on Multiple Input Multiple Output (MIMO) antennas, which are inherently more complex than those used in 2G or 3G systems. Balanced antenna structure, coherent distance (antenna separation), polarity, and even directionality become critically important, and systems that do not properly account for these factors deliver a noticeably degraded user experience.</span></p>
<p class="body-text"><span class="interviewer">In addition, while the lower-frequency bands on which LTE operates improve range, they also increase electrical noise. So antennas must not only account for more complex requirements, they must do so in a noisier environment. Given the fact that many operators are rolling out LTE in existing 2G cell sites, network coverage might also be less optimal than it would be in a network built from the ground up for LTE services.</span></p>
<p class="body-text"><span class="interviewer">To address these factors, system designers should make sure they work with vendors who offer a high level of expertise in the specialized discipline of antenna design and testing.</span></p>
<p class="heading-1"><span class="interviewer">Flexibility for the future</span></p>
<p class="body-text"><span class="interviewer">One of the biggest challenges associated with LTE technology is simply its novelty. LTE systems work &#8211;&nbsp;the new network deployments launching each month testify to this fact &#8211;&nbsp;but LTE is still very much an evolving technology. For example, while the industry is developing an IP-based voice and SMS messaging capability for LTE (the Voice-over-LTE, or VoLTE initiative), there is currently no industry-wide standard for implementing these services. In addition, LTE is evolving to LTE-Advanced, which will support even faster data rates.</span></p>
<p class="body-text"><span class="interviewer">When developing LTE-based infotainment systems for vehicles that will be on the road five, six, or 10 years down the line, designers need to be sure they are using solutions with enough headroom to accommodate evolving standards and technologies. They should look for programmable LTE modules and modems that will allow them to embed application and communication intelligence into the cellular module, as well as add new capabilities over time via over-the-air software updates. They should look for modules built with operating system-like processing capabilities, if not actual lightweight operating systems. Along those lines, they should seek out cellular vendors with robust development platforms that provide everything designers need to build and continually evolve in-vehicle cellular solutions. For example, Sierra Wireless offers its AirPrime AR Series of wireless modules designed specifically for the automotive industry (see Figure 1).</span></p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5382%2Ffigures%2F1" title="AirPrime AR Series wireless modules are developed from the ground up to achieve rigorous compliance with automotive specifications, providing high-quality performance under harsh operating conditions."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5382%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> AirPrime AR Series wireless modules are developed from the ground up to achieve rigorous compliance with automotive specifications, providing high-quality performance under harsh operating conditions.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1"><span class="interviewer">Don&#8217;t drive alone </span></p>
<p class="body-text"><span class="interviewer">The facts are clear: LTE is coming, and it will unlock a world of new possibilities for in-vehicle communications and applications. Moreover, it is just as clear that delivering LTE IVI systems is not a straightforward proposition.</span></p>
<p class="body-text"><span class="interviewer">With mature 2G and 3G technologies, it might have been possible to simply add a cellular modem to an otherwise isolated infotainment system. To develop a high-quality LTE solution, however, system designers will benefit greatly from working with an established supplier who can navigate the unique challenges and potential pitfalls of the technology. From shepherding the system through operator certifications to assuring the solution accounts for unique network implementations in target markets, a strong wireless technology partner can make the journey to tomorrow&#8217;s infotainment systems a much smoother ride. </span></p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5382%2Ffigures%2F2" title="ECD in 2D: To ensure wireless reliability and reduce total cost of ownership, Sierra Wireless AirPrime AR Series embedded modules meet stringent environmental requirements and support high-volume production.Use your smartphone, scan this code, watch a video: opsy.st/ntcSUH. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5382%2Ffigures%2F2" alt="22" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: To ensure wireless reliability and reduce total cost of ownership, Sierra Wireless AirPrime AR Series embedded modules meet stringent environmental requirements and support high-volume production.Use your smartphone, scan this code, watch a video: opsy.st/ntcSUH. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio"><span class="bold">Pierre Teyssier</span> is senior VP of engineering for the M2M Embedded Solutions Business Unit at Sierra Wireless. Prior to joining Sierra Wireless, he served as VP of operations and smart business solutions at&nbsp;Wavecom and director of manufacturing at Axiohm, and also worked as a software engineer at Enerdis.</p>
<p class="contact-info"><span class="bold">Sierra Wireless </span><span class="hyperlink"><a href="mailto:PTeyssier@sierrawireless.com">PTeyssier@sierrawireless.com</a>  <a href="http://twitter.com/#!/sierrawireless">@SierraWireless</a> <a href="http://www.sierrawireless.com">www.sierrawireless.com</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using virtualization to maximize multicore SoC performance</title>
		<link>http://embedded-computing.com/articles/using-multicore-soc-performance/</link>
		<comments>http://embedded-computing.com/articles/using-multicore-soc-performance/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:00:00 +0000</pubDate>
		<dc:creator>Jim Ready, MontaVista Software</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[cavium octeon]]></category>
		<category><![CDATA[computer operating systems comparison]]></category>
		<category><![CDATA[data center virtualization]]></category>
		<category><![CDATA[device driver development]]></category>
		<category><![CDATA[device driver programming]]></category>
		<category><![CDATA[gnu linux operating system]]></category>
		<category><![CDATA[host virtual machine]]></category>
		<category><![CDATA[hypervisor virtualization]]></category>
		<category><![CDATA[hypervisor-based virtualization]]></category>
		<category><![CDATA[lenix operating system]]></category>
		<category><![CDATA[linux open source operating system]]></category>
		<category><![CDATA[linux operating system]]></category>
		<category><![CDATA[linux operating system features]]></category>
		<category><![CDATA[linux virtual machines]]></category>
		<category><![CDATA[migrate virtual machine]]></category>
		<category><![CDATA[MontaVista Software]]></category>
		<category><![CDATA[octeon processor]]></category>
		<category><![CDATA[open source linux operating system]]></category>
		<category><![CDATA[open source operating system linux]]></category>
		<category><![CDATA[open source virtualisation]]></category>
		<category><![CDATA[open source virtualization software]]></category>
		<category><![CDATA[operating system rtos]]></category>
		<category><![CDATA[operating system virtualization]]></category>
		<category><![CDATA[operating systems linux]]></category>
		<category><![CDATA[operating systems open source]]></category>
		<category><![CDATA[realtime operating system]]></category>
		<category><![CDATA[rtos operating system]]></category>
		<category><![CDATA[run multiple virtual machines]]></category>
		<category><![CDATA[running multiple operating systems]]></category>
		<category><![CDATA[running multiple virtual machines]]></category>
		<category><![CDATA[server consolidation virtualization]]></category>
		<category><![CDATA[server virtualization]]></category>
		<category><![CDATA[server virtualization software]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software development in linux]]></category>
		<category><![CDATA[software development linux]]></category>
		<category><![CDATA[software development on linux]]></category>
		<category><![CDATA[storage virtualization technology]]></category>
		<category><![CDATA[use of virtualization]]></category>
		<category><![CDATA[virtual machine hypervisor]]></category>
		<category><![CDATA[virtual machine operating systems]]></category>
		<category><![CDATA[virtual machine workstation]]></category>
		<category><![CDATA[virtual machines operating systems]]></category>
		<category><![CDATA[virtualbox guest additions]]></category>
		<category><![CDATA[virtualisation server]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[virtualization applications]]></category>
		<category><![CDATA[virtualization disaster recovery]]></category>
		<category><![CDATA[virtualization for linux]]></category>
		<category><![CDATA[virtualization hardware]]></category>
		<category><![CDATA[virtualization hypervisor]]></category>
		<category><![CDATA[virtualization of servers]]></category>
		<category><![CDATA[virtualization on linux]]></category>
		<category><![CDATA[virtualization server]]></category>
		<category><![CDATA[virtualization servers]]></category>
		<category><![CDATA[virtualization software]]></category>
		<category><![CDATA[virtualization support]]></category>
		<category><![CDATA[virtualization technologies]]></category>
		<category><![CDATA[virtualization virtual machine]]></category>
		<category><![CDATA[virtualization white paper]]></category>
		<category><![CDATA[virtualized server]]></category>
		<category><![CDATA[virtualized servers]]></category>
		<category><![CDATA[what is virtual machine in operating system]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=6ef6ad28e3bd19a8847529bb04187977</guid>
		<description><![CDATA[Using virtualization techniques to leverage the potential of multicore SoCs.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5379%2Ffigures%2F3" />Multicore Systems-on-Chip are multiplying the difficulties software developers face in enabling applications to scale linearly with available cores and fully leverage the increasing amounts of processing power available. Using Linux-based virtualization methodologies can meet the high-level requirements of multicore environments while avoiding increases in cost and complexity.</h3>
<p><span id="more-117"></span><span class='body'>
<p class="body-text"><span class="interviewer">Whether software developers like it or not, and whether they&#8217;re prepared for it or not, virtually every semiconductor maker worth their salt is producing multicore Systems-on-Chip (SoCs). These SoCs typically pair two or more CPU cores with additional application-specific hardware accelerators to provide a complete system. For example, Cavium Networks, NetLogic Microsystems, and Freescale Semiconductor produce SoCs for network processing, while Texas Instruments and Broadcom make SoCs for digital media devices. </span></p>
<p class="body-text"><span class="interviewer">For software folks, this presents the interesting challenge of enabling applications to obtain all the processing power available from these multicore SoC environments. How can developers make sure their applications scale linearly with the available cores, as well as fully utilize the other SoC hardware components such as media accelerators and packet engines? To be clear, the scalability question is still a real science project for many applications; however, there are systems to build and products to ship, so developers can&#8217;t wait for the theoretically perfect solution. </span></p>
<p class="body-text"><span class="interviewer">In the past year, MontaVista Software examined numerous customer use cases in a wide range of applications including network processing, digital TV, in-vehicle infotainment, super low-power server Web hosting, and more. The goal was to understand how a Linux-based software solution could make full use of the underlying SoC hardware across a wide range of application requirements. The study identified the following high-level requirements that any solution must meet.</span></p>
<p class="heading-2"><span class="interviewer">Multicore support</span></p>
<p class="body-text"><span class="interviewer">The demands of modern embedded systems are hastening the adoption of multicore SoCs. These demands are further accentuated by the requirements to run multiple systems simultaneously; thus, the solution must provide an efficient way of using and managing multicore environments.</span></p>
<p class="heading-2"><span class="interviewer">Security</span></p>
<p class="body-text"><span class="interviewer">Anything downloaded to a device is insecure by definition. The solution must effectively isolate anything downloaded from the core device functions, and the downloaded applications must not be allowed to contaminate other applications. </span></p>
<p class="heading-2"><span class="interviewer">Resource congestion</span></p>
<p class="body-text"><span class="interviewer">Downloaded applications must be prevented from hogging system resources. The goal is to effectively share resources such as memory, CPU time, and I/O. This sharing must allow more important system functions to have priority over less important downloaded applications.</span></p>
<p class="heading-2"><span class="interviewer">Foreign system integration</span></p>
<p class="body-text"><span class="interviewer">Many environments run on top of a Linux kernel. However, these environments might require different userland libraries, as well as different kernel patches. For example, the Android system has its own device drivers and kernel patches. Ideally, the system could run any userland that runs on a Linux kernel. The kernel patches and userlands associated with these environments must be integrated with security and resource sharing in mind.</span></p>
<p class="body-text"><span class="interviewer">This analysis led to the development of a Linux-based architecture that maximizes the underlying power of today&#8217;s powerful multicore SoCs.</span></p>
<p class="heading-1"><span class="interviewer">Architecture overview</span></p>
<p class="body-text"><span class="interviewer">To understand the overall architecture of this software, it is necessary to know a bit about modern Operating System (OS) environments, most notably virtualization technology. But be careful; there&#8217;s a lot of hype around virtualization (or, as we like to say, a lot of hype around hypervisors). </span></p>
<p class="body-text"><span class="interviewer">Virtualization is a method for dividing a computer&#8217;s resources into multiple execution environments. There are three major categories of virtualization in use today, with the key difference among them being the layer where virtualization occurs:</span></p>
<ul>
<li class="bullets">Full virtualization and paravirtualization: These types of virtualization are&nbsp;used to host multiple guest OSs that are isolated from one another. While&nbsp;highly functional, the performance (without a great deal of optimization) is very low due to the overhead of the hypervisor and multiple OSs. Examples include QEMU, Kernel-based Virtual Machine (KVM), Zen, and VMware.</li>
<li class="bullets">OS resource virtualization: This type of virtualization is used to isolate and scale applications using a single OS. The advantage here is a single OS and lower overhead, typically less than 1 percent in most cases. Because there is so little overhead, the ability to scale and/or optimize performance is a huge benefit. Examples include Linux Containers and BDS Jails.</li>
<li class="bullets">Hardware segmentation (Asymmetric Multi-Processing or AMP): This &nbsp;high-performance configuration dedicates hardware to specific applications running in user mode for maximum performance. This can be achieved using a simple runtime executive or leveraging OS resource virtualization and processor core affinity capability to dedicate cores and I/O to processes with almost no overhead.</li>
</ul>
<p class="body-text"><span class="interviewer">These types of virtualization offer different performance characteristics, require different setup and maintenance overhead, introduce unique levels of complexity into the runtime environment, and address different problems. </span></p>
<p class="body-text"><span class="interviewer">While the industry is currently focused on pushing fully virtualized hypervisors as the one-size-fits-all solution to multicore optimization, the reality is that embedded developers need a range of options that can be tailored to specific application needs. Developers will require some combination of one or more of these virtualization technologies to deliver products that fit within hardware constraints and meet design performance characteristics. In short, the trick is to match the application with the right OS services to meet the overall system requirements, which can include performance, reliability, and security.</span></p>
<p class="body-text"><span class="interviewer">MontaVista provides three methods of virtualization based on nonproprietary, open-source Linux technology and supported across multiple processor architectures. Because it is a single runtime, there is one compiler and one set of tools that can be used for any use case or combination of use cases. Figure 1 shows an overall picture of this approach. These three methods are:</span></p>
<ul>
<li class="bullets">KVM Hypervisor (full virtualization)</li>
<li class="bullets">Linux Containers (OS resource virtualization)</li>
<li class="bullets">MontaVista Bare Metal Engine (OS resource virtualization and SoC hardware segmentation)</li>
</ul>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5379%2Ffigures%2F1" title="One compiler and one set of tools can be used for any use case or combination of use cases with MontaVista&amp;#8217;s three methods of virtualization."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5379%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> One compiler and one set of tools can be used for any use case or combination of use cases with MontaVista&#8217;s three methods of virtualization.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1"><span class="interviewer">Microserver use case</span></p>
<p class="body-text"><span class="interviewer">The idea behind microservers is to utilize smaller, more energy-efficient processors to lower the physical and energy consumption footprint of a class of Web-centric IT applications. For certain workloads, several low-power processors can be more efficient than fewer, more powerful processors. Cavium Octeon processors and those from other semiconductor suppliers are well-suited to meet the density and power efficiency requirements underlying the microserver concept on the basis of the power efficiency of the cores themselves. These SoCs also include dedicated hardware to handle the front-end security and encryption/decryption processing that Web-based applications require.</span></p>
<p class="body-text"><span class="interviewer">From a software perspective, MontaVista Linux Containers and Bare Metal Engine technology help complete the picture. Containers are used to provide OS-level virtualization, allowing very efficient virtualization of the workload requirements. For example, Containers can be used to host thousands of independent websites, each securely isolated from each other. Containers allow the precise control of runtime resources allocated to each container, so each website can be limited to the performance levels the customer has purchased. Or, more importantly, a rogue website can be stopped from over consuming resources using the same mechanisms, thus thwarting a denial-of-service type of attack. </span></p>
<p class="body-text"><span class="interviewer">Bare Metal Engine provides the runtime environment for the security and encryption/decryption operations each of these hosted websites requires. For example, a 32-core SoC can utilize most of the cores for application processing with a few dedicated to packet processing, all controlled by one Linux instance.</span></p>
<p class="heading-1"><span class="interviewer">Linux offers a simple solution</span></p>
<p class="body-text"><span class="interviewer">It is a widely held misconception that a combination of Linux and either a Real-Time Operating System (RTOS) or simple runtime environment must be utilized to fully realize the high performance available with multicore processors. Fueling this misconception is the thought that Linux itself is incapable of meeting the requirements because it is too big, too slow, and not real-time. This fallacy also drives the requirement that hypervisors and/or virtualization must mediate and isolate the different runtime environments and facilitate intercommunication among them. Often it is the RTOS vendors themselves who perpetuate this erroneous belief. </span></p>
<p class="body-text"><span class="interviewer">In the end, these misconceptions about Linux drive added complexity and costs into the development process. Complexity increases due to multiple runtime and development environments (one each for Linux, the RTOS, and possibly the hypervisor). Costs increase because of royalties for the proprietary RTOS and hypervisor, not to mention the added costs created by the development complexity itself, with more developers needed for a longer period of time.</span></p>
<p class="body-text"><span class="interviewer">The approach to use Linux everywhere and fix it where it might not meet some requirements results in a single OS environment, single tool chain, and common development and debugging tools for all aspects of the application. As Einstein said, &#8220;Make everything as simple as possible, but not simpler.&#8221;</span>  </p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5379%2Ffigures%2F2" title="ECD in 2D: Jim Ready discusses the technologies available for virtualization in an embedded Linux environment and explains why virtualization involves a lot more than simply running different OSs in a hypervisor. Use your smartphone, scan this code, watch a video: http://opsy.st/r1owBS. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5379%2Ffigures%2F2" alt="22" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: Jim Ready discusses the technologies available for virtualization in an embedded Linux environment and explains why virtualization involves a lot more than simply running different OSs in a hypervisor. Use your smartphone, scan this code, watch a video: http://opsy.st/r1owBS. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio"><span class="author-bio-name">Jim Ready</span> is the CTO of MontaVista Software and a recognized authority in the embedded systems and real-time software industry. The cofounder of Ready Systems, he developed the first commercially viable RTOS product: the VRTX real-time kernel. Jim invented the category of embedded Linux commercialization in 1999 when he founded MontaVista Software to provide the Linux OS to the&nbsp;embedded systems market and embedded system expertise to the open-source Linux community.</p>
<p class="author-bio"><span class="author-bio-name">Patrick MacCartee</span> is a director of product management at MontaVista Software in charge of hardware enablement, pricing, and channel strategies. Patrick has worked in high tech for more than 10 years at Intel and MontaVista Software. He&nbsp;is also responsible for managing the MontaVista Linux 6 and Carrier Grade&nbsp;Edition products.</p>
<p class="contact-info">MontaVista Software <span class="hyperlink"><a href="mailto:marketing@mvista.com">marketing@mvista.com</a> <a href="http://twitter.com/#!/mvista">@mvista</a></span> <span class="hyperlink"><a href="http://www.mvista.com">www.mvista.com</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Model-Based Design optimizes system behavior: Q&amp;A with Ken Karnofsky, Senior Strategist, Signal Processing Applications, MathWorks</title>
		<link>http://embedded-computing.com/articles/model-based-processing-applications-mathworks/</link>
		<comments>http://embedded-computing.com/articles/model-based-processing-applications-mathworks/#comments</comments>
		<pubDate>Wed, 10 Aug 2011 15:00:00 +0000</pubDate>
		<dc:creator>Staff</dc:creator>
				<category><![CDATA[actuator electric]]></category>
		<category><![CDATA[actuators electric]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[automated software testing]]></category>
		<category><![CDATA[automated testing software]]></category>
		<category><![CDATA[automated testing tools]]></category>
		<category><![CDATA[automation testing tools]]></category>
		<category><![CDATA[boost computer speed]]></category>
		<category><![CDATA[boost pc speed]]></category>
		<category><![CDATA[booster connection internet]]></category>
		<category><![CDATA[computer runs slow]]></category>
		<category><![CDATA[computer speed increase]]></category>
		<category><![CDATA[control system simulation]]></category>
		<category><![CDATA[digital signal processing fpga]]></category>
		<category><![CDATA[electric actuator]]></category>
		<category><![CDATA[electric actuators]]></category>
		<category><![CDATA[electric hydraulic actuator]]></category>
		<category><![CDATA[electric hydraulic valve]]></category>
		<category><![CDATA[electric linear actuators]]></category>
		<category><![CDATA[electric rotary actuator]]></category>
		<category><![CDATA[electric rotary actuators]]></category>
		<category><![CDATA[electric valve actuator]]></category>
		<category><![CDATA[electric valve actuators]]></category>
		<category><![CDATA[electro hydraulic actuator]]></category>
		<category><![CDATA[electronic circuit simulator]]></category>
		<category><![CDATA[embedded computing design]]></category>
		<category><![CDATA[fpga signal processing]]></category>
		<category><![CDATA[how to speed up computer]]></category>
		<category><![CDATA[hydraulic actuator]]></category>
		<category><![CDATA[hydraulic actuators]]></category>
		<category><![CDATA[hydraulic rotary actuator]]></category>
		<category><![CDATA[increase computer speed]]></category>
		<category><![CDATA[increase pc speed]]></category>
		<category><![CDATA[integration testing tools]]></category>
		<category><![CDATA[internet speed booster]]></category>
		<category><![CDATA[internet speed slow]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[Model-Based Design (MBD)]]></category>
		<category><![CDATA[Model-Based Design optimizes system behavior]]></category>
		<category><![CDATA[optimize computer performance]]></category>
		<category><![CDATA[optimize pc performance]]></category>
		<category><![CDATA[optimizing computer performance]]></category>
		<category><![CDATA[pc running slow]]></category>
		<category><![CDATA[pneumatic actuator]]></category>
		<category><![CDATA[pneumatic actuators]]></category>
		<category><![CDATA[pneumatic linear actuator]]></category>
		<category><![CDATA[qa testing software]]></category>
		<category><![CDATA[qa testing tools]]></category>
		<category><![CDATA[rotary actuator electric]]></category>
		<category><![CDATA[slow computer fix]]></category>
		<category><![CDATA[slow computer performance]]></category>
		<category><![CDATA[slow computer speed]]></category>
		<category><![CDATA[slow internet speed]]></category>
		<category><![CDATA[slow pc performance]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software functional testing]]></category>
		<category><![CDATA[software qa testing]]></category>
		<category><![CDATA[software testing automation]]></category>
		<category><![CDATA[software testing tools]]></category>
		<category><![CDATA[solenoid actuator]]></category>
		<category><![CDATA[speed up computer]]></category>
		<category><![CDATA[speed up my computer]]></category>
		<category><![CDATA[speed up my computer for free]]></category>
		<category><![CDATA[testing software tools]]></category>
		<category><![CDATA[valbia actuators]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=c3b2314c19d10e031f9c1a4e4476dd26</guid>
		<description><![CDATA[In his interview with Embedded Computing Design, Ken Karnofsky, Senior Strategist, Signal Processing Applications, MathWorks, explains how Model-Based Design keeps embedded systems, and costs, under control.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="6" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F6" />Model-Based Design enables rapid prototyping, easy debugging, accurate analysis, and a host of other system design benefits. Ken outlines the fundamentals of Model-Based Design and shows how techniques and tools such as automatic code generation and parallel computing with multicore processors can enhance simulation.</h3>
<p><span id="more-74"></span><span class='body'>
<p class="body-text-"></p>
<p class="interview-question"><span class="interviewer">ECD:</span> What trends do you see in embedded design?</p>
<p class="body-text-"><span class="interviewee">KARNOFSKY:</span> The overarching trend is accelerating integration of technologies at multiple levels, from hardware to applications. Interaction between system components is causing engineering disciplines to collaborate more effectively. One example stems from the growth of hardware/software coprocessing. Highly integrated computing architectures with multiple cores and hardware accelerators have performance and cost advantages, but they&#8217;re difficult to design and debug using conventional tools and processes. </p>
<p class="body-text-">A similar phenomenon is happening at the interface to the real world, where analog meets digital. We&#8217;re seeing increasing interest in mixed-signal system design, helping engineers use digital algorithms to lower cost and power consumption and improve the performance of sensors, RF transceivers, and other analog electronics.</p>
<p class="body-text-">Another integration trend is the increasing connectivity of everything. Smart everything &#8211; phones, cars, homes, and the power grid contain embedded devices that connect to the Internet and generate huge amounts of data. This requires additional expertise to specify and design the algorithms to communicate and process this data.</p>
<p class="body-text-">Furthermore, the proliferation of inexpensive hardware is transforming the experience of engineering students. Devices like Arduino and BeagleBoard make the integration of classroom and project-based learning a reality. We&#8217;re seeing a lot of curriculum innovation that involves integrating MATLAB and Simulink with these hardware platforms. These innovations will make today&#8217;s students better prepared for the work they&#8217;ll do in industry. </p>
<p class="interview-question"><span class="interviewer">ECD:</span> What are the advantages of Model-Based Design?</p>
<p class="body-text-"><span class="interviewee">KARNOFSKY:</span> Model-Based Design (MBD) uses a system model as an executable specification throughout development (see example in Figure 1). The model represents the embedded system and its environment and enables:</p>
<ul>
<li class="bullets">System-level design and simulation.&nbsp;The system model can include every element that affects system behavior &#8211; algorithms, logic, physical components, and IP. Simulation enables analysis of system performance in conditions otherwise too expensive, risky, or time-consuming to consider.</li>
<li class="bullets">Automatic code generation. Generate&nbsp;C, C++, or HDL code from&nbsp;models for rapid prototyping and production software and hardware implementation. The generated code can be optimized and combined with handwritten code.</li>
<li class="bullets">Continuous test and verification. The&nbsp;system model captures requirements in an executable specification. It also provides a reusable test harness for virtual integration and hardware-in-the-loop testing.</li>
</ul>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F1" title="A system-level model of a wind turbine enables analysis of the electrical, hydraulic, mechanical, and control systems."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A system-level model of a wind turbine enables analysis of the electrical, hydraulic, mechanical, and control systems.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">In 2010, Embedded Market Forecasters conducted an analysis to determine the impact of MBD on the Total Cost of Development (TCD). Data was collected from companies worldwide in the automotive, aerospace, communications, industrial automation, and medical industries. The results show that:</p>
<ul>
<li class="bullets">Development teams that used MBD had an average 37 percent lower TCD compared to teams that did not use MBD.</li>
<li class="bullets">The number of developers used per project was smaller for MBD across all geographic areas and all vertical markets examined.</li>
<li class="bullets">The percent of developer months lost to design cancellation or projects behind schedule was consistently less for MBD development projects across all verticals and geographic areas.</li>
</ul>
<p class="interview-question"><span class="interviewer">ECD:</span> Can embedded design simulation replace physical prototypes?</p>
<p class="body-text-"><span class="interviewee">KARNOFSKY:</span> Simulation with system models enables rigorous system design verification with less time and expense than physical prototypes. This can significantly reduce the number of prototypes required, and in some cases eliminate them altogether. </p>
<p class="body-text-">The primary advantages of simulation are speed of design iterations and early visibility into system behavior for debugging, analysis, optimization, and verification. This reduces the design cost by identifying errors earlier in the development process, often without physical prototypes. </p>
<p class="body-text-">Engineers working toward an optimized design must develop their software and physical system together. Today, however, advances in tools and techniques enable highly accurate physical models that can replace physical prototypes of electrical, mechanical, and other components. </p>
<p class="body-text-">Many engineering teams also rely on automatic code generation with off-the-shelf rapid prototyping hardware (see Figure 2). Code generation enables reuse of algorithm and physical system models for real-time simulation and hardware-in-the-loop testing. These systems help engineers test more thoroughly by starting before hardware is available and simulating conditions that would be dangerous or costly to examine with the real system. They also significantly reduce development time and cost in the testing lab.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F2" title="A system-level model of a GPS receiver is integrated with test hardware for real-time verification."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> A system-level model of a GPS receiver is integrated with test hardware for real-time verification.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="interview-question"><span class="interviewer">ECD:</span> How does the latest wave of&nbsp;multicore processors affect design analysis and optimization?</p>
<p class="body-text-"><span class="interviewee">KARNOFSKY:</span> Multicore processors affect design in two ways. First, multicore PCs and servers provide an opportunity for dramatic reductions in simulation time. Parallel computing tools that are integrated with an MBD environment can take advantage of this computing power to accelerate execution of large-scale problems such as Monte Carlo simulations. For more information on how parallel computing techniques can speed up parameter optimization for a complex control system, see the MATLAB Digest article &#8220;Improving Simulink Design Optimization Performance Using Parallel Computing&#8221; at <span class="hyperlink"><a href="http://www.mathworks.com">www.mathworks.com</a></span>. </p>
<p class="body-text-">Second, multicore embedded processors make software design and development much more complex. Developing applications for these devices requires an understanding of the target processing architecture and careful assessment of execution performance, latency, and task dependencies. This is driving the need for tools that support the mapping of computationally intensive algorithms onto multicore architectures, as well as simulating execution in the target environment.  </p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F3" title="ECD in 2D: Using Model-Based Design, Bell Helicopter evaluated different aircraft configurations of the world&amp;#8217;s first civilian tiltrotor. Use your smartphone, scan this code, watch a video: http://opsy.st/kJUG4e. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5288%2Ffigures%2F3" alt="23" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: Using Model-Based Design, Bell Helicopter evaluated different aircraft configurations of the world&#8217;s first civilian tiltrotor. Use your smartphone, scan this code, watch a video: http://opsy.st/kJUG4e. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio"><span class="author-bio-name">Ken Karnofsky</span> is the senior strategist for signal processing applications at MathWorks. Through his 20 years of experience, first with BBN Technologies, then with MathWorks, Ken has been involved in development and marketing of software for signal processing and data analysis technologies. Ken holds a degree in Systems Engineering from the University of Pennsylvania.</p>
<p class="contact-info">MathWorks 508-647-7443 <span class="hyperlink"><a href="http://www.mathworks.com">www.mathworks.com</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Proven technologies and embedded expertise improve the smart grid&#8217;s security and resiliency</title>
		<link>http://embedded-computing.com/articles/proven-improve-smart-grids-security-resiliency/</link>
		<comments>http://embedded-computing.com/articles/proven-improve-smart-grids-security-resiliency/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 15:00:00 +0000</pubDate>
		<dc:creator>Jim McElroy, Green Hills Software</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Green Hills Software]]></category>
		<category><![CDATA[linux operating system]]></category>
		<category><![CDATA[linux os system]]></category>
		<category><![CDATA[smart energy]]></category>
		<category><![CDATA[smart grid]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=9af7f90c6b81f31b1333abc97a396be8</guid>
		<description><![CDATA[Just like building a house that can withstand storms, building a smart grid device requires a secure operating system as the foundation. Starting with a proven, secure operating system deployed in thousands of critical applications forms the groundwork on which security for an intelligent grid can be built.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5196%2Ffigures%2F2" />Just like building a house that can withstand storms, building a smart grid device requires a secure operating system as the foundation. Starting with a proven, secure operating system deployed in thousands of critical applications forms the groundwork on which security for an intelligent grid can be built.</h3>
<p><span id="more-159"></span><span class='body'>
<p class="body-text-">The smart energy market is hot. Just like a pressure cooker, there are many opposing forces pushing and pulling on the smart grid infrastructure, creating friction, heat, and opportunity. At the core, business challenges are colliding with technical and political challenges. There is money to be made by the utilities as well as grid component suppliers, and consumers will benefit from lower energy costs and more reliable energy. Politically, opposing forces are spouting concerns with privacy of information and even health hazards caused by the deployment and operation of smart energy equipment. </p>
<p class="body-text-">In its current state, the smart grid infrastructure is antiquated, completely insecure, incapable of supporting future energy demands, and not resilient to attack or system-level failures. That all said, utilities are rushing technology to market to provide automation and efficiency without any real consideration for security or reliability in their devices. At the next level down, in homes and businesses, the same can be said of the smart appliances that are being deployed. </p>
<p class="body-text-">Who is factoring security and reliability into their devices? There are huge ramifications for massively deploying insecure technology. Unfortunately, given the business drivers, it will likely take a catastrophic event to trigger government, utilities, and component manufacturers to come to the realization that they cannot sacrifice security and reliability without some different technology coming to bear. </p>
<p class="heading-1">Why security is so important</p>
<p class="body-text-">Much has been written on the security concerns of the grid and its systems, particularly Supervisory Control and Data Acquisition (SCADA, referring to computer systems that monitor and control industrial-, infrastructure-, or facility-based processes). Many in the SCADA world have heard of the Stuxnet worm, which was a deliberate cyber attack on a particular industrial system. In the future, smart people with misguided initiatives and time on their hands will start tapping into the devices in the home and take control of them, creating havoc, disrupting energy delivery, and stealing valuable private information. These are very real concerns for utilities and consumers, with enormous and far-reaching consequences. </p>
<p class="body-text-">Fortunately, there is hope for the smart grid as a whole. It will take time, but with an appropriate focus on protecting high-valued assets, smart grid component suppliers can leverage proven and certified technologies deployed in the aerospace, defense, industrial, and medical markets to make the grid more resilient and protected against component- and system-level failures as well as deliberate attacks.</p>
<p class="body-text-">For the grid to succeed, the components that make up the grid and the information and energy that traverse the grid must be secure and resilient. These elements must be secured, protected, and authenticated. Furthermore, when breakdowns occur, the grid must be able to self-heal and rapidly respond and recover from system failures. For system and device architects alike, the concept of defense in depth can and should be applied to people, operations, and the network of intelligent devices that comprise the grid. Single points of access and control are targets for attack and system failure. Layers of protection and separation of criticality need to exist to protect high-valued assets such as the systems monitoring and controlling the power grid. </p>
<p class="heading-1">Leveraging expertise with a certified operating system</p>
<p class="body-text-">To enable these capabilities in a cost-effective manner, smart grid device manufacturers should look to proven technologies and companies with experience deploying secure embedded devices in domains and applications like aerospace and defense that demand ultimate security and reliability. In these domains people&#8217;s lives are at stake, and systems must be designed to be absolutely secure, safe, and reliable. </p>
<p class="body-text-">The Green Hills Platform for Smart Energy provides the INTEGRITY certified Operating System (OS) to protect high-valued assets from well-funded attackers. INTEGRITY is the first and only OS technology to date to achieve certification from the National Security Agency for Evaluation Assurance Level (EAL) 6+ High Robustness, the highest level of security achieved for any commercial software. Green Hills, in business for nearly 30 years, has proven expertise in architecting secure, safe, and reliable embedded solutions. To address the software development of these complex and vital systems, developers utilize the best-in-class MULTI integrated development environment from Green Hills, which expedites the development, debugging, testing, and deployment of high-assurance real-time embedded applications. </p>
<p class="body-text-">Before looking at where the technology could be deployed, it is important to understand how and where this technology has been used. At the heart of the Green Hills platform for smart energy is an industry-proven real-time separation kernel, deployed in numerous safety- and security-critical applications such as the Joint Strike Fighter and the Joint Tactical Radio System. </p>
<p class="body-text-">The separation kernel uses hardware memory protection to create partitions and isolate and protect critical embedded applications. This ensures that each partition has the resources it needs to run correctly while also protecting the application from malicious attacks or application failures in other partitions. For complex security systems, applications with differing levels of security requirements can run in their own partitions. This architecture provides the necessary security and reliability capabilities compared to legacy applications running in a single address space. </p>
<p class="heading-1">Device-level decisions</p>
<p class="body-text-">When grid component suppliers design their devices, they make significant trade-offs between hardware cost, field upgradeability, power requirements, performance requirements, and hopefully security requirements. Manufacturers of intelligent devices need to determine what information and which devices need to be protected and how they will protect them.  </p>
<p class="body-text-">With the INTEGRITY separation kernel, intrusion prevention and detection, health monitoring, firewalls, encryption, data protection, event logging, and communication stacks are all examples of applications naturally separated into partitions, enabling the device to be more resilient and secure. For in-transit data protection, support for IPv4/IPv6 with protocols such as SSH, SSL, IPsec, IKE, and RADIUS is possible. In the wireless world, WPA and WPA2 provide the latest in wireless security. INTEGRITY intrinsically supports Multiple Independent Levels of Security (MILS) with separation, data isolation, and information flow control. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5196%2Ftables%2F1" title="Example Security protocols supported by INTEGRITY"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5196%2Ftables%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Table 1:</b> Example Security protocols supported by INTEGRITY</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.4x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">Virtualization adds to resilience</p>
<p class="body-text-">Virtualization enables disparate systems to be consolidated onto a single platform, allowing more functionality to reside on a single device and thus reducing bill of material cost. Example applications include network devices or utility applications that have applications running across mixed OSs. </p>
<p class="body-text-">A concrete example is a home energy console with a Graphical User Interface (GUI) running Android that collects information from appliances in the home and transfers confidential household or business information out to a concentrator with a trusted real-time application. In this example, Green Hills Secure Virtualization enables the GUI to run in its own secure virtual machine while the communications run in an independent virtual machine. The separation kernel protects the overall system from being affected by insecure applications running in isolated partitions. </p>
<p class="body-text-">Separation and virtualization make the system more resilient by giving the developer the ability to separate critical from non-critical tasks. In this way, the system can adapt to problems, self-heal, restart applications, and safely and securely continue to operate under adverse conditions. Figure 1 depicts an example architecture utilizing separation and virtualization. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5196%2Ffigures%2F1" title="An OS architecture using separation and virtualization enables the developer to separate critical from non-critical tasks."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5196%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> An OS architecture using separation and virtualization enables the developer to separate critical from non-critical tasks.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">For the smart grid, there are many areas where certified separation kernel technology can make the overall system more resilient to attack. With the large installed base of insecure legacy devices in the grid, a separation kernel with virtualization enables entirely insecure devices to safely and securely operate independently within a partition. This allows the utilities and device manufacturers to leverage and reuse legacy devices in the overall grid architecture by isolating insecure partitions from security-critical components. </p>
<p class="body-text-">From the utility perspective, the ability to enable components in the grid with secure partitions for trusted communication and health monitoring means utilities can remotely monitor, control, and upgrade fielded components as required and as policy permits. This will enable both automated and manual response mechanisms to grid performance and functionality issues. </p>
<p class="heading-1">Getting the foundation right</p>
<p class="body-text-">Several other topics must be addressed to improve the grid&#8217;s resiliency, such as device and information authentication, secure boot, secure wireless and wired protocols, government policies, physical access control, and operational management. Those items cannot be properly addressed on top of an insecure OS. </p>
<p class="body-text-">At the heart of the grid are devices that collect, transmit, receive, and process valuable private information. The foundation for the success of the grid depends on these devices being properly secured and protected. Therefore, device manufacturers should leverage companies and technology that have a proven track record for delivering certified security and safety solutions in critical environments. </p>
<p class="author-bio"><span class="author-bio-name">Jim McElroy </span>is director of industry business development for Green Hills Software, where he is responsible for defining vertical solutions for clients and expanding business in sectors such as medical, smart energy, and transportation. He has worked in the embedded industry for more than 20 years, maintaining management and engineering positions at Esterel Technologies, Telelogic North America, I-Logix, Raytheon, and Lockheed Martin. Jim holds a BS in Computer Science from the University of Massachusetts and an MS in Computer Science from Fitchburg State College.</p>
<p class="contact-info">Green Hills Software <span class="body-text-">805-965-6044 <span class="hyperlink"><a href="http://www.ghs.com">www.ghs.com</a></span>  </div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding concurrency errors with static analysis</title>
		<link>http://embedded-computing.com/articles/finding-concurrency-errors-static-analysis/</link>
		<comments>http://embedded-computing.com/articles/finding-concurrency-errors-static-analysis/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 15:00:00 +0000</pubDate>
		<dc:creator>Paul Anderson, GrammaTech</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[diskless computer]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[GrammaTech]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computer linux]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software for engineers]]></category>
		<category><![CDATA[static analysis]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=88d6c66ea94987d95bcd345e06e00c2e</guid>
		<description><![CDATA[Static analysis tools aid in eliminating the concurrency pitfalls of multithreaded code.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F4" />Due to the rise of multicore processors, programmers increasingly need to write multithreaded code. Pitfalls such as race conditions, starvation, and deadlock make it hard to get such code right, and traditional testing can only help so much. New approaches based on static analysis are proving effective at quickly finding difficult bugs.</h3>
<p><span id="more-222"></span><span class='body'>
<p class="body-text-">Although decades of advances in miniaturization have yielded enormous performance gains for single processors, it appears this era is coming to a close. The best bet for achieving significant additional performance with single chips is through multiple cores, but only if software can be programmed to take advantage of them. </p>
<p class="body-text-">Unfortunately, concurrent programming is difficult. Even expert-level programmers familiar only with single-threaded programming often fail to appreciate that concurrent programs are susceptible to entirely new classes of defects such as race conditions, deadlocks, and starvation. It is difficult for humans to reason about concurrent programs, and some aspects of programming languages themselves are ill-suited to concurrency. Consequently, experts frequently stumble over these hazards. The following discussion describes common concurrency pitfalls and explains how static analysis tools can find such defects without executing the program.</p>
<p class="heading-1">Consequences of race conditions</p>
<p class="body-text-">A race condition arises when multiple threads of execution access a shared piece of data and at least one of them changes the value of that data without an explicit synchronization operation to separate the accesses. Depending on the interleaving of the two threads, the system can be left in an inconsistent state. </p>
<p class="body-text-">Race conditions are especially insidious because they can lurk undetected indefinitely, and only show up in rare circumstances exhibiting mysterious symptoms that are difficult to diagnose and reproduce. In particular, they are likely to survive through testing into deployed software. At best, this means increased development times; at worst, the consequences can be devastating. </p>
<p class="body-text-">One reason the Northeast Blackout of 2003 was so widespread was that a race condition in a computerized energy management system caused misleading information to be communicated to the operators. As Kevin Poulsen noted in a 2004 article (<span class="hyperlink"><a href="http://www.securityfocus.com/news/8412">www.securityfocus.com/news/8412</a></span>), &#8220;the bug had a window of opportunity measured in milliseconds.&#8221; The chances of a problem like this manifesting during testing are infinitesimal. In another case, a race condition in iOS 4.0 through 4.1 (now fixed) meant that any person with physical access to an iPhone 3G or later could bypass its passcode lock under certain conditions. </p>
<p class="body-text-">An example of a simple race condition is shown in Figure 1. A manufacturing assembly line with entry and exit sensors maintains a running count of the items currently on the line. This count is incremented every time an item enters the line and decremented every time an item reaches the end of the line and exits. If an item enters the line at the same time that another item exits, the count should be incremented and then decremented (or vice versa) for a net change of zero. However, normal increment and decrement are not atomic operations; they are composed of a sequence of individual instructions that first loads the value from memory, then modifies it locally, and finally stores it back in memory. If the updating transactions are processed in a multithreaded system without sufficient safeguards, a race condition can arise because the sensors read and write a shared piece of data: the count. The interleaving in Figure 1 results in an incorrect count of 69. There are also interleavings that can result in an incorrect count of 71, as well as some that correctly result in a count of 70.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F1" title="A race condition leads to an incorrect count of items on an assembly line."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> A race condition leads to an incorrect count of items on an assembly line.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">For this example and for race condition bugs in general, standard debugging techniques may be ineffective for several reasons. </p>
<p class="body-text-"><span class="italics">Rare occurrence</span> means a reduced chance of noticing there is a problem. If the problem manifests infrequently, it may never show up during testing. The issue is twofold. Firstly, the number of possible interleavings of the instructions in two threads can be huge and increases enormously as the number of instructions grows. This phenomenon is known as <span class="italics">combinatorial explosion</span>. If thread A executes <span class="italics">M</span> instructions and thread B executes <span class="italics">N</span>;instructions, the possible interleavings of the two threads are:</p>
<p class="figures">
<figure>
<table width="190" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=661,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Fequations%2F1" title=""><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=180&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Fequations%2F1" alt="21" width="180" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Equation 1</b></figcaption>
<div class="fig-zoom">(Click graphic to zoom by 4.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">For example, given two trivial threads with 10 instructions each, there are 184,756 possible interleavings of the instructions. Real-world software is large and complex; testing every interleaving is simply impossible. Secondly, even if testers can identify a few interleavings that merit inspection, it is difficult to set up test cases to ensure they actually occur because thread scheduling can be highly nondeterministic.</p>
<p class="body-text-">If exhaustive testing is intractable, then what can developers do? One extremely useful approach is static analysis. Advanced static analysis tools such as CodeSonar use highly sophisticated symbolic execution techniques to consider many possible execution paths and interleavings at once. These techniques can find race conditions and other concurrency errors without needing to execute the program.</p>
<p class="body-text-">Several factors make race condition diagnosis difficult. Firstly, the symptoms can be perplexing. In the Figure 1 example, the running count will usually be correct, but sometimes too high and other times too low. Secondly, programmers unaccustomed to considering the particular pitfalls of multithreaded programming may spend a lot of time puzzling over the code before the possibility of a race condition occurs to them. Advanced static analysis tools are especially helpful in this regard. They identify race conditions by examining patterns of access to shared memory locations; that is, they focus on the race itself, not its symptoms. When a race condition is identified, an advanced static analysis tool will report it along with supporting information to aid the user in evaluation and debugging. The onus on the programmer is substantially reduced. </p>
<p class="heading-1">More complexity, more bugs</p>
<p class="body-text-">Race conditions are typically avoided by using locks to protect shared resources. However, locks can introduce performance bottlenecks that might prevent the program from taking advantage of the full potential of multiple cores, so programmers must exercise care in using them. It can be tricky to write code that uses locks effectively, and this complexity can lead to a different set of problems, namely deadlock and starvation.</p>
<p class="body-text-">In a deadlock, two or more threads prevent each other from making progress because each holds a lock needed by another. Figure 2 shows how a deadlock can arise with two locks used to protect two shared variables. In this example, multiple assembly lines share a count of the total number of items currently under assembly, and a second bad_items value records how many finished items failed quality control. One thread acquires the lock on count, another acquires the lock on bad_items. Neither thread can obtain the second lock it needs; thus neither can carry out its operations, nor can it get to the point where it will release its lock. As neither update can be completed, both threads are completely stuck.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F2" title="In a deadlock between two threads, neither thread can progress."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> In a deadlock between two threads, neither thread can progress.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">Static analysis tools can identify software at risk of deadlock by flagging situations where the same locks can be acquired in different orders by different threads, such as the threads shown in Figure 2. Eliminating all such cases is sufficient to ensure that the system cannot become deadlocked. </p>
<p class="body-text-">Starvation is another problem that occurs in multithreaded programs that use locks. A thread can starve if it is waiting for a resource currently held by another thread that takes a very long time. For example, suppose the aforementioned manufacturing automation system includes a regular audit thread that examines all entry and exit records to ensure that the running count matches total items entering less total items exiting. The audit thread would need to hold locks on the count and on all sensors, so all updates must wait for the audit to finish. If the audit runs for a long time, updates can be significantly delayed. If it runs too long, the next audit may manage to acquire all the locks and start running before the outstanding thread can make any progress. In the worst case, some or all of the updates may never have the opportunity to run. </p>
<p class="body-text-">Static analysis can provide significant value here by posing questions such as, &#8220;Is there a call to a long-running library function while a lock is held?&#8221; Tools such as CodeSonar also provide mechanisms for users to add their own checks. If an in-house function f() is known to have a long running time, engineers could add a custom check that triggers a warning whenever f() is called by a thread that holds one or more locks. </p>
<p class="body-text-">Multithreading adds entirely new classes of potential bugs to those that embedded developers must consider, making it significantly more difficult to find bugs of all kinds. The latest generation of static analysis tools can help with both of these issues.  </p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F3" title="ECD in 2D: A demo of CodeSonar shows how the tool can identify bugs in each version of the software being analyzed. Use your smartphone, scan this code, watch a video: http://opsy.st/kSRTWh. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5192%2Ffigures%2F3" alt="23" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: A demo of CodeSonar shows how the tool can identify bugs in each version of the software being analyzed. Use your smartphone, scan this code, watch a video: http://opsy.st/kSRTWh. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio"><span class="author-bio-name">Paul Anderson</span> is VP of engineering at GrammaTech, where he manages the engineering team and architects static analysis tools. He has worked in the software industry for 20 years, helping organizations including NASA, the FDA, the FAA, MITRE, Draper Laboratory, GE, Lockheed Martin, and Boeing apply automated code analysis to critical projects. He received his BSc from King&#8217;s College London and his PhD in Computer Science from City University London.</p>
<p class="contact-info">GrammaTech  paul@grammatech.com  www.grammatech.com</p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Static analysis: Beyond a simple list of defects</title>
		<link>http://embedded-computing.com/articles/static-analysis-beyond-simple-list-defects/</link>
		<comments>http://embedded-computing.com/articles/static-analysis-beyond-simple-list-defects/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 15:00:00 +0000</pubDate>
		<dc:creator>Rutul Dave, Coverity</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Coverity]]></category>
		<category><![CDATA[diskless computer]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computer linux]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software for engineers]]></category>
		<category><![CDATA[static analysis]]></category>
		<category><![CDATA[Static code analysis]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=d1acf315cafadeea777f01a56b703c91</guid>
		<description><![CDATA[Contextual information is a valuable asset that enhances static code analysis in the quest for error-free software.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="4" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F4" />You&#8217;ve been diligent and used static code analysis to identify defects early during development. Great. So now what? Finding defects is just the first step in the process of ensuring software integrity. Contextual information on every identified defect is essential to prioritize fixes and maintain bug-free software.</h3>
<p><span id="more-120"></span><span class='body'>
<p class="body-text-">Embedded software is ubiquitous and provides critical functionality in a variety of devices, from the latest smartphones and gaming gadgets to life-saving medical devices. Engineering organizations creating embedded software understand that ensuring quality of code is a key differentiator and competitive advantage. Along with other methods of testing and verification, many companies have taken advantage of the benefits of code testing with modern static analysis to identify defects early in development. During the&nbsp;past few years, various reports by embedded market research firm VDC Research indicate strong growth in companies adopting static analysis as a critical test automation tool. Modern&nbsp;static analysis is arguably the most cost-effective, automated, and repeatable way to meet the challenge of ensuring the quality of complex software. </p>
<p class="body-text-">A strong reason driving this growth is that the technology used to identify critical defects such as memory corruptions, resource leaks, null pointer dereferences, and invalid memory accesses has matured to a point where finding large numbers of hard-to-find defects that traverse function and file boundaries can now be accomplished accurately, resulting in a very small number of false positives. However, the real innovation lies in providing contextual information for every defect identified. A developer needs to know why the defect exists, what impact it will have, and where it needs to be fixed. </p>
<p class="body-text-">The answer to the question of where it needs to be fixed is not as simple as knowing the file name and line number. Code branching and merging for versioning, reuse of code, and reuse of code components for development productivity allow a defect to make its way into multiple versions and products. </p>
<p class="body-text-">Consider the case of a software team with multiple branches for various versions of the product. A bug in one of these branches might exist in one or more other branches due to code replication. In another case, consider a team creating the framework to support applications for smartphones. Because they might be porting the framework onto various platforms like Windows, Android, or iPhone, it is critical that the static analysis results clearly indicate whether identified defects exist in just one place or on multiple platforms. Similarly, when software is created by aggregating from multiple sources, it is a nightmare when a particular component is used in various products, as a defect in one third-party component might end up affecting all the different products that include it. </p>
<p class="heading-1">Multiple branches for different versions of an operating system </p>
<p class="body-text-">Imagine a software development team responsible for creating a new Operating System (OS) for mobile smartphones. Because multiple mobile phone vendors (OEMs) must be supported, every vendor in the source control management system needs a development branch. In addition, each vendor typically has multiple branches for different releases and product generations. The picture starts to get complex very quickly.</p>
<p class="body-text-">Static analysis performed on every branch of the code produces a list of defects. However, depending on when a defect is introduced, it could exist in all versions or a subset. When looking at a single defect in isolation in a single branch, the challenge for developers is that they can&#8217;t gauge the severity of the defect without knowing where else it is present. A defect that is not limited to a single version or one OEM client would be severe, and fixing it would need to be prioritized over anything else. Additionally, a developer writing code to fix the defect needs to know exactly which branches in the source control management system the fix&nbsp;needs to be checked in. Analysis results that pinpoint the exact location where the defect exists and provide information such as the branches where defects occur are highly valuable to developers (see Figure 1).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F1" title="Defects duplicate due to code branching and merging."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Defects duplicate due to code branching and merging.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">A single framework for multiple&nbsp;platforms</p>
<p class="body-text-">On the flip side of branching, there is often a need to write code designed to run on multiple platforms. A software component such as a framework for mobile applications is usually built to run on various types of mobile phone platforms. For embedded devices, a common requirement is to build 32- and 64-bit versions of the same code base. Let&#8217;s take a simple example: </p>
<p class="body-text-"><span class="code-character">gcc &#8211;m32 -c foo.c </span></p>
<p class="body-text-">// 32-bit compile. Contains a null pointer dereference defect.</p>
<p class="body-text-"><span class="code-character">gcc -c foo.c </span></p>
<p class="body-text-">// 64-bit compile. Contains the same null pointer dereference defect.</p>
<p class="body-text-">A defect in <span class="code-character">foo.c</span> that gets triggered in both 32- and 64-bit binaries will be detected and reported as a single defect. However, because the source code is the same, a sophisticated analysis would not report it as a duplicate defect. Duplicates are as harmful as false positives in losing the developer&#8217;s trust in the static analysis&nbsp;solution.</p>
<p class="heading-1">Sharing common code&nbsp;components</p>
<p class="body-text-">In this final example, consider a team developing the platform software for a family of networking switches. Because the functionality provided by the platform software must be implemented in all products, this code component will be shared (see Figure 2). For developers working on this team, the best assessment of the severity of a defect reported by static analysis is not only the impact it will have on one switch product, but also information on all the products that use this platform software component.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F2" title="A single software component is reused in multiple products."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> A single software component is reused in multiple products.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">A product is usually created by combining many such shared components. Each component is not only a project itself, but also a part of various other projects using it. The analysis result needs to identify that a defect in this shared component has an impact on the various projects using it. </p>
<p class="heading-1">Taking the guesswork out of code&nbsp;testing</p>
<p class="body-text-">The adoption of modern developer-side testing methods such as static analysis is a positive trend in the embedded software industry. The technology has matured to a point where it is a strong weapon in the software engineer&#8217;s arsenal. Without needing to create elaborate test cases and testing infrastructures, static analysis automatically finds critical defects as code is written and compiled. However, for static analysis to become a developer&#8217;s most valuable tool, the analysis must provide answers to questions such as &#8220;What is the impact of this defect?&#8221; and &#8220;Where do I need to check in the fix?&#8221; to help prioritize fixing the identified defects and take the guesswork out of ensuring that software is as bug-free as possible.</p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F3" title="ECD in 2D: Former Coverity CTO Ben Chelf explains how the software analysis capabilities offered by Coverity Integrity Center can help avoid debugging nightmares. Use your smartphone, scan this code, watch a video: http://opsy.st/ikAgqg. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5191%2Ffigures%2F3" alt="23" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: Former Coverity CTO Ben Chelf explains how the software analysis capabilities offered by Coverity Integrity Center can help avoid debugging nightmares. Use your smartphone, scan this code, watch a video: http://opsy.st/ikAgqg. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio"><span class="author-bio-name">Rutul Dave</span> is senior development manager at Coverity. He has several years of software development experience in embedded and real-time systems, including work developing bleeding-edge technology systems at Procket Networks, Topspin Communications, and Cisco Systems. When not evangelizing about the benefits of software integrity, Rutul scratches the coding itch by developing mobile apps and understanding the Linux kernel. He received his Master&#8217;s in Computer Science with a focus on networking and communications systems from the University of Southern California. </p>
<p class="contact-info">Coverity   <span class="hyperlink"><a href="mailto:info@coverity.com">info@coverity.com</a></span> www.coverity.com</p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows tackles embedded complexity</title>
		<link>http://embedded-computing.com/articles/windows-tackles-embedded-complexity/</link>
		<comments>http://embedded-computing.com/articles/windows-tackles-embedded-complexity/#comments</comments>
		<pubDate>Thu, 05 May 2011 15:00:00 +0000</pubDate>
		<dc:creator>Warren Webb, Editorial Director,</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[diskless computer]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computer linux]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=68b6982f528c03fe32e0f1eeee0f1939</guid>
		<description><![CDATA[With embedded devices looking more like off-the-shelf PCs, adding a Windows Embedded portfolio to suit consumer demands is a logical OS choice.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="3" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5162%2Ffigures%2F3" />As embedded devices grow in complexity and incorporate more and more features already available in the PC world, it may be time to take another look at the Windows Embedded software suite.</h3>
<p><span id="more-147"></span><span class='body'>
<p class="body-text"><span class="got-a-sec">Embedded devices are beginning to look a lot like desktop computers, as customers demand graphical interfaces, high-speed communications, multimedia, and full integration with Internet-delivered data and services. With these features already built into the Windows operating system, it is only natural for developers to consider variations of the Windows operating system for new embedded products. Microsoft&#8217;s latest Windows Embedded portfolio of platforms and technologies offers the developer plenty of features and functionality to support the next generation of highly complex embedded devices. </span></p>
<p class="body-text"><span class="got-a-sec">Software complexity is just one of several reasons to consider a Windows variation for embedded applications. Other advantages of a Windows-based operating system are the availability of a large number of skilled programmers, familiar development tools, and extensive third-party hardware and software support. Newer embedded devices also require local data security for remote applications and network security software to safely connect with remote databases and services. Windows Embedded Standard&nbsp;7 includes several new security features, including BitLocker and DirectAccess to deal with these cases. For local security, BitLocker encrypts data stored on protected volumes, so if a hard drive is removed from the system, the data is unreadable. For communications security, DirectAccess automatically creates a secure connection between client systems and the company server without the need to initiate a Virtual Private Network (VPN) session. Microsoft also spends considerable time and resources testing and fixing security flaws for both desktop and embedded products.</span></p>
<p class="heading-1"><span class="got-a-sec">Thousands of image components</span></p>
<p class="body-text"><span class="got-a-sec">Code size is often listed as a disadvantage for Windows-based designs. However, Windows Embedded Standard 7 is broken down into thousands of components. It&#8217;s possible to pick from predesigned templates or create a completely unique software configuration, depending on your application. You can use Microsoft tools such as Image Builder Wizard to select from a few options or Image Configuration Editor to add, remove, or configure any functionality in Standard 7 automatically. You can create a specialized embedded operating system image that is as small as 600 MB. (The standard Windows image is about 16 GB.) After the image is running, you can make&nbsp;additional changes manually. Such changes could include installing and configuring software and drivers or customizing the Windows Welcome Screen.</span></p>
<p class="body-text"><span class="got-a-sec">Another frequently cited reason against developing a Windows-based embedded product is the poor response to real-time inputs. Windows Embedded Standard 7 has no inherent real-time capabilities. Thread switch times can be excessive, depending on software activity. For these applications, Microsoft recommends Windows Embedded Compact 7, an updated version of Windows Embedded CE, or third-party, real-time plug-ins that can be used to support a wide range of real-time, small-footprint enterprise and consumer devices. TenAsys is one of several vendors who offer real-time virtualization software compatible with the Windows Embedded Standard 7 platform. The TenAsys INtime RTOS allows you to combine the high-level features of Windows with a real-time, deterministic operating system.</span></p>
<p class="heading-1"><span class="got-a-sec">Embedded off-the-shelf modules</span></p>
<p class="body-text"><span class="got-a-sec">One of the fastest methods to develop a new embedded device is to combine a pre-engineered, off-the-shelf module with a compatible and tested operating system. For example, Advantech supports Windows Embedded Standard 7 for a number of embedded boards, including the SOM-5890 COM Express module (Figure&nbsp;1), which also fits digital signage applications.</span></p>
<p class="body-text"><span class="got-a-sec">The Advantech 4.92-inch x 3.74-inch SOM-5890 COM&nbsp;Express module is compliant with the newly released PICMG COM.0 R2.0 Type 6 specification and offers HDMI, DVI, and DisplayPort video interfaces as well as SVDO, LVDS, and VGA output. The COM Express module is based on the Intel Core i7 processor and Intel QM67 Express chipset and supports graphic intensive, multi-display applications. The SOM-5890 supports up to 16 GB of dual-channel DDR3 memory and extensive interface expansion for up to three DDIs, multiple PCI Express lanes, USB 2.0 ports, and a Gigabit Ethernet interface along with serial and general-purpose I/O ports. The SOM-5890 board includes specialized support for Windows Embedded Standard 7, and the module ships with Advantech&#8217;s iManager software and related APIs. (*See below for acronyms.)</span></p>
<p class="figures"><span class="got-a-sec"><br />
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=704,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5162%2Ffigures%2F1" title="The Advantech SOM-5890 COM Express module targets embedded applications and is compatible with the Windows Embedded Standard 7 operating system."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5162%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> The Advantech SOM-5890 COM Express module targets embedded applications and is compatible with the Windows Embedded Standard 7 operating system.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p>		   </span></p>
<p class="heading-1"><span class="got-a-sec">Digital signs capture video analytics</span></p>
<p class="body-text"><span class="got-a-sec">One application that vividly demonstrates the ability of Windows Embedded Standard 7 to handle complex requirements is the Next-Generation Digital Signage project cosponsored by Microsoft, Intel, and NEC. Digital signage has become ubiquitous in the retail, transportation, education, health care, and lodging markets, delivering high-speed information and advertising content to a wide range of consumers. The Next-Generation Digital Signage project presents advertisers with new opportunities through the use of anonymous video analytics. As consumers pass by and look at the system screen, a built-in camera captures images. System software stores data such as gender, age, length of visit, and time of day to allow advertisers to tailor their content and graphics based on expected demographics. The system can also present daily specials, downloadable coupons, store maps, and other information in real time to respond to customer gestures, motion, or touch-screen inquiries (Figure 2).</span></p>
<p class="figures"><span class="got-a-sec"><br />
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=677,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5162%2Ffigures%2F2" title="The 7.5-foot-tall Intelligent Digital Signage Concept from Intel and Microsoft previews next-generation multi-touch, multi-user advertising techniques."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5162%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> The 7.5-foot-tall Intelligent Digital Signage Concept from Intel and Microsoft previews next-generation multi-touch, multi-user advertising techniques.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p>		   </span></p>
<p class="body-text"><span class="got-a-sec">In addition to Microsoft&#8217;s Windows Embedded Standard 7 operating system, the Next-Generation Digital Signage project relies on a group of technologies now available with the 2nd generation Intel Core architecture. This new architecture includes numerous graphics enhancements such as the integral graphics processor for high-definition hardware image decoding, the Intel&nbsp;Advanced Vector Extensions (AVX) instruction set for faster floating-point capabilities, and a modular design to simplify upgrades. The graphics section comprises an array of parallel execution units for 3D applications and hardware acceleration for high-speed encoding/decoding of high-definition video. These new multicore processors also utilize the Intel Active Management Technology (AMT) and Intel vPro Technology to enable remote system management for monitoring, troubleshooting, and content updates even when powered down.</span></p>
<p class="heading-1"><span class="got-a-sec">Standards reduce fragmentation</span></p>
<p class="body-text"><span class="got-a-sec">NEC is creating the standardized hardware platform for the Next-Generation Digital Signage project, which combines a specialized display system that combines interactivity, audience measurement, and remote management. The NEC controller module and display are based on Intel&#8217;s Open Pluggable Specification (OPS) defining the electrical, mechanical, and thermal specifications for a plug-in module containing the computing system necessary to drive a digital signage display panel. Intel created the specification to reduce fragmentation within the digital signage market and to simplify installation, usage, maintenance, and upgrades. The OPS makes it possible for digital signage manufacturers to rapidly deploy large numbers of interoperable systems while reducing development, implementation, and support costs. </span></p>
<p class="body-text"><span class="got-a-sec">In addition to the Windows Embedded Standard operating system formerly known as XPe, Microsoft has defined or renamed several specialized versions of Windows Embedded including Compact (formerly CE), POSReady (WEPOS), Enterprise, Automotive, Server, Thin Client, and Handheld. Unique documentation, examples, and possible hardware selections to fit the category support each of these variants. Microsoft also recently released the Windows Embedded Device Manager, which allows you to deploy and update images for all your embedded devices from a single tool. With all these platforms and support tools, developers have plenty of options to handle the escalating complexity of tomorrow&#8217;s embedded projects. </span></p>
<p class="author-bio"><span class="got-a-sec">Warren Webb&#8217;s background includes more than 30 years as an engineer and entrepreneur developing high-tech products for the aerospace and health care industries. Most recently, he has been writing articles on hardware design, software development, and emerging technologies for international trade magazines. Warren holds an MBA from Pepperdine University, an MS in Electrical Engineering from San Diego State, and a&nbsp;High Honors BSEE from the University of Tennessee.</span></p>
<p class="answer">More online:</p>
<p class="answer">Migrating to Windows Embedded Standard 7 white paper http://opsy.st/hxzypt</p>
<p class="answer">Intel Core Processor Family webcast http://opsy.st/gZwBIy</p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to build a better smartphone: Architecting with mobile virtualization for secure military communications</title>
		<link>http://embedded-computing.com/articles/how-build-better-virtualization-secure-military-communications/</link>
		<comments>http://embedded-computing.com/articles/how-build-better-virtualization-secure-military-communications/#comments</comments>
		<pubDate>Fri, 29 Apr 2011 15:00:00 +0000</pubDate>
		<dc:creator>Rob McCammon, Open Kernel Labs</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[application development for mobile]]></category>
		<category><![CDATA[application integration middleware]]></category>
		<category><![CDATA[applications software development]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[best gaming desktop]]></category>
		<category><![CDATA[best gaming desktops]]></category>
		<category><![CDATA[best gaming laptop]]></category>
		<category><![CDATA[cheap gaming desktop]]></category>
		<category><![CDATA[cheap gaming desktops]]></category>
		<category><![CDATA[cheap gaming laptops]]></category>
		<category><![CDATA[computer base units]]></category>
		<category><![CDATA[creating mobile applications]]></category>
		<category><![CDATA[custom build laptop]]></category>
		<category><![CDATA[custom build laptops]]></category>
		<category><![CDATA[custom build pc]]></category>
		<category><![CDATA[custom built gaming laptops]]></category>
		<category><![CDATA[custom gamer pc]]></category>
		<category><![CDATA[custom gaming desktop]]></category>
		<category><![CDATA[custom gaming laptops]]></category>
		<category><![CDATA[custom mobile application development]]></category>
		<category><![CDATA[dell cheap desktop]]></category>
		<category><![CDATA[eai integration]]></category>
		<category><![CDATA[eingebettete systeme]]></category>
		<category><![CDATA[embed system]]></category>
		<category><![CDATA[How to build a better smartphone]]></category>
		<category><![CDATA[j2me java applications]]></category>
		<category><![CDATA[java mobile application]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[mobile app developer]]></category>
		<category><![CDATA[mobile app development]]></category>
		<category><![CDATA[mobile application]]></category>
		<category><![CDATA[mobile application companies]]></category>
		<category><![CDATA[mobile application developer]]></category>
		<category><![CDATA[mobile application development]]></category>
		<category><![CDATA[mobile application development platform]]></category>
		<category><![CDATA[mobile application platform]]></category>
		<category><![CDATA[mobile application solution]]></category>
		<category><![CDATA[mobile application solutions]]></category>
		<category><![CDATA[mobile applications developer]]></category>
		<category><![CDATA[mobile applications development]]></category>
		<category><![CDATA[mobile applications platform]]></category>
		<category><![CDATA[mobile applications platforms]]></category>
		<category><![CDATA[mobile apps development]]></category>
		<category><![CDATA[mobile data solutions]]></category>
		<category><![CDATA[mobile device application]]></category>
		<category><![CDATA[mobile device applications]]></category>
		<category><![CDATA[mobile device software development]]></category>
		<category><![CDATA[mobile enterprise application]]></category>
		<category><![CDATA[mobile java apps]]></category>
		<category><![CDATA[mobile phone application development]]></category>
		<category><![CDATA[mobile phone software development]]></category>
		<category><![CDATA[mobile software development companies]]></category>
		<category><![CDATA[mobile software solutions]]></category>
		<category><![CDATA[mobile virtualization]]></category>
		<category><![CDATA[mobile wireless communications]]></category>
		<category><![CDATA[new mobile applications]]></category>
		<category><![CDATA[Open Kernel Labs]]></category>
		<category><![CDATA[pc desktop deals]]></category>
		<category><![CDATA[rtos operating system]]></category>
		<category><![CDATA[server storage virtualization]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[virtualization of servers]]></category>
		<category><![CDATA[virtualized data center]]></category>
		<category><![CDATA[wireless and mobile computing]]></category>
		<category><![CDATA[wireless software development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=18a1bacbcef9310eb98ce528c4aed190</guid>
		<description><![CDATA[Real-world, secure &#8220;superphones&#8221; are deployed to the mobile military personnel thanks to COTS hardware/software and mobile virtualization.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5172%2Ffigures%2F2" />OEMs and integrators can build cost-effective &#8220;superphones&#8221; &#8211; like the &#8220;ObamaBerry&#8221; or Jack Bauer&#8217;s phone on the Fox TV show &#8220;24&#8221; &#8211; but for real military personnel and members of the intelligence community. To do this, a key consideration is understanding architectural options for melding standard commercial smartphone device hardware with mobile virtualization and open source software.</h3>
<p><span id="more-16303"></span><span class='body'>
<p class="body-text">Military personnel and national security operatives are probably the most mobile workers in public service today, and depend on specialized and secure communications equipment to fulfill their missions at the office and in the field.</p>
<p class="body-text">In the past, such secure communications devices &#8211; digital field radios, police/fire radio transceivers, and so on &#8211; emerged from highly proprietary design and acquisition cycles, resulting in systems that were hard to build, expensive to acquire, difficult to maintain, and impossible to upgrade. And they were yet another device for personnel to carry in addition to handsets and notebook computers. </p>
<p class="body-text">Today, in lockstep with initiatives previously launched by the U.S. government, federal agency IT management and mobile device integrators and contractors are leaving behind the world of proprietary legacy systems and looking for COTS mobile solutions similar to those used by Jack Bauer on Fox TV&#8217;s &#8220;24&#8221; or the &#8220;ObamaBerry.&#8221;</p>
<p class="body-text">The following sections explore using COTS hardware and software to create secure mobile communications devices. In particular, they focus on mobile security threats, lay out requirements for secure mobile devices, and present architectural options for integrating standard commercial smartphone device hardware with open source software and mobile virtualization. An Android proof-of-concept is also introduced.</p>
<p class="heading-1">Threats to mobile security </p>
<p class="body-text">As mobile devices become increasingly similar to desktop and also data center computers, they suffer from the same maladies that plague corporate and government IT:</p>
<p class="body-text">Vulnerabilities: Devices are subject to viruses, spyware, Trojan horses, and other malware. Application code bases and the middleware that supports them are large &#8211; tens of millions of line of code&nbsp;&#8211; and by definition untrustworthy and non-certifiable.</p>
<p class="body-text">Buggy software: Mobile OSs and the software that runs on them are unavoidably buggy and thus are subject to a constant stream of <span class="italics">zero-day attacks,</span> which are exploits of application vulnerabilities unknown to the software developer. Open OSs supporting standard application development (such as RimOS and WindowsPhone) and open source OSs (such as Android or Linux) and applications that run on them emerge from commercial and community development of greatly varying quality and sensibilities &#8211; especially where security is concerned.</p>
<p class="body-text">Brute force attacks: Mobile applications running on smartphones, including communications clients, are subject to Denial of Service (DoS) attacks on a per-process and system-wide level, for example. Of particular concern to government and other public entities are exploits that expose voice, text messaging, and other data streams to eavesdropping or other unauthorized third-party scrutiny. Another worry is the ability of unauthorized parties to interrupt mission-critical communications and spoof or forge participant identities and content.</p>
<p class="heading-1">A secure mobile communications&nbsp;device</p>
<p class="body-text">Ideally, a secure mobile communications device such as a smartphone would be constructed from commercially available handsets and tablets that deploy off-the-shelf software platforms and applications running Android or Linux, for example. Devices need to support regular communications (voice, texting, social networking, and so on) and applications for &#8220;normal&#8221; conversations, but also enable secure exchanges (encrypted voice and secure texting/video transmission) among similarly equipped devices and/or infrastructure. </p>
<p class="body-text">Ultimately, the scenarios of interest boil down to straightforward but difficult-to-meet requirements criteria. One requirement is that of secure communications, which refers to conventional applications including 3G voice, VoIP, Short and Multimedia Messaging Services (SMS/MMS), video, and so on, where clients run in secure contexts with options for encrypting data streams.</p>
<p class="body-text">Open networks are also required. Using COTS hardware and software also predicates leveraging ubiquitous 3G, WiFi, and other public networks for private and secure communications. While GPRS, CDMA, 802.11, and so forth offer their own security regimes, those measures alone are insufficient to support secure and certified systems needs&nbsp;&#8211; they have been repeatedly demonstrated to be vulnerable to sniffing, spoofing, and other exploit techniques.</p>
<p class="body-text">The requirement for off-the-shelf devices can also be difficult to meet. The vision for secure communications described herein builds on COTS hardware, but not necessarily mass-market handsets sourced through conventional operator and retail channels. Rather, secure communications devices represent collaboration of OEM handset manufacturers and third-party integrators and/or government contractors. Suppliers of aftermarket hardware encryption devices must also collaborate, such as vendors providing SD cards and/or encryption software running independently or leveraging existing capabilities in mobile chipsets. A concurrent requirement is that integration of these technologies still offers reasonable options for maintenance and upgrades, avoiding the expensive lock-in presented by legacy custom-built hardware and software.</p>
<p class="body-text">Open software is also imperative. Smartphones and other devices suitable for the secure communications mission increasingly run open and/or open source OSs like Android, Linux, and so forth. As mentioned, a secure communications mobile device developer would be well advised to not replace those software platforms, but rather to augment or encapsulate them with secure and certifiable software.</p>
<p class="heading-1">Architectural options: Considering&nbsp;the candidates</p>
<p class="body-text">Although this discussion emphasizes a COTS approach to secure mobile communications, it must also address the secure communications challenge holistically by considering several candidate architectures such as the following:</p>
<p class="heading-2">Point solutions</p>
<p class="body-text">While requirements for mobile security are ubiquitous and system-wide, approaches to secure mobile communications tend toward single-function point solutions of limited scope in the software stack and communications stream. Such point solutions typically entail building and deploying secure and/or certified applications and middleware, encrypted data streams, and dedicated communications channels.</p>
<p class="body-text">While constraining scope-of-effort is usually a good design and engineering practice, it ill serves modern mobile/wireless devices that are more like desktop computers than handheld radio sets. Unfortunately, these point solutions can still be compromised at an application level through cracking a saved or running application image, or by starving that application of compute resources (DoS).</p>
<p class="heading-2">Dedicated hardware</p>
<p class="body-text">The most robust and secure method for isolating software is to run programs on separate pieces of hardware. Some mobile chipsets do feature unique companion processors to accelerate functions like graphics, video, audio, and in some cases, even encryption.</p>
<p class="body-text">However, these dedicated coprocessors are configured as slave peripherals and do not provide sufficient context to run entire communications stacks and voice and messaging clients. In theory, more robust resources could be integrated on&nbsp;an SD card or other aftermarket interfaces, but then would lack means to transmit and receive secure data streams through an otherwise unsecured device without extensive modification to what should be a COTS OS and program&nbsp;stack.</p>
<p class="heading-2">Multicore architecture</p>
<p class="body-text">High-end current-generation handsets and next-generation designs increasingly feature multicore application processors with two or more ARM processor cores. In theory, one or more cores could be dedicated to secure mobile communications, offering strong isolation from open OSs and open application environments. </p>
<p class="body-text">In most cases, integrators or even OEMs would be hard-pressed to free up an entire CPU core for secure mobile communications processing, at least not without degrading overall device performance. (In a dual-core CPU, performance degradation could be up to 50 percent.) Moreover, even with a dedicated CPU core running secure communications loads, shared physical memory could still be subject to attack from the core(s) running an open application OS.</p>
<p class="heading-2">Virtualized architecture</p>
<p class="body-text">A comprehensive and straightforward approach to architecting a secure mobile platform entails introducing mobile virtualization. This technology, like its data center cousin, runs over &#8220;bare metal&#8221; silicon to host an open application OS and software stack, or it could have one or more fully isolated secure cells (virtual machines) to host secure software in its own separate context. It could also have additional cells (as needed) to host selectively shared resources such as device drivers. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=598,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5172%2Ffigures%2F1" title="Secure mobile communications conceptual architecture with a microvisor"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5172%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Secure mobile communications conceptual architecture with a microvisor</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The benefits of a virtualized architecture are many:</p>
<ul>
<li class="bullets">A very small trusted computing base&nbsp;(just the underlying microvisor)&nbsp;to ease certification and&nbsp;limit opportunities for exploits</li>
<li class="bullets">Deployment of existing off-the-shelf&nbsp;open OSs and software stacks in&nbsp;their own isolated cells</li>
<li class="bullets">Flexibility for integrators to instance&nbsp;new cells to meet the particular needs of a security regime&nbsp;and the technology to support&nbsp;it</li>
<li class="bullets">Capabilities-based security providing&nbsp;fully flexible dynamic protection management</li>
<li class="bullets">Defense against malware and security&nbsp;among cells through isolation and use of restricted intercell communications APIs &#8211; the&nbsp;visible open OS can become infected and fail without impacting secure communications software in&nbsp;other cells</li>
<li class="bullets">Fast Inter-Process Communication (IPC) mechanisms for high performance</li>
<li class="bullets">Resistance to DoS attacks through monitoring, prioritization, and load balancing among cells</li>
</ul>
<p class="heading-1">Android proof-of-concept on the&nbsp;BeagleBoard</p>
<p class="body-text">The mobile virtualization platform and security architecture depicted in Figure 1 builds upon a proof-of-concept announced by Open Kernel Labs last year. The OK:Android design for secure voice communications is based on Digi-Key&#8217;s community-driven BeagleBoard running a Texas&nbsp;Instruments OMAP3530 system-on-chip. It is detailed in a white paper available at www.ok-labs.com/products/whitepapers-abstract-page.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=581,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5172%2Ffigures%2F2" title="SecureIT Mobile proof-of-concept for secure voice using Android"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5172%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> SecureIT Mobile proof-of-concept for secure voice using Android</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">The secure voice design uses OKL4 to split up phone resources among multiple mobile hypervisor (or &#8220;microvisor&#8221;) partitions, including one for OK:Android, one for secure communications, and one for shared server compartments. The latter includes shared server cells for audio, various peripherals, system functions such as clocks and power management, and a console for debugging. OKL4 can also facilitate secure video and texting in other instances. </p>
<p class="heading-1">From proof-of-concept to&nbsp;deployment</p>
<p class="body-text">Previously, securing government apps, voice, and SMS required costly custom hardware and proprietary software stacks. This resulted in one-off handsets and radios, saddling government workers with yet another device to carry, locking in their employers to a single vendor, and presenting IT support staff with platforms that are difficult to maintain and impossible to upgrade. Today, several major government integrators and their partners are developing and deploying real-world secure mobile devices by building on mobile virtualization and off-the-shelf mobile hardware and software.  </p>
<p class="author-bio">Rob McCammon is Vice President of Product Management at Open Kernel Labs, where he is in charge of the OKL4 product line. During part of his 25 years of embedded industry experience, Rob was also Director of Advanced Technology Planning at Wind River Systems. He holds a Master of Management from Northwestern, and an MS in Computer Engineering from USC. He can be contacted at <a href="mailto:robm@ok-labs.com">robm@ok-labs.com</a>.</p>
<p class="contact-info">Open Kernel Labs 312-924-1445  www.ok-labs.com</p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Video: Software Design in Medical Devices &#8211; Solving the Quality and Compliance Challenge</title>
		<link>http://embedded-computing.com/articles/video-solving-quality-compliance-challenge/</link>
		<comments>http://embedded-computing.com/articles/video-solving-quality-compliance-challenge/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 15:00:00 +0000</pubDate>
		<dc:creator>Ryan Lloyd, Product Manager, MKS (ALM)</dc:creator>
				<category><![CDATA[alm]]></category>
		<category><![CDATA[application lifecycle management]]></category>
		<category><![CDATA[cmmi process model]]></category>
		<category><![CDATA[compliance]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[iec]]></category>
		<category><![CDATA[iso]]></category>
		<category><![CDATA[iterative software development]]></category>
		<category><![CDATA[lean process improvement]]></category>
		<category><![CDATA[lean sigma process]]></category>
		<category><![CDATA[medical devices]]></category>
		<category><![CDATA[mks (alm)]]></category>
		<category><![CDATA[mks.]]></category>
		<category><![CDATA[product development methodologies]]></category>
		<category><![CDATA[product quality]]></category>
		<category><![CDATA[quality improvement processes]]></category>
		<category><![CDATA[quality management]]></category>
		<category><![CDATA[risk management]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software design]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software engineering methodology]]></category>
		<category><![CDATA[software life cycle management]]></category>
		<category><![CDATA[software lifecycle model]]></category>
		<category><![CDATA[software lifecycle processes]]></category>
		<category><![CDATA[software qa processes]]></category>
		<category><![CDATA[software quality]]></category>
		<category><![CDATA[systems life cycle management]]></category>
		<category><![CDATA[telehealth]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=5007816a482896e25541c29bd8165e56</guid>
		<description><![CDATA[Medical device engineering teams are looking to improve productivity and quality, streamline compliance, and gain complete product visibility. Watch this video and learn how you can reduce the overwhelming complexity of developing software intensive products and generate compliance reports in mouse clicks instead of weeks.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div id='story' class='body'>
<div class='body-text'><img alt="1" class="figure_intro" src="http://i.opensystemsmedia.com/?bg=ffffff&#038;bg=ffffff&#038;fltr[]=over|images/screen2.png|0|0|100&#038;fltr[3]=usm|50|3|0.3&#038;fltr[]=ric|2|2&#038;f=png&#038;h=200&#038;w=225&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5156%2Ffigures%2F1" /></a>This video demonstrates how the MKS Integrity solution for Medical Devices, enables engineering organizations to improve software and product quality, automate risk management, efficiently demonstrate compliance and reduce time to market and development costs. With MKS Integrity, engineering teams can:</p>
<p>* Demonstrate compliance in minutes with automated report generation rather than the weeks required with manual processes</p>
<p>* Manage the volume and velocity of software driven change </p>
<p>* Improve team orchestration and reuse design and development artifacts</p>
<p>
</div>
</p></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://video2.opensystemsmedia.com/fmi/xsl/video/get/begin.xsl?-token.final_via_content=1&amp;amp;-view&amp;amp;-token.special=w1MGFlMjqdhLZ2_Frb2Zhf4cvdCQ3tqI&amp;amp;-token.vendor=MKS (ALM)&amp;amp;-token.id=MES5156&amp;amp;-token.google=UA-21759947-1&amp;amp;-token.title=Video: Software Design in Medical Devices - Solving the Quality and Compliance Challenge" length="" type="download" />
		</item>
		<item>
		<title>Extending the product life cycle with embedded licensing</title>
		<link>http://embedded-computing.com/articles/extending-product-life-cycle-embedded-licensing/</link>
		<comments>http://embedded-computing.com/articles/extending-product-life-cycle-embedded-licensing/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 15:00:00 +0000</pubDate>
		<dc:creator>Vikram Koka, Flexera Software</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[customer needs]]></category>
		<category><![CDATA[embedded licensing]]></category>
		<category><![CDATA[extending product life cycle]]></category>
		<category><![CDATA[Flexera Software]]></category>
		<category><![CDATA[functionality]]></category>
		<category><![CDATA[licensing model]]></category>
		<category><![CDATA[pricing model]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software entitlement]]></category>
		<category><![CDATA[Software Licensing]]></category>
		<category><![CDATA[software lifecycle model]]></category>
		<category><![CDATA[software lifecycle processes]]></category>
		<category><![CDATA[third-party]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=fa25ffdbb80a5a03e2b093b72559ba6e</guid>
		<description><![CDATA[Embedded licensing and entitlement management allow flexibility, security, and reduced costs.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5089%2Ffigures%2F2" />CPU Tech, a manufacturer of secure processors, faced customer demand for different levels of functionality, operations, and security at different life cycle phases. As Vikram notes here, in the process of working with a third-party software licensing and entitlement management vendor, CPU Tech developed a list of criteria for meeting its customers&#8217; licensing and pricing model needs.</h3>
<p><span id="more-227"></span><span class='body'>
<p class="body-text">With the recent surge in cyber security threats, it&#8217;s no surprise that military, government, and other sectors are eyeing secure processors and anti-tamper devices, which can help protect software and systems from reverse engineering.</p>
<p class="body-text">In the military/defense technology community, projects and initiatives have extensive and complex government reviews and milestones. Therefore it is common for defense products and solutions to have a five-to-ten-year (sometimes longer) life cycle. Because of these long life spans, CPU Tech often found its customers did not need all product capabilities during all phases of a project. For example not everyone working in integration, test, or manufacturing needed to understand sensitive design details. Nor should everyone be allowed access to such details. To cite another example, there are times in a product life cycle when some security settings might be &#8220;locked down&#8221; for the remainder of the program. Also, some programs are &#8220;compartmentalized.&#8221; Compartmentalization gives engineers and users different access rights. This is all familiar territory for CPU Tech, which understood the various ways that its customers wanted to use and access CPU Tech processors. However, the company had no way to license, price, or allow access to support compartmentalization and other requirements. </p>
<p class="body-text">Customers pressed CPU Tech for more flexible software licensing and pricing models. Needing an easy and efficient way to differentiate levels of functionality, operations, and security to customers at various stages of the product/project life cycle, CPU Tech began by identifying the following requirements for software licensing and entitlement management:</p>
<ul>
<li class="bullets">Feature-based and role-based licensing and pricing models </li>
<li class="bullets">Provide embedded-node-locked and floating licensing capability </li>
<li class="bullets">Offer both offline (for machines operating in a classified area) and web-based activation </li>
<li class="bullets">Simplify complex product life cycle management </li>
<li class="bullets">Ability to automate the customer activation process</li>
</ul>
<p class="body-text">Ryan Kenny, responsible for product marketing at CPU Tech, explained, &#8220;With our Acalis Sentry Security Server solution we needed to offer our customers both feature-based and role-based functionality. Our solution can be operating in many different environments with different feature sets enabled or disabled, such as in development, manufacturing, security configuration, and security audit environments.&#8221; He added, &#8220;In each environment and use case, different people with different roles and security requirements operate the device. And in each use case, there are different feature sets enabled and disabled based on security and operations needs. For instance, customers may alternate between &#8216;call-back&#8217; registration and standalone licensing and activation, depending on where they are in their development cycle.&#8221;</p>
<p class="body-text">Early on CPU Tech determined it needed to engage with a third-party software licensing and entitlement management vendor. With its focus on its core competencies the company had no desire to develop a homegrown licensing solution, preferring to partner with an embedded software licensing and entitlement management provider. CPU Tech followed up on its initial list of criteria by describing key characteristics of the workable licensing approach: </p>
<ul>
<li class="bullets">Appropriate and adequate cryptographic encryption for license key protection and storage </li>
<li class="bullets"> Small memory footprint </li>
<li class="bullets">Support for processor architecture </li>
<li class="bullets">Support for embedded operating systems &#8211; needed to be OS independent, and easy to port </li>
<li class="bullets">Support for programming language </li>
<li class="bullets">Performance and reliability </li>
<li class="bullets"> Easy to manage and track the license entitlement </li>
<li class="bullets"> License activation automation </li>
<li class="bullets">Integration with other management systems, such as Salesforce </li>
<li class="bullets">Acceptable total cost of ownership</li>
</ul>
<p class="body-text">After researching its options, CPU&nbsp;Tech chose the FlexNet Producer Suite for High-Tech Manufacturers from Flexera Software. Ryan noted, &#8220;Flexera Software&#8217;s embedded software licensing and entitlement management solution enables CPU Tech to protect our intellectual property and allow the customer to operate in a classified/secure area without Internet access. We needed a solution that enables a solid revenue model without expanding our manufacturing costs.&#8221; </p>
<p class="body-text">&#8220;With Flexera Software [see Figure 1] we can now easily upgrade and downgrade our customers without deploying additional hardware as well as offer them licensing and pricing models based on roles and features,&#8221; he added.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=616,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5089%2Ffigures%2F1" title="Matching roles/modes to customer design model."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5089%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Matching roles/modes to customer design model.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Embedded licensing technology and entitlement management will enable CPU Tech to realize a reduction in manufacturing costs and to better manage its Acalis product life cycle. Now CPU Tech can offer a single version of its hardware and simply control the hardware capabilities and features based on roles and features. In addition, the licensing adds a valuable security layer in user activation, making sure only those entitled are able to activate the product. </p>
<p class="body-text">&#8220;Flexera Software&#8217;s embedded licensing technology enable us to protect CPU Tech and customer intellectual property,&#8221; Ryan commented, adding that &#8220;with its entitlement management solution we expect to see clear savings in the operations area by being able to easily upgrade/downgrade capabilities on the hardware. We will be able to bring products to market faster and tailor subscription licenses to meet customers&#8217; unique requirements, helping us to better serve our customers.&#8221;</p>
<p class="body-text">For CPU Tech, flexible software licensing and entitlement management allows for cost reduction and revenue models that matches customer needs and processes. In the past, much of what were security &#8220;rules&#8221; to be enforced through audit are now enforced by embedded licensing and entitlement management. </p>
<p class="author-bio">Vikram Koka is the vice president of research and development at&nbsp;Flexera Software, where he is responsible for engineering for&nbsp;the FlexNet Producer Suite for High-Tech Manufacturers. Prior to joining Flexera Software, Vikram was the chief architect for Macrovision across all its product lines, including the DRM, video, and game distribution offerings, in addition to software licensing. Vikram has held senior engineering or technical management positions at large companies such as Silicon Graphics (SGI), and LSI Logic as well as startups such as CellMania and SmartDB. Prior to Flexera&nbsp;Software, Vikram&#8217;s background included mobile, ecommerce, enterprise applications (both hosted and on-premise), databases, and distributed applications. Vikram has an MS in electrical and computer engineering from the University of California at Santa Barbara, and a BS in electronics and communications engineering from Osmania University, Hyderabad. Vikram currently has four patents pending and was one of the early contributors to the GNU&nbsp;Debugger&nbsp;(GDB), a popular open source debugger.</p>
<p class="contact-info">Flexera Software flexerasoftware@eastwick.com  www.flexerasoftware.com</p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Minimizing risk: embedded software and today&#8217;s medical devices</title>
		<link>http://embedded-computing.com/articles/minimizing-software-todays-medical-devices/</link>
		<comments>http://embedded-computing.com/articles/minimizing-software-todays-medical-devices/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 15:00:00 +0000</pubDate>
		<dc:creator>Stephen Olsen, Mentor Graphics</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[diskless computer]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[Mentor Graphics]]></category>
		<category><![CDATA[Minimizing risk]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[next-generation]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[processor blades]]></category>
		<category><![CDATA[Processors]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[single board computer linux]]></category>
		<category><![CDATA[single board computers]]></category>
		<category><![CDATA[SoC]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[telehealth]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=982e87393a74631e57038c1b0acde792</guid>
		<description><![CDATA[Safety-critical software and SoCs &#8211; for the next generation of medical devices, what's the straight-and-narrow path?]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5091%2Ffigures%2F2" />Stephen covers key system software issues that embedded systems developers must address, including next-generation SoCs that contain multiple cores and methodologies to properly allocate the applications between several types of operating systems.</h3>
<p><span id="more-112"></span><span class='body'>
<p class="body-text">Embedded developers face several decisions when developing medical embedded devices, from selecting the best system software for optimal application performance, to understanding the interactions and limitations between the software operating system and target hardware. Should the software engineer use a small micro-kernel, Real-Time Operating System (RTOS), or a General Purpose OS (GPOS) such as Android or Linux? Other considerations include the physical size of the system for portability and functionality requirements, including faster performance, power consumption, data protection, and display (user interface) technology. And FDA certification and industry standards that affect embedded software selection come into the mix as well.</p>
<p class="body-text">Modern medical devices are evolving at a record clip. From portable wireless units for patients to use at home to larger more complex devices used by healthcare professionals at a facility, there&#8217;s no question we are at the forefront of developing new ways to empower patients and medical professionals alike. How&nbsp;do we make sure the system software that controls these devices does exactly as planned with little to no risk of harming the patient? </p>
<p class="heading-1">At the heart of the matter: operating systems</p>
<p class="body-text">Typically an Operating System (OS) manages a medical embedded device. An OS can vary from a simple &#8220;roll your own&#8221; built in-house by a few enterprising software coders to a more complex OS from an established vendor. A GPOS such as Linux or Android establishes a feature-rich platform for application development, but sometimes consumes more memory than necessary. An RTOS is also a good choice for modern medical devices, particularly when specific system requirements require a deterministic preemptive kernel and a small memory footprint. Somewhere in the mix there is an ideal candidate for your application and hardware. One thing is certain: Before selecting your OS, know exactly the intentions of your application and the hardware you plan to use.</p>
<p class="heading-1">How will the device be used?</p>
<p class="body-text">One way to minimize risk when developing your embedded system is to first consider its use cases &#8211; not just how the end-user will interact with it, but also how it will be designed, developed, and tested. Will the device be used primarily by a healthcare provider, by the patient at home, or both? </p>
<p class="body-text">Does the device have communication modes or is it purely a stand-alone? Depending on its communication needs, you may find that your preferred OS includes many of the modes you need, or you might prefer another OS, in which case you&#8217;ll have to port over the communications stack and/or the driver to attain the right mix of communications software.</p>
<p class="body-text">Are there any real-time needs identified? For some devices, there is no requirement for real-time behavior. If an interrupt is serviced 100 milliseconds late, the results may be delayed by 100&nbsp;milliseconds, but that&#8217;s not going to cause a failure. However, if it&#8217;s a laser involved in eye surgery, this can have catastrophic effects if the laser does not turn on and off at the precise time. If the laser has eye tracking guidance, the laser must move in lockstep with a predefined pattern even in the presence of eye movement.</p>
<p class="body-text">Perhaps the device is a critical piece of equipment, so there is minimal sensitivity to cost. On the contrary, a device that is handheld and sold in the millions has a high sensitivity to cost. These types of considerations will directly affect the need to minimize BOM, which in turn results in possibly minimizing the memory you&#8217;ll need to effectively build the complete application with some margin. </p>
<p class="heading-1">It&#8217;s all about the hardware</p>
<p class="body-text">Once the use cases have been defined, it&#8217;s time to find the appropriate hardware. Medical systems can be extremely small, with an 8-bit microcontroller clocked at less than 25 MHz, and use only 8K of memory. More complex designs can include feature-rich SoCs clocked in the hundreds of MHz and megabytes of memory. The range of systems encompasses hybrid systems that have special purpose processors or DSPs to systems that include numerous multicore chips. </p>
<p class="body-text">What&#8217;s best for your design comes out of the use cases and expectations on how you want the system to behave.</p>
<p class="heading-1">Is multicore necessary?</p>
<p class="body-text">To the two main reasons that come to mind for selecting multicore &#8211; pure processing performance and low power management &#8211; a third could well be added, the combination of the two.</p>
<p class="body-text">If you&#8217;re concerned with low power you may want to use a multicore SoC simply because it can utilize all the available cores at a lower clock frequency rather than clocking a main processor at a much higher frequency. When not needed, it can power down the extra cores to save power.</p>
<p class="body-text">While both power and performance are good reasons to use multicore, the question is more about finding the best way to allocate the CPUs. With symmetric hardware you can use a single operating system across all the available cores as a type of Symmetric Multicore Processing (SMP). Most GPOSes and some RTOSes have this capability. Using SMP could complicate the scheduling across the cores, however, as real-time hits due to cache misses in one core could cause a cache flush in the other core, which invariably leads to delays in the system. Features such as spinlocks are common to all SMP-capable operating systems. If not employed correctly, a spinlock can hurt system performance, as one core stalls for an indeterminate time waiting for the resource on another core to be freed.</p>
<p class="body-text">The other way to build the system (even with symmetric hardware) is to apply Asymmetric Multicore Processing (AMP) techniques. This approach involves two or more separate operating systems (Figure 1) interacting through some type of communication channel using hardware like a series of FIFOs or through shared memory. There is a standard that makes the application development portable by the Multicore Association called the Multicore Communications API (MCAPI).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=1114,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5091%2Ffigures%2F1" title="Distributing your application across multiple operating systems as in this Asymmetric Multicore Processing (AMP) example can relieve risk."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5091%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Distributing your application across multiple operating systems as in this Asymmetric Multicore Processing (AMP) example can relieve risk.</figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="heading-1">When hardware and software worlds collide </p>
<p class="body-text">Consider the case where a medical device that has USB connectivity to a Windows host computer usually follows the USB specification, but when all the parts of the SoC are activated, the hardware intermittently starts signaling outside the specification in such a way that the host computer shuts down the port in the middle of a session causing failure at the most inopportune time &#8211; during patient data collection. With results lost, the patient, who made special preparations for the original procedure 24&nbsp;hours in advance, must prepare for retesting. </p>
<p class="body-text">Two fundamental reasons caused the port shutdown. First, the software assumed that the USB controller would not fail. And second, the system architecture had not planned for the case where the unit is unplugged in the middle of a session. Had the system taken either one of these use cases into account, the system would have stored the data locally, allowing for a transfer after the session was re-established, thus minimizing the risk to the patient of a possible retest.</p>
<p class="body-text">The application relied on the USB controller&#8217;s flawless operation to prevent data loss. If the application had been broken down into several sections, data loss might have been avoided. With an architecture where data collection and data transmission are not interrelated, even if the link goes down, the data is still stored in the device, so when it recovers it can pick up where it left off and not lose any data. A write to a buffer before the transmission to the host, which would occur in the background, is one way to avoid lost data in this type of scenario.</p>
<p class="body-text">If a software workaround to detect the USB bus suspension is used, the workaround can take the SoC pins out of USB mode and make them GPIO pins so that the host can detect a reset condition and force a re-enumeration of the device. The USB software would then resubmit the buffers, and the transmission would resume. The end result is that the data would not be lost, just delayed while the workaround took place.</p>
<p class="heading-1">Portability considerations</p>
<p class="body-text">An OS manages the system&#8217;s resources both in hardware and software. The most basic management is that of memory and time. But where does the responsibility of the OS stop and that of the application start? While an application can have a device driver built into it and talk directly to the hardware, porting to new hardware becomes a challenge as the device evolves and newer hardware is employed. Therefore, it is recommended that most, if not all, devices in the system be managed by the OS in order to ensure future portability.</p>
<p class="heading-1">Regulations and patient privacy</p>
<p class="body-text">The need for portability includes wireless devices like a GSM radio or an 802.11 wireless interface for connectivity. Others include Bluetooth and ZigBee, where these links must also be secure and provide patient privacy. Even in the device itself, it&#8217;s imperative that only doctors who are authorized to see a patient actually see the data of that patient. Disallowing unauthorized access is also a critical requirement of any device. Are the records secure, even for the technician who works on the equipment? Are there any modes where this data is not secure? True Health Insurance Portability and Accountability Act (HIPPA) compliance is making sure that the security of information is paramount. Security inside the database of patient records is as&nbsp;well.</p>
<p class="heading-1">Conclusion</p>
<p class="body-text">Medical devices are a special breed that will touch all of us in some way. We need to take extra care when designing these systems to ensure that the device does what it is intended to do. Does it make sense to use an RTOS or a GPOS to meet the requirements of determinism, size, boot time, power optimization, and the breadth of middleware available? Finally, to minimize risk we need to make sure that all regulations with both HIPPA and the FDA are followed. </p>
<p class="author-bio">Stephen Olsen has over 20 years of embedded software experience with his past 15 years spent at Mentor Graphics. Stephen is currently technical marketing engineer for Mentor Embedded, Mentor&#8217;s embedded software division. During his tenure at Mentor, he has co-chaired VSIA&#8217;s Hardware dependent Software (HdS) design working group, worked on the MRAPI specification for the Multicore Association, and authored several papers on system design and power management. Stephen has worked in consulting, system architecture, embedded software, and IP. He holds a BS in Physics from Humboldt State University in California.</p>
<p class="contact-info">Mentor Embedded <span class="hyperlink"><a href="mailto:Stephen_Olsen@mentor.com">Stephen_Olsen@mentor.com</a></span> <span class="hyperlink"><a href="http://www.mentor.com">www.mentor.com</a></span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhancing application performance on multicore systems</title>
		<link>http://embedded-computing.com/articles/enhancing-application-performance-multicore-systems/</link>
		<comments>http://embedded-computing.com/articles/enhancing-application-performance-multicore-systems/#comments</comments>
		<pubDate>Thu, 17 Feb 2011 15:00:00 +0000</pubDate>
		<dc:creator>John Blevins, LynuxWorks</dc:creator>
				<category><![CDATA[application parallelism]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[eingebettete systeme]]></category>
		<category><![CDATA[embed system]]></category>
		<category><![CDATA[embedded system]]></category>
		<category><![CDATA[embeded system]]></category>
		<category><![CDATA[hypervisor operating systems]]></category>
		<category><![CDATA[LynuxWorks]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[SMP operating system]]></category>
		<category><![CDATA[smp os]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=d9c39de411708849276d1f0847454efd</guid>
		<description><![CDATA[When an application is run on many cores but not optimized for multicore, key practices to ramp up lagging performance include reducing synchronization/concurrency overhead while harnessing parallelism and an SMP-enabled hypervisor.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract">In a simple view of the world, an application running on a multicore system should run at least as fast as the same application runs on a single-core system with the same CPU power. Unfortunately, in practice, that is not the case. However, by implementing application parallelism and using an SMP OS and an embedded hypervisor, one can solve the challenge and realize dramatic performance improvements.</h3>
<p><span id="more-16313"></span><span class='body'>
<p class="body-text">Let&#8217;s face it. The Multicore Era is upon us. How did we get here? For years, processor manufacturers delivered on the Moore&#8217;s Law promise of doubling CPU performance every couple years by increasing the number of transistors, increasing clock rates, and increasing instruction-level parallelism. We saw clock rates go from 1 GHz in the year 2000 to 2 GHz in 2001 and finally to 3&nbsp;GHz in 2002, where we seem to have hit a clock-speed brick wall. </p>
<p class="body-text">The combination of increasing power demands and rising chip temperatures seems to have put the brakes on the clock speed race. One of the surest signs was Apple&#8217;s switch from the PowerPC to the Intel Architecture. Promises of 3&nbsp;GHz PowerPC G5 processors in Apple laptops never materialized due to power and heat problems. Processor manufacturers quickly realized that to keep doubling performance, they needed a new trick. That new trick was to add multiple cores to a chip. Now Mac computers with 12&nbsp;cores at 2.93 GHz exist, and coincidentally, dual- and quad-core single board computers and systems are very prevalent in the military embedded realm today. </p>
<p class="body-text">However, if the software running in the system is not optimized for multicore, there can be degradation in performance when migrating from a single-core based system. The higher transistor density in a multicore CPU does not generally translate to an increase in speed on applications that are not parallelized. Additionally, SMP OS and embedded hypervisor RTOS technologies can aid optimum performance in single-core to multicore migration. But first we will examine the issues of synchronization, concurrency, and scheduling.</p>
<p class="heading-1">Synchronization and concurrency overhead kill performance</p>
<p class="body-text">A real-time embedded SMP operating system must maintain deterministic scheduling and interrupt response as well as respond rapidly to interrupts and high-priority tasks. This job becomes substantially more difficult and time consuming in a multicore CPU. For example, when multiple CPUs are active, data may be accessed by more than one of them simultaneously, adding a new level of concurrency issues for the OS to deal with. This requires additional mechanisms for concurrency control. Because of the increased concurrency in multicore systems, locking and synchronization mechanisms are more complex and take more CPU time than in single-core systems.</p>
<p class="body-text">Generally, on a single-core system, a critical section of code can be protected from interrupts by simply disabling preemption, doing the necessary work, and re-enabling preemption. Enabling and disabling preemption can be as simple as storing a value in a variable. In a multicore system, each core has its own unique set of interrupts, so disabling preemption does not make a lot of sense, since code on the other cores could still execute the critical section. Instead some form of locking needs to be introduced. In LynxOS, a deterministic hard real-time OS from LynuxWorks, this is done with Kernel Spinlocks and requires the use of special hardware mechanisms such as locked bus cycles. These mechanisms are considerably more complex than the simple memory accesses a single-core system uses, and this complexity adds to overall performance degradation.</p>
<p class="body-text">In addition, when code on one core is in a critical section, code on other cores is blocked waiting for the code to finish the critical section. If the locks are coarse-grained, it is possible that several cores could be idle because they are unable to schedule any useful work.</p>
<p class="body-text">The synchronization and concurrency overhead incurred on multicore systems is most visible at the operating system software level, but is also apparent in multi-threaded applications that rely heavily on constructs like condition variables, semaphores, and message queues. Operating systems compiled to support multiple cores are typically about 10 percent slower on a single-core system than the same operating system compiled to support a single core.</p>
<p class="heading-1">Scheduling threads across multiple cores</p>
<p class="body-text">The scheduling algorithms play a key part in harnessing the power of multiple cores and can cause performance issues if not implemented carefully. Typical scheduling algorithms maintain a per-CPU queue of threads that are ready to run and allocate CPU time based on this queue. However, in a real-time system, it is critical to preserve real-time determinism, so the scheduling approach is different. The scheduling happens on a global basis where the highest-priority thread runs on the first available CPU. However, this may lead to higher levels of cache misses. This can be addressed by using design optimizations in real-time thread scheduling. </p>
<p class="body-text">One such design optimization, known as <span class="italics">processor affinity</span>, allows applications to request an &#8220;affinity&#8221; to a processor core. In this case, the operating system schedules the applications on the preferred processor core, as long as it does not affect overall system scheduling. A more rigid form of processor affinity is <span class="italics">processor binding,</span> where the task is always scheduled on the same processor core. However, this approach in RTOSs may lead to priority inversions. Operating system design should accommodate considerations such as processor affinity without degrading real-time determinism and responsiveness. In the context of a real-time operating system, other key factors such as priority scheduling and interrupt latency should be preserved in multicore architectures.</p>
<p class="body-text">An SMP-enabled real-time operating system must schedule tasks dynamically and transparently between processors to efficiently balance workloads using available processors. It optimizes the support of load balancing on multiple cores along with preserving the key elements of real-time latency and determinism. If the operating system &#8220;bounces&#8221; the application from core to core, the application will take additional Translation Lookaside Buffer (TLB) and cache misses, reducing performance. On the other hand, if the application is &#8220;pinned&#8221; to a core, there may be enough additional demand placed on that core to slow down the application, compared to running it on a single core.</p>
<p class="heading-1">Taking full advantage of multicore&nbsp;processors</p>
<p class="body-text">To maximize multicore performance, application parallelism, SMP-enabled OSs, and embedded hypervisor technologies should be explored. </p>
<p class="heading-2">Application parallelism maximizes CPU utilization</p>
<p class="body-text">All applications should be carefully examined for opportunities to parallelize the tasks. In parallel computing, an application is broken down into threads that execute independently on separate cores (Figure 1). Application parallelism is dependent on the ratio of computation to communication overhead. The computation is the amount of time the CPU spends executing application code. The communication overhead is the amount of time that the OS spends in communicating between cores. In a typical multicore architecture, the communication overhead indicates how often messages are sent between different cores. The more threads an application has, the higher the chances that they are scheduled on different cores, which in turn increases the communication overhead. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5048%2Ffigures%2F1" title="In parallel computing, an application is broken down into threads that execute independently on separate cores."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5048%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> In parallel computing, an application is broken down into threads that execute independently on separate cores.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Each type of system has different characteristics, but when optimizing application parallelism to maximize performance, there are broadly two types of application parallelism that can be used:</p>
<p class="body-text">1. <span class="italics">Coarse-grained parallelism</span> is characterized by large tasks, single threaded and low communication overhead. In this case, the ratio of computation to communication overhead is high. This indicates that the communication overhead is lower than computation time, thereby yielding better multicore performance.</p>
<p class="body-text">2. <span class="italics">Fine-grained parallelism</span> is characterized by small tasks, multithreaded and high communication overhead. In this case, the ratio of computation to communication overhead is low. This indicates that the communication overhead is higher than computation time, thereby yielding lower multicore performance.</p>
<p class="body-text">Applications that are CPU-bound can exploit the full power of multicore architectures since they are coarse-grained, while memory-bound or I/O-bound applications (fine-grained) may need to be optimized to avoid the bottlenecks that arise due to the communication overhead in symmetric multiprocessing architectures. </p>
<p class="body-text">POSIX-based OSs provide a rich environment of threading functionality to make it easy for developers to implement parallelism in their applications. Developers must consider the design trade-offs of using multithreading versus non-multithreading to harness the power of multiple processor cores. In some instances, applications may perform better on a single-core system.</p>
<p class="heading-2">Multicore optimization with SMP OS&nbsp;and hypervisor technology</p>
<p class="body-text">Another approach to multicore optimization centers around choosing an appropriate OS. An SMP-enabled OS can help add concurrency to an application by balancing the threads running on multiple CPUs and maintaining a deterministic hard real-time performance level. </p>
<p class="body-text">But what if you could get even more control over how the OS runs on the multicore CPU? A new trend emerging in multicore environments is the use of a small hypervisor operating system, which abstracts the capabilities of hardware and allows multiple heterogeneous operating system instances to run on a single hardware platform. A Type 1 hypervisor, such as LynxSecure from LynuxWorks (Figure&nbsp;2), runs directly on the hardware and has complete control of the platform, providing superior utilization of processor resources. In the SMP-enabled hypervisor, a single copy of the hypervisor can allow a single guest operating system to utilize multiple cores. The same hypervisor can enable AMP by allocating a single guest operating system to a unique core. This can be extended to allow AMP and SMP on the same platform through judicious allocation of guest operating systems on single or multiple cores, thereby increasing processor utilization significantly. </p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5048%2Ffigures%2F2" title="A Type 1 hypervisor runs directly on the hardware and has complete control of the platform."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FMES5048%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> A Type 1 hypervisor runs directly on the hardware and has complete control of the platform.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio">John Blevins is the Director of Product Marketing and Tools&nbsp;Development at LynuxWorks, with more than 25 years of software experience in the embedded industry. Contact him at jb@lnxw.com.</p>
<p class="contact-info">LynuxWorks 408-979-3900 <a href="http://www.lynuxworks.com">www.lynuxworks.com</a></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The benefits of developing Android applications using commercial Eclipse-based solutions</title>
		<link>http://embedded-computing.com/articles/the-commercial-eclipse-based-solutions/</link>
		<comments>http://embedded-computing.com/articles/the-commercial-eclipse-based-solutions/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 15:00:00 +0000</pubDate>
		<dc:creator>Leigh Williamson, IBM Rational</dc:creator>
				<category><![CDATA[agile]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[application developers]]></category>
		<category><![CDATA[application development consulting]]></category>
		<category><![CDATA[application development environments]]></category>
		<category><![CDATA[application development for mobile]]></category>
		<category><![CDATA[application development management]]></category>
		<category><![CDATA[application development methodology]]></category>
		<category><![CDATA[application development process]]></category>
		<category><![CDATA[application development projects]]></category>
		<category><![CDATA[application development system]]></category>
		<category><![CDATA[application development team]]></category>
		<category><![CDATA[application development tool]]></category>
		<category><![CDATA[applications development tools]]></category>
		<category><![CDATA[applications software development]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[best software development tools]]></category>
		<category><![CDATA[custom application development services]]></category>
		<category><![CDATA[custom software developers]]></category>
		<category><![CDATA[customized application development]]></category>
		<category><![CDATA[enterprise web application development]]></category>
		<category><![CDATA[IBM Rational]]></category>
		<category><![CDATA[iphone app developers]]></category>
		<category><![CDATA[iphone applications development]]></category>
		<category><![CDATA[iphone development]]></category>
		<category><![CDATA[iphone mobile application development]]></category>
		<category><![CDATA[iphone software developer]]></category>
		<category><![CDATA[iphone web application development]]></category>
		<category><![CDATA[j2ee application development]]></category>
		<category><![CDATA[java development tools]]></category>
		<category><![CDATA[microsoft software development]]></category>
		<category><![CDATA[mobile app development]]></category>
		<category><![CDATA[mobile application]]></category>
		<category><![CDATA[mobile application developer]]></category>
		<category><![CDATA[mobile application developers]]></category>
		<category><![CDATA[mobile application development]]></category>
		<category><![CDATA[mobile applications development]]></category>
		<category><![CDATA[mobile phone application development]]></category>
		<category><![CDATA[mobile software developer]]></category>
		<category><![CDATA[mobile software developers]]></category>
		<category><![CDATA[mobile software development]]></category>
		<category><![CDATA[mobile software development tools]]></category>
		<category><![CDATA[mobile web application development]]></category>
		<category><![CDATA[project manager software]]></category>
		<category><![CDATA[rapid application development software]]></category>
		<category><![CDATA[rapid software development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software application development process]]></category>
		<category><![CDATA[software developer work]]></category>
		<category><![CDATA[software development]]></category>
		<category><![CDATA[software development analysis]]></category>
		<category><![CDATA[software development consulting]]></category>
		<category><![CDATA[software development cycles]]></category>
		<category><![CDATA[software development management tools]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software development team management]]></category>
		<category><![CDATA[software development work]]></category>
		<category><![CDATA[software project management software]]></category>
		<category><![CDATA[tools for software development]]></category>
		<category><![CDATA[visual web application development]]></category>
		<category><![CDATA[web application development framework]]></category>
		<category><![CDATA[web application development life cycle]]></category>
		<category><![CDATA[web application development platform]]></category>
		<category><![CDATA[windows application development]]></category>
		<category><![CDATA[windows software development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=7d25d17204484eff1b6b738a5898726a</guid>
		<description><![CDATA[The Android SDK is an advantageous starting point for developing Android code, but the SDK can be enhanced significantly by integration with features from other Eclipse-based commercial products.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5032%2Ffigures%2F2" />While the Android SDK provides a great starting point for an individual developer of Android code, it is missing features that facilitate the collaboration and coordination needed when a team is developing an Android application. By integrating the device-specific, native platform SDK with a compatible commercial development solution, agile teams can achieve tremendous efficiencies and higher-quality results.</h3>
<p><span id="more-178"></span><span class='body'>
<p class="body-text-">The Android Software Development Kit (SDK), which Google provides for free, is a great starting point for developing an Android-based smart device application. The SDK contains a variety of useful materials for developers, including extensive documentation, tutorials, samples, best practice guidance, and an array of tools for numerous development purposes.</p>
<p class="body-text-">The SDK&#8217;s set of Java APIs gives application developers access to native functions that Android-based devices support, such as 2D and 3D graphics, multimedia codecs, telephony features, and location services. A device emulator in the SDK allows developers to try out their code directly from the development environment without requiring a physical device. And the SDK has an Eclipse plug-in that exposes the Android APIs and SDK tools in a rich Integrated Development Environment (IDE).</p>
<p class="heading-1">Opening the door to collaboration</p>
<p class="body-text-">For an individual developer of Android code, the SDK is valuable and is becoming more so as it is being extended with new features all the time. However, it is missing features that facilitate the collaboration and coordination needed when a development team is creating the&nbsp;application.</p>
<p class="body-text-">By integrating the device-specific, native&nbsp;platform SDK from Google with a compatible commercial development solution, agile teams can achieve tremendous efficiencies and better results. Integrating the native Android SDK with a commercial development environment opens the door to seamless source control, iterative application planning, effortless work item management, and a host of enterprise-quality development capabilities for an Android application.</p>
<p class="body-text-">For instance, many Android applications are structured as hybrid Web applications, where part of the application runs on an application server on the network delivering data to the device from an enterprise storage system, perhaps a mainframe computer. Another part of the hybrid application runs on the device itself, displaying the data it receives across the network and formatting it for the device form factor while accessing the device&#8217;s services such as GPS, camera, and accelerometer to deliver a rich and well-performing user experience.</p>
<p class="body-text-">Such a hybrid application is typically created by a small team comprising a few developers of the fundamental business logic and Web application components, a few User Interface (UI) developers, a user experience designer, a couple of testers, and a team leader or manager. Let&#8217;s consider how this team can leverage the Android SDK in an environment that allows each member to efficiently communicate and collaborate.</p>
<p class="heading-1">The integrated Eclipse environment</p>
<p class="body-text-">The Android SDK, or more precisely, the Android Development Tools Eclipse plug-in that is part of the SDK, can be combined with an Eclipse-based commercial collaborative development product such as IBM Rational Team Concert (RTC). There is much information available that documents how to get the Android SDK and RTC working within the same Eclipse &#8220;shell.&#8221; See Figure 1 for an illustration of what the Android SDK looks like when integrated with RTC.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5032%2Ffigures%2F1" title="Rational Team Concert enables a development team to easily create and manage Android apps throughout their life cycle."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5032%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Rational Team Concert enables a development team to easily create and manage Android apps throughout their life cycle.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text-">The commercial IDE (RTC) offers integrated work item management, which allows the team leader to define work for the Android UI developers and assign those tasks to them, separately from the work assigned to the application logic developers and the other team members, including work assigned to the testers. The code changes associated with a particular work item are tied together into a specific change set that is delivered in one shot, so the full code change can be tracked as a unit. As the developers edit files inside their IDE, the change set is automatically maintained. The developers don&#8217;t have to do anything special to produce the change set other than edit the files they need to work on.</p>
<p class="body-text-">The change sets can be shared amongst members of the team before being fully integrated with the main code stream. So a change set altering the format of data supplied by the Web application can be shared with the UI developer working on the logic that displays the new data without affecting the rest of the team. Once both UI code changes and Web app code changes are deemed ready, they can be integrated in one synchronized task into the mainline code stream for the rest of the team to use.</p>
<p class="body-text-">Developers working on the Web application can execute the part of the application that runs on the device from their own IDE using the Android device emulator that is part of the SDK. Using the combination of shared change sets and an integrated device emulator, the pairs of developers working on the same feature (UI and Web app logic) can collaborate to work out initial problems that may arise as the result of different understanding about the application details. One of the developers can capture a screenshot of the device emulator using the screen capture tool built into the commercial IDE and share that screen capture with the other developer to show an exact behavioral issue or defect in the code.</p>
<p class="body-text-">Agile team collaborative development tools such as RTC allow the definition of multiple short iterations where a small set of application enhancements are to be implemented and validated. A typical agile iteration is two to four weeks long. The team leader can work with the team to map work items from a backlog list into the specific iterations and assign the work items to individual developers. As the developers pick up the work items and begin to make progress on them, their effort is automatically recorded and available for the team leader to track and view. This makes the information about what has been completed, what is being worked on now, and what is still to be done easy to track and view in a dashboard presentation. Everyone on the team can see how the iteration is progressing and the status of the work items planned for that iteration.</p>
<p class="body-text-">When the testers on the team start the functional testing of the application, they can open defects as work items in the shared development project. They can easily grab screen captures of the failed tests and include them in the defect records. The team leader can track these incoming test defects and work with the team to distribute them for resolution.</p>
<p class="heading-1">Products add value to basic SDK</p>
<p class="body-text-">Several Eclipse-based commercial products can be integrated at the same time with the Android SDK to provide the team with even greater capabilities. For example, the ability to model the device code structure and keep this model in sync with the real source code can be added to the collaborative agile team environment. By integrating a commercial product such as IBM Rational Rhapsody with the combined Android SDK and RTC environment, the team can gain the ability to keep a high-level model of the application in sync with the actual application code. Because the real application structure can be difficult to understand for moderate-sized projects, the ability to generate a model from the source code can prove very valuable for the team.</p>
<p class="body-text-">Commercial static analysis products can be integrated with the Eclipse-based development environment and deliver the ability to analyze the code for quality and security issues. Some of these products can be integrated with the actual change set deliver process so that no code is integrated into the main line code stream unless it has been analyzed for fundamental quality and security issues.</p>
<p class="body-text-">All of the capabilities delivered by the commercial development products extend and enhance the basic SDK supplied by Google. While the Google Android SDK is the fundamental starting point for any project delivering code to be executed on the Android platform, the&nbsp;SDK can be dramatically more effective when integrated with the traditional agile team development features available in other Eclipse-based commercial products becoming more widely available today. </p>
<p class="author-bio"><span class="author-bio-name">Leigh Williamson</span> is an IBM Distinguished Engineer who has worked in the Austin, Texas lab since 1988, contributing to IBM&#8217;s major software projects including OS/2, DB2, AIX, OpenDoc, Java, Component Broker, and WebSphere Application Server. He is currently a member of the IBM Rational Software Chief Technology Officer team, influencing the strategic direction for products in the Rational brand and leading the projects for software development automation and mobile device application development. Leigh holds a BS in Computer Science from Nova University and an MS&nbsp;in Computer&nbsp;Engineering from the University&nbsp;of Texas at Austin.</p>
<p class="contact-info">IBM Rational <span class="hyperlink"><a href="mailto:leighw@us.ibm.com">leighw@us.ibm.com</a></span> <span class="hyperlink"><a href="http://www.ibm.com">www.ibm.com</a> </span></p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editor&#8217;s Choice Speakout: Setting the pace for in-vehicle infotainment systems</title>
		<link>http://embedded-computing.com/articles/editors-setting-pace-in-vehicle-infotainment-systems/</link>
		<comments>http://embedded-computing.com/articles/editors-setting-pace-in-vehicle-infotainment-systems/#comments</comments>
		<pubDate>Sat, 18 Dec 2010 15:00:00 +0000</pubDate>
		<dc:creator>Wind River,</dc:creator>
				<category><![CDATA[about software testing]]></category>
		<category><![CDATA[agile testing methodology]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[application development management]]></category>
		<category><![CDATA[application development system]]></category>
		<category><![CDATA[application testing services]]></category>
		<category><![CDATA[applications software development]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[automated software test]]></category>
		<category><![CDATA[automated test tool]]></category>
		<category><![CDATA[automated test tools]]></category>
		<category><![CDATA[automated testing]]></category>
		<category><![CDATA[automated testing tool]]></category>
		<category><![CDATA[automation testing]]></category>
		<category><![CDATA[automation testing tools]]></category>
		<category><![CDATA[bespoke software development]]></category>
		<category><![CDATA[custom software developers]]></category>
		<category><![CDATA[custom software systems]]></category>
		<category><![CDATA[Editors Choice Speakout]]></category>
		<category><![CDATA[functional test automation]]></category>
		<category><![CDATA[functional testing tools]]></category>
		<category><![CDATA[gui testing tools]]></category>
		<category><![CDATA[it services software]]></category>
		<category><![CDATA[microcontrollers]]></category>
		<category><![CDATA[mobile software development]]></category>
		<category><![CDATA[new product development software]]></category>
		<category><![CDATA[outsourced software testing]]></category>
		<category><![CDATA[product development services]]></category>
		<category><![CDATA[qa test tools]]></category>
		<category><![CDATA[real time systems]]></category>
		<category><![CDATA[single board computer]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software development analysis]]></category>
		<category><![CDATA[software development architecture]]></category>
		<category><![CDATA[software development consulting]]></category>
		<category><![CDATA[software development contract]]></category>
		<category><![CDATA[software development engineering]]></category>
		<category><![CDATA[software development life]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software development quality assurance]]></category>
		<category><![CDATA[software engineering applications]]></category>
		<category><![CDATA[software engineering methodology]]></category>
		<category><![CDATA[software engineering outsourcing]]></category>
		<category><![CDATA[software engineering service]]></category>
		<category><![CDATA[software engineering services]]></category>
		<category><![CDATA[software engineering testing]]></category>
		<category><![CDATA[software outsourcing]]></category>
		<category><![CDATA[software product engineering]]></category>
		<category><![CDATA[software quality tools]]></category>
		<category><![CDATA[software testing and]]></category>
		<category><![CDATA[software testing and quality assurance]]></category>
		<category><![CDATA[software testing methodology]]></category>
		<category><![CDATA[software testing service]]></category>
		<category><![CDATA[software testing tool]]></category>
		<category><![CDATA[software verification]]></category>
		<category><![CDATA[static analysis tools]]></category>
		<category><![CDATA[system test software]]></category>
		<category><![CDATA[test automation tools]]></category>
		<category><![CDATA[test development software]]></category>
		<category><![CDATA[testing software applications]]></category>
		<category><![CDATA[testing tools]]></category>
		<category><![CDATA[tools for software development]]></category>
		<category><![CDATA[tools for software testing]]></category>
		<category><![CDATA[windows software development]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=57999fabf4cfcc3833f3051fb57be050</guid>
		<description><![CDATA[Wind River has introduced the Wind River Platform for Infotainment and the Framework for Automated Software Testing for Android.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story"><span id="more-228"></span><span class='body'>
<p class=Bodytext>When buying a new car, consumers expect their in-vehicle device to deliver user experiences similar to the latest consumer electronics products. But delivering on that expectation means keeping pace with the extraordinary rate of innovation taking place in the industry and the issues that come along with that: ubiquitous wireless connectivity, content enablement, multiple standards and suppliers, piecemeal tools and technologies, compatibility, new regulations, intellectual property, licensing, and more.</p>
<p class=Bodytext>Wind River puts it all together for the automotive industry by combining its pre-integrated GENIVI-compliant Wind River Platform for Infotainment with software and systems integration services; life-cycle support; tool suites for testing, validation, and verification; and a dynamic world-class partner ecosystem. This approach combines open-source and third-party components with Wind River-unique and semiconductor-unique software to reduce development cycles and allow auto equipment makers to focus on innovation and differentiation.</p>
<h1>Editor&#8217;s Choice Award: Testing beyond Android compliance</h1>
<p class=Bodytext>Lots of people are excited about Android, and with good reason. It&#8217;s finding homes in smartphones and all kinds of other devices, from set-top boxes to industrial control to defense applications. One critical item that folks should pay attention to is testing &#8211; not only being sure everything works, but also being sure nothing breaks. </p>
<p class=Figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=653,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5016%2Ffigures%2F1" title="Framework for Automated Software Testing for Android"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5016%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Framework for Automated Software Testing for Android</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class=Bodytext>Wind River recently introduced Framework for Automated Software Testing for Android. It handles three types of testing: compatibility in the form of Google&#8217;s Android Compatibility Test Suite; functional, with &#8220;thousands&#8221; of tests for popular Systems-on-Chips (SoCs) and chipsets; and stress, helping find things like memory leaks. This should be an immense help to Android developers.</p>
<p class=Contactinfo style='margin-left:0in;text-indent:0in'><b style='mso-bidi-font-weight:normal'>Wind River<br /> <a href="http://www.windriver.com">www.windriver.com</a><br /> Model: Framework for Automated Software Testing for Android<br /> <a href="http://www.embedded-computing.com/p45627">www.embedded-computing.com/p45627</a> <br /> Published in: <span class=Italics>Embedded Computing Design</span> August 2010<o:p></o:p></b></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leveraging static code analysis for medical device software</title>
		<link>http://embedded-computing.com/articles/leveraging-analysis-medical-device-software/</link>
		<comments>http://embedded-computing.com/articles/leveraging-analysis-medical-device-software/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 15:00:00 +0000</pubDate>
		<dc:creator>Andrew Yang, Code Integrity Solutions</dc:creator>
				<category><![CDATA[accu clear pregnancy test]]></category>
		<category><![CDATA[accurate pregnancy test]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[c memory leak detection]]></category>
		<category><![CDATA[canadian medical device regulation]]></category>
		<category><![CDATA[cgmp compliance]]></category>
		<category><![CDATA[code coverage analysis tools]]></category>
		<category><![CDATA[code coverage analyzer]]></category>
		<category><![CDATA[Code Integrity Solutions]]></category>
		<category><![CDATA[detect memory leak]]></category>
		<category><![CDATA[early detection pregnancy test]]></category>
		<category><![CDATA[early home pregnancy tests]]></category>
		<category><![CDATA[early results pregnancy test]]></category>
		<category><![CDATA[ept early pregnancy]]></category>
		<category><![CDATA[ept home pregnancy]]></category>
		<category><![CDATA[ept preg test]]></category>
		<category><![CDATA[ept pregnancy]]></category>
		<category><![CDATA[ept pregnancy results]]></category>
		<category><![CDATA[ept test result symbols]]></category>
		<category><![CDATA[faint pregnancy test]]></category>
		<category><![CDATA[fda 21 cfr]]></category>
		<category><![CDATA[fda device]]></category>
		<category><![CDATA[fda inspection]]></category>
		<category><![CDATA[fda inspections]]></category>
		<category><![CDATA[fda medical device regulations]]></category>
		<category><![CDATA[fda pharmaceutical regulations]]></category>
		<category><![CDATA[fda regulatory]]></category>
		<category><![CDATA[fda regulatory consultant]]></category>
		<category><![CDATA[fortify source code analyzer]]></category>
		<category><![CDATA[free static analysis tools]]></category>
		<category><![CDATA[gmp labeling]]></category>
		<category><![CDATA[gmp medical devices]]></category>
		<category><![CDATA[iterative software development]]></category>
		<category><![CDATA[klocwork static analysis]]></category>
		<category><![CDATA[medical device compliance]]></category>
		<category><![CDATA[medical device gmp]]></category>
		<category><![CDATA[medical device market]]></category>
		<category><![CDATA[medical device product development]]></category>
		<category><![CDATA[medical device regulatory]]></category>
		<category><![CDATA[medical device reimbursement]]></category>
		<category><![CDATA[medical device software validation]]></category>
		<category><![CDATA[medical devices manufacturers]]></category>
		<category><![CDATA[medical devices market]]></category>
		<category><![CDATA[midstream pregnancy test]]></category>
		<category><![CDATA[open source code analysis]]></category>
		<category><![CDATA[open source static code analysis]]></category>
		<category><![CDATA[pregnancy test]]></category>
		<category><![CDATA[pregnancy test result]]></category>
		<category><![CDATA[pregnancy tests accuracy]]></category>
		<category><![CDATA[process validation]]></category>
		<category><![CDATA[secure programming with static analysis]]></category>
		<category><![CDATA[sensitive pregnancy tests]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[software development analysis]]></category>
		<category><![CDATA[software development metrics]]></category>
		<category><![CDATA[software engineering methodology]]></category>
		<category><![CDATA[software maintenance metrics]]></category>
		<category><![CDATA[software quality metric]]></category>
		<category><![CDATA[software validation]]></category>
		<category><![CDATA[software verification]]></category>
		<category><![CDATA[source code analyzer]]></category>
		<category><![CDATA[static analysis tools for c]]></category>
		<category><![CDATA[Static code analysis]]></category>
		<category><![CDATA[telehealth]]></category>
		<category><![CDATA[waterfall development process]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=b506e8e5cd20405a17f40789937a3890</guid>
		<description><![CDATA[When used correctly, static analysis has proven to be highly effective in improving software quality for safety-critical code.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="6" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F6" />As discussed in our recent E-cast on &#8220;Enabling Telehealth Devices&#8221; (archived at ecast.opensystemsmedia.com), the FDA is recommending static code analysis for the medical device software development process to detect problems before release. Here&#8217;s a look at best practices for utilizing static code analysis tools.</h3>
<p><span id="more-99"></span><span class='body'>
<p class="body-text">Medical devices are using more software code than ever before. However, while software provides medical devices with significantly more capability and flexibility, it also brings additional complexity, which translates into increased risk of failure. About 20 percent of medical device recalls today are caused by software defects, and the number is rising. </p>
<p class="body-text">The Federal Drug Administration (FDA) oversees the quality of medical devices sold in the United States, and companies wishing to release a medical device must receive FDA 510(k) clearance. While post-market failures are investigated, the FDA is putting stronger focus on prevention and recommending that static code analysis be used as part of the approach.</p>
<p class="heading-1">The value of sophisticated defect detection</p>
<p class="body-text">Modern static code analysis tools use sophisticated techniques to analyze source code to detect potential software defects. Tools try to analyze all logical paths in the code, providing significantly more path and code coverage than traditional forms of testing. Static analysis tools do not require any test cases and can operate even on fragments of code, finding potential program crashes, buffer overruns, memory leaks, data corruption, and more. Static analysis usually operates quickly and can report a range of potential bugs in a relatively short amount of time (see Figure 1).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F1" title="Static analysis can detect potential problems early in the software development life cycle."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> Static analysis can detect potential problems early in the software development life cycle.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">For a variety of reasons, static analysis tools do produce some erroneous results, generally called false positives and false negatives. A false positive occurs when the static analysis tool believes there is an error when there isn&#8217;t. A false negative is when an error should have been reported but isn&#8217;t.</p>
<p class="body-text">Most modern static analysis tools must perform a delicate trade-off between finding as many good results as possible within an acceptable accuracy level and an acceptable running time. Stated another way, noisy tools that find every problem in a sea of false positives may be of limited value, as are highly accurate tools that find only a small class of issues (see Figure 2).</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F2" title="Static analysis tools do not find every bug (false negative) and do report some bugs that aren&amp;#8217;t truly bugs (false positive). What minimizes both missed bugs and false reports are good analysis algorithms and proper analysis tuning."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> Static analysis tools do not find every bug (false negative) and do report some bugs that aren&#8217;t truly bugs (false positive). What minimizes both missed bugs and false reports are good analysis algorithms and proper analysis tuning.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Modern static analysis tools have improved analysis techniques to generate useful results at an adequate level of accuracy. Most organizations recognize that static analysis tools, while imperfect, provide significant value in most any software development process.</p>
<p class="heading-1">Making the most of static analysis tools</p>
<p class="body-text">Modern static analysis tools are relatively new to most medical device manufacturers. For many organizations that are instituting static analysis in their process for the first time, knowledge of best practices can help get the most out of tools in the shortest amount of time and with the least amount of rework. </p>
<p class="heading-2">Tuning</p>
<p class="body-text">Static analysis tools are delivered with generic settings applying to all types of code bases, and while they find good bugs right out of the box, results can be improved greatly just by tuning the tools for the code (see Figure 3). This helps find more relevant bugs and reduces the search through false positives, which wastes time and causes developer fatigue.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '23', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="23" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F3" title="Nearly every static analysis deployment should begin with a solid tuning project. Tuning pays off with more and better bugs and fewer false positives."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F3" alt="23" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 3:</b> Nearly every static analysis deployment should begin with a solid tuning project. Tuning pays off with more and better bugs and fewer false positives.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.8x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Many static analysis tools have their own source code parsers that might not understand or have access to all of the code. Configuring the system to analyze all of the code or tuning the system to recognize interfaces inaccessible at analysis time &#8211; such as separately verified third-party libraries &#8211; ensures the results are optimum and repeatable. Achieving 100 percent code coverage is important to close holes that can increase risk.</p>
<p class="body-text">Tuning helps uncover real problems. For instance, telling the static analysis tool how a memory allocation mechanism works or when a program exits so that the tool isn&#8217;t continuing to track issues along a certain path can help uncover new problems and prune away false ones. This can be a tedious process requiring specific expertise, but it pays off in the long run.</p>
<p class="body-text">Tuning is typically an ongoing process and should be reviewed periodically to ensure that configurations are used consistently and keep pace with the changes to the code and the environment. Without ongoing tuning, developers will likely miss some important bugs and the team will waste time scrutinizing false positives.</p>
<p class="heading-2">Configuring checkers</p>
<p class="body-text">Many static analysis tools come with hundreds of checks that cover a range of issues, from concurrency to security to C and C++ pitfalls. Many do not necessarily apply for a given application. For instance, why turn on a C++ specific check when analyzing C code? Determining the right set of checkers requires some trial and error as well as expertise to understand what is going to give the best bang for the buck. Some areas for consideration are: what categories of checkers can result in real problems, which checkers tend to be noisy, and which checkers can be configured to be useful. Once a good set is finalized, lock it down so it is documented and runs consistently.</p>
<p class="body-text">In a real-world example illustrating the value of checkers, a customer wanted to ensure that their static analysis system was running consistently and requested to be alerted immediately if there was a discrepancy in the system. Developers created a test suite that included test cases for each checker. Whenever they changed the system, they ran the test suite to ensure that every checker was indeed operating as expected. If the results failed, they knew they had a configuration problem that needed to be addressed. If the tests passed, developers dropped the results into their design history file as proof that the system was working as they had documented. This test suite not only gave the customer accountability and assurance, but also decreased their maintenance and administration costs.</p>
<p class="heading-2">Process</p>
<p class="body-text">Once full coverage is achieved, the system is tuned, and the breadth of analysis is defined, developers can begin using static analysis much more effectively. For medical devices, a typical goal is to examine every single issue reported. Each issue can be categorized in a number of different ways:</p>
<ul>
<li class="bullets">An issue that must be fixed. It will have an appropriate priority assigned that describes its importance and how it must be addressed during the software development process.</li>
<li class="bullets">An issue that is correctly flagged, but not likely to manifest as a real-world bug, usually because there is an incorrect environment assumption made by the tool. These types of categorizations signal a potential tuning opportunity.</li>
<li class="bullets">An issue that is incorrectly flagged as an error, either a false positive or an outright bug in the analysis tool. These issues also signal a tuning opportunity.</li>
</ul>
<p class="body-text">Each of these cases must be carefully reviewed. False positives in particular should be examined for correctness. Liberal documentation is required for each issue, and a robust data retention policy is necessary for full accountability. These triaged defect reports will likely be revisited either in an audit process or in a retrospective if a major bug is found later in the process. It&#8217;s common for organizations to go back to the static analysis defect to see how a major bug got through the process. It could signal a broken process or an opportunity to tune the analysis to find better bugs.</p>
<p class="heading-2">Usage model</p>
<p class="body-text">Static analysis is typically run either in a developer sandbox build and/or through a central build (see Figure 4). At a minimum, analyzing and evaluating the results makes sense to do just before release. However, software development organizations shouldn&#8217;t wait to the last minute to address a potentially large pile of bugs, particularly when those bugs could have been addressed earlier as part of a disciplined process. Otherwise, teams risk missing a deadline and changing the code at the worst possible time.</p>
<p class="figures">
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '24', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="24" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F4" title="Static analysis can be deployed in many different ways depending on the business requirements, the environment, and the tool being used."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F4" alt="24" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 4:</b> Static analysis can be deployed in many different ways depending on the business requirements, the environment, and the tool being used.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.9x)</div>
</td>
</tr>
</table>
</figure>
<p class="body-text">Organizations often automate static analysis as part of a nightly build or a continuous integration build. In this way, results can be reviewed frequently and addressed as they arise. Others perform the bug-finding process earlier by enabling developers to analyze the code they are working on right in their sandbox environment. Developers can get immediate feedback on the quality of their code changes and then fix and verify defects before check-in. The quicker the cycle time, the cleaner the code will be in the repository.</p>
<p class="body-text">Regardless of where it runs, the technical environment needs to be consistent to ensure that the results are the same. Central and developer builds need to be consistent. A slight change to the analysis settings can result in many more results being reported, and organizations don&#8217;t need the added burden of having to review more problems that might be mostly false positives. Creating a highly automated system for developers to use will help ensure consistency.</p>
<p class="body-text">Many medical device companies check not only the source code into their repositories, but also their actual environment. In this way, traceability is available. Static analysis executables and all the associated configurations, states, and other relevant items should also be checked in regularly to ensure consistency and accountability. </p>
<p class="heading-2">Dealing with backlog</p>
<p class="body-text">Most organizations begin using static analysis after a significant amount of code has already been developed. Generally, the more code there is, the more bugs will get reported. Thus in rolling out static analysis, management must allocate upfront time to deal with the initial backlog of bugs. </p>
<p class="body-text">It&#8217;s better to try to institute static analysis as early as possible in the development cycle to minimize the backlog, then create a process to deal with the backlog separately from the daily flow of incoming bugs due to day-to-day code changes. Reviewing defects takes time and should be allocated properly among the developers or farmed out to a separate team to pick the defects needing work.</p>
<p class="heading-2">Culture</p>
<p class="body-text">All development teams are heterogeneous in technical skill levels and in how each individual within the team defines quality. During training and mentoring sessions, the most common arguments are:</p>
<ul>
<li class="bullets">&#8220;Yes, this is definitely a bug, but the code has been working so we don&#8217;t want to change it.&#8221;</li>
<li class="bullets">&#8220;We should not allow code like this to be in our product.&#8221;</li>
<li class="bullets">&#8220;This scenario would never happen in real life.&#8221;</li>
<li class="bullets">&#8220;This will become a bug if we port the product to another platform in the future.&#8221;</li>
<li class="bullets">&#8220;If you spent just a few more minutes on this, you&#8217;ll see it&#8217;s clearly a bug.&#8221;</li>
</ul>
<p class="body-text">Static analysis will deliver bugs of all stripes, from critical must-fix problems to warnings. Some organizations want to be opportunistic and only change the code for provable bugs. Others proactively clean up code and improve quality, even going so far as to &#8220;fix&#8221; warnings. Teams should have consistency in how they address static analysis results. Review of the results, training/mentoring, and frequent communication are keys to success.      </p>
<p class="body-text">When used correctly, static analysis has proven itself to be highly effective in improving software quality for safety-critical code. Although not strictly required for approval, the FDA recognizes its efficacy. With the proper planning, expertise, and realistic investment, static analysis should yield a significant return on investment and help deliver safe code to the marketplace. </p>
<p class="figures">
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '25', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="25" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F5" title="ECD in 2D: To obtain more comprehensive and higher-quality data on medical device performance, the FDA has launched the Medical Device Epidemiology Network (MDEpiNet), a collaboration of academic institutions working to advance the methodologies of studying medical devices. Use your smartphone, scan this code, watch a video: http://bit.ly/ezDEQz. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD5012%2Ffigures%2F5" alt="25" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: To obtain more comprehensive and higher-quality data on medical device performance, the FDA has launched the Medical Device Epidemiology Network (MDEpiNet), a collaboration of academic institutions working to advance the methodologies of studying medical devices. Use your smartphone, scan this code, watch a video: http://bit.ly/ezDEQz. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class="author-bio">Andrew Yang is managing director and cofounder of Code Integrity Solutions. He is former VP of products and services at a leading static analysis provider. Andrew has a Computer Engineering degree from Brown University and an MBA from the MIT Sloan School of Management.</p>
<p class="contact-info">Code Integrity Solutions</p>
<p class="contact-info"><span class="hyperlink"><a href="mailto:andy@codeintegritysolutions.com">andy@codeintegritysolutions.com</a></span></p>
<p class="contact-info"><span class="hyperlink"><a href="http://www.codeintegritysolutions.com">www.codeintegritysolutions.com</a></span> </p>
</p></div>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Foundation getting much more embedded</title>
		<link>http://embedded-computing.com/articles/linux-foundation-getting-more-embedded/</link>
		<comments>http://embedded-computing.com/articles/linux-foundation-getting-more-embedded/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 15:00:00 +0000</pubDate>
		<dc:creator>Jim Zemlin, The Linux Foundation</dc:creator>
				<category><![CDATA[applications embedded systems]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[design embedded hardware]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[embedded microcontroller systems]]></category>
		<category><![CDATA[embedded system designing]]></category>
		<category><![CDATA[embedded system hardware]]></category>
		<category><![CDATA[embedded systems hardware]]></category>
		<category><![CDATA[linux board embedded]]></category>
		<category><![CDATA[linux embedded x86]]></category>
		<category><![CDATA[MeeGo]]></category>
		<category><![CDATA[mobile handset sales]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[The Linux Foundation]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=bfb7fe278439cb5192493f87a2163323</guid>
		<description><![CDATA[The MeeGo Project enables cross-device compatibility, application portability, and a user experience that opens up broad market opportunities for developers.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story"><span id="more-160"></span><span class='body'>
<p class=Bodytext><o:p>&nbsp;</o:p></p>
<p class=Interviewquestion><span class=Interviewer><span style='font-style: normal'>ECD:</span></span> Tell us where MeeGo is in the smartphone/tablet race, what&#8217;s next on the near-term roadmap, and how the broader embedded device market can leverage the technology.</p>
<p class=Bodytext><span class=Interviewee>Zemlin:</span> The mobile platform race is a marathon, not a sprint. There will be a variety of winners, and we&#8217;re in just the first five minutes of the race right now. It&#8217;s also not just about smartphones and tablets. </p>
<p class=Bodytext>By using the collaborative development model and committing to an open platform, the MeeGo Project enables cross-device compatibility, application portability, and a user experience that opens up broad market opportunities for developers. MeeGo is built from the ground up to support devices we haven&#8217;t even imagined yet. There is a developer somewhere in the world right now who we will all know of someday because that person will build the next great device.</p>
<p class=Figures>
<figure>
<table width="260" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=870,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4963%2Ffigures%2F1" title="ECD in 2D: MeeGo offers a rich and dynamic user interface for tablets as well as other yet-to-be-developed devices. Use your smartphone, scan this code, watch a video: http://bit.ly/f6B9kG. ART"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=250&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4963%2Ffigures%2F1" alt="21" width="250" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption>ECD in 2D: MeeGo offers a rich and dynamic user interface for tablets as well as other yet-to-be-developed devices. Use your smartphone, scan this code, watch a video: http://bit.ly/f6B9kG. </figcaption>
<div class="fig-zoom">(Click graphic to zoom)</div>
</td>
</tr>
</table>
</figure>
<p class=Bodytext>The broader embedded device market can leverage MeeGo technology because of the project&#8217;s &#8220;upstream first&#8221; philosophy. When MeeGo developers contribute upstream, all of the downstream players (embedded device makers, for example) benefit with lower support costs and faster time to market. Upstream components from a variety of open source projects provide a unified Linux base that embedded developers and device makers know will &#8220;just work.&#8221; Examples of where we&#8217;re already seeing this include MeeGo In-Vehicle Infotainment (IVI) devices and other key components that support hundreds of applications ranging from the smart grid to consumer electronics and much more.</p>
<p class=Bodytext>As for the near-term roadmap, look for incremental updates between now and April 2011 when MeeGo 1.2 is expected for release. MeeGo 1.2 will be a handset UX release with a complete set of applications and support for other device usage models.<span style='mso-tab-count:1'> </span></p>
<p class=Interviewquestion><span class=Interviewer><span style='font-style: normal'>ECD:</span></span> Yocto is your newest project, and it&#8217;s targeted specifically for embedded. Describe the project, who is behind it, and what the plans are.</p>
<p class=Bodytext><span class=Interviewee>Zemlin:</span> The Yocto Project provides high-quality open source infrastructure and tools to help developers create custom Linux distributions for any hardware architecture. The Yocto Project is intended to provide a helpful starting point for developers and speed time to market for vendors by establishing a shared build infrastructure.</p>
<p class=Bodytext>Until now, embedded vendors and their partners relied on deep customization, requiring developers to wrestle with rapidly changing software and difficult build and maintenance cycles. The Linux Foundation recognized that an umbrella project could bring together a variety of upstream sources and sources from local project repositories to ease embedded Linux development. The project includes the Poky Build System (Figure 2) as one of its components, which is a derivative of and compatible with the OpenEmbedded Build System.</p>
<p class=Figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '22', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="22" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4963%2Ffigures%2F2" title="The Yocto Project includes the Poky Build System, which provides mechanisms for building and combining distributed open source projects."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4963%2Ffigures%2F2" alt="22" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 2:</b> The Yocto Project includes the Poky Build System, which provides mechanisms for building and combining distributed open source projects.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.6x)</div>
</td>
</tr>
</table>
</figure>
<p class=Bodytext>Participation and support for the Yocto Project come from the open source software community. Version 0.9 was released at launch, and we&#8217;re inviting developers and contributors to explore and contribute to the Yocto Project at <a href="http://www.yoctoproject.org">www.yoctoproject.org</a>.</p>
<p class=Authorbio><b style='mso-bidi-font-weight:normal'>Jim Zemlin</b> is executive director of The Linux Foundation. His career spans three of the largest technology trends to rise during the past decade: mobile computing, software as a service, and open source software. As executive director at The Linux Foundation, he works with the world&#8217;s largest technology companies, including IBM, Intel, Google, HP, Nokia, and others to help define the future of computing on the server, in the cloud, and on a variety of new mobile and embedded computing devices.</p>
<p class=Contactinfo><b style='mso-bidi-font-weight:normal'>The Linux Foundation<br /> </b>415-723-9709<b style='mso-bidi-font-weight:normal'><br /> </b><a href="http://www.linuxfoundation.org">www.linuxfoundation.org</a> <b style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database puts &quot;media&quot; in media players</title>
		<link>http://embedded-computing.com/articles/database-puts-media-media-players/</link>
		<comments>http://embedded-computing.com/articles/database-puts-media-media-players/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 15:00:00 +0000</pubDate>
		<dc:creator>Sasan Montaseri, ITTIA</dc:creator>
				<category><![CDATA[archos mp4]]></category>
		<category><![CDATA[archos mp4 player]]></category>
		<category><![CDATA[archos mp4 speler]]></category>
		<category><![CDATA[archos multimedia player]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[back up sql database]]></category>
		<category><![CDATA[backup database sql]]></category>
		<category><![CDATA[compare database schemas]]></category>
		<category><![CDATA[compare database tables]]></category>
		<category><![CDATA[compare sql database]]></category>
		<category><![CDATA[compare sql databases]]></category>
		<category><![CDATA[compare two databases]]></category>
		<category><![CDATA[database dbms]]></category>
		<category><![CDATA[database management systems dbms]]></category>
		<category><![CDATA[database mangement system]]></category>
		<category><![CDATA[dbms database]]></category>
		<category><![CDATA[design embedded system]]></category>
		<category><![CDATA[design embedded systems]]></category>
		<category><![CDATA[designing embedded systems]]></category>
		<category><![CDATA[embedded computer design]]></category>
		<category><![CDATA[Embedded databases]]></category>
		<category><![CDATA[embedded hardware design]]></category>
		<category><![CDATA[embedded system applications]]></category>
		<category><![CDATA[embedded systems applications]]></category>
		<category><![CDATA[embedded systems software development]]></category>
		<category><![CDATA[ittia]]></category>
		<category><![CDATA[mdf database file]]></category>
		<category><![CDATA[mdf file sql]]></category>
		<category><![CDATA[mp4 archos]]></category>
		<category><![CDATA[ms sql restore database]]></category>
		<category><![CDATA[rayma suprani]]></category>
		<category><![CDATA[recover mdf file]]></category>
		<category><![CDATA[recovery sql database]]></category>
		<category><![CDATA[relational database table design]]></category>
		<category><![CDATA[relational database tables]]></category>
		<category><![CDATA[restore a sql database]]></category>
		<category><![CDATA[restore database mssql]]></category>
		<category><![CDATA[restore database sqlserver]]></category>
		<category><![CDATA[restore mssql database]]></category>
		<category><![CDATA[restore sql backup]]></category>
		<category><![CDATA[restore sql server database]]></category>
		<category><![CDATA[restoring sql database]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[sql backup database]]></category>
		<category><![CDATA[sql backup log]]></category>
		<category><![CDATA[sql backup restore]]></category>
		<category><![CDATA[sql compare databases]]></category>
		<category><![CDATA[sql database backup software]]></category>
		<category><![CDATA[sql database compare]]></category>
		<category><![CDATA[sql database files]]></category>
		<category><![CDATA[sql database restore]]></category>
		<category><![CDATA[sql database restoring]]></category>
		<category><![CDATA[sql database single user]]></category>
		<category><![CDATA[sql mdf file]]></category>
		<category><![CDATA[sql mdf recovery]]></category>
		<category><![CDATA[sql restore log]]></category>
		<category><![CDATA[sql schema compare]]></category>
		<category><![CDATA[sql server database restore]]></category>
		<category><![CDATA[sql server database restoring]]></category>
		<category><![CDATA[sql server restoring database]]></category>
		<category><![CDATA[sql transaction log file]]></category>
		<category><![CDATA[transaction log backup]]></category>
		<category><![CDATA[transaction log file]]></category>
		<category><![CDATA[what is data in dbms]]></category>

		<guid isPermaLink="false">http://embedded-computing.com/?guid=9129b4faa2c2170bd1278880d593c23d</guid>
		<description><![CDATA[Developers can turn to relational embedded database management technologies for the scalability required by modern portable media players.]]></description>
			<content:encoded><![CDATA[<ul style='margin-left: 11px; margin-top: 0px; padding: 2px;'><li style="list-style-type: none; list-style: none; background-position: 0px 8px; background-image: url(http://cloud1.opensystemsmedia.com/arrows/9.gif); background-repeat: no-repeat;  margin-bottom: 11px; margin-top: 6px; padding-left: 19px; padding-top: 5px; font-size: 14px; font-family: arial;" ><div class="story">
<h3 class="abstract"><img alt="2" class="figure_intro wide" src="http://i.opensystemsmedia.com/?zc=F&#038;f=png&#038;h=320&#038;w=600&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4965%2Ffigures%2F2" />Managing the media in a device calls for a database, but several design issues need to be addressed to make both the consumer experience and the developer experience as good as possible.</h3>
<p><span id="more-186"></span><span class='body'>
<p class=Bodytext>Portable media players offer new ways to deliver and access content. Limitations that device manufacturers have been able to take for granted, such as amount of content and delivery method, are gradually eroding. In addition to metadata about media stored on the device, such as artist, album, and song names, players with network connectivity can map recommendations from friends. With increasing storage capacity and the new possibilities that come with ubiquitous connectivity, portable media players are set to handle more data than ever before.</p>
<p class=Bodytext>As with any consumer device, cost remains a critical factor in portable media player design. Software developers must create new techniques to manage music, video, and image files that leverage the limited hardware available for these products. The amount of data that must be managed can easily exceed a device&#8217;s working memory, posing unique challenges to developers who want to access that information for a variety of purposes.</p>
<p class=Bodytext>Software developers can turn to relational embedded database management technologies for the scalability required by modern portable media players. A database file stored on inexpensive NAND flash memory is a simple solution because the details of storage and retrieval are handled by algorithms with proven scalability and reliability, adapted to the unique requirements of portable devices. Design engineers can capitalize on this advantage to reduce cost and time to market.</p>
<p class=Figures>
<figure>
<table width="300" border="0" align="right" cellpadding="2" cellspacing="0">
<tr>
<td align="center" style="padding-left:10px" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=580,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4965%2Fsidebars%2F1" title="Design considerations for media player data"><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=290&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4965%2Fsidebars%2F1" alt="21" width="290" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Sidebar 1:</b> Design considerations for media player data</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.7x)</div>
</td>
</tr>
</table>
</figure>
<h1>Organizing media files</h1>
<p class=Bodytext>There are many ways to find a song on a portable media player. A user might look up the artist and album, then select the song from the album&#8217;s track list. Or the user might search for the song by title after browsing through an alphabetical list. Sometimes the song is chosen randomly.</p>
<p class=Bodytext>To do this, the media player must have a list of all songs stored on the device. This list can be generated when the player is started or when the song is transferred to the device if a media-aware protocol such as Media Transfer Protocol (MTP) is used. This list should be stored persistently so that it is not recreated each time the device is started, and should allow the data to be browsed in several different ways. If songs are added or removed, it should not be necessary to rebuild the entire list.</p>
<h1>Hardware limitations</h1>
<p class=Bodytext>Portable media players are designed for a single task: playing music and video. These devices typically use dedicated DSP hardware to decode media, leaving the general-purpose CPU free to operate the user interface and send media to the DSP. Unlike a desktop application, where a rogue task can sometimes consume all CPU resources, media player software is carefully designed to limit the amount of time spent on each task so that media playback is never interrupted.</p>
<p class=Bodytext>Media files and their metadata are stored on NAND flash memory or miniature hard drives. While these are inexpensive and persistent, both types of storage are divided into blocks that affect performance. Metadata is accessed randomly, so data is often read into RAM far in advance of when it is needed. For this reason, it is necessary to cache frequently accessed blocks so that these extra reads are not wasted.</p>
<p class=Bodytext>But because available memory is limited, media player software must use a predetermined amount of RAM for general processing. The total RAM required for a software component, such as a lightweight relational database, is based on four measurements: static code, static data, stack, and heap. The exact amount of RAM required, or footprint, depends on which parts of the software are actively running at any given time.</p>
<h1>Embedded relational database</h1>
<p class=Bodytext>When software developers implement a custom data management framework for a portable media player, the data model is usually hard-coded in the framework itself. Changes to the data model must be made carefully so that worst-case guarantees are not violated. The alternative, developing a generalized data management framework, is difficult to justify for a single product.</p>
<p class=Bodytext>While a traditional database management system requires too much overhead to be used on a portable media player, the core database technology and algorithms are still valuable for portable media players. An embedded relational database provides a standard interface for reliable data management that is suitable for media players and other portable devices. The database is invisible to the consumer and requires no administration because it is linked directly into the application as an in-process software library.</p>
<p class=Bodytext>Database technology provides applications with a practical model for data storage that is powerful yet easy to use. Information is organized into tables with a predefined structure. By hiding the exact format used to store information, the database can cache information intelligently to optimize performance while providing a wide range of features &#8211; transactions, recovery, search, and shared access &#8211; that would otherwise be difficult to implement and maintain in a single application.</p>
<p class=Bodytext>Application code is frequently reused to expand an existing product line or to jump-start development of a new product. Using a database gives an application a consistent architecture for persistent data storage, making it easy to add new features and migrate the application code to a new environment. Using a database is a good long-term investment because it lets applications scale through the entire life cycle of the application.</p>
<p class=Bodytext>Portable media players need consistent, scalable performance across all operations, whether reading or writing to the database. Indexes are used to efficiently search the database and traverse the relationships between tables. B+ tree indexes are optimized to minimize disk I/O and offer consistent performance regardless of table size, even with limited RAM.</p>
<p class=Bodytext>When a sudden power failure or crash occurs while writing to a file, data corruption and inconsistency can result. To prevent corruption, embedded databases first write each change to a separate log file before modifying the database file. Using the log, incomplete changes can be rolled back to restore the database to a known good state.</p>
<p class=Bodytext>Rollback helps application developers cope with errors. If the software on a media player were to encounter a media file that is partially corrupt, it might have already added data about the file to several tables in the database. Rollback lets the application group changes together into an atomic transaction that either finishes completely or not at all. When an error occurs anywhere in the transaction, the application can roll back all changes with a single API call, regardless of where in the process the error occurred.</p>
<h1>Solving media player storage problems</h1>
<p class=Bodytext>Nearly every consumer now owns a portable media player in some form, and the demand for more storage capacity in these and other embedded devices continues to drive down the cost of storage hardware. But new hardware capabilities present new problems to media player software.</p>
<p class=Bodytext>ITTIA DB SQL is a pure relational database library suitable for portable media players where performance matters (see Figure 1). No matter how large the collection of media files grows, media will be sorted, searched, and navigated rapidly because the database library maintains indexes on key fields in the metadata. Interoperability, communication, and synchronization with other consumer electronics are areas of expansion for application developers. Device applications embedded with ITTIA DB SQL can leverage row-level locking to add concurrent access to the metadata for other devices. The database library exercises tight control over memory and code footprint and stores data in a portable format so that media player developers can face current hardware restrictions while providing for the needs of the future.</p>
<p class=Figures>
<figure>
<table width="480" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td align="center" >
<p>				<a onclick="popup=window.open(this.href, '21', 'width=875,height=596,scrollbars=no,resizable=yes'); popup.focus(); return false;" id="21" href="http://i.opensystemsmedia.com/?bg=ffffff&#038;q=90&#038;w=871&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4965%2Ffigures%2F1" title="ITTIA DB SQL enables media in a portable media player to be sorted, searched, and navigated rapidly."><br />
					<img src="http://i.opensystemsmedia.com/?q=94&#038;bg=ffffff&#038;w=470&#038;f=jpg&#038;src=http%3A%2F%2Fattachments.opensystemsmedia.com%2FECD4965%2Ffigures%2F1" alt="21" width="470" border="0" /><br />
				</a>
				</td>
</tr>
<tr>
<td class="caption" align="center" style="padding-top:10px;line-height:1em">
<figcaption><b>Figure 1:</b> ITTIA DB SQL enables media in a portable media player to be sorted, searched, and navigated rapidly.</figcaption>
<div class="fig-zoom">(Click graphic to zoom by 1.6x)</div>
</td>
</tr>
</table>
</figure>
<p class=Authorbio><b style='mso-bidi-font-weight:normal'>Sasan Montaseri</b> is the founder and president of ITTIA. He has more than 20 years of experience in the embedded database business arena. He holds a BS in Electrical Engineering from the University of Kansas with a minor in Mathematics. He was a member of PI MU Epsilon National Honor Society of Mathematics.</p>
<p class=Authorbio><b style='mso-bidi-font-weight:normal'>Ryan Phillips</b> is a lead database engineer at ITTIA. He has more than 15 years of software and database development experience. He holds a BS in Computer Science from the University of Washington.</p>
<p class=Contactinfo style='margin-left:0in;text-indent:0in'><b style='mso-bidi-font-weight:normal'>ITTIA<br /> </b>425-462-0046<b style='mso-bidi-font-weight:normal'><br /> </b><a href="http://www.ittia.com">www.ittia.com</a> <b style='mso-bidi-font-weight: normal'><o:p></o:p></b></p>
<p class=Bodytext><o:p>&nbsp;</o:p></p>
<p class=Bodytext><o:p>&nbsp;</o:p></p>
<p class=Bodytext><o:p>&nbsp;</o:p></p>
<p></span></div></li></ul>]]></content:encoded>
			<wfw:commentRss>http://embedded-computing.com/articles/application-testing-traceability-embedded-product-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
