3 ms·
How flip-flops are implemented in the Intel 8086 processor
- kens 3y agoAuthor here for all your 8086 questions :-) By the way, HN's title editing makes the title appear a bit strange. Of course flip-flops are implemented in the processor. The article describes how they are implemented.
- Tomte 3y agoYou're right, I edited the title. This HN misfeature regularly makes me furious.
- mochomocha 3y agoI just wanted to express gratitude for the amazing work you're doing. As someone with no hardware background, I learnt a lot from reading your blog, and I marvel at the amount of collective human intelligence packed into all the tiny chips surrounding our daily lives.
- kens 3y agoThanks! Yes, it's amazing how much effort is packed into tiny chips, especially when you consider that the 8086 was 45 years ago.
- phkahler 3y agoI've toyed with the idea of a flip-flop that captures the input on both rising and falling edges. Doing this at the gate level seems inefficient, so I've wondered if there is a better way to design it, and if anyone uses such a thing in production. What do you think?
- basementcat 3y agoDouble sided flip flops are used in DDR SDRAM and many other applications. https://docs.xilinx.com/r/en-US/am010-versal-selectio/Double-Data-Rate-Flip-Flops https://docs.xilinx.com/r/en-US/am010-versal-selectio/Double...
- imtringued 3y agoThis is where the double in "double data rate" comes from.
- brudgers 3y agoUnderstanding that the wires are used as capacitors makes the tiny scale of the tiny electronics inside chips make sense. I feel inside-the-sausage-factory enlightenment. Which practically speaking might be the best kind I will experience. Thank you.
- denotational 3y ago> However, the enable input is a fairly obscure feature for a flip-flop component; most flip-flop chips have a clock input, but not an enable. The clock-enable is actually really common for flops in an integrated circuit; it might have been unusual in the days of discrete TTL, but as the article concedes, practically every cell library or FPGA fabric you can find will have it. Not only is it commonly present, but the CE is used all the time by the synthesis/technology-mapping process, indeed any time you write an `if` without an `else` within a clock-edge sensitive process, the tool is probably going to use a CE. On an FPGA, the only other option is a LUT-based feedback mux which can be undesirable for various reasons, including the use of additional routing resources if the fabric has no dedicated route in each CLB from the output flop to the input LUT, and the increased fanout on the flop.
- guepe 3y agoXilinx/amd fpga have a CE pin on many of its flops (if not all?). Not sure for altera/intel but would be surprised they wouldn't have.
- denotational 3y agoI pretty much only work with Xilinx/AMD parts these days, and, at least on US/US+, they do indeed all have a CE on all the flops (unless there are undocumented degenerate cells with missing features).
- jecel 3y agoThere is a design style called RTL (register transfer level) which works better with registers that have separate clock and enable inputs. The clock goes to all registers, but on any given cycle only a subset of those are enabled depending on the current state. Since these enables are generated from the outputs of these registers which then pass through some combinational logic, they will be stable around the rising edge of the clock. Note that people talk about Verilog or VHDL as "RTL languages". That is not correct - these languages allow hardware designs using any style to be modeled. But sticking with RTL is strongly encouraged. A design that uses the output from one part of a circuit as a clock to another part, for example, is not RTL. This might cause problems when moving from one FPGA to another or to an ASIC.
- SomeoneFromCA 3y agoSome observations: 1. Interesting, how fundamentally analog element such as capacitor, find its way into dynamic logic circuits. 2. The article states that asynchronous computers are not made anymore. Is not google TPU asynchronous?
- dekhn 3y agoAll digital logic is fundamentally analog. No, the TPU is not async. It has a single main clock. It does work in parallel, but it's still synchronously clocked. As neat as async is, it's truly a paradigm shift that affects nearly everything about your system and most of us can'd think in partial differential equations.
- kens 3y agoOne of Vonada's 14 engineering maxims is "Digital circuits are made from analog parts." That said, dynamic logic that depends on capacitance is more analog than most digital logic :-) Vonada's engineering maxims: https://twitter.com/kenshirriff/status/1633154548318732289 https://twitter.com/kenshirriff/status/1633154548318732289
- dekhn 3y agoOK I learned a bit today- I didn't realize transistors were considered "active", or that dynamic logic was uncommon. Vonada's engineering maxims are pretty scary to me- an amateur hobbyist soldering various chips together to build simple projects like "a rotary encoding controlling a binary counter visualized with LEDs". I spend many hours soldering and carefully debugging every individual component, and when I integrate, spend many more hours debugging why something doesn't work. The failures are almost always because I did something dumb, like wiring up VCC and GND backward, I honestly don't know that I'd be able to debug "When all but one wire in a group of wires switch, that one will switch also." in my binary counter's inputs or outputs.
- tzs 3y ago> Vonada's engineering maxims are pretty scary to me- an amateur hobbyist soldering various chips together to build simple projects like "a rotary encoding controlling a binary counter visualized with LEDs" Fortunately for probably most hobby projects you don't have to worry about most of those things. A lot of those maxims concern failures of the lumped element model. The lumped element model is a model where all the capacitance occurs in capacitors, all the resistance is in resistors, all the inductance is in inductors, and so on, and wires are zero resistance conductors of current that do not couple magnetically or inductively with anything. If clock speeds aren't too high, there is enough gap between the highest 0 logic voltage and the lowest 1 logic voltage, wires aren't too long, voltages and currents aren't too high or too low, and you don't do anything like put loops in your wires (other than when you are intentionally trying to make an inductor) the deviations of reality from the lumped element model shouldn't cause any problems. As you deal with higher frequencies reality starts to noticeably diverge from the lumped element model. You have to start worrying about things like capacitance between leads on your components, inductance between wires, and wires acting like transmission lines. Keep going up in frequency and you can get to a point where you have to use software that can solve (exactly or numerically) Maxwell's equations for the fields around things and take into account interactions with those fields. Hobbyist projects can do things that get past where the lumped element model is all you need, such as WiFi or Bluetooth which operate at several GHz, but usually those functions are handled by modules that the hobbyist buys that are (hopefully!) designed by people who know how to deal with high frequencies. E.g., you buy an RF module that does the scary radio stuff, and you control it from a microcontroller that is running an order of magnitude or more slower than the RF module, and whatever inputs and sensors and non-radio outputs you have are probably at least an order of magnitude slower than your microcontroller. Those non-RF parts of the project are likely to be well in the realm where lumped element works. Most of the rest of the maxims concern things that are mostly going to be a problem for big projects where you might be worrying about things like synchronizing things across dozens of subsystems and with very tight tolerances.