Ver código fonte

Add method that returns to us if the chip is AL or AH

Baglio Tabifata 5 anos atrás
pai
commit
018fc77a65

+ 3 - 3
src/main/java/info/hkzlab/dupal/analyzer/board/boardio/DuPALAnalyzer.java

@@ -737,10 +737,10 @@ public class DuPALAnalyzer {
 
         strBuf.append("\n");
 
-        // Phase
+        // Phase, if the chip is active low, we'll be interested in the equations that gives us the OFF-set of the truth table
         strBuf.append(".phase ");
-        for(int idx = 0; idx < specs.getNumROUTPins(); idx++) strBuf.append('0'); // REG outputs
-        for(int idx = 0; idx < additionalOUTs; idx++) strBuf.append('0'); // Outputs
+        for(int idx = 0; idx < specs.getNumROUTPins(); idx++) strBuf.append(specs.isActiveLow() ? '0' : '1'); // REG outputs
+        for(int idx = 0; idx < additionalOUTs; idx++) strBuf.append(specs.isActiveLow() ? '0' : '1'); // Outputs
         for(int idx = 0; idx < additionalOUTs; idx++) strBuf.append('1'); // OEs
         strBuf.append("\n\n");
         out.write(strBuf.toString().getBytes(StandardCharsets.US_ASCII));   

+ 5 - 0
src/main/java/info/hkzlab/dupal/analyzer/devices/PAL16R4Specs.java

@@ -80,4 +80,9 @@ public class PAL16R4Specs implements PALSpecs {
     public String[] getIO_PinNames() {
         return IO_PIN_NAMES;
     }
+
+    @Override
+    public boolean isActiveLow() {
+        return true;
+    }
 }

+ 5 - 0
src/main/java/info/hkzlab/dupal/analyzer/devices/PAL16R6Specs.java

@@ -79,4 +79,9 @@ public class PAL16R6Specs implements PALSpecs {
     public String[] getIO_PinNames() {
         return IO_PIN_NAMES;
     }
+
+    @Override
+    public boolean isActiveLow() {
+        return true;
+    }
 }

+ 5 - 0
src/main/java/info/hkzlab/dupal/analyzer/devices/PAL16R8Specs.java

@@ -80,4 +80,9 @@ public class PAL16R8Specs implements PALSpecs {
     public String[] getIO_PinNames() {
         return IO_PIN_NAMES;
     }
+
+    @Override
+    public boolean isActiveLow() {
+        return true;
+    }
 }

+ 2 - 0
src/main/java/info/hkzlab/dupal/analyzer/devices/PALSpecs.java

@@ -20,4 +20,6 @@ public interface PALSpecs {
     public String[] getROUT_PinNames();
     public String[] getIN_PinNames();
     public String[] getIO_PinNames();
+
+    public boolean isActiveLow();
 }