Table of Contents Previous Chapter
The purpose of the Continuous Clocking PRAM Builder is to generate and load CCD-controller Program RAM instructions which clock the CCDs for the Continuous Clocking Science Mode.
The following lists the uses of the Continuous Clocking PRAM Builder:
The following illustrates the relationships used by the Continuous Clocking PRAM Builder class, PramCc.
FIGURE 156. Continuous Clocking PRAM Builder class relationships
PramCc - This class is responsible for generating and loading a series of sequencer Program RAM (PRAM) words needed to clock a CCD for Continuous Clocking mode. It provides a function which sets the desired clocking parameters (configure), and provides a function which generates and loads the clocking sequence into a particular DEA CCD-controller (build).
DeaManager - This class is provided by the Protocols class category, and is responsible for managing access to the DEA interface. It provides a function which the builder uses to load words into a CCD-controller's Program RAM (writePram).
SramLibrary - This class is responsible for providing the PRAM builder with the Sequencer RAM (SRAM) locations of various primitives. It provides functions which select certain clocking options to use, such as the high-gain timing for the output register clocking, or the direction to clock the output registers (selectGain, selectOrDirection). It provides functions which supply the address of an SRAM block which clock and sample 1 pixel from the output register to the output node (getOrToOn), clock and sum two pixels from the output register to the output node (getOrToOnX2), clock and sum, without sampling, two pixels into the output register (getOrToOnSumX2). It also provides a function which return the starting SRAM block and number of contiguous blocks used to clock one row from the image array to the framestore and from the framestore to the output registers (getImageToFrame).
Figure 157 illustrates a graphical representation of a single CCD. The figure on the left of the illustration presents a simplified picture of the main CCD components, and the figure on the right illustrates the pixel dimensions of each of the components.
FIGURE 157. Graphical CCD Representation
Each CCD consists of an Image Array, a Framestore, two output registers and four output nodes. Due to an overhang of the cover of the Framestore, only 1024 of the 1026 Image Array rows are used for data acquisition.
The following illustrates the sequence of operations used to clock out one summed CCD row in Continuous Clocking Mode:
SRAM consists of a collection of blocks, where each block performs a clocking operation. Some operations can be performed in a single SRAM block, whereas others, due to power constraints, require a series of SRAM blocks. Table 27 lists the SRAM operations used for Continuous Clocking Mode.
TABLE 27. Continuous Clocking SRAM Operations
------------------------------------------------------------------------------------------------ Operation Number of Description SRAM Blocks------------------------------------------------------------------------------------------------ Image to Frame 4 (TBD) Clock one row from the image array to the framestore, and from the framestore to the output registers. TBD: Should we also clock the output registers? OR to ON discard 1 Clock two pixels from the output registers to their output (x2) nodes and discard the result. OR to ON sum, x2 1 Clock and sum two pixels from the output registers into the output nodes. OR to ON sample, 1 Clock one pixel from the output registers to their output low gain nodes and sample the result. OR to ON sample, 1 Clock one pixel from the output registers to their output high gain nodes and sample the result. Use signal timing to increase gain. OR to ON sample, 1 Clock two pixels from the output registers to their output x2, low gain nodes, and sum and sample the pixels at the output nodes. OR to ON sample, 1 Clock two pixels from the output registers to their output x2, high gain nodes, and sum and sample the pixels at the output nodes. Reverse OR to ON 1 Clock and sum two pixels from the output registers into sum, x2 their opposite output nodes. Reverse OR to ON 1 Clock two pixels from the output registers to their opposite discard (x2 sum output nodes and discard the result. ming) Reverse OR to ON 1 Clock one pixel from the output registers to their opposite sample, low gain output nodes and sample the result. Reverse OR to ON 1 Clock one pixel from the output registers to their opposite sample, high gain output nodes and sample the result. Use signal timing to increase gain. Reverse OR to ON 1 Clock two pixels from the output registers to their opposite sample, x2, low gain output nodes, and sum and sample the pixels at the output nodes. Reverse OR to ON 1 Clock two pixels from the output registers to their opposite sample, x2, high output nodes, and sum and sample the pixels at the output gain nodes. ------------------------------------------------------------------------------------------------
This section describes the format of the PRAM words. PRAM consists of collections of word pairs known as `couplets.' Each couplet contains the address of one SRAM block to invoke, a repeat counter indicating the number of times to repeat the block, and a pixel code, which instructs the Front End Processors (FEPs) how to process pixels being clocked while the SRAM block is being invoked. Each invocation of a couplet takes 1 pixel clock period (~10us).
While PRAM is running, pixel clocks are always being delivered to the FEPs, regardless of whether pixel data is being clocked out of the CCDs or not. The pixel code portion of the couplets indicate how the FEPs interpret the data. Valid pixel data is flagged using a "Valid Pixel" code, and overclock pixels are flagged using an "Overclock" code. All other codes cause the clocked pixel data to be ignored. These include the "Vsync" code, which indicates that a new image has been started, the "Hsync" code, which indicates that a new image row is about arrive, and the "Ignore" code, which indicates that the clocked pixel should be completely ignored by the FEPs.
Each collection of couplets is preceded by a pair of `header' words. The header consists of the number of couplets which follow the block, the number of times to repeat the collection of couplets, and an action to perform once the collection of couplets. These actions include: halt the sequencer, continue to the header immediately following the couplet collection, jump to the first PRAM location (restart), and jump to the indicated PRAM page.
The following illustrates the clocking algorithm using pseudo-code, where the bolded text indicates operations which utilize the header repeat counter, italicized text indicates operations which can be accomplished using a single SRAM block and utilize the couplet repeat counter, and the underlined text indicates looping operations which are "unrolled" by the builder:
PRAM Page 0:
/* ---- Flush contents of image array and framestore ----
REPEAT for 2 * 1026 rows
Clock image array/framestore to sum "n" rows in output registers
Discard 4 dummy output register pixels
REPEAT for all summed pixels in output register
Clock output register to sum "m" pixels. Discard result.
ENDREPEAT
Discard TBD output register pixels prior to producing overclocks
REPEAT for each overclock pixel sum
Clock output register to sum "m" overclocks. Discard result.
ENDREPEAT
ENDREPEAT
Jump to PRAM Page 1
PRAM Page 1:
/* ---- Clock and emit first row of data set ---- */
Clock image array/framestore to sum "n" rows in output registers
Discard 4 dummy pixels, and indicate start of data set (VSYNC)
REPEAT for all summed pixels in output register
Clock output register to sum "m" pixels. Sample result.
ENDREPEAT
Discard TBD output register pixels prior to producing overclocks
REPEAT for each overclock pixel sum
Clock output register to sum "m" overclocks. Sample result.
ENDREPEAT
/* ---- Clock remaining rows of data set ---- */
REPEAT for 511 rows
Clock image array/framestore to sum "n" rows in output registers
Discard dummy pixels and indicate start of row (HSYNC)
REPEAT for all summed pixels in output register
Clock output register to sum "m" pixels. Sample result.
ENDREPEAT
Discard TBD output register pixels prior to producing overclocks
REPEAT for each overclock pixel sum
Clock output register to sum "m" overclocks. Sample result.
ENDREPEAT
ENDREPEAT
Jump to PRAM Page 1
Assuming constraints on the maximum number of rows and columns that may be summed (TBD), phase-delays between image array/framestore row transfers on different CCDs, such as those used by Timed Exposure Mode (see Section 34.4.6), are not required.
Hierarchy:
Superclasses:
none
Public Uses:
SramLibrary
Implementation Uses:
DeaManager deaManager
Public Interface:
Operations:
build() configure()
Protected Interface:
Operations:
blockEnd() blockStart() emitBlockHeader() emitBranchBlock() emitCouplet() emitDataSet() emitDiscardOr() emitImageToFrame() emitSummedPixel() generateSequence() setPramBlock()
Private Interface:
Has-A Relationships:
Has-A Relationships:
Arguments:
unsigned repeat
Documentation:
This function starts a block, storing repeat as the block's repeat count, blockRepeat, and zeroing the block's couplet count blockCount.
Arguments:
DeaBoardId boardid
Documentation:
This function builds a PRAM sequence and loads the sequence into the DEA CCD-controller specified by boardid.
Arguments:
unsigned rowsum
unsigned colsum
QuadMode quadrants
unsigned ocPairs
Boolean highGain
SramLibrary& sramlib
Documentation:
This function configures the Continuous Clocking PRAM builder. rowsum is the number of rows to sum, and colsum is the number of columns to sum per output pixel. quadrants indicates the output node configuration and clocking direction (Full, Diagnostic, AC, or BD). ocPairs indicates the number of pairs of overclock pixels to generate. sramlib is a reference to the SRAM library to use when building PRAM.
Arguments:
unsigned operation
unsigned page
Documentation:
This function emits the PRAM couplet block header, storing blockRepeat for the repeat count, and blockCount as the couplet count. operation is the action the sequencer should take after the block has been run, and page indicates the page address to jump to (if action is to page jump). NOTE: This function was not combined with blockEnd() because the operation and page information are not necessarily known when blockEnd() is called.
Arguments:
unsigned id
Documentation:
This function emits a PRAM instruction which jumps to a new PRAM block, indicated by id.
Arguments:
unsigned sramaddr
unsigned pixcode
unsigned repeat
Documentation:
This function emits a couplet, where sramaddr is the index of the SRAM block to cycle, pixcode is the pixel code to emit during the cycle, and repeat is the number of times to repeat the cycle.
Arguments:
unsigned nrows
Boolean flush
Documentation:
Emit PRAM instructions to produce 1 data set of continuously clocked CCD pixels. nrows specifies the number of rows to emit in the data set, and flush indicates whether or not to use the produced data set. If flush is BoolFalse, treat clocked data as valid pixels. If flush is BoolTrue, then ignore all clocked data. This is used to discard the initial contents of the image array and framestore at the start of the run.
Arguments:
unsigned npix
unsigned pixcode
Documentation:
Emit PRAM couplets which clock npix columns from the output register into the output node, each time, discharging the output node, effectively discarding the pixels. pixcode indicates the pixel code to use when discarding the pixels.
Arguments:
unsigned nrows
Documentation:
This function clocks nrows from the image array to the framestore, and from the framestore into the output register. The rows clocked into the output register are summed with each other, and with charge already in the output registers.
Arguments:
unsigned npix
PRAM_PIXCODE pixcode
Documentation:
Emit PRAM couplets which emit a series of npix summed pixels from the output register. Each output pixel is flagged with the pixcode pixel code, and consists of the sum of colSum output register pixels.
Arguments:
unsigned id
Documentation:
This function sets the current pramAddress according to the PRAM block selected by id. The passed id can range from 0 to 15.