浏览代码

Update readme and command line parsing

Fabio Battaglia 5 年之前
父节点
当前提交
870244be09

+ 2 - 2
README.md

@@ -19,7 +19,7 @@ Once this is known, the application will:
 1. Connect to the board, reset it, and enable the *REMOTE MODE*, so it accepts command from the application.
 2. If which I/O pins are actually outputs is not known, the board will try to guess this and print the result. This procedure is not bulletproof (or it would take the same time as the proper analisys: in case it did not detect some outputs, these will be found during the analisys and will halt the procedure, allowing the user to specify them correctly for the next run).
 3. The analisys will start. The procedure can take hours to complete.
-4. A truth table formatted in a way that the **espresso** heuristic logic minimizer likes is saved to a file.
+4. A JSON file that collects every state of the outputs of the PAL and how they change depending on the inputs is saved to file.
 
 ### Supported devices
 
@@ -46,7 +46,7 @@ java -jar /path/to/dupal_analyzer.jar <serial_port> <pal_type> <output_file> [he
 
 - **serial_port:** is just the serial port to use to connect to the DuPAL board. Connection is hardcoded at **57600bps 8n1** without flow control.
 - **pal_type:** is the type of PAL device that is going to be analyzed.
-- **output_file:** The file where the analyzer will save the generated truth table.
+- **output_file:** The file where the analyzer will save the JSON output.
 - **hex_output_mask:** This mask (a byte represented as an *hex number*) is used to tell the Analyzer which IOs are configured as outputs. If it's not present, the Analyzer will try to guess it by itself. It's usually advisable to let the guessing run for a few minutes, then restart the analisys by specifying the guessed mask. If the mask is wrong, during the analisys an error will be thrown as soon as what was thought as an input is found to be an output. At that point the analisys can be restarted with the new mask.
 
 #### The output mask format

+ 3 - 8
src/main/java/info/hkzlab/dupal/analyzer/App.java

@@ -17,7 +17,6 @@ public class App {
     private static String serialDevice = null;
     private static PALSpecs pspecs = null;
     private static int outMask = -1;
-    private static boolean padTable = true;
     private static String outFile = null;
 
     public static void main(String[] args) throws Exception {
@@ -31,7 +30,7 @@ public class App {
             }
 
             logger.error("Wrong number of arguments passed.\n"
-                    + "dupal_analyzer <serial_port> <pal_type> <output_file> [pad_table: Y|N] [hex_output_mask]\n"
+                    + "dupal_analyzer <serial_port> <pal_type> <output_file> [hex_output_mask]\n"
                     + "Where <pal_type> can be:\n" + supportedPALs.toString() + "\n");
 
             return;
@@ -55,7 +54,7 @@ public class App {
             }
         });
 
-        dpan.startAnalisys(padTable);
+        dpan.startAnalisys();
     }
 
     private static void parseArgs(String[] args) {
@@ -73,11 +72,7 @@ public class App {
         outFile = args[2];
 
         if(args.length >= 4) {
-            padTable = args[3].equalsIgnoreCase("Y");
-        }
-
-        if(args.length >= 5) {
-            outMask = Integer.parseInt(args[4], 16);
+            outMask = Integer.parseInt(args[3], 16);
         }
     }
 }

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

@@ -73,16 +73,10 @@ public class DuPALAnalyzer {
     }
 
     public void startAnalisys() throws Exception {
-        startAnalisys(false);
-    }
-
-    public void startAnalisys(boolean padTable) throws Exception {
         int board_revision = dpci.getBoardVersion();
         DuPALCmdInterface.DuPAL_LED led;
         String formatterOutput = null;
        
-        logger.info("startAnalisys() -> Espresso table results will"+(padTable?"":" not")+" be padded.");
-        
         switch(dpci.palSpecs.slotNumber()) {
             default:
             case 0: