4 ms·
> Along the same lines, some early microprocessors like the 6502 also weren't microcoded (though they still tended to use large ROM lookup tables driven by a cu
by colejohnson66 4y ago
> Along the same lines, some early microprocessors like the 6502 also weren't microcoded (though they still tended to use large ROM lookup tables driven by a custom state machine so sort of half-microcoded).
There’s two types of microcode: vertical (the kind people think of when hearing “microcode”) and horizontal (a large PLA). So, the 6502 is not “sort of” microcoded, it is microcoded, just horizontal microcode.
- monocasa 4y agoI used to think that, but as I've gotten to know vertical ucode, horizontal ucode, and large PLAs a lot better, I've come around to the idea that the 6502 isn't microcoded. Particularly, while there are the T states, there's not really a true micro instruction counter or a single micro instruction word enabled at a time. It's more like if the hundred or so control signals each have a CAM that tells them whether to be enabled or not based on the instuction register and T state. It's kind of an inverse from how you think about ucode as a logic designer. A better example of horizontal microcode (and what I learned on) are the PDP-11s. A clear micro instruction address counter and the ability to jump around the micro instruction ROM, but very wide control words where it's clear 'these three signals go into this mux, this signal is an enable over here, etc'.
- kens 4y agoI've studied the 6502 in detail and I agree with you that the 6502 is not microcoded [*], for the reasons you mention. The 6502 has "random" control logic implemented with a PLA. (Since the PLA has multiple lines active at once, it's technically not a ROM.) You can't define a micro-instruction format for the 6502. There's a lot of detail on the 6502's PLA at this link: https://www.pagetable.com/?p=39 https://www.pagetable.com/?p=39 [*] For standard definitions of microcode.
- colejohnson66 4y agoFair enough, but where would you draw the line between a PLA and horizontal microcode?
- kens 4y agoI would say that the difference is not the outputs, but how the information is stored. Microcode is "software" that is stored in a ROM, so you have one row of the ROM producing the outputs. You can point to one line of the microcode and say "here's the micro-instruction", and change one bit of it easily. (The definition of a ROM having one row active at a time while a PLA can have multiple rows active is from "The Architecture of Microprocessors".) You could use a PLA to produce exactly the same outputs from the same inputs, but it wouldn't be microcode. The PLA is "just" an optimization. But with a PLA, you can't change a micro-instruction without ripping out some of the logic and replacing it. You have a hardware implementation rather than a software implementation, which is the hallmark of microcode. In other words, changing a control signal value in the 8086's microcode is trivial, but changing a control signal in the 6502 is considerably harder. As a concrete example, the design of the Apollo Guidance Computer is clearly microcoded, with specific microinstructions. However, the implementation is gate logic that completely obscures the microcode design. (Not a ROM implemented with NOR gates, but highly-optimized logic.) So I consider the implementation of the AGC to not be microcode. (This is kind of splitting hairs, and I'm not really into subtle linguistic arguments.)