浏览代码

Check that we end up in the correct macrostate

Baglio Tabifata 4 年之前
父节点
当前提交
eecee0c089
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/net/hkzlab/dupal/boardio/DuPALAnalyzer.java

+ 6 - 0
src/net/hkzlab/dupal/boardio/DuPALAnalyzer.java

@@ -147,6 +147,12 @@ public class DuPALAnalyzer {
                     logger.info("Found a path to another MacroState: ["+ms+"]");
                     // Traverse the path
                     for(StateLink sl : slPath) pulseClock(sl.raw_addr);
+
+                    // Check that we got to the right place
+                    int cur_rpin_status = ((readPINs() & pspecs.getROUT_READMask()) >> pspecs.getROUT_READMaskShift());
+                    if(cur_rpin_status != ms.rpin_status) {
+                        logger.error("Mismatch between the registerd output status ("+String.format("%02X", cur_rpin_status)+") and expected status ("+String.format("%02X", ms.rpin_status)+")");
+                    }
                 }
             }
         }