Embedded design teams often have legacy considerations that dictate system design with each revision or evolution. Software is a particular concern. Teams seek to preserve proven algorithms and code even while attempting to take advantage of the latest hardware. And the legacy code may well have been written for a number of loosely-coupled specialized processors either combined on one board or spread across multiple boards. Today's Intel® Architecture multi-core processors, based on the Core or Nehalem microarchitectures, provide a very cost effective platform that can easily replace a dozen or more processors in a legacy system. But how do you migrate the software?
Of course there is no simple answer. The design team could rewrite the software from the ground up and likely realize performance gains. Such a redesign, however, adds engineering costs and adds time to the design cycle resulting in undetermined but potentially significant opportunity costs. Teams looking to harness the latest processors do have options to maintain the legacy code and still consolidate their design to a single- or dual-socket multi-core design.
QNX Software Systems, an Associate member of the Intel® Embedded and Communications Alliance (Intel® ECA), offers one alternative for porting legacy code to a multi-core processor. The company supports a technique called Bound Multiprocessing (BMP) that offers many of the advantages of Symmetric Multiprocessing (SMP) on a multi-core platform, while simplifying the task of getting legacy code to work on the platform.
Multi-processor legacy systems often dedicated an instantiation of an operating system (OS) to each processor and dedicated each processor to a specific set of tasks or software processes - a technique often called asymmetric multiprocessing (AMP or ASMP). In a modern SMP system, a single copy of the OS hosts all processes and assigns any process needing service to the next available processor or core. But legacy code designed for a single-processor environment may not run without significant modification in an SMP system. The code may have no shared-memory mechanism and in real-time implementations may expect direct access to the processor at all times.
BMP offers a compromise between the legacy AMP system and an SMP system. The BMP implementation available in the QNX Momentics Tool Suite relies on a single copy of the OS to handle all processes. But the design team can specify that a process or set of processes, and all associated threads, be dedicated to a particular core. The legacy code gets the equivalent of a dedicated processor. Meanwhile, SMP-aware code can take full advantage of SMP with the OS scheduling processes for the next available execution resource. Below you'll see a screen shot of the memory analysis feature in Momentics.
For a thorough look at AMP, BMP, and SMP, you might read the article, "Software migration strategies for multi-core processors" from Embedded Control Europe magazine. In addition, Intel multi-core expert Lori Matassa recently posted an SMP article to the Intel® ECA site.
As for your choices in multi-core platforms, Intel has a broad variety of platforms that are in the company's embedded program with guaranteed availability for many years. The platforms include both options optimized for performance and others optimized for low power. The available processors range from single- and dual-core Intel® Core TM-2 Duo processors to dual- and quad-core Intel® Xeon® processors. And in all cases, the platforms support dual processor sockets for as many as eight cores total. For more information on the Intel embedded platforms see the Hardware Platforms web page.
I'd like to hear other ideas on moving legacy multiprocessor applications to a modern multi-core platform. How did you migrate legacy software and how have you leveraged Multi-Core features? Please share your techniques with the Intel® Embedded Community via comments to this blog.