Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
EE Times-Asia > Controls/MCUs

Programmable logic/customizable CPU cores adapt hardware to apps

Posted: 02 Dec 2002 ?? ?Print Version ?Bookmark and Share

Keywords:sopc? programmable logic? cpu core? system-on-a programmable chip? embedded microcontroller?

Embedded microcontrollers are the original SoC devices. In the last few years, FPGA and PLD manufacturers have preffered the term "system-on-a programmable chip" (SOPC), which captures the idea of using programmable logic as a medium with which designers can create custom hardware - including microcontrollers.

The elements required to create viable custom microcontrollers include: full-featured 32-bit RISC microprocessors, readily available peripherals and options for building custom peripherals, IP, and comprehensive development tools. These elements are now available, and in combination with low-cost programmable PLDs. Designers can use these elements to realize attractive alternatives to off-the-shelf microcontrollers.

In particular, this approach is especially useful in compute-intensive applications where microprocessors and microcontrollers have moved into the realm of DSP. In some applications, however, such as in small footprint iappliances and some embedded systems environments, such as home networking, where it is being used as the main connection to the external network, a subset of DSP-like functionality is all that is required. Usually in the past, the designer had to decide between options such as coding in assembly language and using a higher-clock frequency processor, or using a DSP processor as the main processor, or using a co-processor for the compute intensive portion of the problem.

With microprocessor/microcontroller systems in programmable logic, other options are available. The designer is now free to take specific software blocks and code these as hardware that can be called as single "custom instructions" from the microprocessor.

From the software engineer's perspective, this is simply a function call in C or assembly language, but rather than a sequential list of instructions being called, a block of hardware is used to execute the relevant algorithm. Similarly, the architecture of the system can be changed to match the problem at hand, including adding multiple arbitrated slave-peripherals on a multi-master bus, or including custom peripherals or DMA as necessary.

Many embedded and small footprint iappliance applications only require the use of floating point instructions. But when floating point calculations are done in software, they are notoriously slow. Few microcontrollers provide floating-point support, forcing the designer to use either a software library or an external floating point unit. In many cases, only a subset of the floating point instructions is necessary for the problem to be solved. The use of custom instructions allows the designer to choose which operations to implement as hardware and which to leave as software library routines.

Overall improvements

Aside from improving system performance by improving compute performance through custom instructions, programmable logic-based designs allow architectural changes in embedded microcontroller designs that can be used to improve overall system performance. For example, consider an embedded Web server on a microcontroller that on request from an external browser serves up several pages, including images that are 60KB in size.

There are two ways to measure "throughput" on such an application. The first, "HTTP server throughput" is a measure of the end-to-end performance of the system from the request from the client to the final transmission and acknowledge. The second, "transmission throughput" is simply a measure of the time to transmit the http packets over the 10Mbps Ethernet channel.

Optimizations to the system hardware using a programmable logic-based customizable processor include adding a checksum peripheral that calculates the IP-packet checksum off the microprocessor and does this in parallel in a hardware peripheral added to the system. Another system optimization: Add a DMA controller to the system that is used to copy packets to/from the MAC/PHY chip from/to memory without having to go through the microprocessor, as is done in the baseline system.

Performance improvements can be achieved by moving software blocks into hardware or changing the architecture of the microcontroller system. All of our examples were done on the same development board running at 33MHz. Standard tricks of increasing the raw clock-frequency, or moving to faster memory, or adding cache to a system are still available to the system designer. The use of programmable logic microcontrollers extends the available set of tools that can improve system performance.

In the Web server application, performance improvements from doing checksum and DMA in software were almost three-fold in the case of HTTP server throughput as well as in transmission throughput. In the first case, the boost was from a baseline software only approach of 2.12Mbps to 6.07Mbps. In the case of transmission throughput, the improvement was 9.42Mbps, from 3.14Mbps for the baseline software-only approach.

- Chris Robinson

Embedded Applications Engineer

Altera Corp.

Article Comments - Programmable logic/customizable CPU ...
*? You can enter [0] more charecters.
*Verify code:


Visit Asia Webinars to learn about the latest in technology and get practical design tips.

Back to Top