61
via the Frame Valid line. Bits 95:64 are the starting address of the previous frame in
memory. This is a block address, not a byte address. Because of treating the DDR data
as SDR at 128 bits wide, a “word” is 16 bytes. The block to be read always starts at a 16
word boundary, thus the minimum addressable unit is 256 raw bytes of memory. Bits
102:100 for the frame ID word is always encoded as 110, Data Valid and Line Valid, but
not Frame Valid.
R
EADING
O
UT
M
EMORY
Whenever the preview bit is enabled, only image data is sent to the USB and it is framed
as defined by the input ROI. The preview image is not scaled. The upper left corner of the
image will always be in the upper left corner of the preview, and excess image data will be
cropped to the 640 by 480 preview window. Image data is 8 bits per pixel using the most
significant 8 bits of the sensor data. The top left pixel is replaced with the readout status
byte as described below. If there are fewer than 640 pixels per line, lines are extended by
repeating the last 10 active pixels. Images are extended to include the top of the next
frame when there are fewer than 480 lines.
When the preview bit is not set, data is presented to the USB 300K bytes at a time. This
represents the 640 by 480 “frame” of the emulated HV7131 sensor; however the data is to
be interpreted as a raw stream by the host. The readout is initiated by the “Y” command in
one of two formats. The first format has no argument, just “Y” followed by a carriage-
return. In this format the returned data starts at the “current” address in memory. The
current address is initialized to the start of the most recently captured frame while memory
storage is active. The second format consists of “Y” followed by four bytes (8 hex digits) of
address, low byte first. This form directs the memory to return data starting at the
specified address. Note that only 22 bits of address are required for a 1 gigabyte SO-
DIMM.
Either form of “Y” command can cause multiple 300K blocks to be sent per command.
This is controlled by the readback_count in configuration byte 131. Setting this byte to 0 or
1 sets one block per “Y” command. 2 to 255 blocks are programmed by setting
readback_count to the desired number of blocks.
Each 300KB block starts with 4 bytes indicating the starting address of the block. For the
second format of the “Y” command this should correspond to the requested address.
Following the start address are 23,616 words of memory (1,476 blocks). Thirteen bytes of
each word are transmitted, least significant byte first. After the last block are four more
bytes with the address of the next block. If the readback_count is greater than 1 this will
be the “current” address for the next block. The remaining 184 bytes are filled with the
current readout status byte. The readout status byte is defined as follows:
S
TATUS
B
YTE
B
ITS
D
ESCRIPTION