1 / 34

SciFi Decoding (Everything you never wanted to know but couldn’t avoid going over and over)

SciFi Decoding (Everything you never wanted to know but couldn’t avoid going over and over). VLSB Data (unpacking to AFE, MCM, Chan) VLPC Cassette (AFE, MCM, Chan -> Module, Channel) External Waveguide (Module, Channel -> Patch Panel channel)

badrani
Télécharger la présentation

SciFi Decoding (Everything you never wanted to know but couldn’t avoid going over and over)

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. SciFi Decoding(Everything you never wanted to know but couldn’t avoid going over and over) • VLSB Data (unpacking to AFE, MCM, Chan) • VLPC Cassette (AFE, MCM, Chan -> Module, Channel) • External Waveguide (Module, Channel -> Patch Panel channel) • Internal Waveguide (WG, Patch Panel Channel -> Station Connector, Channel) • Station (Station Connector, Channel -> Tracker, Station, Plane, Fibre) • Station 5 M. Ellis - 17th May 2007

  2. VLSB Data Unpacking • The VLSB boards read out one AFEIIT board each. • There are 4 LVDS links per board, each transferring data in parallel to a corresponding block of memory on the VLSB. • The 8 MCMs on an AFE board are grouped in pairs, and assuming the LVDS cables are attached correctly, then the connections are: • Memory Bank 0: MCMs 1 and 2 • Memory Bank 1: MCMs 3 and 4 • Memory Bank 2: MCMs 5 and 6 • Memory Bank 3: MCMs 7 and 8 • The data is readout as 32 bit words. • The 21 least significant bits of these words are the data that has been transferred over the LVDS. • The 2 ADC values (for each of the two MCMs) are packed into these 21 bit words. M. Ellis - 17th May 2007

  3. M. Ellis - 17th May 2007

  4. Code to unpack Data • Lives in G4MICE in the RealData area. • VlsbReadout2006.cc decodes the data taken with the current firmware. • Good events have header words that contain the number 237 in the position where ADCs should be on all 8 MCMs before the start of good data. • Once this is found, the data is presented in the form address, ADC, address, ADC. • The code to unpack the lower and upper ADC values (e.g. MCMs 1 and 2) is below: up = ( mod & 0x7f800 ) >> 11; low = ( mod & 0x1fe ) >> 1; M. Ellis - 17th May 2007

  5. ADC Values • In the current firmware the ADC values are grey encoded. • This means that once the values have been determined from the masking procedure on the previous slide, the grey encoding needs to be undone. • This is achieved with the following code: // graydecode routine taken from wikipedia entry on gray codes // http://en.wikipedia.org/wiki/Gray_code#Programming_algorithms unsigned int VlsbReadout2006::graydecode( unsigned int gray ) { unsigned int bin; for( bin = 0; gray; gray >>= 1 ) bin ^= gray; return bin; } M. Ellis - 17th May 2007

  6. Channel assignment • The data does not come off the AFE board in the order of channel numbering (i.e. 1 to 64). • Instead it comes off in the order: 63, 61, 59, 57, 55, 53, 52, 50, 48, 46, 44, 42, 40, 39, 37, 35, 34, 33, 36, 38, 41, 43, 45, 47, 49, 51, 54, 56, 58, 60, 62, 64, 1, 3, 5, 7, 9, 11, 14, 16, 18, 20, 22, 24, 27, 29, 32, 31, 30, 28, 26, 25, 23, 21, 19, 17, 15, 13, 12, 10, 8, 6, 4, 2 • Once the VlsbReadout2006 class has unpacked an event, the result will be 512 VlpcHit objects for each AFE board, each of which will have an AFE board number (recorded in the data file), an MCM and channel number and the ADC counts for that channel. M. Ellis - 17th May 2007

  7. Verification of this stage • The correctness of this code has been checked on a number of occasions by using the self injection mechanism of the TRIP-t chip. • The TRIP-t chip is programmed to inject charge onto one channel of each TRIP chip (16 per board) such that each TRIP (and hence each MCM) has charge on a different chip. • This has also been done simultaneously on a LHB and RHB such that all 32 TRIPs had signal on a different channel. • The data file produced was analysed and the Board ID, MCM and channel of all hits that were found to be well above pedestal was found to agree exactly with those channels that had charge injected onto them. • So I am confident that when the data is unpacked, the board, MCM, channel and ADC values are all correct. M. Ellis - 17th May 2007

  8. LVDS Links • In order to ensure that the LVDS links are connected correctly, the VLSB modules should be watched as the AFE boards are programmed. • As each of the DFPGAs on a board are programmed, the pair of red LEDs near the corresponding AFPGAs will light up. • When they do, the corresponding LED on the VLSB will change from Red to Green. • If the sequence of changing from Red to Green is correct, then the LVDS cables have been attached correctly. M. Ellis - 17th May 2007

  9. VLPC Cassette • A VLPC Cassette contains 1024 channels. • These are broken up into 8 128 channel modules. • Each cassette is readout by two AFEIIt boards (one Left Hand Board and one Right Hand Board). • The 128 channels of a given module are read out by one MCM of the LHB (64 channels) and one MCM of the RHB (the other 64 channels). • The VLPC cassette modules are numbered from 1 to 8, with 1 being that closest to the backplane and 8 being that farthest from the backplane. • The MCMs on a board are numbered 1 to 8, but the numbering with respect to the backplane depends on which side of the cassette the board is on. M. Ellis - 17th May 2007

  10. Module vs MCM Numbers BackPlane Left Hand Board Right Hand Board Mod 1 MCM 8 MCM 1 Mod 8 MCM 8 MCM 1 M. Ellis - 17th May 2007

  11. LHB & RHB -> VLPC Channel • The mapping between a given channel on a VLPC module connector (i.e. the fibre that takes the light to the VLPC) and the electronic channel (which channel on an MCM on a LHB or RHB) involves some internal transformations inside the cassette/AFE system. • This mapping is described in a D0 document in terms of the SVX channel number on a module. • The following slides will show the D0 numbering scheme, and how the readout order can be determined with respect to this scheme. M. Ellis - 17th May 2007

  12. D0 Warm End Connector • View from above, backplane in the background • Pin is on the backplane end of the connector. • First overlay shows the numbering assigned to the fibres that we will call the “D0 numbering scheme”. • Second overlay shows a sample of the SVX channel assignment to the same fibres. • Note that the SVX channel numbers are repeated on the Left and Right halfs of the cassette. 1 17 113 16 32 128 41 92 92 87 41 M. Ellis - 17th May 2007

  13. SVX Channel Assignments • We can now make a mapping between the fibre numbers defined on the previous slide (1-128) and these SVX channels for the LHB and RHB. • There is also a separate map showing the channel number on the MCM for each SVX channel (next slide...) M. Ellis - 17th May 2007

  14. 128 Way Connector -> SVX Channel -> MCM Channel M. Ellis - 17th May 2007

  15. 128 Way Warm End Connector • So it is now possible to take a hit on a known channel of a given MCM on a left or right hand board and determine which of the 128 fibres of a given module that corresponds to. • Example 1: LHB, MCM 2, Channel 10 • MCM 2 on a LHB is Module 2 on the Cassette. • Channel 10 on a LHB is SVX Channel 110 and is Fibre 43 on the warm end connector on the cassette. • Example 2: RHB, MCM 2, Channel 45 • MCM 2 on a RHB is Module 7 on the Cassette. • Channel 45 on a RHB is SVX Channel 47 and is Fibre 125 on the warm end connector on the cassette. • On the following slide, the module and fibre on that module are identified for these two examples. M. Ellis - 17th May 2007

  16. Warm End Connector Example 1 Module 2 Fibre 43 M. Ellis - 17th May 2007

  17. Warm End Connector Example 2 Module 7 Fibre 125 M. Ellis - 17th May 2007

  18. Implementation in G4MICE • The VlpcCableImperial class reads in two text files (readout-left and readout-right) which contain the mapping between channel on an MCM and the fibre number on the connector. • The AFEIIt versions are called: • readout-left.v2.txt • readout-right.v2.txt • These files list the MCM channel ID followed by the corresponding fibre number: TYPE = READOUT-LEFT VERSION = 12 May 2007 # MCM CHANNEL ID = HOLE ID OF EXTERNAL WAVEGUIDE @ READOUT-END 36 = 1 39 = 2 42 = 3 45 = 4 52 = 5 ... M. Ellis - 17th May 2007

  19. Verification of this stage • Other than by inspecting the documents from D0, the mapping from AFE channel to module and fibre number on the warm end connector has not been verified. • Perhaps it is worth taking LED data with most of the fibres masked off to check that this stage is correct? • We could pick 16 different channels and mask off all but two channels (one on each side of the cassette) on each of the 8 modules and take some LED data and then look to see that the MCM, channel and board numbers of the channels that show light match the fibre numbers that were exposed to the light according to these readout files. M. Ellis - 17th May 2007

  20. External Waveguide • The External and Internal Waveguides and Patch Panel connection have a numbering system that is internally consistent and which has been checked by the Osaka group as the waveguides are constructed. • The numbers assigned to the 128 fibres on the D0 warm end connector on the external waveguide are not the same as those already shown for the corresponding connector on the VLPC cassette. • It is necessary to make a translation from the fibre number on the VLPC cassette to the fibre number on the D0 end of the external waveguide. M. Ellis - 17th May 2007

  21. VLPC Cassette vs D0 Connector on WG M. Ellis - 17th May 2007

  22. 1 2 3 4 5 6 7 8 121 122 123 124 125 126 127 128 VLPC Cassette vs D0 Connector on WG Hole 1 113 16 128 Dowel M. Ellis - 17th May 2007

  23. 1 2 3 4 5 6 7 8 121 122 123 124 125 126 127 128 Patch Panel Connector • The Patch Panel connector has 128 fibres and the numbering scheme is identical to that on the 128 way D0 connector. • So fibre 1 on the D0 connector of the external waveguide is connected to fibre 1 of the patch panel connector on the same waveguide and so on: M. Ellis - 17th May 2007

  24. Internal Waveguide • The Patch Panel connector of the internal waveguide has 128 fibres. • The station connector side consists of 6 individual bundles of between 20 and 22 fibres. 1 1-20 2 21-42 3 1-128 43-64 4 65-86 5 87-108 6 109-128 M. Ellis - 17th May 2007

  25. Internal Waveguide Connections • The channels on the 128 way interface have the mapping shown below to each of the 6 station connectors. • The channel numbering on the station connector is also shown: Station Connector 1-1 1 - 20 1-2 1 - 22 1-3 1 - 22 1-4 1 - 22 1-5 1 - 22 1-6 1 - 20 M. Ellis - 17th May 2007

  26. Station Connections • The station connectors can in theory be attached to any of the station connectors on a station. • For station 5, the 5 waveguides’ station connectors were numbered from 1 to 30 and corresponding numbers were marked on the station: M. Ellis - 17th May 2007

  27. Station Connectors • Plane V used Station Connectors 1- 10 • Plane X used Station Connectors 11 – 20 • Plane W used Station Connectors 21 – 30 • The station connector numbering increased clockwise when the station is viewed as shown on the photo in the previous slide. M. Ellis - 17th May 2007

  28. Fibre Numbering • Each bundle of seven 350 mm fibres will be referred to as a “fibre”. • The detailed description of the mapping of the fibres from the plane to the station connector can be found here: • http://mice.iit.edu/modules/tracker/html/TrackerAssembly/QA/Visio-view-v.pdf • http://mice.iit.edu/modules/tracker/html/TrackerAssembly/QA/Visio-view-x.pdf • http://mice.iit.edu/modules/tracker/html/TrackerAssembly/QA/Visio-view-w.pdf M. Ellis - 17th May 2007

  29. M. Ellis - 17th May 2007

  30. M. Ellis - 17th May 2007

  31. M. Ellis - 17th May 2007

  32. Implementation in G4MICE • All of the connections that have been shown on the previous slide are described in another file that is used by the VlpcCableOsaka class: TYPE = WAVEGUIDE VERSION = 11 May 2007 # STATION FIBRE: station, view, fibre id = # STATION CONNECTOR: connector id, hole id = # INTERNAL WAVEGUIDE @ STATION: waveguide id, connector id, hole id = # INTERNAL WAVEGUIDE @ PATCH-PANEL: hole id = # EXTERNAL WAVEGUIDE @ PATCH-PANEL: waveguide id, hole id = # EXTERNAL WAVEGUIDE @ READOUT-END: hole id # station 5, view V 5 0 1 = 1 1 = 1 1 1 = 1 = 1 128 = 113 5 0 2 = 1 2 = 1 1 2 = 2 = 1 120 = 114 5 0 3 = 1 3 = 1 1 3 = 3 = 1 112 = 115 5 0 4 = 1 4 = 1 1 4 = 4 = 1 104 = 116 5 0 5 = 1 5 = 1 1 5 = 5 = 1 96 = 117 5 0 6 = 1 6 = 1 1 6 = 6 = 1 88 = 118 5 0 7 = 1 7 = 1 1 7 = 7 = 1 80 = 119

  33. Waveguide Connections • Another file is used to describe which external waveguide is connected to which module on a given VLPC cassette: TYPE = FIBRE-CASSETTE VERSION = 21 March 2007 # EXTERNAL WAVEGUIDE ID = CASSETTE ID, MODULE ID = AFE LEFT ID, AFE RIGHT ID 1 = 105 8 = 574264 574359 2 = 105 7 = 574264 574359 3 = 105 6 = 574264 574359 4 = 105 5 = 574264 574359 5 = 105 4 = 574264 574359 # eof M. Ellis - 17th May 2007

  34. Decoding Setup • A final text file is used to select which version of each of the previously described files should be used in combination to achieve the decoding: ### ### ### RO_RIGHT = readout-right.v2.txt RO_LEFT = readout-left.v2.txt CONNECTION = fibre2cassetteStation5.V3.txt FIBRE_MAP = cabling_station5test.V4.dat # eof M. Ellis - 17th May 2007

More Related