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

multigraph support #42

Open
drom opened this issue Jul 19, 2018 · 0 comments
Open

multigraph support #42

drom opened this issue Jul 19, 2018 · 0 comments
Labels
Milestone

Comments

@drom
Copy link
Owner

drom commented Jul 19, 2018

The following example creates multiple connections from edge:1 to node:2

c1 = {
  const g = reqack.circuit();
  const n = {a: g(), b: g(), c: g('+'), d: g()};
  n.a()(n.b);
  const eb = n.b();
  [0, 1, 2].map(_ => eb(n.c));
  n.c()(n.d);
  g.edges.map(e => Object.assign(e.label, {width: 8}));
  return g;
}

Generated Verilog has multiple asignements to ack1_0

...
// node:2 join +
// join:3, fork:1
assign req2 = req1_0 & req1_0 & req1_0;
assign ack1_0 = ack2 & req1_0 & req1_0;
assign ack1_0 = ack2 & req1_0 & req1_0;
assign ack1_0 = ack2 & req1_0 & req1_0;
// node:3 initiator
...

Dagre renderer renders only one connection:

image

Full test case:

https://beta.observablehq.com/@drom/reqack-multigraph

@drom drom added the bug 🪲 label Jul 19, 2018
@drom drom added this to the v2 milestone Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant