00001 #!/usr/local/bin/python 00002 # 00003 # Copyright 2004 00004 # by 00005 # The Board of Trustees of the 00006 # Leland Stanford Junior University. 00007 # All rights reserved. 00008 # 00009 00010 00011 __facility__ = "Online" 00012 __abstract__ = "GLAST GEM functional block" 00013 __author__ = "Selim Tuvi <stuvi@slac.stanford.edu> SLAC - GLAST LAT I&T/Online" 00014 __date__ = ("$Date: 2005/06/15 17:45:10 $").split(' ')[1] 00015 __version__ = "$Revision: 2.19 $" 00016 __release__ = "$Name: R04-12-00 $" 00017 __credits__ = "SLAC" 00018 00019 import LATTE.copyright_SLAC 00020 00021 import gDb 00022 import gAttr 00023 00024 class GGEM(gDb.Gdb): 00025 """\brief GGEM node. 00026 00027 """ 00028 __attrs = [] 00029 00030 __EPU_ADDR = 0x20 00031 00032 def __init__(self, client, parent): 00033 """\brief Initialize child objects. 00034 00035 """ 00036 self.GEMC = None 00037 self.GEMMG = None 00038 self.GEMST = None 00039 self.GEMSC = None 00040 self.GEMVG = None 00041 self.GEMIE = None 00042 self.GEMW = None 00043 flags = {'CmdrspFabric' : 'On', 00044 'EventFabric' : 'On'} 00045 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs, None, flags) 00046 00047 def getEPUaddr(self): 00048 # Hard code EPU_ADDR to 0x20 to work with the Caligula FSW release 00049 return GGEM.__EPU_ADDR 00050 00051 def downGEMC(self): 00052 """\brief Navigate to the GGEMC node 00053 00054 \return The GGEMC object instance 00055 """ 00056 return self.GEMC 00057 00058 def existsGEMC(self): 00059 """\brief Check if the GGEMC instance exists in the schema. 00060 00061 \return 1 if it exists, 0 if it doesn't. 00062 """ 00063 return self.GEMC != None 00064 00065 def downGEMMG(self): 00066 """\brief Navigate to the GGEMMG node 00067 00068 \return The GGEMMG object instance 00069 """ 00070 return self.GEMMG 00071 00072 def existsGEMMG(self): 00073 """\brief Check if the GGEMMG instance exists in the schema. 00074 00075 \return 1 if it exists, 0 if it doesn't. 00076 """ 00077 return self.GEMMG != None 00078 00079 def downGEMST(self): 00080 """\brief Navigate to the GGEMST node 00081 00082 \return The GGEMST object instance 00083 """ 00084 return self.GEMST 00085 00086 def existsGEMST(self): 00087 """\brief Check if the GGEMST instance exists in the schema. 00088 00089 \return 1 if it exists, 0 if it doesn't. 00090 """ 00091 return self.GEMST != None 00092 00093 def downGEMSC(self): 00094 """\brief Navigate to the GGEMSC node 00095 00096 \return The GGEMSC object instance 00097 """ 00098 return self.GEMSC 00099 00100 def existsGEMSC(self): 00101 """\brief Check if the GGEMSC instance exists in the schema. 00102 00103 \return 1 if it exists, 0 if it doesn't. 00104 """ 00105 return self.GEMSC != None 00106 00107 def downGEMVG(self): 00108 """\brief Navigate to the GGEMVG node 00109 00110 \return The GGEMVG object instance 00111 """ 00112 return self.GEMVG 00113 00114 def existsGEMVG(self): 00115 """\brief Check if the GGEMVG instance exists in the schema. 00116 00117 \return 1 if it exists, 0 if it doesn't. 00118 """ 00119 return self.GEMVG != None 00120 00121 def downGEMIE(self): 00122 """\brief Navigate to the GGEMIE node 00123 00124 \return The GGEMIE object instance 00125 """ 00126 return self.GEMIE 00127 00128 def existsGEMIE(self): 00129 """\brief Check if the GGEMIE instance exists in the schema. 00130 00131 \return 1 if it exists, 0 if it doesn't. 00132 """ 00133 return self.GEMIE != None 00134 00135 def downGEMW(self): 00136 """\brief Navigate to the GGEMW node 00137 00138 \return The GGEMW object instance 00139 """ 00140 return self.GEMW 00141 00142 def existsGEMW(self): 00143 """\brief Check if the GGEMW instance exists in the schema. 00144 00145 \return 1 if it exists, 0 if it doesn't. 00146 """ 00147 return self.GEMW != None 00148 00149 ## private: 00150 00151 def __removeGEMC(self): 00152 self.GEMC = None 00153 00154 def __addGEMC(self): 00155 ggemc = GGEMC(self.client(), self) 00156 self.GEMC = ggemc 00157 return ggemc 00158 00159 def __removeGEMMG(self): 00160 self.GEMMG = None 00161 00162 def __addGEMMG(self): 00163 ggemmg = GGEMMG(self.client(), self) 00164 self.GEMMG = ggemmg 00165 return ggemmg 00166 00167 def __removeGEMST(self): 00168 self.GEMST = None 00169 00170 def __addGEMST(self): 00171 ggemst = GGEMST(self.client(), self) 00172 self.GEMST = ggemst 00173 return ggemst 00174 00175 def __removeGEMSC(self): 00176 self.GEMSC = None 00177 00178 def __addGEMSC(self): 00179 ggemsc = GGEMSC(self.client(), self) 00180 self.GEMSC = ggemsc 00181 return ggemsc 00182 00183 def __removeGEMVG(self): 00184 self.GEMVG = None 00185 00186 def __addGEMVG(self): 00187 ggemvg = GGEMVG(self.client(), self) 00188 self.GEMVG = ggemvg 00189 return ggemvg 00190 00191 def __removeGEMIE(self): 00192 self.GEMIE = None 00193 00194 def __addGEMIE(self): 00195 ggemie = GGEMIE(self.client(), self) 00196 self.GEMIE = ggemie 00197 return ggemie 00198 00199 def __removeGEMW(self): 00200 self.GEMW = None 00201 00202 def __addGEMW(self): 00203 ggemw = GGEMW(self.client(), self) 00204 self.GEMW = ggemw 00205 return ggemw 00206 00207 00208 class GGEMC(gDb.Gdb): 00209 """\brief GEMC sub-node of GGEM (controller). 00210 00211 Has GGEMC specific registers and dataless commands. 00212 00213 Valid Registers: 00214 - \c configuration 00215 - \c address 00216 - \c periodic_mode 00217 - \c periodic_limits 00218 - \c periodic_rate 00219 - \c sequence 00220 - \c cr_statistics 00221 - \c event_statistics 00222 - \c delay_ext_trg 00223 00224 Dataless Commands: 00225 - \c cmd_nop 00226 - \c cmd_reset 00227 - \c cmd_trigger 00228 00229 """ 00230 __attrs = [ 00231 # Registers 00232 gAttr.GattrRaw('configuration', 0, 4), 00233 gAttr.GattrRaw('address', 1, 4), 00234 gAttr.GattrRaw('periodic_mode', 3, 4), 00235 gAttr.GattrRaw('periodic_limits', 4, 4), 00236 gAttr.GattrRaw('periodic_rate', 5, 4), 00237 gAttr.GattrRaw('sequence', 6, 4), 00238 gAttr.GattrRaw('cr_statistics', 7, 4), 00239 gAttr.GattrRaw('event_statistics', 8, 4), 00240 gAttr.GattrRaw('delay_ext_trg', 9, 4), 00241 # Dataless Commands 00242 gAttr.GattrDlc('cmd_nop', 0, 0), 00243 gAttr.GattrDlc('cmd_reset', 1, 0), 00244 gAttr.GattrDlc('cmd_trigger', 2, 0), 00245 ] 00246 00247 def __init__(self, client, parent): 00248 """\brief Initialize valid registers as Gattrs 00249 """ 00250 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00251 00252 def read(self, reg): 00253 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_CC, reg, '!I') 00254 00255 def load(self, reg, value): 00256 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_CC, reg, value) 00257 00258 def send(self, cmd): 00259 return self.cmdrsp('GEM_cmd', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_CC, cmd) 00260 00261 00262 class GGEMMG(gDb.Gdb): 00263 """\brief GEMMG sub-node of GGEM (TAM generator). 00264 00265 Has GGEMMG specific registers and dataless commands. 00266 00267 Valid Registers: 00268 - \c engine_0 00269 - \c engine_1 00270 - \c engine_2 00271 - \c engine_3 00272 - \c engine_4 00273 - \c engine_5 00274 - \c engine_6 00275 - \c engine_7 00276 - \c engine_8 00277 - \c engine_9 00278 - \c engine_a 00279 - \c engine_b 00280 - \c engine_c 00281 - \c engine_d 00282 - \c engine_e 00283 - \c engine_f 00284 00285 """ 00286 __attrs = [ 00287 # Registers 00288 gAttr.GattrRaw('engine_0', 0, 4), 00289 gAttr.GattrRaw('engine_1', 1, 4), 00290 gAttr.GattrRaw('engine_2', 2, 4), 00291 gAttr.GattrRaw('engine_3', 3, 4), 00292 gAttr.GattrRaw('engine_4', 4, 4), 00293 gAttr.GattrRaw('engine_5', 5, 4), 00294 gAttr.GattrRaw('engine_6', 6, 4), 00295 gAttr.GattrRaw('engine_7', 7, 4), 00296 gAttr.GattrRaw('engine_8', 8, 4), 00297 gAttr.GattrRaw('engine_9', 9, 4), 00298 gAttr.GattrRaw('engine_a', 10, 4), 00299 gAttr.GattrRaw('engine_b', 11, 4), 00300 gAttr.GattrRaw('engine_c', 12, 4), 00301 gAttr.GattrRaw('engine_d', 13, 4), 00302 gAttr.GattrRaw('engine_e', 14, 4), 00303 gAttr.GattrRaw('engine_f', 15, 4), 00304 ] 00305 00306 def __init__(self, client, parent): 00307 """\brief Initialize valid registers as Gattrs. 00308 """ 00309 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00310 00311 def read(self, reg): 00312 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_TAM, reg, '!I') 00313 00314 def load(self, reg, value): 00315 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_TAM, reg, value) 00316 00317 00318 class GGEMST(gDb.Gdb): 00319 """\brief GEMST sub-node of GGEM (statistics). 00320 00321 Has GGEMST specific registers and dataless commands. 00322 00323 Valid Registers: 00324 - \c livetime 00325 - \c prescaled 00326 - \c discarded 00327 - \c sent 00328 - \c tile_counters 00329 - \c tile_0 00330 - \c tile_1 00331 - \c cno_counters 00332 - \c cno_0 00333 - \c cno_1 00334 - \c one_pps 00335 - \c timebase 00336 - \c deadzone 00337 00338 \deprecated 00339 - \c \b missed Use 'deadzone' instead 00340 00341 """ 00342 __attrs = [ 00343 # Registers 00344 gAttr.GattrRaw('livetime', 0, 4), 00345 gAttr.GattrRaw('prescaled', 1, 4), 00346 gAttr.GattrRaw('discarded', 2, 4), 00347 gAttr.GattrRaw('sent', 3, 4), 00348 gAttr.GattrRaw('tile_counters', 4, 4), 00349 gAttr.GattrRaw('tile_0', 5, 4), 00350 gAttr.GattrRaw('tile_1', 6, 4), 00351 gAttr.GattrRaw('cno_counters', 7, 4), 00352 gAttr.GattrRaw('cno_0', 8, 4), 00353 gAttr.GattrRaw('cno_1', 9, 4), 00354 gAttr.GattrRaw('one_pps', 10, 4), 00355 gAttr.GattrRaw('timebase', 11, 4), 00356 gAttr.GattrRegDepr('missed', 12, 4), # Deprecated: use deadzone 00357 gAttr.GattrRaw('deadzone', 12, 4), 00358 ] 00359 00360 def __init__(self, client, parent): 00361 """\brief Initialize valid registers as Gattrs. 00362 """ 00363 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00364 00365 def read(self, reg): 00366 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_STAT, reg, '!I') 00367 00368 def load(self, reg, value): 00369 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_STAT, reg, value) 00370 00371 def send(self, cmd): 00372 return self.cmdrsp('GEM_cmd', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_STAT, cmd) 00373 00374 def extCtrEnable(self, reg): 00375 """\brief Enable the specified pseudo counter. 00376 By default all pseudo counters are disabled. 00377 00378 \param reg Register id of the pseudo counter. 00379 Can be retrieved by calling gemst.regs['regname'].id(). 00380 \return A Response object 00381 """ 00382 return self.cmdrsp('GEM_stat_enable', reg) 00383 00384 def extCtrDisable(self, reg): 00385 """\brief Disable the specified pseudo counter. 00386 By default all pseudo counters are disabled. 00387 00388 \param reg Register id of the pseudo counter. 00389 Can be retrieved by calling gemst.regs['regname'].id(). 00390 \return A Response object 00391 """ 00392 return self.cmdrsp('GEM_stat_disable', reg) 00393 00394 def extCtrLoopEnable(self): 00395 """\brief Enable the update loop that updates all 00396 counter pseudoregisters. 00397 00398 \return A Response object 00399 """ 00400 return self.cmdrsp('GEM_stat_loop_enable') 00401 00402 def extCtrLoopDisable(self): 00403 """\brief Disable the update loop that updates all 00404 counter pseudoregisters. 00405 00406 \return A Response object 00407 """ 00408 return self.cmdrsp('GEM_stat_loop_disable') 00409 00410 def extCtrSetLoopDelay(self, delay): 00411 """\brief Set the update loop interval for 00412 counter pseudoregisters. 00413 00414 \param Set the pseudo counter update loop delay 00415 in 1/60 second ticks. The default is 30 (2 Hz). 00416 00417 \return A Response object 00418 """ 00419 return self.cmdrsp('GEM_stat_loop_delay', delay) 00420 00421 def extCtrRead(self, reg): 00422 """\brief Read the specified pseudocounter 00423 00424 \param reg Register id of the pseudo counter. 00425 Can be retrieved by calling gemst.regs['regname'].id(). 00426 \return (value, timestamp) pair 00427 """ 00428 return self.cmdrsp('GEM_stat_read', reg, '!Q', '!Q') 00429 00430 def extCtrClear(self): 00431 """\brief Clear the pseudocounters 00432 """ 00433 return self.cmdrsp('GEM_stat_clear') 00434 00435 def extCtrClearStatus(self): 00436 """\brief Read the pseudocounter statuses 00437 """ 00438 return self.cmdrsp('GEM_stat_clear_status') 00439 00440 00441 00442 class GGEMSC(gDb.Gdb): 00443 """\brief GEMSC sub-node of GGEM (scheduler). 00444 00445 Has GGEMSC specific registers and dataless commands. 00446 00447 Valid Registers: 00448 - \c conditions_00_07 00449 - \c conditions_08_0f 00450 - \c conditions_10_17 00451 - \c conditions_18_1f 00452 - \c conditions_20_27 00453 - \c conditions_28_2f 00454 - \c conditions_30_37 00455 - \c conditions_38_3f 00456 - \c conditions_40_47 00457 - \c conditions_48_4f 00458 - \c conditions_50_57 00459 - \c conditions_58_5f 00460 - \c conditions_60_67 00461 - \c conditions_68_6f 00462 - \c conditions_70_77 00463 - \c conditions_78_7f 00464 - \c conditions_80_87 00465 - \c conditions_88_8f 00466 - \c conditions_90_97 00467 - \c conditions_98_9f 00468 - \c conditions_a0_a7 00469 - \c conditions_a8_af 00470 - \c conditions_b0_b7 00471 - \c conditions_b8_bf 00472 - \c conditions_c0_c7 00473 - \c conditions_c8_cf 00474 - \c conditions_d0_d7 00475 - \c conditions_d8_df 00476 - \c conditions_e0_e7 00477 - \c conditions_e8_ef 00478 - \c conditions_f0_f7 00479 - \c conditions_f8_ff 00480 00481 """ 00482 __attrs = [ 00483 # Registers 00484 gAttr.GattrRaw('conditions_00_07', 0x00, 4), 00485 gAttr.GattrRaw('conditions_08_0f', 0x01, 4), 00486 gAttr.GattrRaw('conditions_10_17', 0x02, 4), 00487 gAttr.GattrRaw('conditions_18_1f', 0x03, 4), 00488 gAttr.GattrRaw('conditions_20_27', 0x04, 4), 00489 gAttr.GattrRaw('conditions_28_2f', 0x05, 4), 00490 gAttr.GattrRaw('conditions_30_37', 0x06, 4), 00491 gAttr.GattrRaw('conditions_38_3f', 0x07, 4), 00492 gAttr.GattrRaw('conditions_40_47', 0x08, 4), 00493 gAttr.GattrRaw('conditions_48_4f', 0x09, 4), 00494 gAttr.GattrRaw('conditions_50_57', 0x0a, 4), 00495 gAttr.GattrRaw('conditions_58_5f', 0x0b, 4), 00496 gAttr.GattrRaw('conditions_60_67', 0x0c, 4), 00497 gAttr.GattrRaw('conditions_68_6f', 0x0d, 4), 00498 gAttr.GattrRaw('conditions_70_77', 0x0e, 4), 00499 gAttr.GattrRaw('conditions_78_7f', 0x0f, 4), 00500 gAttr.GattrRaw('conditions_80_87', 0x10, 4), 00501 gAttr.GattrRaw('conditions_88_8f', 0x11, 4), 00502 gAttr.GattrRaw('conditions_90_97', 0x12, 4), 00503 gAttr.GattrRaw('conditions_98_9f', 0x13, 4), 00504 gAttr.GattrRaw('conditions_a0_a7', 0x14, 4), 00505 gAttr.GattrRaw('conditions_a8_af', 0x15, 4), 00506 gAttr.GattrRaw('conditions_b0_b7', 0x16, 4), 00507 gAttr.GattrRaw('conditions_b8_bf', 0x17, 4), 00508 gAttr.GattrRaw('conditions_c0_c7', 0x18, 4), 00509 gAttr.GattrRaw('conditions_c8_cf', 0x19, 4), 00510 gAttr.GattrRaw('conditions_d0_d7', 0x1a, 4), 00511 gAttr.GattrRaw('conditions_d8_df', 0x1b, 4), 00512 gAttr.GattrRaw('conditions_e0_e7', 0x1c, 4), 00513 gAttr.GattrRaw('conditions_e8_ef', 0x1d, 4), 00514 gAttr.GattrRaw('conditions_f0_f7', 0x1e, 4), 00515 gAttr.GattrRaw('conditions_f8_ff', 0x1f, 4), 00516 ] 00517 00518 def __init__(self, client, parent): 00519 """\brief Initialize valid registers as Gattrs. 00520 """ 00521 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00522 00523 def read(self, reg): 00524 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_SCHD, reg, '!I') 00525 00526 def load(self, reg, value): 00527 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_SCHD, reg, value) 00528 00529 00530 class GGEMVG(gDb.Gdb): 00531 """\brief GEMVG sub-node of GGEM (ROI generator). 00532 00533 Has GGEMVG specific registers and dataless commands. 00534 00535 Valid Registers: 00536 00537 - \c ROI_00, ROI_01, ROI_02,...,ROI_53 00538 00539 """ 00540 __attrs = [] 00541 # Registers 00542 for i in range(54): 00543 __attrs.append(gAttr.GattrRaw('ROI_%02d' % i, i, 4)) 00544 00545 def __init__(self, client, parent): 00546 """\brief Initialize valid registers as Gattrs. 00547 """ 00548 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00549 00550 def read(self, reg): 00551 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_ROI, reg, '!I') 00552 00553 def load(self, reg, value): 00554 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_ROI, reg, value) 00555 00556 00557 class GGEMIE(gDb.Gdb): 00558 """\brief GEMIE sub-node of GGEM (input enables). 00559 00560 Has GGEMIE specific registers and dataless commands. 00561 00562 Valid Registers: 00563 - \c towers_0_3 00564 - \c towers_4_7 00565 - \c towers_8_11 00566 - \c towers_12_15 00567 - \c acd_cno 00568 - \c tiles_000_013 00569 - \c tiles_014_032 00570 - \c tiles_033_NA3 00571 - \c tiles_100_113 00572 - \c tiles_114_NA5 00573 - \c tiles_200_213 00574 - \c tiles_214_NA7 00575 - \c tiles_300_313 00576 - \c tiles_314_NA9 00577 - \c tiles_400_413 00578 - \c tiles_414_NA1 00579 - \c tiles_500_NA10 00580 - \c tower_busy 00581 - \c external 00582 00583 """ 00584 __attrs = [ 00585 # Registers 00586 gAttr.GattrRaw('external', 18, 4), # Specified first to support 00587 # older GASUs. See __commit() in 00588 # trigger.TrgGem for more information. 00589 gAttr.GattrRaw('towers_0_3', 0, 4), 00590 gAttr.GattrRaw('towers_4_7', 1, 4), 00591 gAttr.GattrRaw('towers_8_11', 2, 4), 00592 gAttr.GattrRaw('towers_12_15', 3, 4), 00593 gAttr.GattrRaw('acd_cno', 4, 4), 00594 gAttr.GattrRaw('tiles_000_013', 5, 4), 00595 gAttr.GattrRaw('tiles_014_032', 6, 4), 00596 gAttr.GattrRaw('tiles_033_NA3', 7, 4), 00597 gAttr.GattrRaw('tiles_100_113', 8, 4), 00598 gAttr.GattrRaw('tiles_114_NA5', 9, 4), 00599 gAttr.GattrRaw('tiles_200_213', 10, 4), 00600 gAttr.GattrRaw('tiles_214_NA7', 11, 4), 00601 gAttr.GattrRaw('tiles_300_313', 12, 4), 00602 gAttr.GattrRaw('tiles_314_NA9', 13, 4), 00603 gAttr.GattrRaw('tiles_400_413', 14, 4), 00604 gAttr.GattrRaw('tiles_414_NA1', 15, 4), 00605 gAttr.GattrRaw('tiles_500_NA10', 16, 4), 00606 gAttr.GattrRaw('tower_busy', 17, 4), 00607 ] 00608 00609 def __init__(self, client, parent): 00610 """\brief Initialize valid registers as Gattrs. 00611 00612 """ 00613 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00614 00615 def read(self, reg): 00616 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_IE, reg, '!I') 00617 00618 def load(self, reg, value): 00619 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_IE, reg, value) 00620 00621 00622 class GGEMW(gDb.Gdb): 00623 """\brief GEMW sub-node of GGEM. 00624 00625 Has GGEMW specific registers. 00626 00627 Valid Registers: 00628 - \c window_width 00629 - \c window_open_mask 00630 """ 00631 __attrs = [ 00632 # Registers 00633 gAttr.GattrRaw('window_width', 0, 4), 00634 gAttr.GattrRaw('window_open_mask', 1, 4), 00635 ] 00636 00637 def __init__(self, client, parent): 00638 """\brief Initialize valid registers as Gattrs. 00639 """ 00640 gDb.Gdb.__init__(self, client, parent, 0, self.__attrs) 00641 00642 def read(self, reg): 00643 return self.cmdrsp('GEM_read', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_WIN, reg, '!I') 00644 00645 def load(self, reg, value): 00646 return self.cmdrsp('GEM_load', gDb.Lem.ADDR_GEM, gDb.Lem.GEM_WIN, reg, value)