PET Fundamentals: Electronics (2) Wu, Jinyuan Fermilab Apr. 2011.

Slides:



Advertisements
Similar presentations
Signal Encoding Techniques
Advertisements

INPUT-OUTPUT ORGANIZATION
Digital Phase Follower -- Deserializer in Low-Cost FPGA
A Low-Power Wave Union TDC Implemented in FPGA
JLab High Resolution TDC Hall D Electronics Review (7/03) - Ed Jastrzembski.
11/24/2004EE 42 fall 2004 lecture 361 Lecture #36: Transmission lines Last lecture: –Transmission lines –Balanced and unbalanced –Propagation This lecture:
On-Chip Processing for the Wave Union TDC Implemented in FPGA
Digital Logic Circuits (Part 2) Computer Architecture Computer Architecture.
The 8085 Microprocessor Architecture
FREQUENCY SHIFT KEYING
Jan. 2009Jinyuan Wu & Tiehui Liu, Visualization of FTK & Tiny Triplet Finder Jinyuan Wu and Tiehui Liu Fermilab January 2010.
ADC and TDC Implemented Using FPGA
Improving Single Slope ADC and an Example Implemented in FPGA with 16
Reconfigurable Computing - Clocks John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western Australia.
Chapter 9 Memory Basics Henry Hexmoor1. 2 Memory Definitions  Memory ─ A collection of storage cells together with the necessary circuits to transfer.
Lecture 8: Clock Distribution, PLL & DLL
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Transmitting digital signals How do we encode digital signals for transmission? How can we interpret those signals?
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Chapter 4 Digital Transmission.
Multichannel Analyzers A multichannel pulse-height analyzer (MCA) consists of an ADC, a histogramming memory, and a visual display of the histogram recorded.
Configuration. Mirjana Stojanovic Process of loading bitstream of a design into the configuration memory. Bitstream is the transmission.
IT-101 Section 001 Lecture #15 Introduction to Information Technology.
Data transmission refers to the movement of data in form of bits between two or more digital devices. This transfer of data takes place via some form.
INPUT-OUTPUT ORGANIZATION
Time Division Multiplexing School of Physics and Astronomy Department of Particle Physics Elissavet Papadima 29/5/2014.
Low Cost TDC Using FPGA Logic Cell Delay Jinyuan Wu, Z. Shi For CKM Collaboration Jan
May. 2009, Wu Jinyuan, Fermilab IEEE RT09 Short Course 1 FPGA Structure, Programming Principals and Applications: Part II Wu, Jinyuan.
U niversity of S cience and T echnology of C hina Design for Distributed Scheme of WCDA Readout Electronics CAO Zhe University of Science and Technology.
Chapter 6. Signal Encoding Techniques
Review: The application layer. –Network Applications see the network as the abstract provided by the transport layer: Logical full mesh among network end-points.
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Sub- Nyquist Sampling System Hardware Implementation System Architecture Group – Shai & Yaron Data Transfer, System Integration and Debug Environment Part.
TOF Electronics Qi An Fast Electronics Lab, USTC Sept. 16~17, 2002.
© H. Heck 2008Section 4.41 Module 4:Metrics & Methodology Topic 4: Recovered Clock Timing OGI EE564 Howard Heck.
Hardware Design of High Speed Switch Fabric IC. Overall Architecture.
The GANDALF Multi-Channel Time-to-Digital Converter (TDC)  GANDALF module  TDC concepts  TDC implementation in the FPGA  measurements.
TDC and ADC Implemented Using FPGA
MiniBoone Detector: Digitization at Feed Through Student: John Odeghe ; SC State, Fermi Lab Intern Supervisor: JinYuan Wu; Fermi Lab 1.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals with PLD Programming.
Leo Greiner IPHC meeting HFT PIXEL DAQ Prototype Testing.
K.C.RAVINDRAN,GRAPES-3 EXPERIMENT,OOTY 1 Development of fast electronics for the GRAPES-3 experiment at Ooty K.C. RAVINDRAN On Behalf of GRAPES-3 Collaboration.
Resource Awareness FPGA Design Practices for Reconfigurable Computing: Principles and Examples Wu, Jinyuan Fermilab, PPD/EED April 2007.
TDC for SeaQuest Wu, Jinyuan Fermilab Jan Jan. 2011, Wu Jinyuan, Fermilab TDC for SeaQuest 2 Introduction on FPGA TDC There are.
September 8-14, th Workshop on Electronics for LHC1 Channel Control ASIC for the CMS Hadron Calorimeter Front End Readout Module Ray Yarema, Alan.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
British Computer Society (BCS)
A Front End and Readout System for PET Overview: –Requirements –Block Diagram –Details William W. Moses Lawrence Berkeley National Laboratory Department.
Interrupts, Buses Chapter 6.2.5, Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.
1 ELE5 COMMUNICATIONS SYSTEMS REVISION NOTES. 2 Generalised System.
A Novel Digitization Scheme with FPGA-based TDC for Beam Loss Monitors Operating at Cryogenic Temperature Wu, Jinyuan, Arden Warner Fermilab Oct
Mar. 12, 2009Wu, Jinyuan Fermilab1 Several Topics on TDC and the Wave Union TDC implemented in FPGA Wu, Jinyuan Fermilab LBNL, Mar.
FPGA firmware of DC5 FEE. Outline List of issue Data loss issue Command error issue (DCM to FEM) Command lost issue (PC with USB connection to GANDALF)
Floyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd © 2008 Pearson Education Chapter 1.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
Status and Plans for Xilinx Development
Digitization at Feed Through R&D (2) Digitizer Performance Evaluation Student: John Odeghe ; SC State, Fermi Lab Intern Supervisor: JinYuan Wu; Fermi Lab.
Digitization at Feed Through Wu, Jinyuan Fermilab Feb
June 2009, Wu Jinyuan, Fermilab MicroBooNe Design Review 1 Some Data Reduction Schemes for MicroBooNe Wu, Jinyuan Fermilab June, 2009.
Data Reduction Schemes for MicroBoone Wu, Jinyuan Fermilab.
TDC and ADC Implemented Using FPGA
Wu, Jinyuan Fermilab May. 2014
Serial Communications
End OF Column Circuits – Design Review
EKT124 Digital Electronics 1 Introduction to Digital Electronics
REGISTER TRANSFER LANGUAGE (RTL)
EI205 Lecture 8 Dianguang Ma Fall 2008.
Digital Fundamentals Floyd Chapter 1 Digital concepts Tenth Edition
Serial Communication Interface: Using 8251
Digital Fundamentals Floyd Chapter 1 Tenth Edition
Serial Communications
Presentation transcript:

PET Fundamentals: Electronics (2) Wu, Jinyuan Fermilab Apr. 2011

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 2 Introduction Clock Distribution. Timing Reference. Coincidence Trigger. Serial Communication

Common Clock Distribution Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 3

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 4 Common Clock Distribution Frontend modules have their own crystal oscillators: (X). The frequencies of the oscillators may be slightly different. The relative phases in different module change with time. Usually, a common clock is generated and sent to all modules. Frequency: same. Phase: may still have limited drift. Frontend Module Common Clock Module X Frontend Module X Frontend Module X

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 5 Phase Lock Loop (PLL) The phase lock loop (PLL) circuit is a common building block. It can be an IC chip or a functional block inside an FPGA. The PLL recreate clock signals with phases lock to the input clock. The PLL may create clocks with frequency f = (n/m)*f_input. (Therefore, one can distribute slower clock and create faster clock.) The outputs of PLL may have small phase shift. The PLL in today’s FPGA usually allows users to switch clock sources between the local crystal or external clock from the common clock module. Common Clock Module FPGA TDC PLL

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 6 The First Clock Cycle? Reset Signal The phase lock loop (PLL) circuit creates a clock signal with locked phase. But which clock cycle is the first cycle is still to be defined. One method to provide the first clock cyclone information is to send a RESET signal using another cable. A time stamp counter is reset and the subsequent clock cycles are indicated by the counter. This scheme needs two critical timing cables: one for clock and the other for RESET. x RESET Time Stamp Counter 01 2

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 7 Sending Clock and Reset in the Same Cable A wide-narrow pulse sequence is generated in the normal clock train. The pulse train is DC balanced. The receiving circuit detects the pulse sequence and generate a reset signal. The time stamp counter is reset and the subsequent clock cycles are indicated by the counter. The scheme uses only one critical timing cable. A possible receiving circuit is given in the backup slides. The scheme is a special case given in next slide. x RESET Time Stamp Counter x0 1

The Clock-Command Combined Carrier Coding (C5) A data train contains 5 pulses and each pulse is transmitted in four unit time intervals, usually in four internal clock cycles at frequency f. Information is carried with wide, normal and narrow pulses and the first pulse is always wide or narrow. When not transmitting data, all pulses have normal width. The data stream is DC balanced over 5 pulses suitable for AC coupled transmission. All leading edges are evenly spread so that the pulse train can be used directly drive the receiver side logic or PLL. Apr. 2011, Wu Jinyuan, Fermilab 8 PET Fundamentals: Electronics (2)

Common Timing Reference Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 9

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 10 Common Timing: A Cross Check The phase of PLL may drift ( ps) as temperature changes. When high precision measurement is required, the drift must be detected. One may use an additional TDC to ensure a possible phase drift is known. FPGA TDC Common Timing Module Common Clock Module FPGA TDC PLL

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 11 Common Single Pulse and Common Burst Traditionally, common start or common stop signals are single pulses. Single common pulse increase timing error by sqrt(2). Using the average time of a common burst provides finer timing precision. TDC -  - - -

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 12 Good and Reliable Cable? The propagation delays in cables may change as temperature changes. In applications with high timing precision, is necessary to compensate temperature effect of the cables. See next slide for mean timing scheme. FPGA TDC Common Timing Module PLL ? ? ? ?

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 13 The Mean Timing Scheme TR TL RARBRCRD The mean times are identical as long as: T AB = T BA, T BC = T CB, etc. In most cases, signals traveling left and right have the same speed. The timing relationship between mean times on different module won’t change with temperature. Identical time can be established on all modules using mean timing scheme. Time to RATime to RBTime to RC Signal From LeftT L +T LA T L +T LA +T AB T L +T LA +T AB +T BC Signal From RightT R +T RC +T CB +T BA T R +T RC +T CB T R +T RC Mean Times:½(T L +T LA +T R +T RC +T CB +T BA ) ½(T L +T LA +T AB +T R +T RC +T CB ) ½(T L +T LA +T AB +T BC +T R +T RC )

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 14 The NIM Clip Wire for Mean Timing The coaxial cable is shorten at the far end. A NIM transition propagates from driver and reflect back with polarity reversal. The times of the leading and the trailing edges at different receivers are different. But the mean times are identical. Note: Terminate 50 Ohms at the driver end.

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 15 The Analog Mean Timer After the first transition arrives, the integrator is charged with 1 unit current I. After the returning transition, the charging current is 2*I. The output flips after a constant delay from the mean time. Analog noise etc. affects timing precision.

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 16 The Digital Mean Timing Scheme TR TL RARBRCRD TDC -  The left and right end drivers are alternatively enabled and drive pulses to travel from left or right end. The receivers on each TDC FPGA receive the pulses each delayed from left and right path. The arrival times at different TDC modules are different, but the mean times of the pulses are the same. No requirement of using high quality cable. TDC -  - - -

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 17 The Digital Mean Timing with Multi Pulses TR TL RARBRCRD TDC -  The mean timing burst has 8 pulses and the left and right end drivers are alternatively enabled and drive pulses to travel from left or right end. The receivers on each TDC FPGA receive the burst with 4 pulses each delayed from left and right path. The arrival times at different TDC modules are different, but the mean times of the 8 pulses as indicated with the red dots are the same. Better timing precision is anticipated due to averaging of multiple measurements. TDC -  - - -

Coincidence Trigger (Trigger ~ Data Selection) Oct. 2010, Wu Jinyuan, Fermilab Conventional & Unconventional Applications of FPGA 18 Apr. 2011, Wu Jinyuan, Fermilab 18 PET Fundamentals: Electronics (2)

Coincidence in PET Positrons and electrons annihilate to produce pairs of photons. The back- to-back photons hit the detector at nearly the same time. The data are selected only when both hits are detected. Apr. 2011, Wu Jinyuan, Fermilab 19 PET Fundamentals: Electronics (2)

Sectioning in Space Domain Detector may be sectioned in space to reduce data volume. Fake coincidence can be avoided with appropriate sectioning. Apr. 2011, Wu Jinyuan, Fermilab 20 PET Fundamentals: Electronics (2) F E D 8 C B A 9

Boundary Effect If coincidence is searched only between opposite sections, some valid hits will be lost. Artificial image brightness variation may be generated. Apr. 2011, Wu Jinyuan, Fermilab 21 PET Fundamentals: Electronics (2) F E D 8 C B A 9

Boundary Coverage Coincidence is searched between opposite -1, +0 and +1 sections to include all valid hits. Reduce bias as much as possible. Apr. 2011, Wu Jinyuan, Fermilab 22 PET Fundamentals: Electronics (2) F E D 8 C B A 9

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 23 Avoiding Duplicated Coincidence Pairs If two hits A & B exist within time window and opposite +-1 sectors from each other, they will be found twice, i.e., (A,B) and (B,A) when A and B are used as “seed”, respectively. To eliminate duplicated pairs, only hits on the sections 0-8 of the detector are used as seed.  This way, pairs will only be found once.  For seeds in section 7 and 8, some combinations are denoted as invalid using “<>” to avoid duplicate coincidence F E D 8 C B A 9 Seeds in SectorOpposite -1OppositeOpposite A 29AB 3ABC 4BCD 5CDE 6DEF 7EF 8F

Timing Window The timing window can not be too narrow or it may cause artificial image brightness variation. The timing window can not be too wide either since it may bring in fake coincidence. Apr. 2011, Wu Jinyuan, Fermilab 24 PET Fundamentals: Electronics (2) F E D 8 C B A 9

Analog Method of Timing Adjustment Coincidence Logic Apr. 2011, Wu Jinyuan, Fermilab 25 PET Fundamentals: Electronics (2)

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 26 The Full Data Coincidence Approach (From Talk by Bill Mosses)

Complexity of Doublet Matching Detector hits are digitized and hits at nearly the same time are to be matched together. The process takes O(n^2) clock cycles. For example, if there 1000 hits in Group 1 and 3000 hits in Group 2, there are 3,000,000 combinations to check. T D T D Group 1 Group 2 -  T<A?  T>(-A)? Apr. 2011, Wu Jinyuan, Fermilab 27 PET Fundamentals: Electronics (2)

Identifying Time Coincidences Break Time Into Slices (100–250 ns / slice) Search for Singles Within  t max (4–12 ns) in Each Slice Greatly Reduces Combinatory Break Time Into Slices (100–250 ns / slice) Search for Singles Within  t max (4–12 ns) in Each Slice Greatly Reduces Combinatory Time Slice 1Slice 2Slice 3Slice 4Slice 5Slice 6 Single  t max Coincidence Single Coincidence Single Coincidence Single Coincidence Coincidence ? Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 28 (From Talk by Bill Mosses, Search “OpenPET”)

Slicing Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 29 Take the same example of 1000 hits in Group 1 and 3000 hits in Group 2. Total number of combinations reduces as the time slice becomes finer. Group 1 Hits/slice Group 2 Hits/slice CombinationsReduction Total *3000=3,000, slices100300(100*300)*10=300,0001/ slices1030(10*30)*100=30,0001/ slices~1~3(1*3)*1000=3,0001/1000

Hash Sorter: Slicing Finer and Finer K K D K D Pass 1:  Data in Group 1 are stored in the hash sorter bins based on key number K. Pass 2:  Data in Group 2 are fetched though and paired up with corresponding Group 1 data with same key number K. Group 1 Group 2 The entire pairing process takes 2n clock cycles, rather than n 2 clock cycles. Apr. 2011, Wu Jinyuan, Fermilab 30 PET Fundamentals: Electronics (2)

