Sequence Generation
Generating the clock waveforms for the ircamera
is central to the entire operation.
The key problem is generating the sequence of
bytes that is to be downloaded into the
AWFG (Arbitrary Waveform Generator).
The six chip clocks as well as the analog to digital
converter trigger clock have been assigned
to the two 4 bit outputs of the AWFG as follows.
- X0 Pixel transition increments column counter
- X1 Lsync active low to initialize column counter
- X2 Fsync active low to initialize row counter
- X3 Line transition to increment row counter
- Y0 Reset active high resets selected row
- Y1 Read active high gating signal (usually on)
- Y2 Trigger rising edge causes ADC conversion
- Y3 Spare a 5 clock wide pulse with rising edge at start of sequence
The AWFG is capable of storing a waveform of up to 32K
steps long.
When executing a waveform you must specify:
- Length of waveform
- Number of times to execute the waveform
- clock divider - specifies number of microseconds per step
The operation of the AWFG is implemented in the C++ class
CAWFG.
Which has functions for loading the waveform and executing them.
The awfg class communicates with the awfg card through ioctl calls
to a linux device /dev/awfg.
The driver for this devices was written in-house.
Unfortunately the maximum waveforme length of 32K
is not large enough to readout the Picnic array.
Instead we must
specify a series of waveforme and execute then sequentially.
The AWFG does allow a new sequence to be loaded as the last
sequence is finishing, if the length of the sequence is the same
and the clock divider does not change.
Elementary Wavefoms
We have settled for a waveform of length of 4128 clocks.
The Wave Class defines an object that is used to
put together more complex sequences.
It is invoked (Generate method) with a integer mode that is the logical OR of
the following masks.
- WAVE_RESET if the Reset line pulse should be fired
- WAVE_FSYNC if the Fsync line pulse should be pulsed low
- WAVE_READ if the pixel clock and adc clocks should be activated
- WAVE_EXPOSE if the sequence is just to mark time for an exposure
- WAVE_QUIET if the clocks turned off for testing
The generate invoked with WAVE_READ creates a basic waveform
with
- 512 transitions of the pixel clock
- 2048 triggers of the adc
- 4 Lsync pulses
- 4 transition of the Line clock
Here is
A view of the first couple of transitions.
Note that there are four rising ADC triggers per pixel readout.
Here is
a graph of the full read waveform
The basic step time is created from a 5 MHz clock divided
by 25, yielding a 5 microsecond base step time.
Generating the Sequences
The full readout sequence is created by stringing together
multiple waveforms.
This is done in the Create method of the
CIRcam class.
The Read sequence just reads
thru the entire chip and digitizes the result is the
combination of two waveforms:
- 1 waveform with WAVE_READ | WAVE_FSYNC to start frame
- 31 waveforms with WAVE_READ to scan thru entire chip
The Frame sequence is more complex is composed of
three parts: i) the chip is reset 2) the a variable length
wait time (the exposure) 3) The full frame Read sequence
above.
This sequence is made up of 5 individual waveforms.
- 1 waveform with WAVE_RESET | WAVE_FSYNC to reset the chip start frame
- 31 waveforms with WAVE_RESET to scan thru entire chip
- adjustable WAVE_EXPOSE to create exposure delay
- 1 waveform with WAVE_READ | WAVE_FSYNC to read the chip start frame
- 31 waveforms with WAVE_READ to read thru entire chip
The CDS sequence is similarly complex:
This sequence is made up of 5 individual waveforms.
- 1 waveform with WAVE_RESET | WAVE_FSYNC | WAVE_READ to reset the chip, start the frame and reads
- 31 waveforms with WAVE_RESET|RESET to scan thru entire chip and reads
- adjustable WAVE_EXPOSE to create exposure delay
- 1 waveform with WAVE_READ | WAVE_FSYNC to read the chip start frame
- 31 waveforms with WAVE_READ to read thru entire chip
The software then subtracts the first values that are read just after
the reset from the second ones (after the exposure) and reports the
difference.
Last Revised April 6, 1999