ChipFind - документация

Электронный компонент: LF2301JC25

Скачать:  PDF   ZIP
DEVICES INCORPORATED
Video Imaging Products
2-1
LF2301
Image Resampling Sequencer
08/16/2000LDS.2301-H
u
u
u
u
u 40 MHz Clock Rate
u
u
u
u
u High-Speed Image Manipulation
u
u
u
u
u Maximum Image Size: 4096 x 4096
Pixels
u
u
u
u
u Supports Following Interpolation
Algorithms:
Nearest-Neighbor
Bilinear Interpolation
Cubic Convolution
u
u
u
u
u Applications:
Video Special-Effects
Image Recognition
High-Speed Data Encoding/
Decoding
u
u
u
u
u Replaces TRW/Raytheon/Fairchild
TMC2301
u
u
u
u
u 68-pin PLCC, J-Lead
FEATURES
DESCRIPTION
LF2301
Image Resampling Sequencer
DEVICES INCORPORATED
LF2301 B
LOCK
D
IAGRAM
SOURCE
ADDRESS
GENERATOR
TARGET
ADDRESS
GENERATOR
INPUT IMAGE
BOUNDARY
COMPARATOR
ACC
DONE
WEN
LDR
B
3-0
P
11-0
INTER
INIT
NOOP
END
PARAMETER
STORAGE
CONTROL
INTEGER
FRACTION
CZERO
U
11-0
UWRI
X
11-0
CA
7-0
WALK COUNT
OETA
The LF2301 is a self-sequencing
address generator designed to filter
a two-dimensional image or remap
and resample it from one set of
Cartesian coordinates (x,y) into a
new set (u,v).
The LF2301 can resample digitized
images or perform such manipula-
tions as rotation, panning, zooming,
and warping as well as compression
in real-time.
By using two LF2301s in a Image
Transformation System (ITS),
nearest-neighbor, bilinear interpola-
tion, and cubic convolution algo-
rithms, with kernel sizes up to 4 x 4
pixels, are all possible (see Figure 1).
This system can also implement
simple static filters with kernel sizes
up to 16 x 16 pixels.
DETAILS OF OPERATION
Most video applications use a pair
of LF2301s in tandem to construct
an ITS. One LF2301 is the row
coordinate generator (x to u) and the
other is the column generator (y to
v). External RAM is needed for
storage of the interpolation coeffi-
cient lookup table, as well as for
buffers of the source and destination
images. An external Multiplier-
Accumulator is required when
performing interpolation or imple-
menting static filters.
The ITS is capable of performing the
general second-order coordinate
transformation of the form:
x(u,v) = Au
2
+Bu+Cuv+Dv
2
+Ev+F
y(u,v) = Gu
2
+Hu+Kuv+Lv
2
+Mv+N
where parameters A through N of
the transform are user-defined.
The system steps sequentially
through each pixel in the "target"
image lying within a user-defined
rectangle. For each "target" pixel
at (u,v), the LF2301 points to a
corresponding "source" pixel at
(x,y).
DEVICES INCORPORATED
LF2301
Image Resampling Sequencer
2-2
08/16/2000LDS.2301-H
Video Imaging Products
SIGNAL DEFINITIONS
Power
Vcc and GND
+5V power supply. All pins must be
connected.
Clock
CLK -- Master Clock
The rising edge of CLK strobes all
enabled registers.
Inputs
P
11-0
-- Parameter Register Data Input
P
11-0
is the 12-bit Parameter Register
Data input port. P
11-0
is latched on
the rising edge of CLK.
B
3-0
-- Parameter Register Address Input
B
3-0
is the 4-bit Parameter Register
Address input port. B
3-0
is latched on
the rising edge of CLK.
Outputs
X
11-0
-- Source Address Output
X
11-0
is the 12-bit registered Source
Address output port.
CA
7-0
-- Coefficient Address Output
CA
7-0
is the 8-bit registered Coeffi-
cient Address output port.
U
11-0
-- Target Address Output
U
11-0
is the 12-bit registered Target
Address output port.
Controls
INIT -- Initialize
When INIT is HIGH for a minimum of
two clock cycles, the control logic is
cleared and initialized for the start of a
new image transformation. When
INIT goes LOW, normal operation
begins after two clock cycles. INIT is
latched on the rising edge of CLK.
WEN -- Write Enable
When WEN is LOW, data latched into
the device on P
11-0
is loaded into the
preload register addressed by the data
latched into the device on B
3-0
. When
WEN is HIGH, data cannot be loaded
into the preload registers and their
contents will not be changed. WEN is
latched on the rising edge of CLK.
LDR -- Load Data Register
When LDR is HIGH, data in all
preload registers is latched into the
Transformation Parameter Registers.
When LDR is LOW, data cannot be
loaded into the Transformation
Parameter Registers and their contents
will not be changed. LDR is latched
on the rising edge of CLK.
ACC -- Accumulate
The registered ACC output initializes
the accumulation register of the
external multiplier-accumulator. At
the start of each interpolation "walk,"
ACC goes LOW for one cycle effec-
tively clearing the storage register by
loading in only the new first product.
ACC from either the row or column
LF2301 may be used.
UWRI -- Target Memory Write Enable
The Target Memory Write Enable goes
LOW for one clock cycle after the end
of each interpolation "walk." When
OETA is HIGH, this registered output
is forced to the high-impedance state.
UWRI from either the row or column
LF2301 may be used.
INTER -- Interconnect
When two LF2301s are used to form
an ITS, the END flag on each device
is connected to INTER on the other
device. The END flag from the row
device indicates an "end of line" to the
column device. The END flag from the
column device indicates a "bottom of
frame" to the row device, forcing a
reset of the address counter.
NOOP -- No Operation
When NOOP is LOW, the clock is
overridden holding all address
generators in their current state. X
11-0
and CA
7-0
are forced to the high-
F
IGURE
1. I
MAGE
T
RANSFORMATION
S
YSTEM
(ITS)
12
P
11-0
5
INIT, LDR,
B
3-0
4
INTER
END
INTER
END
12
24
12
12
12
12
24
LF2301
Row
Address
Generator
(X)
X
11-0
ACC
UWRI
U
11-0
8
8
IMAGE DATA IN
12
12
IMAGE DATA OUT
V
11-0
Y
11-0
LF2301
Column
Address
Generator
(Y)
INTERPOLATION
COEFFICIENT
RAM
CA
7-0
CLK
ACC
DESTINATION
IMAGE
RAM
LMA1009/2009
12 x 12 bit
Multiplier-
Accumulator
SOURCE
IMAGE
RAM
CA
7-0
Y
X
X,Y,P
D
OUT
12
12
WEN, NOOP, OETA
DEVICES INCORPORATED
Video Imaging Products
2-3
LF2301
Image Resampling Sequencer
08/16/2000LDS.2301-H
impedance state. Users may then
access external memory. Normal
operation resumes on the next clock
cycle after NOOP goes HIGH. NOOP
is latched on the rising edge of CLK.
OETA -- Target Memory Output Enable
When OETA is HIGH, UWRI and U
11-0
are forced to the high-impedance
state. When OETA is LOW, UWRI
and U
11-0
are enabled on the next
clock cycle. OETA is latched on the
rising edge of CLK.
Flags
CZERO -- Coefficient Zero
If in a row device x<0,
XMIN
x
XMAX, or x
4096, the
registered CZERO flag goes HIGH . If
0
x
<
XMIN or XMAX<x<4096, CZERO
goes LOW. In an ITS, when the source
address falls outside a rectangle with
vertices (XMIN, YMIN), (XMAX,
YMIN), (XMIN, YMAX), and (XMAX,
YMAX), the logical AND of the
CZERO flags from the row and
column of the LF2301s will go LOW
representing an invalid address.
END -- End of Row/Frame
When two LF2301s are used to form
an ITS, the END flag on each device
is connected to INTER on the other
device. The END flag from the row
device indicates an "end of line" to the
column device. The END flag from
the column device indicates a "bottom
of frame" to the row device, forcing a
reset of the address counter.
When Mode is set to "00" or "10"
END goes HIGH on the row device
for (K+1) x (K+1) clock cycles
starting[2 x (K+1) x (K+1)] + 1 clock
cycles before the last X address of a
row. END goes HIGH on the column
device for (K+1)
3
x (UMAX-UMIN)
clock cycles starting at (K+1)
3
x
(UMAX-UMIN) + 1 clock cycles before
the last X address of a frame.
When Mode is set to "01" or "11"
END goes HIGH on the row device
for K+1 clock cycles starting at (K+1) +
2 clock cycles before the last X address
of a row. END goes HIGH on the
column device for (K+1) x (K+1)
clock cycles starting at [(K+1) x (K+1)] +
1 clock cycles before the last X address
of a frame.
DONE -- End of Transform
In a two LF2301 system, after the last
walk of the last row of an image, the
registered DONE flag goes HIGH
indicating the end of the transform.
DONE goes HIGH one clock cycle
before the last X address of a frame. If
AIN is HIGH, DONE will remain
HIGH for one clock cycle. If AIN is
LOW, DONE will remain HIGH until
a new transform begins.
Transformation Control Parameters
XMIN, XMAX, YMIN, YMAX
XMIN, XMAX, YMIN, YMAX define
the valid area in the source image
from which pixels may be read. The
CZERO flags will denote a valid
memory read whenever the LF2301s
generate an (x,y) address within this
boundary.
UMIN, UMAX, VMIN, VMAX
UMIN, UMAX, VMIN, VMAX define
the area in the destination image into
which pixels will be written.
(UMIN, VMIN) is the top left corner
and (UMAX + 1, VMAX) is the bottom
right corner. The following conditions
must be met: UMAX>UMIN and
VMAX>VMIN.
x
0
, y
0
x
0,
y
0
determine what the first pixel read
out of the source image will be at the
beginning of an image transformation.
x
0,
y
0
will be the upper left corner of the
original image in non-inverting, non-
reversing applications.
dx/du
dx/du is the displacement along the
x axis corresponding to a one-pixel
movement along the u axis.
dx/dv
dx/dv is the displacement along the
x axis corresponding to each one-pixel
movement along the v axis.
dy/du
dy/du is the displacement along the
y axis corresponding to each one-pixel
movement along the u axis.
dy/dv
dy/dv is the displacement along the
y axis corresponding to each one-pixel
movement along the v axis.
d
2
x/du
2
d
2
x/du
2
determines the rate of change
of dx/du with each step along a line
in the output image.
d
2
x/dv
2
d
2
x/dv
2
determines the rate of change
of dx/dv with each step down a
column in the output image.
d
2
y/du
2
d
2
y/du
2
determines the rate of change
of dy/du with each step along a line
in the output image.
d
2
y/dv
2
d
2
y/dv
2
determines the rate of change
of dy/dv with each step down a
column in the output image.
d
2
x/dudv
d
2
x/dudv determines the rate of
change of dx/du while moving
vertically through the output image.
d
2
x/dudv also determines the rate of
change of dx/dv while moving
horizontally through the output
image.
d
2
y/dudv
d
2
y/dudv determines the rate of
change of dy/dv while moving
horizontally through the output
image. d
2
y/dudv also determines the
rate of change of dy/du while
moving vertically through the output
image.
DEVICES INCORPORATED
LF2301
Image Resampling Sequencer
2-4
08/16/2000LDS.2301-H
Video Imaging Products
T
ABLE
3. F
IELD
O
F
V
IEW
F
2
F
1
F
0
FOV
0
0
0
0
0
0
1
1
0
1
0
2
0
1
1
3
1
0
0
4
1
0
1
5
1
1
0
6
1
1
1
7
R/C -- Row/Column Select
When set to 0, the LF2301 functions as
a row device. When set to 1, the
LF2301 functions as a column device.
M
1-0
-- Mode
This 2-bit control word defines four
modes as follows (see table 1):
The 1st and 3rd modes are single-
pass operations where the device
walks through a (K + 1) x (K + 1)
kernel for each output pixel. K is the
kernel size determined by K
3-0
in
Parameter Register 7. In mode 00, the
spiral walk is in the clockwise direc-
tion. In mode 10, the spiral walk is in
the counter clockwise direction.
The 2nd and 4th modes are used
together to perform a two-pass
operation. The first pass (mode 01)
performs a (K+1) kernel in the
horizontal dimension. The second
pass (mode 11) performs a (K+1)
kernel in the vertical dimension.
The result of pass 1 is stored in the
destination image memory and is used
as the source image data for the second
pass. A system to switch source and
destination memory banks could be
designed, or utilization of a second
LF2301 pair in a pipelined architecture
could be used. In this case, the system
would require a third image buffer for
the final destination image.
K
3-0
-- Kernel
Kernel determines the length of the
spiral walk when performing image
transformations and the size of the
filter when implementing static filters
(see table 2). When performing image
transformations, the longest spiral walk
possible is 4 x 4 pixels (Kernel = 3). For
static filters, kernels of up to 16 x 16
pixels (Kernel = 15) are possible.
FOV -- Field of View
FOV determines the distance between
pixels in a spiral walk. An FOV of 1
means each step in a spiral walk is one
pixel. An FOV of 2 means each step is
two pixels, and so on. FOV can be set
as high as 7 (see Table 3). It is impor-
tant to note when FOV is 0, the x and
y addresses will not change during a
spiral walk. They will remain fixed at
the first pixel address of the spiral
walk.
ALR -- Autoload
When set HIGH and upon INIT being
strobed, the LDR control is automatically
asserted which causes the data
currently stored in the Preload Registers
to be loaded into the Transformation
Parameter Registers.
AIN -- Autoinit
A new transform automatically begins
if the AIN bit is HIGH when the end of
an image is reached. The DONE flag
will go HIGH for one clock cycle. If
AIN is LOW, UWRI and the DONE flag
remain HIGH until the user strobes the
INIT control to begin a new image
transformation.
PIPE -- Pipe Control
In order to compensate for buffered
source image RAM, PIPE adjusts the
timing of UWRI and ACC. If the PIPE
bit is HIGH, UWRI and ACC will have
a one clock cycle delay added relative
to the generation of the target address.
TM -- Test Mode
Calculations of the source image and
coefficient addresses are made by an
internal 28-bit accumulator. TM
allows access to the sign bit and the
seven bits below the four coefficient
address bits in the accumulator. When
TM is HIGH the sign bit and 11 bits
below the source image address are fed
to X
11-0
(see Figure 2). When TM is
LOW, the source image address is fed
to X
11-0
. Two clock cycles are required
to access both the MS and LS words of
the internal accumulator.
Functional Description
The LF2301 is an address generator
designed to be used in an image
transformation system (ITS). When
implementing an LF2301-based ITS,
second-order image transformations
can be performed like resampling,
rotation, warping, panning, and
rescaling, all at real-time video rates.
2D filtering operations, like pixel
convolutions, can also be performed.
In most applications two LF2301s are
used, one to generate the row addresses
and the other to generate the column
T
ABLE
1. M
ODE
S
ELECTION
M
1
M
0
MODE
0
0 single-pass operation (CW)
0
1 pass 1 of two-pass operation
1
0 single-pass operation (CCW)
1
1 pass 2 of two-pass operation
T
ABLE
2. K
ERNEL
K
3
K
2
K
1
K
0
Kernel
0
0
0
0
1 x 1
0
0
0
1
2 x 2
0
0
1
0
3 x 3
0
0
1
1
4 x 4
0
1
0
0
5 x 5
0
1
0
1
6 x 6
0
1
1
0
7 x 7
0
1
1
1
8 x 8
1
0
0
0
9 x 9
1
0
0
1
10 x 10
1
0
1
0
11 x 11
1
0
1
1
12 x 12
1
1
0
0
13 x 13
1
1
0
1
14 x 14
1
1
1
0
15 x 15
1
1
1
1
16 x 16
DEVICES INCORPORATED
Video Imaging Products
2-5
LF2301
Image Resampling Sequencer
08/16/2000LDS.2301-H
addresses. An example of an ITS
implemented with two LF2301s is
shown in Figure 1. In this system the
following components are used: two
LF2301s, a multiplier-accumulator
(MAC), interpolation coefficient RAM,
and source/target image RAM.
Maximum image size is 4096 x 4096
pixels. Data word size is determined
by the word size of the external RAM.
A typical ITS performs image transfor-
mations as follows:
a. The LF2301s generate sequential
pixel addresses (left to right, top to
bottom) which fill the rectangle in the
target image RAM defined by
(UMIN,VMIN) and (UMAX +1, VMAX).
It is important to note that the U value
of the last pixel address on each line of
the target RAM is UMAX + 1.
b. The LF2301s calculate the address
of the corresponding pixel in the
source image RAM for each target
pixel address generated.
c. If interpolation is needed, the
external MAC sums the products of
the source pixels and the interpola-
tion coefficients. Control signals for
the MAC and address signals for the
interpolation coefficient RAM are
provided by the LF2301s.
d. The new pixel value is written into
the target image RAM.
The LF2301s generate source pixel
addresses according to the following
general second order equations:
x = Au
2
+ Bu + Cuv + Dv
2
+ Ev + F
y = Gu
2
+ Hu + Kuv + Lv
2
+ Mv + N
where (x,y) and (u,v) are the source
and target coordinates respectively.
A through N are user-defined param-
eters. The actual second order equa-
tions used are shown in Figure 3.
dx
du
d x
dudv
2
dx
dv
d x
2
du
2
d x
2
dv
2
m m
2
2
n n
2
2
+
=
x
0
m +
n +
mn +
+
x
dy
du
d y
dudv
2
dy
dv
d y
2
du
2
d y
2
dv
2
m m
2
2
n n
2
2
+
=
y
0
m +
n +
mn +
+
y
+ FOV CAY(w)
FOV m CAY(ker)
+
+ FOV CAX(w)
FOV m CAX(ker)
+
m
=
u
UMIN +
n
=
v
VMIN +
NOTE:
m m
2
2
APPROXIMATES THE EXPONENTIAL CHARACTERISTIC OF
m
2
.
F
IGURE
3. A
DDRESS
T
RANSFORMATION
E
QUATIONS
F
IGURE
2. T
EST
M
ODE
D
ATA
R
OUTING
SIGN
7
4
12
1
CA
3-0
CA
7-4
X
11-0
/T
11-0
28-BIT INTERNAL
ACCUMULATOR
WALK COUNTER
4
4
12
12