⬆️ ⬇️

We split Quark. Intel microarchitecture





Quark is a fundamental, that is, a structureless elementary particle, introduced into the theory in 1964, which so far could not be described as a composite one. Intel Quark is a processor for the Internet of Things, released by Intel since autumn 2013, but still not having a public description of its internal structure and perceived outside of Intel as a “black box”. - How do you call a yacht, so she sails? But I do not believe it. Rather, as you call a yacht, she will call you (if there is an onboard computer in it). In general, in this post I will correct the situation and tell you how Quark works.





Modern history - Quark.


So, in September 2013, Intel will announce the new Intel Quark processor, designed for the Internet of Things, as well as for a variety of wearable technology and consumer devices. Quark is really a microprocessor (from the Greek “micro” = small), with a size of about 1/5 of the Atom (that is, the Intel Atom, of course), and 10 times less power consumption. At that time, these are the only known technical details about Quark - there are not many of them, as is usually the case with announcements of this level. But the interest in this processor is quite big. Here, for example, an independent post with the announcement and the corresponding reaction of readers to habrahabr.ru.

')

A month after the announcement, the first representative of the Quark family, the Quark SoC X1000, appears on the market. It is the basis of the first Arduino-compatible microcomputer on the Intel platform, Galileo . Then the information about Quark becomes more. The Quark X1000 SoC is a single-core 32-bit processor with a frequency of up to 400 MHz, made on 32 nm technology and has an architecture compatible with the Pentium instruction set (Pentium Instruction Set Architecture). The full characteristics of the Quark X1000 SoC on the Intel ARK add several technical details to this description: 16 Kb cache, no Hyperthreading, maximum data exchange speed with memory 1.6 GB / s ...., but the main issue of the internal Quark CPU remains open.



Finally, in January 2014, Intel introduces a computer codenamed Edison, an SD-sized device running Linux OS with integrated WiFi and Bluetooth. It is not hard to guess that Edison is also based on the Quark family of processors, but NOT on the Quark SoC X1000, and on the other, dual-core, whose 22nm technology will begin in the summer of 2014. Journalists who have visited the Edison presentation mention the words “Pentium class computer” "But what exactly is meant? - classes, you know, are different.





Ancient History - Pentium


The Pentium appeared in 1993 and was so named because it was the fifth generation of the IA32. It was the first superscalar, that is, implementing internal parallelism at the instruction level, microarchitecture.

As can be seen in the diagram below, Pentium includes 2 pipelines (Pipeline) for processing integer data - “U” and “V” and, respectively, two ALUs (arithmetic logic unit for integers), separate data caches (Data Cache) and instructions (Code Cache) and branch prediction unit (Branch Target Buffer):



There are no vector instructions in this version yet, they will appear later, in Pentim MMX.



But, compared to 486, several new instructions were added to the Pentium, the most famous of which is CPUID (CPU IDentification), which allows you to get information about the features of this CPU, and RDTSC (ReaD Time Stamp Counter), which returns the number of ticks since the processor was turned on and used to measure performance. Agree that the instructions are so useful that it seems that they have always existed. By the way, CPUID after the debut in Pentium was added to the special i486 model (SL-Enhanced 486), released immediately after the Pentium. True, an interesting twist?



Quark. What's inside?


Now back to the present - to Intel Quark. His connection with the Pentium is underlined by the Intel’s astronaut, which is included in the delivery of Galileo (perhaps not in all stores), resembling a colleague who worked in advertising for the Pentium at the end of the last century. Moreover, the colleague is clearly not the same character, the differences are visible not only in the modern Intel logo on his spacesuit, but in the whole figure.



Also Quark. This is by no means an overclocked and reduced Pentium, produced by the latest technology .

And what is this? For a complete answer to this question, it is necessary to study two publicly available documents that are found by a simple search for the keywords " intel quark reference manual ":

Intel Quark SoC X1000 Core Developer's Manual , 311 pages of related information

Intel Quark SoC X1000 Core Hardware Reference Manual , 143 pages of useful information.



But of all this wealth, we are interested in the main thing - the Quark core device. Here it is, in the diagram from the second manual:







As you can see, this is noticeably different from the above diagram of the Pentium device, and not only because the drawing is not colored.

The main differences:



To aid the cache, the bus interface unit has a temporary buffer capable of storing up to 4 32-bit entries, allowing many internal operations to continue without waiting for the end of the write on the processor bus ...



At the same time, we note that pipeline processing in Quark is present. Pipeline consists of five stages - sampling, two stages of decoding, execution and writing data to the registers. Each stage takes one processor cycle. But I repeat once again - this is not a superscalar, although in the comments to the excellent post about Quark of my vtsymbal colleague you can find a heated argument on this topic.



And now let's look at another old scheme - the device processor Intel 80486:



True, similar to Quark? As they say, find 10 differences. Or at least two.



Although, in fact, their minimum, an order of magnitude more, and you should not look for them on this scheme. Quark is not i486 ! As mentioned above, Quark is compatible with the Pentium ISA, that is, it supports all the new Pentium instructions, and, moreover, a number of new instructions that appeared in processors less than five years ago and are related to the security of the system - the most important thing in modern conditions and support modern OS. This is the Supervisor Mode Execution Protection (SMEP), as well as the PAE (Physical Address Extension), which allows 32-bit processors to use more than 4 GB of physical memory and is a condition for the NX (No-Execute) functionality that is also supported by Quark.

In addition, Quark supports JTAG debugging and is a synthesizable CPU, that is, it allows third-party manufacturers to add their own blocks to the Quark core.



So why isn't Quark based on a more complex and advanced Pentium microarchitecture? The most reasonable assumption is for reasons of reduced power consumption and sufficient for a prospective application the performance of the architecture of a simpler CPU.



But even with sufficient theoretical speed of work, experience shows that optimization is often required in practice. By the way, it may be necessary for you personally - Intel plans to launch a contest of application developers for Quark-based systems with a prize fund of over a million dollars in the near future! And understanding Quark's internal device can help improve application performance — when compiling for Quark, you should use a set of options like -march = pentium -mtune = i486, that is, a Pentium instruction set, and their execution for i486.

Truly, the new is well forgotten old. Or, as in this case, not even forgotten, but just a good old one.

Source: https://habr.com/ru/post/213047/



All Articles