Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signal fanout #9

Open
drom opened this issue Mar 7, 2016 · 8 comments
Open

Signal fanout #9

drom opened this issue Mar 7, 2016 · 8 comments
Milestone

Comments

@drom
Copy link
Owner

drom commented Mar 7, 2016

Question:
From @wavedrom group topic: https://groups.google.com/d/topic/wavedrom/iqTKBLl6mYU/discussion

Can some tell me how to make a driver gate to drive multiple gates in the next level with replication of the driver gate.
For example:
Level 0 : AND GATE
Level 1: 3 Inverters driven by the same AND GATE

Answer:
Current engine renders only tree forest structures. So, signal fanout will not be visualized.
Naming the signals with the same name will help user to navigate, but no line will appear on the schematic.

@drom
Copy link
Owner Author

drom commented Mar 7, 2016

TODO:

  • scope all the cases
  • sketch the cases
  • appropriate grid design
  • routing algorithm

@drom
Copy link
Owner Author

drom commented Mar 7, 2016

Case 1: single wire in a single sharing column. (Do we need to extend "a" ?)

{ assign: [
  ["out", ["&", "a", "b", "b"]]
]}

fanout1fanout1a svg

Case 2: multiple wires in a sharing column.

{ assign: [
  ["out", ["&", "a", "b", "a", "c", "b"]]
]}

fanout2fanout2a svg

Case 3: Horizontal extenders for wires crossing the sharing column.

{ assign: [
  ["out", ["^", "a", ["^", "b", ["^", "c", "a"]]]]
]}

fanout3fanout3a svg

Case 4: XOR

{ assign: [
  ["out",
    ['|',
      ["&", ["~", "a"], "b"],
      ["&", "a", ["~", "b"]]
    ]
  ]
]}

xorxor svg

Case 5: Half Adder. Sharing between the trees. Fanout > 2

{ assign: [
  ["out",
    ['|',
      ["&", ["~", "a"], "b"],
      ["&", "a", ["~", "b"]]
    ]
  ],
  ["carry", ["&", "a", "b"]]
]}

haha svg

Case 6: Sharing column with minimized line crossings, or minimized number of vertical lanes.

{ assign: [
  ["out",
    ['|',
      ["&", "a", "b"],
      ["&", "b", "c"],
      ["&", "a", "c"]
    ]
  ]
]}

oraaa6oraaa6a svgoraaa6b svg

Case 7: MUX4

{ assign: [
  ["a",
    ['|',
      ["&", ["~", "s0"], ["~", "s1"], "e0"],
      ["&", ["~", "s0"], "s1", "e1"],
      ["&", "s0", ["~", "s1"], "e2"],
      ["&", "s0", "s1", "e3"]
    ]
  ]
]}

mux4mux4a svg

@drom drom added this to the v1 milestone Mar 8, 2016
@DmitryAGusev
Copy link

Comment to the initial question. Is it possible to add unique tag/id/name to the block, or assign a name to the output signal of any block (not only for global output)? If so, task becomes the same as for input signals in examples above.

@drom
Copy link
Owner Author

drom commented Mar 8, 2016

ok, you are right @DmitryAGusev . My pictures above have not addressed the original question. How about next example as the possible solution?

{ assign: [
  ["a",
    ['|',
      ["&", ["!s0", ["~", "s0"]], ["!s1", ["~", "s1"]], "e0"],
      ["&", "!s0", "s1", "e1"],
      ["&", "s0", "!s1", "e2"],
      ["&", "s0", "s1", "e3"]
    ]
  ]
]}

mux4_1mux4_1a svg

@DmitryAGusev
Copy link

Yes, this is what I meant. It will be nice to add the ability to suppress the showing of intermediate names like !s0, !s1. I.e. by using another quotes '!s1' instead of "!s1". And the same for input signal names, sometimes some of them are not important to be shown, i.e. for highlighting critical paths.

@drom
Copy link
Owner Author

drom commented Mar 9, 2016

Another important question is: How to render connect between multiple expressions? Sort of MIMO case.

Gray to Binary example:

{ assign:[
  ["b3", "g3"],
  ["b2", ["^", "b3", "g2"]],
  ["b1", ["^", "b2", "g1"]],
  ["b0", ["^", "b1", "g0"]]
]}

gray2binarygray2binary_a svg

{
  b3 = g3
  b2 = b3 ^ g2
  b1 = b2 ^ g1
  b0 = b1 ^ g0
}

@DmitryAGusev
Copy link

It looks like the structure {assign: [ ]} should define some kind of name space. All signals within this space with similar names should be connected (unless it is suppressed explicitly by some option/flag). Two output signals with similar names cause an error. Multiple intermediate inputs can be connected to one intermediate output signal or one global input signal.

@drom
Copy link
Owner Author

drom commented Mar 10, 2016

That is correct. We have to think about the temporal variable scoping. Especially, if we going to use multiple scopes (namespaces), or / and nested scoping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants