Live data from Hacker News

Microcode: the place where hardware and software meet

alanwinfield.blogspot.co.uk

1–10 of 25 posts

Re: Microcode: the place where hardware and software meet

#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.

Re: Microcode: the place where hardware and software meet

#4
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 back to the "fetch" micro-op). Electrically, however, there's no difference between a microcoded and hard-wired CPU - they both fetch and execute sequences of instructions.

Of course, there's an obvious advantage to the microcoded approach: your instruction set gets uploaded to your hardware in a ROM! You can change the operation of instructions after the hardware is made, make custom sequences of instructions, or even fix microcode bugs (while uncommon, there have been cases in the past).

Re: Microcode: the place where hardware and software meet

#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'?

Re: Microcode: the place where hardware and software meet

#6
I am still unclear after reading the article.

What is the exact interface where a software change leads to a change in some physical word state?

For instance, logically storing X in some register is going to lead to some particular configuration of electrical current on the CPU. I still don't see the exact point where that happens.

How do the two intersect?

Re: Microcode: the place where hardware and software meet

#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.

Re: Microcode: the place where hardware and software meet

#9

I am still unclear after reading the article. What is the exact interface where a software change leads to a change in some physical word state? For instance, logically storing X in some register is going to lead to some particular configuration of electrical current on the CPU. I still don't see the exact point where that happens. How do the two intersect?

I highly recommend the book, and the course, http://www.nand2tetris.org/ (previously known as The Elements of Computing Systems or TECS).

This starts with discussion on NAND gates and goes through building CPU components, to a complete computer, to implementing a high-level language for it.

(All the chapters from the book revevant to your question are available as free PDFs).

Re: Microcode: the place where hardware and software meet

#10
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 think it's called an 'assembler language' because it's the language you use to program your assembler (specifying what to emit into the binary).
Post reply on HN