Showing posts with label cpu. Show all posts
Showing posts with label cpu. Show all posts

Tuesday, August 13, 2019

The Motorola 68000 microprocessor

The Motorola 68000 (MC68000) is a 16/32 -bit CISC microprocessor designed and marketed by Motorola (currently produced by Freescale). Introduced in 1979 deploying HMOS technology it was the first member of the successful family of 32-bit m68k microprocessors. The software created for this processor is usually fully compatible with future versions of the rest of the line, despite the fact that this first version is limited to an external 16-bit bus width. After three decades in production, the 68000 architecture is still in use today.

Notable computers using the Motorola 68XXX processor

The microprocessor owes its name to the number of transistors of which it’s composed. It has been used, among others, in the Commodore Amiga family, the Atari ST line of micro computers, the very first Macintosh, the Sharp X68000 and the first gaming video games used by Capcom. The MC68000 was launched in 1980 and is the first of a family of microprocessors that is made up of the Motorola 68010, Motorola 68020, Motorola 68030, Motorola 68040 and the Motorola 68060. This family of processors is often designated by the generic terms 680x0, m68k, 68k or 68000 family . Motorola also developed a 680x0 successor, called the Coldfire.


The 68000 emerged out of the the MACSS project (Motorola Advanced Computer System on Silicon, Motorola Advanced Silicon Computing Systems), which started in 1976 to develop a completely new architecture without maintaining compatibility with any previous processors. It would be the most powerful microprocessor to complement the 6800 8-bit production line instead of designing a compatible line. After all the 68000 provided a bus protocol with a compatibility mode for peripheral devices of the 6800 line. Thus a version with an 8-bit data bus was produced.

However, the designers focused mainly on the future or forward compatibility, which gave the m68k platform an advantage over subsequent 32-bit architectures in its instruction set. For example, the CPU registers were 32 bits wide, although only few autonomous structures in the processor worked in a 32 bits mode at that time. The MACSS team was very strongly influenced by the design of processors for minicomputers, such as the PDP-11 and VAX systems, which have a similar microcode.


The 68000 architecture is based on two banks of 8 32-bit registers. One bank represents data (Dn) and the other the pointers (An). It also has a 32-bit program counter and a 16-bit status register, the so called "System Byte" being high and the "User Byte" being low. Data registers (D0 to D7) can be used as 32-bit (.l), 16-bit (.w) and 8-bit (.b) registers. Any of them can be used for the accumulator, index- or pointer registers. This processor is made in HMOS technology and has 64 pins without signal multiplexing.

Address registers

Address registers (pointers) are very similar to those of data registers, but cannot be used as bytes and operations, because they do not affect carry registers when performing calculations. The A7 register represents the stack pointer and is duplicated, with one stack for the user mode and another for the supervisor mode.

Wednesday, June 6, 2018

Zilog Z80 CPU

The Zilog Z80 is an 8-bit microprocessor designed and manufactured by Zilog. One of the peculiarities of this processor is the coupling of some 8-bit registers to a 16-bit register. This with a 16-bit address bus allows for much faster processing of data than with a conventional 8-bit processor.

This processor was marketed for the first time in July 1976. In the early 1980s it was very popular in the design of 8-bit computers such as Radio Shack TRS-80, Sinclair ZX80, ZX81, ZX Spectrum, MSX standard, Amstrad CPC, PC-88 and later in embedded systems. With the MOS 6502 family, it dominated the 8-bit micro computer market from the late 1970s to the mid-1980s and was still used in then new Amstrad computers until 1995.

The Z80 was designed to be compatible with the Intel 8080, so the majority of the code for 8080 could work without much modification on the Z80. The CP/M operating system was designed around Intel 8080 based systems and could also work without modification on Z80 based systems.Z80 based systems were generally more powerful and had more features than systems based on 8080 CPUs. Some versions of CP/M applications only existed in a Z80 version.

History and overview

Z80 CPU DIP by DamicatzThe Z80 came into being when Federico Faggin, after working on the 8080, left Intel at the end of 1974 to found Zilog together with Ralph Ungermann to put the Z80 on the market in July of 1976. It was designed to be binary compatible with the Intel 8080 so that most of the 8080 code, including the CP/M operating system, works without modification on it. The Z80 quickly took over share from the 8080 on the market, and became one of the most popular 8-bit processors. Perhaps one of the keys to Z80's success was the integrated refresh of DRAM, and other features that allowed systems to be built with fewer chips. For the first NMOS generation, the maximum clock rate increased gradually. First at 2.5 MHz, then by the well known 4 MHz (Z80a), up to 6 (Z80b) and 8 MHz (Z80h). A CMOS version was developed with frequency limits ranging from 4 MHz to 20 MHz and some versions were sold until the 2000s. The CMOS version also has a low power sleep mode, with processor state retention. The Z180 and eZ80, fully compatible derivatives, have specifications for up to  50 MHz.

Use in systems

The Z80 CPU saw uses including in Texas Instruments calculators, SEGA Master System, GameBoy, and Game Gear video game consoles. Some more powerful consoles with other central processors like the Neo Geo or the Mega Drive with its Motorola 68000, used the Z80 as an addon processor to handle sound or system I/O.

Saturday, May 19, 2018

The MOS 6502 CPU microprocessor

In the early '70s, a group of engineers from Motorola was convinced that it was possible to obtain a cheap microprocessor if a simple design and an improved manufacturing process were raised with respect to the standards of the time. Without the support of the company, this group would create one of the families of chips that would be the catalyst for the revolution of home computing, it is the 6502 and its successors, the main engine of the first Atari and Apple machines, between others.

