d8192f94c5032b3d60f7322dfe9efa0985a5823e
[fleet.git] / src / com / sun / vlsi / chips / marina / test / InstructionStopper.java
1 package com.sun.vlsi.chips.marina.test;
2
3 import java.util.ArrayList;
4 import java.util.List;
5
6 import com.sun.async.test.BitVector;
7 import com.sun.async.test.ChainControl;
8 import com.sun.async.test.ChipModel;
9
10 import edu.berkeley.fleet.api.Dock;
11 import edu.berkeley.fleet.api.Instruction;
12 import edu.berkeley.fleet.marina.MarinaFleet;
13
14 import static com.sun.vlsi.chips.marina.test.Marina.INSTRUCTION_LENGTH;
15
16 /**
17  * InstructionStopper is a scaffold that lets us create a 36 bit propperStopper
18  * by using a 52 bit propperStopper and throwing away the unused bits.
19  */
20 public class InstructionStopper extends ProperStopper {
21
22     public InstructionStopper(String name,
23                               String propInst,
24                               String controlChain, String dataChain,
25                               String reportChain,
26                               ChainControls cc, ChipModel model,
27                               boolean clockHack,
28                               Indenter indenter, String counterPath) {
29         super(name, propInst, controlChain, dataChain, reportChain, cc, model, clockHack, indenter, counterPath);
30     }
31
32     /** put one Instruction into InstructionStopper */
33     public void fill(Instruction inst) {
34         MarinaPacket mp = new MarinaPacket(inst);
35         MarinaTest.indenter.prln("  inserting instruction: " +
36                                  inst.toString().substring(inst.toString().indexOf(':')+1)
37                                  +"\n      "+mp);
38         super.fill(mp);
39     }
40
41     /* put a torpedo into the InstructionStopper */
42     public void fillTorpedo() {
43         MarinaTest.indenter.prln("  inserting torpedo");
44         super.fill(new MarinaPacket(MarinaPacket.null_word, true, MarinaPacket.null_path));
45     }
46 }