Data Communication Options Oct. 2010, Wu Jinyuan, Fermilab Conventional & Unconventional Applications of FPGA 31 Apr. 2011, Wu Jinyuan, Fermilab 31 PET Fundamentals: Electronics (2)

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 32 Data Communication Communications Between:  Functional blocks inside an FPGA.  Chips on a printed circuit board.  Boards in a crate.  Boards in different crates. Timing and Framing Scheme:  Serial Link: Timing and data are carried in the same physical channel.  Parallel Bus: Timing and data are carried in different physical channels. Physical Format:  Single ended: TTL, CMOS, NIM  Differential: LVDS, (ECL), PECL, LVPECL  Optical

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 33 Serial Communication: Commercial Chips Parallel 16 bits data at 75 to 125 MHz Serial port at 1.5 to 2.5 GBPS.

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 34 Serial Communication: Dedicated High-Speed Transceivers inside FPGA Parallel data interfacing internally in FPGA Serial port up to GBPS for external communications. Limited number of ports  Higher cost 

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 35 8B/10B Standard Parallel 8-bit input data are broken into 3-bit + 5-bit sections. Conversions 3b/4b and 5b/6b are performed to create 10-bit data. The 10-bit data are DC balanced so that it can be transmitted communication channels with AC coupling (such as transformer) and optical fibers. Most of bit sequence has <5 continuous 0’s or 1’s. Bit sequences , or in the “comma symbols” K28.1, K28.5 and K28.7 are used for synchronization.

Classical Picture of Serial Communications The parallel data is converted to serial bits driven by crystal oscillator X1 in the transmitter device. The serial data stream is used to generate a recovered clock at the receiver device with a phase lock loop (PLL). The recovered clock is used to drive the serial-to-parallel converter and store the data into a first-in-first-out (FIFO) buffer. The FIFO buffer is used to transfer data from the recovered clock domain to the local clock domain generated by crystal oscillator X2. Parallel -to-Serial Converter FIFO Serial-to -Parallel Converter PLL X1X2 Local Logic Recovered Clock Apr. 2011, Wu Jinyuan, Fermilab 36 PET Fundamentals: Electronics (2)

Serial Data Receiving Without PLL etc. Generating recovered clock with PLL, VCO, VCXO etc. is an analog process and it is not convenient to generate in an FPGA, especially for applications with multiple receiving channels. There are pure digital methods to receive the serial data.  Digital Phase Follower: 1bit/CLK  The Two-Cycle Serial IO: 1bit/(2CLK)  FM Encoder and Decoder: 1bit/(2-16CLK)  Clock-Command Combined Carrier Coding (C5): 4bits/(20CLK) The transmitter and receiver can be driven by two independent free running crystal oscillators. Parallel -to-Serial Converter Digital Serial-to -Parallel Converter X1X2 Local Logic See Backup Slides Apr. 2011, Wu Jinyuan, Fermilab 37 PET Fundamentals: Electronics (2)

Digital Phase Follower The input data rate is 1bit/clock cycle. Four clock phases, c0, c90, c180 and c270 are used to detect input transition edge. The phase for data sample follows the variation of the transition edge. Apr. 2011, Wu Jinyuan, Fermilab 38 PET Fundamentals: Electronics (2)

The Two-Cycle Serial IO This scheme is slower than digital phase follower but the logic is simpler. The CLK1 and CLK2 can be generated with two free running crystal oscillators. CLK1 Data Out Transmitter Receiver start bit = 1 b15b14b15 start bit = 1 Xb14X CLK2 Data In One data bit is transmitted every 2 clock cycles. A logic transition is detected between these two falling edges. Input data are stable at these clock edges. Apr. 2011, Wu Jinyuan, Fermilab 39 PET Fundamentals: Electronics (2)