Chuck Peddle was one of the leading engineers in the development of the Motorola 6800 processor, in his meetings with important industrial clients, he realized that the technology was appreciated, but too expensive to be used in a massive way. In conversations with his clients, he concluded that the cost of the processor had to go down from USD $ 300, which cost 6800 to only USD $ 25 at the time, a conclusion that did not make Motorola managers who had no motivation at all happy. to look to reduce the price of a technology that already had good sales.

Chuck Peddle and his work

For Chuck and other engineers it was an interesting technical challenge and without the support of Motorola they began to work on the necessary changes to improve their processor. On the one hand, the team was unhappy with Motorola's lack of support, and on the other hand the company was annoyed by Chuck's and his team's stubbornness, and finally the straw that broke the camel's back was Motorola's formal request to halt the project. that made Chuck and his team decide to leave the company, to continue working on their microprocessor on their own.

6502 CPU chip (C)


The group joined a low profile company called MOS, where they reached an agreement to participate in the profits that could be obtained with the new microprocessor, an agreement that from the MOS point of view was convenient due to the low profitability that meant in that time the production of these chips. This agreement, together with the mass resignation of Motorola was a demonstration of the confidence that the team of engineers had in the product they were developing.

The first processor of the 6500 series was 6501. An unprecedented fact that surrounded the development of this chip was that Chuck designed it completely by hand and it worked on the first attempt, when the normal thing in those years was to go through a process of over 10 failed attempts This processor was quite scarce since it was not made in order to be sold, but as a way to show Motorola how wrong they were, and that a useful and inexpensive microprocessor could be built.

One of the factors that influenced the reduction of production costs was an innovation of these engineers regarding the manufacturing process. In those times, the failure rate in production was 70%, that is, only 7 of every 10 processors manufactured went straight to the trash. This happened mainly because the process consisted of creating a large mold of the processor and applying reductions until reaching the real size, in these reductions errors always occurred and the engineers in MOS found a way to apply corrections to the mold in each reduction, achieving with this change a success rate of 70%, that is, 7 out of 10 processors were perfect.

The 6501, a Motorola clone?

The 6501 was fully compatible with the Motorola 6800 boards and could be used as a direct replacement at hardware level, which motivated a Motorola claim for alleged patent infringement of its former engineers. Supposed because in fact what was at stake was the intellectual property, since it was applying the knowledge of technologies that in fact were not patented. Even so an agreement was reached with Motorola and a sum of about USD $200,000 was paid to end the lawsuit.

The problem with Motorola caused the creation of the 6502, it was a 6501 but incompatible with the hardware designed for the Motorola 6800. The 6502 debuted at WestCon 1975 at the exact price of USD $ 25 that had been proposed. At first the attendees thought that it was some kind of scam, since it was not conceived to create such a cheap processor, but on the same day Motorola and Intel lowered the price of their 6800 and 8080 processors from USD $ 179 to only USD $ 69, validating the 6502 that was sold by the hundreds.

In the coming years Commodore, who was still in the calculator business, was going through financial difficulties as the business was going down and the competition was getting stronger. As a strategy to change the direction of the business, they bought from MOS, which was also struggling but had the technology they needed.

For Chuck Peddle the microprocessor business was geared to the industrial world, but while visiting different companies to try to sell the 6502 they told him that a couple of guys were trying to use their processor to build a personal computer. The fact seemed nice and agreed to go to help them to his garage, it was nothing more and nothing less than Steve Jobs and Steve Wozniak who worked on his first Apple computer. Chuck thought about introducing the 6502 into the industries and he did not suspect that a big market was in personal computers. Not in a million years! In his own words.

The 6502 is an 8-bit processor, which means that all its internal operations handle numbers between 0 and 255, on the other hand it has a 16-bit address bus that allows it to access up to 64KB of memory. The 6502 normally operated with a clock between 1 and 2 Mhz but given the same clock frequency it was capable of running much faster than the Motorola 6800, thanks to its clever design that reduced the number of clock cycles needed to execute an instruction .

Among the computers that were built around the 6502 are the Commodore PET, VIC-20, Apple I and II, BBC Micro and the entire line of Atari 8 bit computers such as the XL, XE, 400, 800, but also can be found in other types of devices, such as the Commodore 1541 disk drive for Commodore 8 bit computers. In the pioneering Atari 2600 console, an economical version of the 6502 known as 6507 was used, a version that had fewer pins and could only access 8KB of memory. The Commodore 64 also used a modified 6502, it was the 6510 where it added simple features that were usually implemented with additional circuitry.

Wednesday, January 3, 2018

Intel processor kernel bug

A fundamental design flaw in Intel's processor chips dealing with speculative execution ("KASLR") was found and forced an extensive redesign of the kernels of at least Windows, Mac and Linux operating systems. It was also noted that an otherwise simple microcode update is not sufficient.

Interestingly, these patches KPTI patches to move the kernel to a separated address space of the operating system, no matter if Linux or Windows, will incur a performance hit on Intel products of possible 30%. It now reminds me of the time when DMA (Direct Memory Access) came around and did quite a performance boots. The imagine it's taken away from you again.

It is speculated that it might be enough for users of Intel based computers to run in the open arms of AMD. It will sure cost Intel dearly.

In the meantime two flaw were uncovered and nicknamed Meltdown and Spectre.