November 1st, 2019 ~ by admin

CPU of the Day: Motorola MC68040VL

Motorola MC68040VL

A month or so ago a friend was opening up a bunch of unmarked packages, and taking die photos and came across an interesting Motorola.  The die looked familiar, but at the same time different.  The die was marked 68040VL, and appeared to be smaller version of the 68040V.  The Motorola 68040V is a 3.3V static design of the Motorola MC68LC040 (It has dual MMUs but lacks the FPU of the 68040).  The 68040V was made on a 0.5u process and introduced in 1995.  Looking closely at the mask revealed the answer, in the form of 4 characters. F94E

Motorola Mask F94E – COLDFIRE 5102

Motorola uses mask codes for nearly all of their products, in many ways these are similar to Intel’s sspecs, but they are more closely related to actual silicon mask changes in the device.  Multiple devices may use the same mask/mask code just with different features enabled/disabled.  The Mask code F94E is that of the first generation Motorola COLDFIRE CPU, the MCF5102.  The COLDFIRE was the replacement for the Motorola 68k line, it was designed to be a 32-bit VL-RISC processor, thus the name 68040VL for VL-RISC. .  VL-RISC architectures support fixed length instruction (like a typical RISC) but also support variable length instructions like a traditional CISC processor.  This allows a lot more code flexibility and higher code density.  While this may be heresy to RISC purists it has become rather common.  The ST Transputer based ST20 core is a VL-RISC design, as is the more modern RISC-V architecture.  The COLDFIRE 5102 also had another trick, or treat up its sleeve.  It could execute 68040 code.

Motorola XCF5102PV20A 03F94E – 1995

The COLDFIRE, and the 68040 are microcoded processors, meaning they do not execute the instructions directly, the opcodes are translated in a PLA to the actual instructions that manipulate the flow of data. This is common in processors today and allows greater flexibility.  Its what allows the COLDFIRE to execute 68040 code as well as the new VL-RISC instructions.  In fact, its actually what allowed Motorola to re-spin the 68040V as the COLDFIRE, at its heart the COLDFIRE 5102 is actually a slightly modified 68040V.  It seems that Motorola may have even been thinking about calling it the 68040VL before renaming it COLDFIRE. There are some minor differences however.

The 68040V had dual 4K instruction/Data caches, which in the COLDFIRE 5102 have been reduced to 2K Instruction cache and 1K Data cache (clearly visible on the die).

68040V on the left with clearly larger cache’s and COLDFIRE on the right, smaller caches. Overall very similar designs.

It omits the dual MMU of the 68040V which is less needed in embedded processors (it got added back in in the V4e version a decade later) The COLDFIRE retains the 6-stage pipeline of the 68040 but uncouples the Instruction Fetch and Decoding stages, allowing for somewhat faster processing.  The Register structure is also the same, with 8 Data Registers, 8 Address Registers and a PC.   The COLDFIRE instruction set is actually a subset of the 68040, most 68040 code will run on a 68020 or higher.  For later versions of the COLDFIRE the opposite is not true, but in the 5102 the additional 68040 instructions are supported, to allow easier transition to the platform.

Motorola MC68040RC25V

By the 1990s the 68k line was getting a bit tired, and increasing competition was making it less relevant and competitive.  Motorola’s quick update to the design, made possible by good engineering and microcoding allowed them to make a ‘new’ product and compete again in the 32-bit embedded market.  The complete renaming of the design to COLDFIRE from 68040VL helped market it as ‘new’ and certainly COLDFIRE is a cool sounding name for a product that had grown cold and needed a bit of reheating.

Thanks to my friend aberco for sending me down this rabbit hole with his nice die photos

Leave a Reply