litwr (litwr) wrote,

Emotional stories about first processors for computers: part 3 (Motorola 68k)

Motorola: from 68000 to 68040

Motorola is the only company that could successfully compete with Intel processors in the field of production of processors for personal computers for some time.

68000 was released in 1979 and at first glance looked much more impressive than 8086. I could address 16 MB of memory directly, which did not create any restrictions, for example, for large arrays. However, careful analysis of features of 68000 shows that not everything is as good as it seems. In those years, to have a memory of more than 1 MB is an unattainable luxury even for medium-sized organizations. The 68000 code density is worse than for 8086, which means that 68000 codes with the same functionality occupy more space. The latter is also due to the fact that codes for 68k should be multiples of 2 bytes in length, and for x86 – 1. But the information about the code density is controversial – there are some points showing that in some cases 68000 could have the better code density. Out of 16 registers there are 8 address registers, in some respect they are slightly more advanced analogues of x86 segment registers. The ALU and data bus are 16-bit, so operations with 32-bit data are slower than someone could expect. The execution time of register-register operations is 4 cycles, and for 8086 is only 2.

As always, with products from Motorola, the architecture of the 68000 shows a few clumsiness and contrived oddities. For example, there are two stacks and two carry flags (one for condition checks and another for operations). Some operations are irritated by their non-optimization, for example, CLR instruction of writing zero to memory is slower than writing a constant 0 to memory with MOVE instruction or shift to the left is slower than adding an operand to itself. There are some almost unnecessary commands, for example, there are both arithmetic and logical shifts to the left. Even the address registers, while seemingly superior to the 8086 segment registers, have a number of annoying disadvantages. For example, they needed to load as much as 4 bytes instead of two for 8086 and of these four, one was extra.

The codes for Motorola look somewhat more cumbersome and clumsy compared to x86 or ARM. On the other hand, 68000 is faster than 8086, according to my estimates by about 20-30%. The 680x0 codes, however, are inherent some special beauty and elegance, less mechanicality, than x86. Additionally, as shown by experts, the code density of 68k is often better than that of x86.

Overall, the 68000 is a good processor, with a large instruction set. It was used in many of the now legendary personal computers: the first Apple Macintosh computers that were produced before the early 90's, the first Commodore Amiga multimedia computers, in relatively inexpensive and high-quality Atari ST computers. 68000 was also used in relatively inexpensive computers working with Unix variants, in particular, in the rather popular Tandy 16B. Interestingly, IBM simultaneously with the development of the PC led the development of the System 9000 computer based on the 68000, which was released less than a year after the PC.

68010 appeared clearly belatedly, only in 1982, at the same time Intel released 80286, which put personal computers on the level of a mini-computer. 68010 is compatible with the plug with 68000, but the system of its instructions is slightly different, so the replacement of 68000 by 68010 has not become popular. The incompatibility was caused by a contrived reason to bring the 68000 into more correspondence with the ideal theory of virtualization. 68010 is only slightly, no more than 10% faster than 68000. Obviously, the 68010 was badly losing 80286 and was even weaker than the 80186 that appeared in the same year. Like the 80186, 68010 almost never found a use in personal computers.

68008 was also released in 1982, probably with the hope of repeating the success of the 8088. It's 68000, but with an 8-bit data bus, which allowed it to be used in cheaper systems. But 68008, like 68000, does not have an instruction queue, which makes it about 50% slower than 68000. Thus, the 68008 may even be a little slower than the 8088, which is only about 20% slower than the 8086 due to the presence of the instruction queue.

Based on it, Sir Clive Sinclair made Spectrum QL – a very interesting computer that, because of the lower price, could compete with Atari ST and similar computers. But Clive, in parallel and clearly prematurely, began to invest a lot in the development of electric vehicles, leaving QL (Quantum Leap) rather as a secondary task, which, in the presence of some unsuccessful constructive decisions, led the computer and the whole company to premature closure (the company became part of Amstrad, which refused to produce QL).

