Virtual Prototyping for Embedded Linux Product Development

by Jason R. Williamson

Right now, embedded developers who choose Linux face a bombardment of "what if" questions: What if it doesn't work? What kind of technical support is available? What if it isn't robust enough? What if the performance isn't there? What if we need to change to a more traditional OS?

Fortunately, Linux has the power and flexibility to answer these questions as well as any other RTOS. Unfortunately, even the best OS in the world cannot guarantee the final product to be something the customers need, something easy for them to use and, ultimately, something they will buy. Development of a successful product requires you to solicit the feedback of other people and incorporate that feedback into your design.

During the early phases, before too much money is sunk into the product and before it is too late for revisions, it is vital to make sure the design is on track and is applicable to the needs of the customer. To do this, you could hand over your code or your simulation model for review by management, the marketing department or even to prospective customers. The only problem is that they probably won't be able to visualize the final product by looking at cryptic models or thousands of lines of code. Something a little more graphical and user-friendly could help communicate the design concept and enable others to tell you what changes need to be made.

Virtual prototyping provides such a solution. Prototyping software tools typically include a graphical development environment in which you can (without programming) create an interactive prototype that looks and behaves like the actual product. Other people can then click their way around your designs and easily discover potential problems and request changes early in the development process, when those changes are easy to implement. This feedback is key to producing products that win over the skeptics of embedded Linux.

Prototyping Pros and Cons

Before making a snap judgment one way or the other on the idea of prototyping, you need to consider the key advantages and disadvantages carefully. We'll begin by looking at the drawbacks.

Unfortunately, you can't just decide that prototyping is a great idea and begin doing it immediately. The process actually begins with selecting and purchasing a prototyping software tool. The initial investment can cost thousands of dollars, depending on the tools you choose. Your return on this investment comes when you calculate the value of bringing the right product to market on time and under budget. However, you still face an initial outlay of cash to buy the tool.

Once you select and purchase a prototyping tool, you can also count on some downtime while learning how to use it. The length of the learning curve depends on the tool you choose. As with any type of application, some programs are more intuitive than others. To expedite the learning process, you'll want to purchase the tool from a vendor that offers comprehensive training, as well as a responsive and competent technical support staff.

You also will need to adjust your product development process to accommodate the extra step of prototyping. Once you're proficient with the software, the creation of prototypes won't be too time consuming, but it is still an additional step. Even though ironing out the specifications early in the process saves you the time of endless iterative cycles, you may still feel like you're adding more work to an already crunched production schedule.

As for the advantages of prototyping, the first and probably most significant benefit is involving other people early in the design process. As mentioned earlier, the virtual prototype presents your product plan to non-engineers in a way that they can understand and visualize, without having to wait until a hardware mock-up is available. You don't want the marketing department, product experts and management requesting specification changes when the product is nearly done. At that point, such changes may take months to implement. Often it is too late to make all the necessary revisions, so a less-than-perfect product goes on to market.

Prototyping also enables you and the rest of the design team to work together and collaborate better during the design process. Quite often team members work in different departments, different locations or even different companies. Furthermore, they may not have enough computing power or the right software tools to run the simulation models. Some prototyping tools allow people to interact with a prototype that is viewed over the Web. This bridges the distance between separate offices, and it solves the problem of not having the right computer or software. Additionally, if the prototype graphics are modular and the interface well defined, multiple people can collaborate on various aspects of the virtual prototype simultaneously.

Design debugging is another good use for prototypes. Sometimes, even engineers struggle to see a system's flaws and bugs while looking at it through modeling software or code. In that form, it's hard to visualize the real workings of the product. The virtual prototype, however, provides a different perspective, one that may reveal hidden bugs as you click your way through it, pressing buttons, turning knobs and exploring all the individual functions. By prototyping, you can debug your design faster, more effectively and much earlier in the development process.

Essentially, the advantages of prototyping boil down to two key benefits: bringing products to market faster and lowering development costs. Prototyping reduces development time because it enables early input and ease of collaboration. Testing and debugging also take less time because errors are found before they become difficult to correct. Naturally, the less time spent developing the product, the less it costs the company, and the earlier a product goes to market, the sooner the company begins realizing profits.

How Prototyping Works

The actual process of building a virtual prototype varies depending upon the tool you choose, but generally it involves creating the graphics and defining their behavior, identifying features to make available to others to customize and connecting the design to the simulation model or code.

You can create the graphics for your prototype using three different methods, none of which involve programming. The first method is to draw your own custom components within the tool's graphics development environment. This is commonly done with vector graphics, such as lines, squares, circles and polygons. While you do have the capacity to create anything you want, drawing all the graphics from scratch may prove tedious.