The FM coding A bit is transmitted in two unit time intervals, usually in two internal clock cycles at frequency f. For bit=1, the output toggles each cycle, i.e., with frequency (f/2) and for bit=0, the output toggles every two cycles, i.e., with frequency (f/4). When not transmitting data, the output toggles at frequency (f/4), until seeing the start bit. The data stream is naturally DC balanced suitable for AC coupled transmission. The polarity of the interconnection doesn’t matter. 0start bit = Apr. 2011, Wu Jinyuan, Fermilab 40 PET Fundamentals: Electronics (2)

The Clock-Command Combined Carrier Coding (C5) A data train contains 5 pulses and each pulse is transmitted in four unit time intervals, usually in four internal clock cycles at frequency f. Information is carried with wide, normal and narrow pulses and the first pulse is always wide or narrow. When not transmitting data, all pulses have normal width. The data stream is DC balanced over 5 pulses suitable for AC coupled transmission. All leading edges are evenly spread so that the pulse train can be used directly drive the receiver side logic or PLL. Apr. 2011, Wu Jinyuan, Fermilab 41 PET Fundamentals: Electronics (2)

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 42 Conclusion Clock Timing Trigger Serial Communication

The End Thanks

Doublet Finding in Trigger System Oct. 2010, Wu Jinyuan, Fermilab Conventional & Unconventional Applications of FPGA 44 Disc Edge Detecting Delay Pulse Stretch Coincidence Logic DiscDelay Pulse Stretch Sampling Edge Detecting Sampling Apr. 2011, Wu Jinyuan, Fermilab 44 PET Fundamentals: Electronics (2)

Hit Matching SoftwareFPGA Typical FPGA Resource Saving Approaches O(n 2 ) for(){ for(){…} } O(n)*O(N) Comparator Array Hash Sorter O(n)*O(N): in RAM O(n 3 ) for(){ for(){…} } O(n)*O(N 2 ) CAM, Hugh Trans. Tiny Triplet Finder O(n)*O(N*logN) O(n 4 ) for(){ for(){ for() {…} }}} Apr. 2011, Wu Jinyuan, Fermilab 45 PET Fundamentals: Electronics (2)

The Clock-Command Combined Carrier Coding (C5) A data train contains 5 pulses and each pulse is transmitted in four unit time intervals, usually in four internal clock cycles at frequency f. Information is carried with wide, normal and narrow pulses and the first pulse is always wide or narrow. When not transmitting data, all pulses have normal width. The data stream is DC balanced over 5 pulses suitable for AC coupled transmission. All leading edges are evenly spread so that the pulse train can be used directly drive the receiver side logic or PLL. Apr. 2011, Wu Jinyuan, Fermilab 46 PET Fundamentals: Electronics (2)

Schematics of C5 Decoder Data Rate: 36ns/bit or 27.7Mbits/s Internal clock: 111MHz Apr. 2011, Wu Jinyuan, Fermilab 47 PET Fundamentals: Electronics (2)

DINDOUT Index RAM Pointer RAM DATA RAM K Link List Structure of Hash Sorter Apr. 2011, Wu Jinyuan, Fermilab 48 PET Fundamentals: Electronics (2)

Hash Sorter K Using hash sorter, matching pairs can be grouped together using 2n, rather than n 2 clock cycles. Apr. 2011, Wu Jinyuan, Fermilab 49 PET Fundamentals: Electronics (2)

Delay Line Based TDC Architectures HIT CLK HIT CLK HIT CLKHIT CLK Delay HitDelay CLKDelay Both CLK is used as clock HIT is used as clock Only this architecture needs dual coarse time counters. Apr. 2011, Wu Jinyuan, Fermilab 50 PET Fundamentals: Electronics (2)

Digital Phase Follower The input data rate is 1bit/clock cycle. Four clock phases, c0, c90, c180 and c270 are used to detect input transition edge. The phase for data sample follows the variation of the transition edge. Apr. 2011, Wu Jinyuan, Fermilab 51 PET Fundamentals: Electronics (2)

Schematics of Digital Phase Follower CLK: 375MHz Data Rate: 375Mbits/s Apr. 2011, Wu Jinyuan, Fermilab 52 PET Fundamentals: Electronics (2)

