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