22.05.2014 Views

Dark Energy Survey - Department of Physics - The Chinese ...

Dark Energy Survey - Department of Physics - The Chinese ...

Dark Energy Survey - Department of Physics - The Chinese ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Design <strong>of</strong> Emulator for Testing the Image Acquisition from the<br />

520 Megapixel CCD Camera in <strong>Dark</strong> <strong>Energy</strong> <strong>Survey</strong><br />

Cheuk-yui Leung<br />

2 nd September 2006<br />

1) Introduction<br />

In the project dark <strong>Energy</strong> survey, a 520 megapixel Charged-Coupled device (CCD)<br />

camera will be built at Cerro Tololo Inter-American Observatory. University <strong>of</strong> Illinois<br />

designs and builds the data acquisition system while Lawrence Berkeley National<br />

laboratory (LBNL) designs CCDs. <strong>The</strong> image acquisition system is to be tested and<br />

debugged before LBML CCDs are ready. Hence, Circuit boards with field<br />

programmable gate array (FPGA) called emulators are designed to emulate CCDs.<br />

2) Background<br />

2.1) Data transferring mode from CCDs<br />

Fig.1 shows a CCD schematically. Each CCD consists <strong>of</strong> 2048 x 4096 pixels. <strong>The</strong>re is<br />

one line <strong>of</strong> horizontal shift register at the bottom <strong>of</strong> the CCD board. <strong>The</strong> CCD is divided<br />

into two parts. <strong>The</strong> right half named ‘lower’ and the left named ‘higher’. <strong>The</strong>re are<br />

output gates at the bottom right (lower output) and left (upper output) <strong>of</strong> the CCD<br />

alternatively.<br />

When the pulses representing the vertical shift command are sent to the CCD board, the<br />

pulse signals will be checked. <strong>The</strong> correct sequence <strong>of</strong> pulse is show in Fig.2. If the<br />

signals are correct, the memory stored in the lowest row <strong>of</strong> pixels will be shifted to the<br />

horizontal shift register. Memory stored in the second lowest row will be shifted to the<br />

lowest row, etc.<br />

When the pulses representing the horizontal shift command are sent to the ‘upper’<br />

horizontal input <strong>of</strong> CCD board, the pulse signals will be checked. <strong>The</strong> correct sequence<br />

<strong>of</strong> pulse is shown in Fig.3. If the signals are correct, the most left memory bit <strong>of</strong> the<br />

horizontal shift register in ‘upper’ will be shifted to the detector on the left. <strong>The</strong><br />

information <strong>of</strong> that memory will then be transmitted away. <strong>The</strong> second most left<br />

memory will shift left, etc. ‘Lower’ also works in the same way except the memories in<br />

the shift register are shifted right.<br />

Vertical signals and horizontal signals are inputted alternatively until all information<br />

stored in the CCD is transmitted away.


3) Programming <strong>of</strong> FPGA<br />

3.1) Some facts about the emulator<br />

Altera Cyclone II chips are used in the circuit for the emulator and the s<strong>of</strong>tware Quantus<br />

II is used to program the chips. Each chip contains 64 x 64 points <strong>of</strong> memory. By<br />

repeating it over and over, we can emulate the whole 2048 x 4096 pixels CCD. That<br />

means if we program the database <strong>of</strong> emulator like the star in Fig 15, we expect to<br />

emulate the CCD like Fig 16, with Fig 15 repeat over and over.<br />

Hence, the address <strong>of</strong> each emulated pixel is assigned with 12 bits, while the first 6 bits<br />

represent the row number and the last 6 bits represent the column number. 8 bits <strong>of</strong><br />

memory are assigned to each pixel.<br />

<strong>The</strong> program is mainly divided into input <strong>of</strong> pulse, checking <strong>of</strong> pulse and output <strong>of</strong> data.<br />

<strong>The</strong> outlook is shown in Fig 4, 5 and 6 respectively.<br />

<strong>The</strong> vertical shift checking system is clocked with period <strong>of</strong> 100.0ns. Both the upper<br />

and lower horizontal shift checking systems are clocked with period <strong>of</strong> 10.0ns.<br />

3.2) <strong>The</strong> idea <strong>of</strong> checking pulse<br />

When the pulses representing a vertical shift or horizontal shift are being input, the<br />

signal is checked.<br />

<strong>The</strong>re are 5 inputs <strong>of</strong> pulses for the vertical shift, which are TG, V1, V2, V3, TRIGOUT<br />

respectively. <strong>The</strong>re are also 5 inputs for the Horizontal inputs respectively, which are RG,<br />

H1, H2, H3, SW respectively. Please refer to Fig 2 and 3 for the correct sequence <strong>of</strong><br />

