Lattice Semiconductor Correlator IP Core
6
block can be a maximum of 36 bits wide, therefore if the number of correlator cells (MWIDTH) is not greater than
36, only one column of EBR memories is required for the Coefficient Memories. If MWIDTH > 36, then multiple col-
umns will be configured. As in the case of the Tap Memories, if the total number of coefficients which needs to be
stored exceeds one row of EBR memories, then multiple rows will be configured in a stacked arrangement as
shown in Figure 4. For MWIDTH
≤
36, the number of coefficients required is [NUM_TAP * NUM_COEF_SEQ]. If
this number is less than 8192 then only one EBR is needed for the Coefficient Memory.
Unlike the Tap Memories which are written with new user data under the control of the state machine, the Coeffi-
cient Memories must be written with the coefficient sequences before any correlation operations can be done. This
is done via the Coefficient Memory Configuration interface shown in Figure 5. This interface consists of the input
signals:
coeffaddr
,
coeffwdat
,
coeffwdat_im
, and
coeffwr
. Figure 6 shows the timing for this interface for
a two-channel design with MWIDTH=4, NUM_TAP=16 and NUM_COEF_SEQ=2.
Figure 5. Coefficient Memory Configuration Interface Timing
In this case, the Coefficient Memory is implemented in one EBR block. Each row of Coefficient Memory is required
to store MWIDTH=4 coefficients, so each write to the memory writes four bits. Each coefficient sequence is
NUM_TAP=16 bits long, and it will occupy (NUM_TAP / MWIDTH)= 4 rows in the Coefficient Memory. In addition, in
this example there are two separate coefficient sequences, so the coefficients will occupy a total of eight rows in
the Coefficient Memory.
Writes to the Coefficient Memory are enabled by asserting the
coeffwr
input. The
coeffaddr
input selects the
row of memory to be written, and
coeffwdat
(and
coeffwdat_im
for complex correlations) is set to the desired
value. This is a very simple interface, however it is essential to make sure that the coefficient sequence is written in
the correct order. In the example above, the first four values written are for coefficient sequence 0. The values writ-
ten are 0xa6fc (or in binary: 1010 0110 1111 1100) with the LSB being the first bit in the correlation sequence. This
bit will be multiplied against the newest data value received by the Correlator. The MSB in this string will be multi-
plied against the oldest data read from Tap Memory. This is explained further in the Correlator Evaluation Package
section of this document.
The second coefficient sequence written into the Coefficient Memory is 0x0180, and is written into rows 7, 6, 5 and
4. This will be selected as coefficient sequence 1 by setting the
code_sel_in
to 1 when a data value is input to
the Correlator. Figure 6 shows how the coefficient values from this example would appear in the Coefficient Mem-
ory: