1
\$\begingroup\$

I'm trying to design a logic circuit that will end up looking a binary tree (there will be a "root" logic gate at the top and a whole bunch of "leaf" logic gates at the bottom).

Input is fed as bits into the leaves and the outputs are passed upward towards the root. But at any time (not necessarily at the root) the flow could change direction and they need to "follow" the path where they came from down to the leaf where they originated from.

I feel like the only way to create "breadcrumbs" is to create a storage bit at each gate indicating either right or left down the tree, leading to the leaf node.

Am I way off in my thinking here? Is it possible to have inputs go upward towards a root logic gate and then reverse the direction and go back to the leaf logic gate?

\$\endgroup\$
  • \$\begingroup\$ I can't really follow your thinking, but surely you could assemble something that does what you want out of existing gates? \$\endgroup\$ – pjc50 Oct 30 '12 at 11:12
2
\$\begingroup\$

The logic that accepts and stores input is a "flip-flop". If you wish to store from either "side" you can have a 2:1 multiplexer that selects between the 2 inputs.

\$\endgroup\$
0
\$\begingroup\$

It's not entirely clear what you're trying to achieve, but here's some parts and ideas that might help.

The 7400 series includes a lot of very versatile parts, such as the 74HC299, which is an 8-bit shift register that also supports parallel load. With appropriate use of the select pins, it can output its state on the I/O pins, or read new state in from them, fulfilling your requirement for bidirectionality.

Another thing you might consider is "wormhole routing", which works something like this: Take a pair of 4-to-1 demultiplexers (you can get these in a single chip). Hook up the 0 outputs to the input of a 2-bit register (or two D flipflops). Hook up the output of this register to the select lines of the same demux. Now connect the remaining 3 outputs from the demux to other 'leaves'.

Now the inputs to the root demux are your communication lines. Initially, you're 'talking' to the register for your root node, which determines where your signal is routed. Put the 2-bit address of the leaf you want to talk to on the input pins and take the register's latch pin high, and the multiplexer will send your output to the selected leaf. Now repeat for that leaf, and so on, until you reach the desired node, which you can talk to directly.

When you're done communicating, take all the registers' reset pins high, and you can start again.

\$\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.