Skip to content

Commit

Permalink
flowmap: implement depth relaxation.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Jan 6, 2019
1 parent 2fcc1ee commit 00b53da
Show file tree
Hide file tree
Showing 7 changed files with 708 additions and 21 deletions.
647 changes: 626 additions & 21 deletions passes/techmap/flowmap.cc

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions passes/tests/flowmap/pack1.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Exact reproduction of Figure 3(a) from 10.1109/92.285741.
module top(...);
input a,b,c,d,e,f,g,h;
wire x = !(c|d);
wire y = !(e&f);
wire u = !(a&b);
wire v = !(x|y);
wire w = !(g&h);
output s = !(u|v);
output t = !(v|w);
endmodule
11 changes: 11 additions & 0 deletions passes/tests/flowmap/pack1p.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Like pack1.v, but results in a simpler network.
module top(...);
input a,b,c,d,e,f,g,h;
wire x = c|d;
wire y = e&f;
wire u = a&b;
wire v = x|y;
wire w = g&h;
output s = u|v;
output t = v|w;
endmodule
15 changes: 15 additions & 0 deletions passes/tests/flowmap/pack2.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Exact reproduction of Figure 4(a) from 10.1109/92.285741.
module top(...);
(* $flowmap_level=1 *) input a;
(* $flowmap_level=1 *) input b;
(* $flowmap_level=2 *) input c;
(* $flowmap_level=1 *) input d;
(* $flowmap_level=3 *) input e;
(* $flowmap_level=1 *) input f;
wire u = !(a&b);
wire w = !(c|d);
wire v = !(u|w);
wire n0 = !(w&e);
wire n1 = !(n0|f);
output n2 = !(v&n1);
endmodule
15 changes: 15 additions & 0 deletions passes/tests/flowmap/pack2p.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Like pack2.v, but results in a simpler network.
module top(...);
(* $flowmap_level=1 *) input a;
(* $flowmap_level=1 *) input b;
(* $flowmap_level=2 *) input c;
(* $flowmap_level=1 *) input d;
(* $flowmap_level=3 *) input e;
(* $flowmap_level=1 *) input f;
wire u = a&b;
wire w = c|d;
wire v = u|w;
wire n0 = w&e;
wire n1 = n0|f;
output n2 = v&n1;
endmodule
15 changes: 15 additions & 0 deletions passes/tests/flowmap/pack3.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Exact reproduction of Figure 5(a) (bottom) from 10.1109/92.285741.
module top(...);
input a,b,c,d,e,f,g,h,i,j;
wire x = !(a&b);
wire y = !(c|d);
wire z = !(e|f);
wire n0 = !(g&h);
wire n1 = !(i|j);
wire w = !(x&y);
wire n2 = !(z&n0);
wire n3 = !(n0|n1);
wire n4 = !(n2|n3);
wire v = !(w|n5);
output u = !(w&v);
endmodule
15 changes: 15 additions & 0 deletions passes/tests/flowmap/pack3p.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Like pack2.v, but results in a simpler network.
module top(...);
input a,b,c,d,e,f,g,h,i,j;
wire x = a&b;
wire y = c|d;
wire z = e|f;
wire n0 = g&h;
wire n1 = i|j;
wire w = x&y;
wire n2 = z&n0;
wire n3 = n0|n1;
wire n4 = n2|n3;
wire v = w|n5;
output u = w&v;
endmodule

0 comments on commit 00b53da

Please sign in to comment.