The Two-Cycle Serial IO This scheme is slower than digital phase follower but the logic is simpler. The CLK1 and CLK2 can be generated with two free running crystal oscillators. CLK1 Data Out Transmitter Receiver start bit = 1 b15b14b15 start bit = 1 Xb14X CLK2 Data In One data bit is transmitted every 2 clock cycles. A logic transition is detected between these two falling edges. Input data are stable at these clock edges. Apr. 2011, Wu Jinyuan, Fermilab 53 PET Fundamentals: Electronics (2)

Schematics of the Two-Cycle Serial IO CLK: 200MHz Data Rate: 100Mbits/s Apr. 2011, Wu Jinyuan, Fermilab 54 PET Fundamentals: Electronics (2)

The FM coding A bit is transmitted in two unit time intervals, usually in two internal clock cycles at frequency f. For bit=1, the output toggles each cycle, i.e., with frequency (f/2) and for bit=0, the output toggles every two cycles, i.e., with frequency (f/4). When not transmitting data, the output toggles at frequency (f/4), until seeing the start bit. The data stream is naturally DC balanced suitable for AC coupled transmission. The polarity of the interconnection doesn’t matter. 0start bit = Apr. 2011, Wu Jinyuan, Fermilab 55 PET Fundamentals: Electronics (2)

Schematics of FM Decoder CLK: 212MHz Data Rate: 26.5Mbits/s The ratio 8 CLK cycles/bit in this design is not an intrinsic limit. Apr. 2011, Wu Jinyuan, Fermilab 56 PET Fundamentals: Electronics (2)

Schematics of C5 Decoder Data Rate: 36ns/bit or 27.7Mbits/s Internal clock: 111MHz Apr. 2011, Wu Jinyuan, Fermilab 57 PET Fundamentals: Electronics (2)

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 58 Measurement Result for Wave Union TDC A Histogram Raw TDC + LUT 53 MHz Separate Crystal -- Wave Union Histogram Plain TDC:  delta t RMS width: 40 ps.  25 ps single hit. Wave Union TDC A:  delta t RMS width: 25 ps.  17 ps single hit.

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 59 Digital Calibration Using Twice-Recording Method IN CLK Use longer delay line. Some signals may be registered twice at two consecutive clock edges. N 2 -N 1 =(1/f)/  t The two measurements can be used:  to calibrate the delay.  to reduce digitization errors. 1/f: Clock Period  t: Average Bin Width

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 60 Digital Calibration Result Power supply voltage changes from 2.5 V to 1.8 V, (about the same as 100 o C to 0 o C). Delay speed changes by 30%. The difference of the two TDC numbers reflects delay speed. N2N2 N1N1 Corrected Time Warning: the calibration is based on average bin width, not bin-by-bin widths.

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 61 Weighted Averages The weighted average is a special case of inner product. Multipliers are usually needed. y1y1 y2y2 y3y3 y4y4 y5y5 y6y6 y7y7 c1c1 c2c2 c3c3 c4c4 c5c5 c6c6 c7c7 d1d1 d2d2 d3d3 d4d4 d5d5 d6d6 d7d7 e1e1 e2e2 e3e3 e4e4 e5e5 e6e6 e7e7 X  X  X 

Apr. 2011, Wu Jinyuan, Fermilab PET Fundamentals: Electronics (2) 62 Exponentially Weighted Average No multipliers are needed. The average is available at any time. It can be used to track pedestal of the input signals. s[n]=s[n-1]+(x[n]-s[n-1])/N N=2, 4, 8, 16, 32, … + s[n-1] x[n] - s[n] 1/2 K

Parameters in Coincidence Finding Apr. 2011, Wu Jinyuan, Fermilab 63 PET Fundamentals: Electronics (2)

Digital Coincidence Finding Disc Edge Detecting Delay Pulse Stretch Coincidence Logic DiscDelay Pulse Stretch Sampling Edge Detecting Sampling Apr. 2011, Wu Jinyuan, Fermilab 64 PET Fundamentals: Electronics (2)

Some Details Disc Edge Detecting Delay Pulse Stretch Sampling Apr. 2011, Wu Jinyuan, Fermilab 65 PET Fundamentals: Electronics (2)