1
\$\begingroup\$

I am a programming student studying electrical engineering fundamentals on the side. I have come across two different methods for getting the result of an operation onto the bus.

  1. A decoder accepts the op code. Each operation has an enabler attached to the output. All operations are performed and the results are stored in the enablers. The enabler that is selected gives the output of the operation.
  2. The output of each operation provides the input for a multiplexer. The op code is the selection input for the multiplexer. The output of the multiplexer is then put onto the bus.

Is there anything functionally different between these two variants? What are the advantages and disadvantages?

\$\endgroup\$
1
\$\begingroup\$

What you refer to as "enablers" are called "bus drivers" and are used to selectively gate a particular value onto a bus. They are also called "tri-state" drivers since they have three different output states: driving low, driving high, and not driving at all. Sometimes these come with integrated flip-flops which act as memory forming a "register".

Yes, the overall logic is the same either way, and a bunch of tri-state drivers onto a bus is essentially a multiplexer. The only difference is whether the multiplexing is done inside a IC or you are doing outside at the macro level with separate chips. Doing it inside a single IC allows the operations to be faster, and of course takes up less space.

As a separate point, ALUs don't necessarily work the way you describe. Some functions are performed in parallel, then the result of the right one selected. However, some similar functions may only differ in small ways, and the opcode could be used to select different input data paths along the way. There are various ways to make a ALU, and various ways to optimize one since there are various criteria for what is optimal.

\$\endgroup\$
  • \$\begingroup\$ Thanks for correcting my improper word choice. I'm reading an entry level book on the topic that uses far too much incorrect terminology. Is it called a driver because it 'drives' the bit, in any state, to the bus; or is it because of something else? Also, how can I begin to learn more about modern computer design? All of the books accessible to someone like me(with little hardware knowledge) seem to teach the fundamentals from hardware that's 30+ years old. \$\endgroup\$ – CanadaIT Apr 22 '15 at 23:56
  • \$\begingroup\$ @CanadaIT: The fundamentals are easily 30+ years old and precede the hardware. If you want some practical knowledge then you could do worse than Don Lancaster's TTL cookbook, available here. Also, if you have specific hardware design questions, you can ask for help here. \$\endgroup\$ – EM Fields Apr 23 '15 at 9:28
1
\$\begingroup\$

Historically it used to be common to have chips with buses that could be driven from multiple sources. In some cases such designs can still work well. A difficulty with such an approach, however, is that it's often necessary to either have dead time between switching off one output and switching on another, or else limit the amount of current that can flow if multiple outputs which are switched on simultaneously try to output different values. If speed is not a requirement, adding dead time may be a workable approach, but in many cases it's better to use a different logic approach.

In almost every FPGA, and in many other kinds of synthesized logic design, every logic input to every internal component must be connected to exactly one output (though each output may feed multiple inputs, and the chip is assumed to have a part that always "outputs" high and one that always outputs low). If the are 256 subsystems which could logically sit on a bus, then the device will use a 256-input multiplexer (which may be constructed from seventeen 16-input multiplexers, each of which may be constructed from five 4-input multiplexers). Although this requires more circuitry than would having 256 three-state drivers sitting on a bus, it may be faster and more energy-efficient, since each output only has to drive one input, versus having to drive one input and 255 outputs.

\$\endgroup\$
  • \$\begingroup\$ Thanks. That definitely makes sense. I didn't think about it from the component requirements point of view. \$\endgroup\$ – CanadaIT Apr 22 '15 at 23:54
0
\$\begingroup\$

What you refer to as "enablers" are called "registers" and are used to store data and to perform simple operations like shifting, and rotating that data, and to output that data to an I/O.

a multiplexer, on the other hand, is a device used to switch between at least two sources of data, sequentially, to a common I/O, and can be made by connecting register outputs in parallel and then switching between the registers to output the data stored in each. It's understood that the register outputs must be mutually exclusive, with all their outputs being 3-stated except for the selected register.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.