E
E
evg_962018-01-01 23:59:59
Iron
evg_96, 2018-01-01 23:59:59

What is processor microcode?

I read about microarchitecture. I came across a moment in which the memory subsystem is mentioned. It has a microprogram control unit. Started googling. Came out on the concept of microcode. I googled it but still don't understand what it is exactly.
Whether this is a program that breaks some complex cisc instructions into microinstructions, or this is a set of microinstructions.
One thing I understood for sure is that the microcode is in the ROM. And it seems like when power is applied it is transferred to the RAM. So de understood that the microcode can be patched.
What and how determines that a team needs to be broken down into micro-instructions?
And what exactly is microcode? everywhere is written ambiguously

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
pfg21, 2018-01-02
@pfg21

The CISC instruction of the source x86 code is split into a set of RISC instructions, which are then fed to the hardware RISC processor. those. in all modern processors, x86 and x86-64 are emulated, the algorithms of this emulation are written in microcode , a
practical description of the use of processor microcode, for example , here

V
Viktor, 2018-01-02
@nehrung

Whether this is a program that breaks some complex cisc instructions into microinstructions, or this is a set of microinstructions.
Yes, it is a set of microinstructions. A good explanatory example is the division operation. There are no division instructions in RISC processors with their fifteen and a half instructions, but division can be done using a division routine a couple of hundred RISC instructions long. There can be many such subroutines, according to the number of complex CISC commands. These routines can be implemented as an interpreter with their own software. This is the microcode. It can be changed from the outside (for example, for optimization).
One thing I understood for sure is that the microcode is in the ROM. And it seems like when power is applied it is transferred to the RAM.
If the ROM is slow and located outside the processor, and the RAM is fast (say, it is the cache memory closest to the core), then using the architecture with microcode loading, you can greatly speed up the work of this microcode, at the same time gaining the ability to edit it. But this is not necessary, with a fast ROM, microcode that does not need to be edited can be stored immediately in it.
What and how determines that a team needs to be broken down into microinstructions?
Complexity. Actually, the transition to microcode is an opportunity to simplify the processor's control device, to save it from very long command sequences (see the example with the division operation). And this, in turn, allows us to calculate the core (the one that operates at extremely high frequencies) is as compact as possible and does not emit too much heat.

S
Sly_tom_cat ., 2018-01-02
@Sly_tom_cat

Any processor is essentially a small computer, there are executive devices, register cells (memory), external channels (data and address buses), caches .... and all this needs to be controlled somehow. It is for this control that the microcode of the processor is responsible. In fact, this is such a code deeply tied to hardware that allows you to implement individual primitive actions inside the processor that require the coordinated action of its individual components.
But microcode only in ancient processors (which were assembled from hundreds of individual elements or several chips) was stored in a separate ROM circuit. In all microprocessors (when all the offal of the processor, and sometimes even part of the external buses are assembled on one chip), the microcode is written in a separate part of this common chip. And it's not always a ROM, sometimes it's like a flash, but fast, because it works at the internal (very high) frequency of the processor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question