Live data from Hacker News

Microcode: the place where hardware and software meet

alanwinfield.blogspot.co.uk

21–25 of 25 posts

Re: Microcode: the place where hardware and software meet

#21
post #18

Earlier quoted context omitted.

The 6502 is an interesting case. The decode ROM (PLA) gets instructions about 1/3 of the way decoded, and then there's a whole pile of random control logic [1], [2] that generates the actual control lines [3]. The output from the decode ROM consists of semi-meaningless things such as ADC/SBC in state T0, or JSR in T5 [4], and after a whole bunch of gates these get turned into the actual control functions such as S bu…

"Random control logic" Oxymoron? Is the control logic really random in some way? That sounds impossible. Or at least, very highly inefficient.

No, it's obviously not random. It is carefully designed, but there is no regularity to it. The expression "random logic" is used to describe the circuitry that is "ad hoc" rather than a matrix, like RAM, registers, or an ALU.

Google the expression to learn more.

* http://www.google.co.uk/search?q=random+logic

* http://en.wikipedia.org/wiki/Random_logic

Re: Microcode: the place where hardware and software meet

#22
post #3

The original ARM RISC design did away with Microcode, with the chip executing instructions directly, although I think it might have crept back in since then http://en.wikipedia.org/wiki/ARM_architecture#Instruction_se...

There are many more machines without microcode - 6502, machineForth chips like f21, c18 etc. I'd argue that they are much more appealing to a designer with taste.

Ah, taste, one of the most important traits of a good engineer.

Re: Microcode: the place where hardware and software meet

#23
post #8

Reminds me of this question on Super User: How does a CPU 'know' what commands and instructions actually mean? http://superuser.com/questions/307116/how-does-a-cpu-know-wh... Microcode in its most basic form is just a big look-up table (could be nested if word size is limited) containing the electrical signals for a particular instruction, and a new address to "jump" to (either a subsequent micro-operation, or jump b…

Uncommon? I'd venture to say that all desktop architectures have known bugs. Some are just documented, some are fixed by microcode, some require work arounds in software "or" compilers. Example: (core i7, may 2011) http://download.intel.com/design/processor/specupdt/320836.p... BIOS updates often contain bugfixes for your CPU.

I don't like waiting for BIOS vendors to package cpu firmware updates and I don't like to update the BIOS unless I have to. If you are running debian just install (amd64|intel)-microcode[1]. The package provides the most recent microcode updates from the CPU vendor and updates the microcode on boot.

[1] http://lists.debian.org/debian-user/2012/11/msg00193.html

Re: Microcode: the place where hardware and software meet

#24
post #5

A bit off topic, but I've always wondered why some refer to the language as 'assembler' whereas others call it 'assembly'. I always thought the assembler is the name of the thing that reads in your assembly code and turns it into a machine binary. Is there some historical significance to calling it 'assembler'?

I'm not old enough to know but my theory is things in the programming world historically came from the computer architectural world. Computer architecture uses stacks, interrupts (events), and other things in the physical layout of the computer chip. When people were done with the hardware stuff, they created software which has similarities to hardware and thus called them the same. When people then created higher level software from lower level software, they saw similarities there as well and went from there.

Re: Microcode: the place where hardware and software meet

#25
post #7

Donn Stewart has a very enlightening and relatively simple explanation on the very basics of how a CPU works, which includes a great explanation of microcode and the control cycle. http://cpuville.com/cpu_design.pdf And here's his main site: http://cpuville.com

If you're having trouble viewing, the easiest way is to copy-and-paste the URL into a new window or tab.

(As noted by krapp, it's a referer check)

Post reply on HN