1 / 10

Generic Device Configurator Nuno Almeida CMS Week - DAQ Software and Detector Controls

Generic Device Configurator Nuno Almeida CMS Week - DAQ Software and Detector Controls. I have based my presentation on. (12/06/2002). DB Configuration & Data Integrity Monitoring. (R. Alemany 22/02/05). Properties (based on Requirements).

arlettam
Download Presentation

Generic Device Configurator Nuno Almeida CMS Week - DAQ Software and Detector Controls

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Generic Device ConfiguratorNuno AlmeidaCMS Week - DAQ Software and Detector Controls I have based my presentation on (12/06/2002) DB Configuration & Data Integrity Monitoring (R. Alemany 22/02/05)

  2. Properties (based on Requirements) • Configure different hardware modules without changing the software • Update/retrieve easily the configuration data • Check device configuration • Configure devices from Data Bases or XML User Files • For portability the configuration should be specified in a way… : • Flexible enough to be adapted to different Data Bases • Self describing and understandable by everyone (you should tell us if we achieved this • requirement)

  3. Structure of the Generic Device Configurator HAL Address file Item Builder file <CARD_TYPE _type="Module" TYPE_ID="CMS-ECAL-DCCpttp"> <VME64X_ADDRESS _type="Module" ITEM_NAME=“OPERATIONMODE"> <ADDRESS _type="number">0x00000004</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x0000007f</MASK> </VME64X_ADDRESS> <VME64X_ADDRESS _type="Module" ITEM_NAME=“CXTALWEIGHTS"> <ADDRESS _type="number">0x00000084</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x00000fff</MASK> </VME64X_ADDRESS> <VME64X_ADDRESS _type="Module" ITEM_NAME="L1ZSUPPRESSION"> <ADDRESS _type="number">0x00000104</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x00000fff</MASK> </VME64X_ADDRESS> </CARD_TYPE> <CompositeItem name="OPERATIONMODE" addrIncrement="HAL_NO_INCREMENT" > <SegmentedBlock length="1"> <BitsSegment name="SREADOUT" width="1" position="0" /> <BitsSegment name="ZSUPPRESSION" width="1" position="1" /> <BitsSegment name="DAQMODE" width="1" position="2" /> <BitsSegment name="WEIGHTSMODE" width="1" position="3" /> <BitsSegment name="TTSINTERFACE" width="1" position="4" /> <BitsSegment name="TEST" width="1" position="5" /> <BitsSegment name="INPUTHANDLERERRCHECK" width="1" position="6" /> </SegmentedBlock> </CompositeItem> <CompositeItem name="CXTALWEIGHTS" addrIncrement="HAL_NO_INCREMENT" > <SegmentedBlock length="150"> <BitsSegment name="WEIGHT" width="12" position="0"/> </SegmentedBlock> </CompositeItem> <SingleItem name="L1ZSUPPRESSION" /> OPERATIONMODE Some bit fields inside one Word(block of SegmentedBlock) Some bit fields in a Continuous Memory Region (block of SegmentedBlock) CXTALWEIGHTS L1ZSUPPRESSION Single Words (Single Item)

  4. Some bit fields inside one Word (block of SegmentConfig) Some bit fields in a Continuous Memory Region (block of SegmentConfig) Structure of the Generic Device Configurator HAL Address file DCC Configurable Parameters file Item Builder file <CARD_TYPE _type="Module" TYPE_ID="CMS-ECAL-DCCpttp"> <VME64X_ADDRESS _type="Module" ITEM_NAME=“OPERATIONMODE"> <ADDRESS _type="number">0x00000004</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x0000007f</MASK> </VME64X_ADDRESS> <VME64X_ADDRESS _type="Module" ITEM_NAME=“CXTALWEIGHTS"> <ADDRESS _type="number">0x00000084</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x00000fff</MASK> </VME64X_ADDRESS> <VME64X_ADDRESS _type="Module" ITEM_NAME="L1ZSUPPRESSION"> <ADDRESS _type="number">0x00000104</ADDRESS> <SPACE _type="string">memory</SPACE> <MAP _type="number">0</MAP> <READ_OR_WRITE _type="string">rw</READ_OR_WRITE> <MASK _type="number">0x00000fff</MASK> </VME64X_ADDRESS> </CARD_TYPE> <OPERATIONMODE _userInfo="Structure" OPERATIONMODE_ID="0"> <SREADOUT_0 _userInfo="SegmentConfig">0</SREADOUT_0> <ZSUPPRESSION_0 _userInfo="SegmentConfig">0</ZSUPPRESSION_0> <DAQMODE_0 _userInfo="SegmentConfig">0</DAQMODE_0> <WEIGHTSMODE_0 _userInfo="SegmentConfig">0</WEIGHTSMODE_0> <TTSINTERFACE_0 _userInfo="SegmentConfig">1</TTSINTERFACE_0> <TEST_0 _userInfo="SegmentConfig">1</TEST_0> <INPUTHANDLERERRCHECK_0 _userInfo="SegmentConfig">0</INPUTHANDLERERRCHECK_0> </OPERATIONMODE> <CHANNEL _userInfo="Module" CHANNEL_ID="0"> <ADDRESS _userInfo="ModuleAddress" >0x1084</ADDRESS> <CXTAL _userInfo="Structure" CXTAL_ID="0"> <WEIGHTFACTOR>1</WEIGHTFACTOR> <WEIGHT_0 _userInfo="SegmentConfig">0</WEIGHT_0> <WEIGHT_1 _userInfo="SegmentConfig">1</WEIGHT_1> <WEIGHT_2 _userInfo="SegmentConfig">2</WEIGHT_2> <WEIGHT_3 _userInfo="SegmentConfig">3</WEIGHT_3> <WEIGHT_4 _userInfo="SegmentConfig">4</WEIGHT_4> <WEIGHT_5 _userInfo="SegmentConfig">5</WEIGHT_5> </CXTAL> </CHANNEL> <OPERATIONATTRIBUTES _userInfo="Structure" OPERATIONATTRIBUTES_ID="0"> <L1ZSUPPRESSION _userInfo="SingleConfig">14</L1ZSUPPRESSION> <L2ZSUPPRESSION _userInfo="SingleConfig">13</L2ZSUPPRESSION> <INPUTEVENTSIZE _userInfo="SingleConfig">12</INPUTEVENTSIZE> <DATATIMEOUT _userInfo="SingleConfig">11</DATATIMEOUT> <SREADOUTTIMEOUT _userInfo="SingleConfig">10</SREADOUTTIMEOUT> <TCCTIMEOUT _userInfo="SingleConfig">10</TCCTIMEOUT> etc </OPERATIONATTRIBUTES> <CompositeItem name="OPERATIONMODE" addrIncrement="HAL_NO_INCREMENT" > <SegmentedBlock length="1"> <BitsSegment name="SREADOUT" width="1" position="0" /> <BitsSegment name="ZSUPPRESSION" width="1" position="1" /> <BitsSegment name="DAQMODE" width="1" position="2" /> <BitsSegment name="WEIGHTSMODE" width="1" position="3" /> <BitsSegment name="TTSINTERFACE" width="1" position="4" /> <BitsSegment name="TEST" width="1" position="5" /> <BitsSegment name="INPUTHANDLERERRCHECK" width="1" position="6" /> </SegmentedBlock> </CompositeItem> <CompositeItem name="CXTALWEIGHTS“ addrIncrement="HAL_NO_INCREMENT" > <SegmentedBlock length="150"> <BitsSegment name="WEIGHT" width="12“ position="0"/> </SegmentedBlock> </CompositeItem> <SingleItem name="L1ZSUPPRESSION" /> OPERATIONMODE CXTALWEIGHTS L1ZSUPPRESSION Single Words (SingleConfig)

  5. Structure of the Generic Device Configurator DCC Configurable Parameters file <DCC _userInfo="Module" DCC_ID="0"> <ADDRESS _userInfo="ModuleAddress" >0x0</ADDRESS> <OPERATIONMODE _userInfo="Structure" OPERATIONMODE_ID="0"> <SREADOUT_0 _userInfo="SegmentConfig">0</SREADOUT_0> <ZSUPPRESSION_0 _userInfo="SegmentConfig">0</ZSUPPRESSION_0> <DAQMODE_0 _userInfo="SegmentConfig">0</DAQMODE_0> <WEIGHTSMODE_0 _userInfo="SegmentConfig">0</WEIGHTSMODE_0> <TTSINTERFACE_0 _userInfo="SegmentConfig">1</TTSINTERFACE_0> <TEST_0 _userInfo="SegmentConfig">1</TEST_0> <INPUTHANDLERERRCHECK_0 _userInfo="SegmentConfig">0</INPUTHANDLERERRCHECK_0> </OPERATIONMODE> <CHANNEL _userInfo="Module" CHANNEL_ID="0"> <ADDRESS _userInfo="ModuleAddress" >0x1084</ADDRESS> <CXTAL _userInfo="Structure" CXTAL_ID="0"> <WEIGHTFACTOR>1</WEIGHTFACTOR> <WEIGHT_0 _userInfo="SegmentConfig">0</WEIGHT_0> <WEIGHT_1 _userInfo="SegmentConfig">1</WEIGHT_1> <WEIGHT_2 _userInfo="SegmentConfig">2</WEIGHT_2> <WEIGHT_3 _userInfo="SegmentConfig">3</WEIGHT_3> <WEIGHT_4 _userInfo="SegmentConfig">4</WEIGHT_4> <WEIGHT_5 _userInfo="SegmentConfig">5</WEIGHT_5> </CXTAL> </CHANNEL> <OPERATIONATTRIBUTES _userInfo="Structure" OPERATIONATTRIBUTES_ID="0"> <L1ZSUPPRESSION _userInfo="SingleConfig">14</L1ZSUPPRESSION> <L2ZSUPPRESSION _userInfo="SingleConfig">13</L2ZSUPPRESSION> <INPUTEVENTSIZE _userInfo="SingleConfig">12</INPUTEVENTSIZE> <DATATIMEOUT _userInfo="SingleConfig">11</DATATIMEOUT> <SREADOUTTIMEOUT _userInfo="SingleConfig">10</SREADOUTTIMEOUT> <TCCTIMEOUT _userInfo="SingleConfig">10</TCCTIMEOUT> etc </OPERATIONATTRIBUTES> </DCC>

  6. Generic Concepts : Module • Is an entity that characterizes the address access to the Registers • Ex: • 0x00101100 : will address RegA for Channel 1 of Device1 • 0x00104100 : will address RegA for Channel 4 of Device1 • This approach is very useful when you have identical functional hardware blocks with the same registers: • Only one definition of the register is needed independent of the number of modules in which the register appears • In the simplest case we have only one module entity the DEVICE Module Module Module DEVICE ID=1 Module Channel ID=1 RegA Reg1 Reg2 Reg3 Reg1 Reg2 Reg3 RegA RegB RegC RegA RegE RegF Reg4 Reg5 Reg6 Reg1 Reg2 Reg3 Reg1 Reg2 Reg3 RegB RegE RegF RegG RegA RegB RegC Reg4 Reg5 Reg6 Reg7 Reg8 ex. module TCC  sub-modules SLB

  7. Generic Concepts :Structure Structure :This is a more high level conceptual entity... It can be considered as a Configurable Container, we can also have structures of structures (Ex. A Tower structure is a structure of Cxtal structures) Module Device SegmentConfigA_4 SingleConfigA SingleConfigB AddOfset Struct Struct1 Struct2 SegmentConfigA_1 SegmentConfigA_2 SingleConfigC SegmentConfigA_3

  8. The DCC Example < DCC _userInfo=“Module” DCC_ID=1> <ADDRESS _userInfo=“ModuleAddress”>0x0</ADDRESS> <OPERATIONMODE _userInfo= “SingleConfig”>2</ACTIVECHANNEL > ... <CHANNEL _userInfo=“Module” Channel_ID=1> <ADDRESS _userinfo=“ModuleAddress”>0x0</ADDRESS> <CXTAL _userInfo=“Stucture” CXTAL_ID=1> <WEIGHTFACTOR _userInfo=“Factor”>1</WEIGHTFACTOR> <CHANNELWEIGHTS_1 _userInfo=“SegmentConfig” >2</CHANNELWEIGHTS _1> ... <CHANNELWEIGHTS_10 _userInfo=“SegmentConfig” >3</CHANNELWEIGHTS_10> </CXTAL> ... <CXTAL _userInfo=“Stucture” CXTAL_ID=25> <WEIGHTFACTOR _userInfo=“Factor”>1</WEIGHTFACTOR> <CHANNELWEIGHTS_241 _userInfo=“SegmentConfig” >2</ CHANNELWEIGHTS _241> ... < CHANNELWEIGHTS_250 _userInfo=“SegmentConfig” >3</ CHANNELWEIGHTS_250> </CXTAL> </CHANNEL> ... <CHANNEL _userInfo=“Module” CHANNEL_ID=68> ... </CHANNEL> </DCC> DCC ID=1 CHANNEL ID=1 ... CHANNEL ID=68 ADDRESS OPERATIONMODE ... CXTAL ID=1 ... CXTAL ID=25 ADRESS WEIGHTFACTOR CHANNELWEIGHTS_1 CHANNELWEIGHTS_10 ...

  9. Update/retrieve (configuration) data: ItemBuilder Model // Object creation: CompositeItem * operationMode = itemBuilder->buildCompositeItem(“OPERATIONMODE”); for ( ulong position = 0; position < 1; position++ ) { operationMode->setDataSegment(“SREADOUT”, position, value); } // The data content of the operationMode CompositeItem can be transferred into/from the hardware // with the methods write/read (with block transfer of single access): operationMode->write(); Configuration Model DCC * _device->loadConfiguration(CONFIGURATION_FILE); // XML Config or DB through a DOM Tree DeviceStatus _deviceStatus = _device->configure(); // configure() is a method from class ECALDevice (DCC driver) if ( _deviceStatus == ECALDEVICE::ECAL_IDLE) { // Check configuration pair<DeviceStatus, pair<bool,string> > checkConfigResult = _device->checkConfiguration(); if ( !checkConfigResult.second.first ) { throw DCCException(checkConfigResult.second.second); } cout << "*... Configuration Succesful " << endl; cout << checkConfigResult.second.second << endl; \\ To display on the screen the configurable values }

  10. Documentation http://ecal-od-software.web.cern.ch/ecal-od-software/ http://cmsdoc.cern.ch/~nalmeida/start/gconfig.htm (to get the code) A Software Package for the Configuration of Hardware Devices Following a Generic Model. CMS NOTE-2004/014, Computer Physics Communications 163 (2004) 41-52. • Presentations in meetings: • Software: • CMS Week 12-06-02(N. Almeida) ppt

More Related