updates to get some of the shutdown code to execute via Program
[fleet.git] / src / edu / berkeley / fleet / dataflow / PunctuatorNode.java
1 package edu.berkeley.fleet.dataflow;
2 import java.util.*;
3 import edu.berkeley.fleet.loops.*;
4 import edu.berkeley.fleet.api.*;
5
6 public class PunctuatorNode extends Node {
7     private final long    punc;
8     private final Ship    ship  = dfg.pool.allocateShip("Counter");
9     private final InPort  op    = new DockInPort("inOp", ship.getDock("inOp"), 0, new BitVector[] {
10             ship.getDock("inOp").getConstant("PASS_C2_V1"),
11             ship.getDock("inOp").getConstant("PASS_C2_V2") } );
12
13     public  final InPort  count;
14     public  final OutPort out   = new DockOutPort("out", ship.getDock("out"));
15     public  final InPort  val   = new DockInPort("val",  ship.getDock("in1"));
16
17     public PunctuatorNode(DataFlowGraph dfg, long punc) {
18         super(dfg);
19         this.punc = punc;
20         this.count = new DockInPort("in2", ship.getDock("in2"), 0, new BitVector[] { null, bv(1), bv(punc) });
21     }
22 }