4 ms·
> Microcode is effectively just a program. Can't you just write the same program in Verilog or whatever? I think the answer is "yes" No. FPGAs are basically b
by geocar 4y ago
> Microcode is effectively just a program. Can't you just write the same program in Verilog or whatever? I think the answer is "yes"
No.
FPGAs are basically big fat lookup tables, some clever partitioning logic, and a boolean function. Inputs and outputs are (from the perspective of the "programmer") simultaneous, and if you want to do any state-keeping, it has to be done in response to some transition (such as a clock pin strobing).
State like registers. So you want to implement program registers and make those inputs be address and data lines, decode the instruction, map it to the appropriate internal "registers", then write out the data back to memory (if any), you're talking two transitions (or four if you want to reuse the address/data likes for fetch and load).
The speed/heat/power/price at which you can do that is (for the most part) a function of how big that lookup table is. If you can decode a single instruction in 4 steps instead of 1, you usually should because it means you can strobe 4x faster (or everything else will be cheaper, lower-power, cooler, etc).
Microcoding is a technique to doing this, but it's also a choice because there are limits to how little-power you can get, or how cheap fabricating any amount of silicon is, or even how low-level you can be meaningfully thinking about solving business problems, otherwise we'd all be using massively-parallel SBNZ-computers that float in the air.
- skissane 4y ago> FPGAs are basically big fat lookup tables I never said anything about FPGAs though. If you are telling me how microcode might be useful in overcoming limitations of FPGAs, I’m not sure what relevance that has to most microprocessors, which aren’t implemented as FPGAs
- geocar 4y agoNo, but they're a useful target for Verilog, and this limitation is shared by any hardware compute/circuit (I had hoped that would be obvious from the description)
- skissane 4y agoYou can implement a CPU completely with random logic, zero microcode - it has been done before. Yes you do end up needing something like extra registers to hold control state - but that’s not microcode