It would be interesting to calculate the bit index for 68000, it seems to me, clearly higher than 16, although rather not higher than 24.

Appearing in 1984, 68020 again returned Motorola to the first positions. In this processor, many very interesting and promising innovations were realized. The strongest effect is certainly the instruction pipeline, which sometimes allows you to execute up to three instructions at a time! The 32-bit address bus looked a little premature in those years, and therefore a cheaper version of the processor (68020EC) with a 24-bit bus was available. But the 32-bit data bus looked quite appropriate and allowed to significantly speed up the processor. The built-in cache appeared to be an innovation even though it was a small 256 bytes of capacity, which allowed to significantly improve the performance because the main dynamic memory could not keep up with the processor. Quick enough operations for division (64/32 = 32,32) and multiplication (32*32 = 64), for approximately 80 and up to 45 cycles, respectively, were added. The timings of the instructions were generally improved, for example, the division (32/16 = 16,16) began to be performed for approximately 45 cycles (more than 140 cycles in 68000). Some instructions in the most favorable cases can be performed without occupying clocks at all! New address modes were added, in particular, with scaling – in x86 this mode appeared only in the next year at 80386. Another new address modes allow the use of double indirect addressing, using several offsets, – PDP-11 has been remarkably outdone here.

But some new instructions, for example, bulky operations with bit fields or new operations with decimal numbers that have become little needed in the presence of rapid division and multiplication, looked more like a fifth wheel of a bus than something essentially useful. Address modes with double indirect addressing theoretically look interesting, but practically are needed quite rarely and are executed very slowly. Unlike 80286, the 68020 takes time to compute the address of the operand, the so-called effective address. The division at 68020 is still almost twice as slow as the fantastic division at 80286. Multiplication and some operations are also slower. The 68020 doesn't have a built-in memory management unit and rather the exotic ability to connect up to eight coprocessors couldn't fix this.

68020 was widely used in mass computers Apple Macintosh II, Macintosh LC and Commodore Amiga 1200. It was also used in several Unix systems.

The appearance of the 80386, though still generally slower than the 68020, but with a built-in and very well-made MMU and 32-bit buses and registers, again put Motorola in position number 2. 68030, appearing in 1987, for the last time, briefly returned the leadership to Motorola. The 68030 has a built-in memory management unit and a doubled cache, divided into a cache for instructions and data – it was a very prospective novelty. In addition, the 68030 could use a faster memory access interface, which can speed up memory operations by almost a third.

68030 was used in computers of the Apple Macintosh II series, Commodore Amiga 3000, Atari TT, Atari Falcon and some others.

With 68040 Motorola once again tried to outperform Intel. This processor appeared a year later after 80486, but on a set of useful qualities, it was never able to surpass it. In fact, Motorola, having a more overloaded system of instructions, was not able to support it and in a sense has disappeared from the race. In 68040, only a very truncated coprocessor could be placed to work with real numbers, and the chip itself was heated significantly more than 80486. 68040 almost did not find applications in popular computers. Some noticeable use was found only by its cheaper version – 68LC040, which does not have a built-in coprocessor. However, the first versions of this chip had a serious hardware defect, which did not allow using even the software emulation of the coprocessor!

Motorola always had problems with mathematical coprocessors. As was mentioned above Motorola never released such a coprocessor for the 68000/68010, while Intel released its very successful 8087 since 1980. But to get a significant performance boost, the code for 68882 needs to be compiled differently than for 68881.

It is appropriate to say that Intel still has problems with the mathematical coprocessor – the accuracy of calculations of some functions, for example, the sine of some arguments is very small, sometimes no more than 4 digits. Therefore, modern compilers often calculate such functions without using the services of the coprocessor.

Tags: 68000, 68010, 68020, 68030, 68040, 68881, 68882, 68k, computer, cpu, dec, gnu, hardware, history, intel, motorola, pdp-11, processor, x86
  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.