Final Year Project A CMOS imager with compact digital pixel sensor (BA1-08) Supervisor: Dr. Amine Bermak Group Members: Chang Kwok Hung Kwok Kam Kin Kwan Tsz Chun
Outline Aim of our project Introduction Pixel Sensor Huffman encoding system Control system Performance Q&A
Aims: ◦ To design a compact digital pixel sensor using effective compression scheme based on Different Pulse Code Modulation processing ◦ To implement Huffman encoding scheme in order to provide further compression on the differential signal output Aims of our project
Why is image compression important? Minimize storage size Minimize silicon area of the chip Speed enhancement
Aim of our project The advantages of a single chip imager: ◦ Low noise ◦ Low power consumption ◦ Total cost is low
Aim of our project Comparison between CDD and CMOS Imager CCDCMOS Power consumptionhigherlower Sizelargersmaller Image's qualityhigherlower Multiple functions on chipNoYes
Introduction Categories of CMOS Image Sensors ◦ Passive Pixel Sensor (PPS) ◦ Active Pixel Sensor (APS) ◦ Digital Pixel Sensor (DPS)
Introduction Passive Pixel Sensor (PPS) Column bus Row select 1.High Fill factor 2.Signal-to-noise ratio (SNR) is poor 3.Shared analog to digital convertor (ADC).
Introduction Active Pixel Sensor (APS) Column bus Row select Vdd Reset Simple amplifier 1.Signal amplifier is included 2.Larger SNR 3.Lower fill factor 4.Shared ADC
Introduction Digital Pixel Sensor (DPS) Vdd Reset Row select Column bus VrefADC 1.ADC is installed in each pixel. 2.SNR is larger 3.Speed is higher
Introduction Comparison between APS and DPS Row Select Column select ADC Row Select Column select Pixel 1 Pixel 2 Pixel 3 Pixel 4 Pixel 1 Pixel 2 Pixel 3 Pixel 4 Pixel select Analog to digital conversion Signal read
Differential Pulse Code Modulation
By utilizing the difference between the sample values of 2 successive pixels, the number of bits of memory can be reduced As the degree of redundancy is particularly high in normal images, DPCM can effectively decrease the size of the on-chip memory
Differential Pulse Code Modulation
Pixel Sensor Photodiode Comparator Reconfigurable 5-bits up/down counter
Photodiode A photodiode is a reversed-bias diode with internal capacitance Current flows with different magnitudes according to the illumination
Pixel Sensor Block diagram
Discharge time The discharge time depends on the illumination
Reconfigurable up/down counter Count up when receiving a pulse from the current pixel Count down when receiving a pulse from the neighbor pixel
Reconfigurable up/down counter
Timing Diagram:
Potential Problems Overflow problem Crashes of input pulses
Overflow handling Overflow is a serious problem as it affects the data recovery in the external environment Solution: Stop counting up when the memory is Stop counting down when the memory is 10000
Crashes of input pulses handling When pulses from the current pixel and the neighbor pixel received at the same time, the counter cannot work Solution Add a buffer to delay one of the pulses Cancelling each other
Huffman encoding system Huffman coding A variable-length encoding scheme. Lossless compression Length of the codeword depends on the occurrence of the sample value An example of Huffman coding ( SYMBOLProbability 1Codeword 1Probability 2Codeword [1 0 1]0.93[0] [1 0 0]0.02[1 0 0] [1 1 1]0.0125[1 1 1] [1 1 0]0.01[ ] [0 0 1]0.01[ ] [0 0 0]0.01[ ] [0 1 1]0.005[ ] [0 1 0]0.0025[ ] Average Length
ProbabilityCodewordProbabilityCodeword Average Length= % from DPCM values Codeword Assignment
Performance is content dependent DPCM ±15 DPCM ±4 8x8 BITMAP (Color not in scale) Huffman codeword length= 8 Resultant size=(8x8-1)x8= 504bits Huffman codeword length= 5 Resultant size=(8x8-1)x5= 315 bits
Example of Huffman codeword Photo diode DPCM Huffman codeword Serial link
Codeword Tree
Implementation Combinational logic Input: DPCM values from the pixel grid Output: Huffman codeword and its length Pixel grid CONTROL
Methodology K-map Common term discovery Solution minimization NAND-NOR combination
Methodology – K-Map K-map of CW5
Methodology – Common Terms
Methodology – NAND-NOR Combination
Summary- Huffman encoder Convert DPCM value to Huffman codeword 18 common terms Implementation done by 428 gates
Control System It consists of 3 parts ◦ Interface 8-bit Shift Register 4-bit Counter 14-bit Counter ◦ Row Decoder ◦ Column Multiplexer
Control System
Delay path Control logic interface Hand shake protocol
Control Logic Async with data link Hand shake protocol communication 14-bit pixel counter Delay counter
Interface Synchronous to datalink Send request to control logic Serve MCU request It consists of 2 main elements ◦ 8-bit Shift Register for huffman code stream ◦ 4-bit Counter for code length
Delay counter count down Shift register and length counter load Data transmission, length decrease Length =0 Next pixel value request 14-bit counter increase MCU request
Control System Wait if: Delay counter do not finish counting or 14-bit counter reach the top or 4-bit length counter finish counting
8-bit Shift Register 1.Receive codeword signal from Hoffman encoder 2.Transfer the received signal to MCU
4-bit Counter 1.Keeps tracking the length of the codeword from the Hoffman encoder 2.It is 4 bits since the maximum length of the codeword is 8 3.When the counter value reached zero, shift register is acknowledged to get the new branch of data.
14-bit Counter Control the row decoder and column multiplexer to select the right piece of pixel. The 7 less significant bits are connected to column multiplexer while the 7 more significant bits are connected to row decoder.
Row Decoder 1. Responsible for selecting the right row of pixel to 128 decoder is required since there are 128 rows of pixel.
Row Decoder 1 to 2 decoder
Column Multiplexer 1. Responsible for selecting the right column of pixel to 5 multiplexer is required since there are 128 columns of pixel and each pixel give out 5bits of signal.
Column Multiplexer 2 to 1 multiplexer
Performance
Performance - Simulation
Performance - Power consumption Current waveform of the pixel sensor
Performance - Fill factor The fill factor of the imager is about 12 %
Performance - Post layout sim.
Compression performance Image SizeORIGINALDPCM ONLY (-37.5%) DPCM with Huffman Coding (-55%) 1x11 bytes5 bits (-3 bits) 3.6 bits (-4.4 bits) 128x12816k bytes10k bytes (-6kB) 7.2k bytes (-8.8kB) 640x480 (VGA) 300k bytes187.5k bytes (-112.5kB) 135k bytes (-165kB) 1280x720 (HD 720) 900k bytes562.5k bytes (-337.5kB) 405k bytes (-495kB) Actual compression rate varies from 0% to 75%, depend on the actual content of the image.
Performance-Huffman encoder Maximum switching Delay= 2.4ns Maximum possible operation frequency =410MHz
Q&A Further explanation