
9-8
Memory Usage Guide
Lattice Semiconductor
LatticeECP/EC and LatticeXP Devices
The various ports and their definitions for the Single Port Memory are included in
Table 9-1. The table lists the cor-
responding ports for the module generated by IPexpress and for the EBR RAM_DQ primitive.
Table 9-1. EBR-based Single Port Memory Port Definitions
Reset (or RST) only resets the input and output registers of the RAM. It does not reset the contents of the memory.
CS, or Chip Select, a port available in the EBR primitive, is useful when memory requires multiple EBR blocks to be
cascaded. The CS signal forms the MSB for the address when multiple EBR blocks are cascaded. CS is a 3-bit
bus, so it can easily cascade eight memories. If the memory size specified by the user requires more than eight
EBR blocks, the software automatically generates the additional address decoding logic which is implemented in
the PFU (external to the EBR blocks).
Each EBR block consists of 9,216 bits of RAM. The values for x (for Address) and y (Data) for each EBR block for
Table 9-2. Single Port Memory Sizes for 9K Memories for LatticeECP/EC Devices
Table 9-3 shows the various attributes available for the Single Port Memory (RAM_DQ). Some of these attributes
are user selectable through the IPexpress GUI. For detailed attribute definitions, refer to Appendix A.
Table 9-3. Single Port RAM Attributes for LatticeECP/EC Devices
Port Name in
Generated Module
Port Name in the
EBR Block Primitive
Description
Active State
Clock
CLK
Clock
Rising Clock Edge
ClockEn
CE
Clock Enable
Active High
Address
AD[x:0]
Address Bus
—
Data
DI[y:0]
Data In
—
Q
DO[y:0]
Data Out
—
WE
Write Enable
Active High
Reset
RST
Reset
Active High
—
CS[2:0]
Chip Select
—
Single Port
Memory Size
Input Data
Output Data
Address [MSB:LSB]
8K x 1
DI
DO
AD[12:0]
4K x 2
DI[1:0]
DO[1:0]
AD[11:0]
2K x 4
DI[3:0]
DO[3:0]
AD[10:0]
1K x 9
DI[8:0]
DO[8:0]
AD[9:0]
512 x 18
DI[17:0]
DO[17:0]
AD[8:0]
256 x 36
DI[35:0]
DO[35:0]
AD[7:0]
Attribute
Description
Values
Default Value
User Selectable
Through
IPexpress
DATA_WIDTH
Data Word Width
1, 2, 4, 9, 18, 36
1
YES
REGMODE
Register Mode (Pipelining) NOREG, OUTREG
NOREG
YES
RESETMODE
Selects the Reset type
ASYNC, SYNC
ASYNC
YES
CSDECODE
Chip Select Decode
000, 001, 010, 011, 100, 101, 110,
111
000
NO
WRITEMODE
Read / Write Mode
NORMAL, WRITETHROUGH,
READBEFOREWRITE
NORMAL
YES
GSR
Global Set Reset
ENABLED, DISABLED
ENABLED
YES