3 ms·
Yes, an interpreter is exactly what microcoding is. See Maurice Wilkes' original paper, or the initial IBM 360 models (the lower end of which had an 8 bit CPU r
by brucehoult 6y ago
Yes, an interpreter is exactly what microcoding is. See Maurice Wilkes' original paper, or the initial IBM 360 models (the lower end of which had an 8 bit CPU running the microcode), or the various VAX models etc.
In those days the microcode ROM and ALU etc was substantially faster than RAM (core). At some point SRAM became as fast as or faster than ROM and machines copied the microcode into SRAM on startup. Some machines such as the Burroughs 1700 series loaded different microcode into SRAM depending on whether you wanted to run FORTRAN or COBOL programs.
Then companies started allowing users to write their own custom instructions in microcode. See for example the VAX "Writeable Control Store" which on the 11/780 (as an option) gave users 1024 words (12 KB) for custom microcode and a microcode assembler and debugger. Some people even wrote compilers targeting this for languages such as Pascal (see for example https://apps.dtic.mil/dtic/tr/fulltext/u2/a089424.pdf https://apps.dtic.mil/dtic/tr/fulltext/u2/a089424.pdf)
The next step was to turn the SRAM into a cache, and make a slightly more user-friendly microcode the actual instruction set used by all compilers, and thus RISC was born.
Of course you are correct that specialised instructions to make instruction decoding easier are helpful in an ISA emulator. It would not surprise me to see RISC-V itself get an extension along those lines in the near future, to help M-mode software emulate unaligned loads and stores and other unimplemented instructions, but maybe also to help emulate other instruction sets.
- kiwidrew 6y ago> Yes, an interpreter is exactly what microcoding is. In a sense, yes, it is indeed! But when I think "microcode" then I think something like the 8086's horizontal microcode [1], where each line of microcode is wired directly to the various functional units and the microcode jumps and branches are (in some sense) determined based off (some of) the bits in the instruction register. Characteristics of microcode include: wide instructions (20-40 bits) that perform multiple operations in parallel (e.g. ALU operation and register-register copy) and hardware dispatch to the appropriate microcode to handle each microcoded instruction via zero-overhead multiway branches. I wouldn't call a 6502-like assembly language microcode, even if it implements an interpreter for a user-level instruction set, because it lacks the relevant characteristics of true CPU microcode. [1] https://www.reenigne.org/blog/8086-microcode-disassembled/ https://www.reenigne.org/blog/8086-microcode-disassembled/
- brucehoult 6y agoare you in kiwi-land Mr kiwidrew?