Eight 32-Bit Cores Take Flight In Multiprocessor Microcontroller

April 13, 2006
New processor architectures are rare, especially in the microcontroller arena. But Parallax created a chip that could rotate right into your next application. The Parallax Propeller consists of eight identical RISC-style processing units call

New processor architectures are rare, especially in the microcontroller arena. But Parallax created a chip that could rotate right into your next application. The Parallax Propeller consists of eight identical RISC-style processing units called cogs (see the figure).

The chip runs on 80 MHz, but it only consumes 75 mA with all cogs running. If you cut back to one cog using the internal clock at 20 kHz, the power drain drops to the 3-µA range.

Each cog can access all of the 32 I/O pins. Usually, though, an application running on a cog will use only a few pins. A typical example of a cog application is a full-duplex serial port interface that would utilize two pins. Hardware flow control adds two pins. Want two serial ports? Fire up another cog.

A COG IN THE MACHINE This chip takes a new approach to running code in multiprocessing applications. To start up another cog, you just specify what routine to begin executing, or the address of an assembly program, and it automatically loads up and begins executing code internally. The cog can later shut itself off so that it can be reused for some other purpose.

Code can be run on a specific cog. Generally, though, the next idle cog is used instead, because each cog is identical and has the same access to memory and I/O pins. A cog needs to be identified so that another cog can start or stop it, although most communication is completed using the shared system memory.

Access to the shared resources— memory, semaphore bits, and other cogs—is provided in round-robin style, with each cog getting one time slot. This makes system access significantly slower than access to local cog memory, but it simplifies the architecture. The Propeller contains a single memory for code and data.

Self-modifying code is an option. This tends to be less of an issue given the limited memory size. Code modules are likely to be small and concise. In fact, tight coding will be the norm. There's no hardware stack support, but a co-routine switch instruction allows a stack to be implemented in software if necessary.

TAKING A COG FOR A SPIN Don't take off your propeller hat yet. This chip takes a two-level approach to programs.

Spin, a Basic-like programming language with recursion, is executed by a Spin interpreter program that runs in a cog. Spin code resides in shared memory, so Spin runs slower (60 KIPS) than cog code (20 MIPS). Spin applications handle the high-level portion of the application, with cog code handling peripheral control.

Spin isn't multithreaded, but multiple Spin interpreters can be run on different cogs. By default, a Spin interpreter runs on a cog when the chip starts up. Actually, the startup process is a bit more complicated, since the ROM contains a boot loader. Application code and data can be automatically loaded into system RAM via a serial EEPROM or serial port.

Parallax supplies its own development tools designed to handle a mixture of cog and Spin code. The development environment is both polished and rough—its debugging features could use some work. Still, the integrated development environment contains neat features like automatic code documentation support. The hardware architecture and software environment is different enough so that even experienced developers will need to stop and think—and that's a good thing.

The Propeller can perform some surprising tasks, like drive a VGA display from software. It also takes applications like motor control to a new level. Ultimately, though, a new mindset is necessary to take advantage of the architecture.

A low-cost, USB-based dev kit is available for the Propeller. Also, the board contains its own serial EEPROM. Time to fly!

Parallax
www.parallax.com

See the table

Sponsored Recommendations

Highly Integrated 20A Digital Power Module for High Current Applications

March 20, 2024
Renesas latest power module delivers the highest efficiency (up to 94% peak) and fast time-to-market solution in an extremely small footprint. The RRM12120 is ideal for space...

Empowering Innovation: Your Power Partner for Tomorrow's Challenges

March 20, 2024
Discover how innovation, quality, and reliability are embedded into every aspect of Renesas' power products.

Article: Meeting the challenges of power conversion in e-bikes

March 18, 2024
Managing electrical noise in a compact and lightweight vehicle is a perpetual obstacle

Power modules provide high-efficiency conversion between 400V and 800V systems for electric vehicles

March 18, 2024
Porsche, Hyundai and GMC all are converting 400 – 800V today in very different ways. Learn more about how power modules stack up to these discrete designs.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!