input pulses.<br />

<strong>The</strong> pulses are checked at the edges where their signals are changed. Take the V1 input<br />

<strong>of</strong> the vertical shift input as example. <strong>The</strong> signal changes at 60.4us and 121.2us. To<br />

ensure the input signal change at 60.4us, we use an AND gate to check if the signal at<br />

58.0us (signal = 1) and the inverse <strong>of</strong> signal at 62.0us (the signal = 0, the inverse should<br />

be 1) are the same. All other edges <strong>of</strong> pulses are checked in the same way. If the signals<br />

in V1, Y2, V3, TRIGOUT are correct, the signal <strong>of</strong> the output GOOD VERTICAL will<br />

be changed from 0 into 1 until the next set <strong>of</strong> pulses are being input.<br />

<strong>The</strong> same procedure also applies to the checking system <strong>of</strong> upper and lower horizontal<br />

shift. <strong>The</strong> only difference is that the names <strong>of</strong> the output are GOOD UPPER<br />

HORIZONTAL and GOOD LOWER HORIZONTAL. And the outputs will become<br />

high only for 20 ns. At this 20ns, data will be read from the database and will become


the output. A state machine is used to control the checking <strong>of</strong> signals.<br />

3.3) Output <strong>of</strong> the program<br />

Please refer to Fig 6 for the program interface specifying the output. <strong>The</strong>re are address<br />

counters outputting the vertical (lpm_counter2), upper horizontal and lower horizontal<br />

(lpm_counter1) address <strong>of</strong> the data respectively. When checking is performed, the<br />

address counter would automatically increase the address output by 1 no matter the<br />

pulses are checked to be good or not. <strong>The</strong> address is then sent to the database<br />

(lpm_rom0 and lpm_rom1). Corresponding data are then sent to another logic element<br />

called MUX. <strong>The</strong> outputs <strong>of</strong> GOOD VERTICAL, GOOD UPPER HORIZONTAL and<br />

GOOD LOWER HORIZONTAL are also sent to MUX. If the input pulses passed all the<br />

checks, the corresponding data will then be the output <strong>of</strong> MUX. Otherwise, another<br />

assigned number will be sent out. <strong>The</strong> assigned number is 171 for the upper system and<br />

205 for the lower system. Hence, we would know the input is incorrect if these two<br />

numbers are generated.<br />

3.4) Pin assignment<br />

Since the pins on the circuit board are fixed, it is necessary to ensure that the inputs and<br />

outputs are assigned to fixed pins on the chip. Hence, the circuit board still can function<br />

well even the program inside the FPGA is changed. <strong>The</strong> pin assignment table is shown<br />

in Fig 7.<br />

4) Testing <strong>of</strong> the program<br />

<strong>The</strong> first few columns and rows <strong>of</strong> the emulated database are shown in table 1.<br />

Table 1: A part <strong>of</strong> the emulated database<br />

Address 0 1 2 3<br />

0 0 1 2 3<br />

1 64 65 66 67<br />

<strong>The</strong> initial value <strong>of</strong> the horizontal address and vertical address are both 64. Hence, the<br />

values <strong>of</strong> them will be 0 after the first checking <strong>of</strong> vertical and horizontal input signals.<br />

And the first data output will be the one with position (0,0).<br />

In Fig 8, RGU, H1U, H2U, H3U, SWU represent the upper horizontal shift input signals.<br />

RGL, H1L, H2L, H3L, SWL represent the lower horizontal shift input signals. TG, V1,<br />

V2, V3 represent the vertical shift input signal. OUTL [0]-[7] represent the outputs <strong>of</strong><br />

the lower system and OUTU [0]-[7] represent the outputs <strong>of</strong> the upper system.<br />

<strong>The</strong> output <strong>of</strong> upper system and lower system will only be transferred when clk_dac_u


and clk_dac_l are high respectively. <strong>The</strong> period is 20ns as stated before.<br />

4.1) Testing <strong>of</strong> vertical shift input signal<br />

4.1.1) <strong>The</strong> result <strong>of</strong> correct input signals<br />

In Fig 9, a set <strong>of</strong> correct vertical shift pulses was inputted. When there are correct<br />

horizontal shift pulses come later, the system gives out data from the database.<br />

4.1.2) <strong>The</strong> result <strong>of</strong> incorrect signals<br />

In Fig 10, a set <strong>of</strong> incorrect vertical shift pulses was inputted. <strong>The</strong> system does not give<br />

out data from the database even there are correct horizontal shift pulses inputted.<br />

4.2) Testing <strong>of</strong> horizontal shift input signal<br />

In this case, the system is checked with the first row <strong>of</strong> data in table 1. That means right<br />

