> Maybe we're not understanding what is meant by "microcode"... > The only CPU I've designed was a 4-bit system that didn't use > microcode to get it's work done (it was for a class), so I > can't claim direct experience, but I at least thought I knew > what the word microcode implied... a level of abstraction, if > you will, between the opcodes and the actual hardware... a > reduced instruction set sitting there that could take some of > those complex codes and break it down into the fundamental > instructions.
That's close to my understanding of microcode but, remember, I last did serious microcoding on hardware that was state of the art 20 years ago. Intermediate level of abstration, yes, as far as it goes, but that description hides a lot of detail which I regard as essential. IMO, microcode has to be able to control functional elements at a very low level indeed. The ALU is controllable independently of the sequencer; the various data paths within the cpu are selectable and controllable individually --- you may be able control the DRAM refresh mechanism on a cycle-by cycle basis, for instance, or determine programmatically whether a given datum is cached or not. Each of these physical units or datapaths would be allocated a separate bit field in the microinstruction. The machine I programmed even had the instruction timing controllable by a 2-bit field in the microinstruction. Some logic elements or data sources were faster than others, so some microinstructions could be executed in less time than others, depending on what resources they required. The basic clock ticked at 40MHz and the 2-bit field selected 5, 6, 7 or 8 ticks for the microinstruction before the next one was executed. Although we had a program to calculate how long an instruction ought to take, we some times dynamically changed the number of ticks on an instruction by instruction basis while the machine was running. Made for some interesting benchmark results... On a traditional microcoded machine, the microcode is an interpreter for the instruction set. To some extent that is still true today: simple instructions are executed directly; complex ones are interpreted. The PDP-8 was an interesting hybrid. Six of its eight instruction types were directly executed. The other two (special ALU ops and I/O) were microcode in their own right. Not interpreted by microcode, but microcode with specific bits to control the functional units directly. An oversimplification, true, but a useful one, is that machine code controls a cpu; microcode controls the components within a cpu. Far from an ideal definition, but the best I can come up with for a one-liner. Paul _________________________________________________________________________ Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers
