瀏覽代碼

Changed Config Sequences for V7
Changed handling of TH delays for TH1 and TH2 to be dependent on each other

kapture2 3 年之前
父節點
當前提交
2898432ae3
共有 2 個文件被更改,包括 97 次插入177 次删除
  1. 3 8
      KCG/base/backend/board/board_config.py
  2. 94 169
      KCG/base/backend/board/sequences/sequences_7.json

+ 3 - 8
KCG/base/backend/board/board_config.py

@@ -324,16 +324,11 @@ class BoardConfiguration(QtGui.QWidget):
             if self._config['adc_number'] > 4:
                 #Setup Long delay 330ps. Value needs to be shifted to the left because first bit is used vor halfstep
                 self.observe_write(lambda x: pci.write(self.identifier, hex((x+5)<<1), '0x90A0'), 'delay_330_adc_2')
-                self.observe_write(lambda x: pci.write(self.identifier, hex((x+5)<<1), '0x90A8'), 'delay_330_th_2')
-                #self.observe_write(lambda x: pci.write(self.identifier, hex((self._config['delay_330_max']-x+5)<<1), '0x90A8'), 'delay_330_th_2')
-
-                #self.observe_write(lambda x: pci.write(self.identifier, hex((x+5)<<1), '0x90C4'), 'delay_330_fpga_2')
+                self.observe_write(lambda x: pci.write(self.identifier, hex((self._config['delay_330_max']-x+5)<<1), '0x90A8'), 'delay_330_th_2')
                 
                 #Setup short Delay 25ps
                 self.observe_write(lambda x: pci.write(self.identifier, hex(x), '0x90A4'), 'delay_25_adc_2')
-                self.observe_write(lambda x: pci.write(self.identifier, hex(x), '0x90AC'), 'delay_25_th_2')
-                #self.observe_write(lambda x: pci.write(self.identifier, hex(self._config['delay_25_max']-x), '0x90AC'), 'delay_25_th_2')
-                #self.observe_write(lambda x: pci.write(self.identifier, hex(x), '0x90C4'), 'delay_25_fpga_2')
+                self.observe_write(lambda x: pci.write(self.identifier, hex(self._config['delay_25_max']-x), '0x90AC'), 'delay_25_th_2')
 
 
         else:
@@ -845,4 +840,4 @@ class BoardConfiguration(QtGui.QWidget):
 
         else:
             logging.vinfo("adc_delay update not defined for more than 4 adc")
-        
+        

+ 94 - 169
KCG/base/backend/board/sequences/sequences_7.json

@@ -8,17 +8,18 @@
                         "PLL_sequence500",
                         "PLL_sequence_1G",
                         "synchronisation_sequence",
-                        "calibartion_sequence",
                         "adc_autosync",
-                        "adc_pdown",
+                        "calibration_sequence",
                         "adc_normal",
-                        "adc_test"],
+                        "adc_test",
+                        "adc_pdown"],
     "initialization_sequence_order": [
                         "reset_sequence",
                         "PLL_sequence",
                         "synchronisation_sequence",
-                        "calibartion_sequence",
-                        "adc_autosync"],
+                        "adc_autosync",
+                        "calibration_sequence",
+                        "reset_sequence"],
     "demo_sequence": {
         "Comment": "Text shown on Button",
         "status_val": "",
@@ -66,67 +67,67 @@
         "status_val" : "PLL500M",
         "sequence": [
             [
-                "0x80160180", "0x9060",
+                "0x00030000", "0x9044",
                 "",
-                "PLL RESET "
+                "Config both PLL "
             ],
             [
                 "0x80160180", "0x9060",
                 "",
-                "PLL RESET 2"
+                "PLL RESET "
             ],
             [
-                "0x301400C0", "0x9060",
+                "0x101400C0", "0x9060",
                 "",
                 "PLL INIT "
             ],
             [
-                "0x301800C1", "0x9060",
+                "0x301400C1", "0x9060",
                 "",
                 "ADC delay to +330ps",
                 "delay_330_adc", "1",
                 "delay_330_adc_2", "1"
             ],
             [
-                "0x30140302", "0x9060", 
+                "0x20280302", "0x9060", 
                 "",
                 "CASCADE delay to +0*330ps",
                 "delay_cascade", "0"
             ],
             [
-                "0x301800C3", "0x9060", 
+                "0x801400C3", "0x9060", 
                 "",
                 "FPGA OUTPUT",
                 "delay_330_fpga", "1"
             ],
             [
-                "0x301800C4", "0x9060",
+                "0x101400C4", "0x9060",
                 "",
                 "FPGA OUTPUT new KaptureBoard",
                 "delay_330_fpga", "1"
             ],
             [
-                "0x301400C5", "0x9060",
+                "0x106400C5", "0x9060",
                 "",
                 "OUT10",
                 "delay_330_th", "0",
                 "delay_25_th", "0"
             ],
             [
-                "0x33035006", "0x9060",
+                "0x33030006", "0x9060",
                 "",
                 "ADC delay to +10*25ps",
                 "delay_25_adc", "10",
                 "delay_25_adc_2", "10"
             ],
             [
-                "0x015001C7", "0x9060",
+                "0x01300007", "0x9060",
                 "",
                 "CASCADE delay to +14*25ps",
                 "delay_cascade_25", "14"
             ],
             [
-                "0x03010008", "0x9060",
+                "0x3303b808", "0x9060",
                 "",
                 ""
             ],
@@ -239,14 +240,14 @@
         "status_val" : "PLL500M",
         "sequence": [
             [
-                "0x80160180", "0x9060",
+                "0x30000", "0x9044",
                 "",
-                "PLL RESET "
+                "Config both PLL "
             ],
             [
                 "0x80160180", "0x9060",
                 "",
-                "PLL RESET 2"
+                "PLL RESET "
             ],
             [
                 "0x301400C0", "0x9060",
@@ -388,12 +389,12 @@
         "status_val" : "PLL1G",
         "sequence": [
             [
-                "0x80160180", "0x9060",
+                "0x30000", "0x9044",
                 "",
-                "PLL RESET "
+                "Config both PLL "
             ],
             [
-                "0x30140060", "0x9060",
+                "0x10000060", "0x9060",
                 "",
                 "PLL INIT "
             ],
@@ -405,171 +406,137 @@
                 "delay_330_adc_2", "0"
             ],
             [
-                "0x30140302", "0x9060", 
+                "0x00001", "0x9028",
                 "",
-                "CASCADE delay to +0*330ps",
-                "delay_cascade", "0"
-            ],
-            [
-                "0x30180063", "0x9060",
-                "",
-                "FPGA OUTPUT",
-                "delay_330_fpga", "1"
-            ],
+                "P.S. ==> Set number of teurn to skip = 1"
+            ]
+
+        ]
+    },
+    "synchronisation_sequence": {
+        "Comment": "PLL Synchronizing",
+        "status_val": "synced",
+        "sequence": [
             [
-                "0x80140184", "0x9060",
+                "100400", "0x9040",
                 "",
                 ""
             ],
             [
-                "0x301400C5", "0x9060",
-                "",
-                "OUT10",
-                "delay_330_th", "0"
-            ],
-            [
-                "0x33035006", "0x9060",
-                "",
-                "ADC delay to +10*25ps",
-                "delay_25_adc", "10",
-                "delay_25_adc_2", "10"
-            ],
-            [
-                "0x015001C7", "0x9060",
+                "400", "0x9040",
                 "",
-                "CASCADE delay to +14*25ps",
-                "delay_cascade_25", "14"
-            ],
+                "PLL Clock Sync signal sent.. "
+            ]          
+        ]
+    },
+    "calibration_sequence": {
+        "Comment": "ADC Calibration",
+        "status_val": "calibrated",
+        "sequence": [
             [
-                "0x03010008", "0x9060",
+                "30000", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x55555549", "0x9060",
+                "0x0040A000", "0x9064",
                 "",
-                ""
-            ],
+                "Starting ADC Auto Calibration..."
+            ], 
             [
-                "0x91024CAA", "0x9060",
+                "0x00402000", "0x9064",
                 "",
-                ""
-            ],
+                "Done!"
+            ]         
+        ]
+    },
+    "adc_autosync": {
+        "Comment": "ADC Autosync",
+        "status_val": "",
+        "sequence": [
             [
-                "0x4402800B", "0x9060",
+                "004", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x1B0C006C", "0x9060",
+                "0x5c0007", "0x9064",
                 "",
-                ""
+                "Set ADC 2 to Slave"
             ],
             [
-                "0x1323A26D", "0x9060",
+                "002", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x1300000E", "0x9060",
+                "0x5c0003", "0x9064",
                 "",
-                ""
+                "Set ADC 1 to Master"
             ],
             [
-                "0x8000800F", "0x9060",
+                "0x5c0001", "0x9064",
                 "",
-                ""
+                "Enable Master Ref Clock"
             ],
             [
-                "0xC1550410", "0x9060",
+                "004", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x00000058", "0x9060",
+                "0x5c000F", "0x9064",
                 "",
-                " --------------------------"
+                "Phase setting on Slave"
             ],
             [
-                "0x02C9C419", "0x9060",
+                "20004", "0x9044",
                 "",
                 ""
             ],
             [
-                "0xAFA8001A", "0x9060",
+                "0x5c0007", "0x9064",
                 "",
-                ""
+                "Set ADC 2 to Slave"
             ],
             [
-                "0x1C00015B", "0x9060",
+                "20002", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x0020021C", "0x9060",
+                "0x5c0003", "0x9064",
                 "",
-                ""
+                "Set ADC 1 to Master"
             ],
             [
-                "0x0180009D", "0x9060",
+                "0x5c0001", "0x9064",
                 "",
-                ""
+                "Enable Master Ref Clock"
             ],
             [
-                "0x0600009E", "0x9060",
+                "20004", "0x9044",
                 "",
                 ""
             ],
             [
-                "0x001F001F", "0x9060",
+                "0x5c000F", "0x9064",
                 "",
-                ""
+                "Phase setting on Slave"
             ]
         ]
     },
