1 package edu.berkeley.fleet.dataflow;
3 import edu.berkeley.fleet.loops.*;
4 import edu.berkeley.fleet.api.*;
7 * Takes a starting value at "start" and a (positive) decrement
8 * amount at "incr" and counts down; the first value emitted will be
11 public class DownCounterNode extends Node {
12 private final Ship ship = dfg.pool.allocateShip("Counter");
13 private final InPort inOp = new DockInPort("inOp", ship.getDock("inOp"), "COUNT");
14 public final InPort start = new DockInPort("start", ship.getDock("in1"));
15 public final InPort incr = new DockInPort("incr", ship.getDock("in2"));
16 public final OutPort out = new DockOutPort("out", ship.getDock("out"));
18 public DownCounterNode(DataFlowGraph dfg) { super(dfg); }