If you have bitmap images of what the product is supposed to look like, you can save a lot of time by importing those photo-realistic graphics into the prototyping tool. Importing bitmaps from scanned images or 3-D rendering software gives you a customized prototype without having to build your graphics from scratch. This method also allows you to create a prototype that looks exactly like what you envision for the final product.

Finally, if you need a working prototype but don't have much time to build one, use the quick and easy drag-and-drop method of inserting prebuilt components. Prebuilt components may range from sliders and meters to cockpit instruments or dashboard components. You easily can modify the behavior and appearance of these components using built-in properties. Depending on the tool you choose, the types of prebuilt component libraries and the number of available components may vary.

Defining the graphics' behavior involves assigning animation and stimulus to the various components so that they move as desired when prompted by input from the user. Animating objects typically requires no programming. In fact, it is usually as simple as manipulating the object within the graphics editor--rotating it, moving it, hiding it, changing its color--and assigning the given motion as its animation. The next step is assigning stimulus to the graphics, so that mouse clicks, mouse movements, keystrokes and other inputs result in the desired response from the prototype. You also may be able to define more sophisticated behavior and component interactions based upon events and what you want the prototype to do when a certain event occurs.

If other people will be editing or modifying the prototype, you'll want to make it easy for them to change the properties of various components. When you've built your interactive graphics, you can identify features that other users might want to change. These features include things like colors and minimum and maximum values for each object. Once these features are defined, other users can easily personalize the objects' appearance and behavior.

In some cases the virtual prototype itself contains all the system's logic. In more complex systems, however, the last step to creating a complete virtual prototype is connecting the graphics to any external simulator or code that you may be using. (This external logic is usually what will be deployed on the final system.) Depending on your prototyping tool and your simulator, a prebuilt, high-level connection may enable you to send and receive events with a simple point-and-click dialogue. The connection to code typically involves an API that allows you to send data back and forth between the code and the prototype.

Features to Look for

Not all prototyping tools are created equal. Specific features and capabilities may vary from one program to the next. When you're in the market to purchase this type of software, there are a few important things that you should look for and consider before making a purchase.

Find out whether or not the prototyping tool uses an open architecture. You do not want to hinder your future product development flexibility because of the limitations of your prototyping tool. Look also for a program that runs on multiple operating systems, so that you can use it regardless of what platform you're working on and enhance your ability to collaborate with others. Furthermore, the prototyping tool should connect to a wide variety of simulation programs and programming languages, giving you the freedom to switch tools when necessary.

Determine how the tool handles distribution of the prototypes you create. Good prototyping tools should make it easy for you to distribute your prototypes to the people who need to see them--after all, that's the point of this whole exercise, isn't it? For greatest convenience, look for a tool that provides a royalty-free runtime for passing your prototypes on to your colleagues, managers and customers. It's also handy to be able to embed the prototypes into a web page, making them accessible via the Internet.

Automatic documentation is another nice feature for a prototyping tool. With this capability, the tool goes through the interface and then automatically creates documentation that includes technical information, specification data and illustrations. This saves you a significant amount of time and effort, and it helps you maintain a standard format and appearance for all documentation. Documentation also can aid in your own understanding of the prototype, as well as help you to explain it to others.

Finally, if you develop products that include a display screen as part of the graphical user interface, look for a prototyping tool that works with an automatic graphics code generator. Because you already have created the screen graphics as part of the virtual prototype, it would be a shame to waste them by then hand-writing the graphics code from scratch. With graphics code-generation capability, once you've completed the prototype and finalized product specifications, you can return to the prototype, select the display screen portion, and then automatically generate complete code that is ready to deploy on your target. Different graphics code generators produce code for different target RTOSes, so make sure that the tool you choose has the ability to generate code for embedded Linux.

The Bottom Line

Prototyping itself offers no guarantee that people immediately will welcome embedded Linux as an integral part of their next new product. You'll still have to convince the skeptics and answer their myriad "what if" questions. Only when you bring the first useful and applicable Linux-based product to market will they begin to gain confidence in the OS. What prototyping does offer is the type of product development process that makes your final product (and its OS) look good. It helps your development team hit the mark because you understand your customer's needs and therefore release a truly useful product. Maybe it will even be that first Linux killer app, and when that happens, embedded Linux is on its way to becoming mainstream and indispensable.

Jason R. Williamson works at Altia, Inc., which is at the vanguard of virtual software prototyping. Jason wrote this article along with Hannah Henry (hannah@altia.com), who is in charge of marketing and communications at Altia.

Load Disqus comments