Spartan-3E FPGA Family: Functional Description
DS312 (v4.1) July 19, 2013
Product Specification
33
The INIT attribute can be used to preload the memory with
data during FPGA configuration. The default initial contents
for RAM is all zeros. If the WE is held Low, the element can
be considered a ROM. The ROM function is possible even
in the SLICEL.
The global write enable signal, GWE, is asserted
automatically at the end of device configuration to enable all
writable elements. The GWE signal guarantees that the
X-Ref Target - Figure 26
Figure 26: RAM16X1D Dual-Port Usage
D
A[3:0]
WE
WCLK
SPO
DPO
DPRA[3:0]
16x1
LUT
RAM
(Read/
Write)
16x1
LUT
RAM
(Read
Only)
Optional
Register
Optional
Register
SLICEM
DS312-2_41_021305
X-Ref Target - Figure 27
Figure 27: Dual-Port RAM Component
Table 18: Dual-Port RAM Function
Inputs
Outputs
WE (mode)
WCLK
D
SPO
DPO
0 (read)
X
data_a
data_d
1 (read)
0
X
data_a
data_d
1 (read)
1
X
data_a
data_d
1 (write)
↑
D
data_d
1 (read)
↓
X
data_a
data_d
Notes:
1.
data_a = word addressed by bits A3-A0.
2.
data_d = word addressed by bits DPRA3-DPRA0.
RAM16X1D
WE
SPO
D
WCLK
A0
A1
A2
A3
DPRA0
DPRA1
DPRA2
DPRA3
DPO
DS312-2_42_021305
Table 19: Distributed RAM Signals
Signal
Description
WCLK
The clock is used for synchronous writes. The
data and the address input pins have setup
times referenced to the WCLK pin. Active on
the positive edge by default with built-in
programmable polarity.
WE
The enable pin affects the write functionality of
the port. An inactive Write Enable prevents
any writing to memory cells. An active Write
Enable causes the clock edge to write the data
input signal to the memory location pointed to
by the address inputs. Active High by default
with built-in programmable polarity.
A0, A1, A2, A3
(A4, A5)
The address inputs select the memory cells for
read or write. The width of the port determines
the required address inputs.
D
The data input provides the new data value to
be written into the RAM.
O, SPO, and
DPO
The data output O on single-port RAM or the
SPO and DPO outputs on dual-port RAM
reflects the contents of the memory cells
referenced by the address inputs. Following an
active write clock edge, the data out (O or
SPO) reflects the newly written data.