Module.SourcePort fabric_out = fabric.getOutputPort("funnel_out");
Module.Latch count = root.new Latch("count", 8);
Module.Latch count_out = root.new Latch("count_out", 8);
- root.addPreCrap("initial count = 0;");
- root.addPreCrap("initial count_out = 0;");
root.new Event(new Object[] { in, fabric_in },
new Object[] { new SimpleAction(fabric_in.getName()+" <= ("+fabric_in.getName()+" << 8) | in;"),
new SimpleAction("if (count >= 5) begin count <= 0; "+fabric_in.getName()+"_r <= 1; end else count <= count+1; "),