-    "synchronisation_sequence": {
-        "Comment": "PLL Synchronizing",
-        "status_val": "synced",
-        "sequence": [
-            [
-                "100400", "0x9040",
-                "",
-                ""
-            ],
-            [
-                "400", "0x9040",
-                "",
-                "PLL Clock Sync signal sent.. "
-            ]          
-        ]
-    },
-    "calibartion_sequence": {
-        "Comment": "ADC Calibation",
-        "status_val": "calibrated",
+    "adc_pdown": {
+        "Comment": "ADC Power Down",
+        "status_val": "",
         "sequence": [
             [
-                "000", "0x9044",
+                "30000", "0x9044",
                 "",
                 ""
             ],
             [
-                "40A000", "0x9064",
-                "",
-                ""
-            ], 
-            [
-                "402000", "0x9064",
-                "",
-                ""
-            ]         
-        ]
-    },
-    "calibartion_sequenceB": {
-        "Comment": "ADC Calibation",
-        "status_val": "calibrated",
-        "sequence": [
-            [
-                "1000", "0x9044",
+                "402C00", "0x9064",
                 "",
                 ""
             ],
@@ -577,88 +544,46 @@
                 "000", "0x9044",
                 "",
                 ""
-            ]         
+            ]
         ]
     },
-    "adc_autosync": {
-        "Comment": "ADC Autosync",
+    "adc_normal": {
+        "Comment": "ADC Normal",
         "status_val": "",
         "sequence": [
             [
-                "001", "0x9044",
-                "",
-                "DCLK Reset"
-            ],
-            [
-                "000", "0x9044",
+                "30000", "0x9044",
                 "",
                 ""
             ],
             [
-                "004", "0x9044",
-                "",
-                " set ADC_1 as Master "
-            ],
-            [
-                "5C0001", "0x9064",
+                "402000", "0x9064",
                 "",
                 ""
             ],
-            [
-                "002", "0x9044",
-                "",
-                " set ADC_2 as Slave"
-            ],
-            [
-                "5CA007", "0x9064",
-                "",
-                " set ADC_2 as Slave"
-            ] 
-        ]
-    },
-    "adc_pdown": {
-        "Comment": "ADC Power Down",
-        "status_val": "",
-        "sequence": [
             [
                 "000", "0x9044",
                 "",
                 ""
-            ],
-            [
-                "402C00", "0x9064",
-                "",
-                ""
             ]
         ]
     },
-    "adc_normal": {
-        "Comment": "ADC Normal",
+    "adc_test": {
+        "Comment": "ADC TestPattern",
         "status_val": "",
         "sequence": [
             [
-                "000", "0x9044",
+                "30000", "0x9044",
                 "",
                 ""
             ],
             [
-                "402000", "0x9064",
-                "",
-                ""
-            ]
-        ]
-    },
-    "adc_test": {
-        "Comment": "ADC TestPattern",
-        "status_val": "",
-        "sequence": [
-            [
-                "000", "0x9044",
+                "403000", "0x9064",
                 "",
                 ""
             ],
             [
-                "403000", "0x9064",
+                "0000", "0x9044",
                 "",
                 ""
             ]