Adam generates decoded instructions
authorrkao <rkao>
Fri, 31 Oct 2008 14:46:29 +0000 (14:46 +0000)
committerrkao <rkao>
Fri, 31 Oct 2008 14:46:29 +0000 (14:46 +0000)
testCode/com/sun/vlsi/chips/marina/test/InstructionStopper.java

index 8164f3b..3150d28 100644 (file)
@@ -8,6 +8,18 @@ import com.sun.async.test.ChipModel;
  * by using a 52 bit propperStopper and throwing away the unused bits. */
 public class InstructionStopper extends ProperStopper {
        public static final int INSTR_SZ = 36;
+       private String formatDecodedInstr(BitVector dta) {
+               BitVector instr = dta.get(0, INSTR_SZ).bitReverse(); 
+               StringBuffer sb = new StringBuffer();
+               String pred = instr.get(0, 6)  .getState();
+               String rq = instr.get(6, 1).getState();
+               String unused2 = instr.get(7, 2).getState();
+               String op = instr.get(9, 6).getState();
+               String tail = instr.get(15, 1).getState();
+               String rest = instr.get(16, 20).getState();
+               
+               return pred+" "+rq+" "+unused2+" "+op+" "+tail+" "+rest;
+       }
        public InstructionStopper(String propInst,
                                          String controlChain, String dataChain,
                                          String reportChain,
@@ -37,6 +49,6 @@ public class InstructionStopper extends ProperStopper {
        }
        @Override
        public String formatDataTokAddr(BitVector dta) {
-               return dta.get(0, INSTR_SZ).getState();
+               return formatDecodedInstr(dta);
        }
 }