after the first set <strong>of</strong> vertical input signal is being inputted.<br />

4.2.1) <strong>The</strong> result <strong>of</strong> correct input signals<br />

Three sets <strong>of</strong> correct signals are input in sequence. In Fig 11, 12 and 13, the correct<br />

outputs 00000000, 00000001, 00000010 are given out respectively.<br />

4.2.2) <strong>The</strong> result <strong>of</strong> incorrect signals<br />

In Fig 14, the H1U input <strong>of</strong> the second group pulses is incorrect. Hence, the output<br />

would remain at the value 171 when clk_dac_u is high. This number indicates that the<br />

input pulses are not correct.<br />

5) Conclusion and future development<br />

<strong>The</strong> project dark energy survey is aimed at investigating the dark energy in the universe.<br />

A 520 megapixel Charged-Coupled device (CCD) camera telescope will be built for this<br />

purpose. UIUC is to build the data acquisition system <strong>of</strong> the telescope. <strong>The</strong> emulator is<br />

designed to simulate the CCD output for testing.<br />

This report mainly concerns the programming <strong>of</strong> Altera Cyclone II chips.<br />

In the future, printed circuit board containing Altera Cyclone II chips will be designed.<br />

And these emulators will be used to test the data acquisition system.<br />

6) Acknowledgement<br />

I would like to thank pr<strong>of</strong>essor John Thaler and pr<strong>of</strong>essor Mats Selen <strong>of</strong> University <strong>of</strong><br />

Illinois at Urbana-Champaign for letting me to join their research group and work under<br />

their guidance.


I would also like to thank the physics department <strong>of</strong> <strong>The</strong> <strong>Chinese</strong> university <strong>of</strong> Hong<br />

Kong for giving me a chance to UIUC for a summer exchange.<br />

7) References<br />

- E.L. Dagless, J.O. Reilly; Electronics: A System Approach; Addison- Wesley<br />

Publishing Company; 1992<br />

- Proposal to NOAO for the dark energy <strong>Survey</strong>. Retrieved 12/6/2006 from<br />

http://cosmology.uiuc.edu/DES/Documents/A_Proposal_to_NOAO.pdf


Appendix:<br />

Fig.1 A CCD <strong>of</strong> the camera<br />

Fig 2. Correct sequence <strong>of</strong> input pulses for a vertical shift commend<br />

Fig 3. Correct sequence <strong>of</strong> input pulses for a horizontal shift commend


Fig. 4 Interface <strong>of</strong> program for input <strong>of</strong> pulses<br />

Fig. 5 Interface <strong>of</strong> program for checking <strong>of</strong> pulses


Fig. 6 Interface <strong>of</strong> program for output <strong>of</strong> Data<br />

Fig. 7 Location <strong>of</strong> the chip pins assigned to the inputs and outputs


Fig. 8 Inputs and output names during the simulation <strong>of</strong> program<br />

Fig. 9 Output with correct input <strong>of</strong> vertical shift signals. <strong>The</strong> red square contains the<br />

input <strong>of</strong> vertical shift signals. <strong>The</strong> blue square contains the output.


Fig. 10 Output with incorrect input <strong>of</strong> vertical shift signals. <strong>The</strong> red square contains the<br />

input <strong>of</strong> vertical shift signals. <strong>The</strong> green square contains the input <strong>of</strong> horizontal shift<br />

pulses. <strong>The</strong> blue square contains the output.<br />

Fig.11 Output after the first input <strong>of</strong> correct horizontal shift signals. <strong>The</strong> red square<br />

contains the output <strong>of</strong> the upper system. <strong>The</strong> blue square contains the output <strong>of</strong> lower<br />

system


Fig.12 Output after the second input <strong>of</strong> correct horizontal shift signals. <strong>The</strong> red square<br />

contains the output <strong>of</strong> the upper system. <strong>The</strong> blue square contains the output <strong>of</strong> lower<br />

system<br />

Fig.13 Output after the third input <strong>of</strong> correct horizontal shift signals. <strong>The</strong> red square<br />

contains the output <strong>of</strong> the upper system. <strong>The</strong> blue square contains the output <strong>of</strong> lower<br />

system


Fig.14 Output after the input <strong>of</strong> correct and incorrect horizontal shift signals. <strong>The</strong> red<br />

square contains the input and output with correct input pulses. <strong>The</strong> blue square contains<br />

the input and output with incorrect input pulses. <strong>The</strong> green squares indicate where the<br />

input signals are incorrect.<br />

Fig.15 <strong>The</strong> database <strong>of</strong> the emulator programmed with the information <strong>of</strong> a star<br />

Fig.16 <strong>The</strong> expected outlook <strong>of</strong> the CCD emulated with information in Fig. 16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!