background image

 

iCE40 SPRAM Usage Guide 

 

Technical Note 

 
 

© 2016 Lattice Semiconductor Corp. All Lattice trademarks, registered trademarks, patents, and disclaimers are as listed at 

www.latticesemi.com/legal

All other brand or product names are 

trademarks or registered trademarks of their respective holders. The specifications and information herein are subject to change without notice. 

TN1314-1.0 

 

Table 2.1. SB_SPRAM256KA RAM Port Definitions 

(Continued) 

User 
Primitive 
Port Name 

Test 

Primitive 

Port 

Name 

Primitive 

Port 

Width 

HW 

Port 

Name 

HW 

Port 

Width 

Pin Name 

Default Value 

Description 

Note 

SLEEP 

— 

[0:0] 

DS 

[0:0] 

Deep 
Sleep 
Input 

1b’0 

This pin shuts down 
power to periphery and 
maintains memory 
contents.  
The outputs of the 
memory are pulled low. 

POWEROFF 

— 

[0:0] 

— 

[0:0] 

Power Off 
Input 

1b’1 

This pin turns off the 
power to the memory 
core. Note that there is 
no memory data 
retention when this is 
driven low. 

DATAOUT 

— 

[15:0] 

[15:0] 

Data 
Output 
bus 

— 

This pin outputs the 
contents of the memory 
location addressed by 
the address Input 
signals. 

— 

Notes

1.

 

MASKWREN includes the nibble write masks for the DATAIN. 
The hardware port, WEM allows write mask for individual bits of DATAIN.  
For external user primitive level, this mask is available for each nibble (4-bits). Thus the MASKWREN has to map to WEM as 
follows: 
 

MASKWREN(3) => WEM(15) 

 

MASKWREN(3) => WEM(14) 

 

MASKWREN(3) => WEM(13) 

 

MASKWREN(3) => WEM(12) 

 

MASKWREN(2) => WEM(11) 

 

MASKWREN(2) => WEM(10) 

 

MASKWREN(2) => WEM(9) 

 

MASKWREN(2) => WEM(8) 

 

MASKWREN(1) => WEM(7) 

 

MASKWREN(1) => WEM(6) 

 

MASKWREN(1) => WEM(5) 

 

MASKWREN(1) => WEM(4) 

 

MASKWREN(0) => WEM(3) 

 

MASKWREN(0) => WEM(2) 

 

MASKWREN(0) => WEM(1) 

 

MASKWREN(0) => WEM(0) 

2.

 

The default value of each MASKWREN is 1. In order to mask a nibble of DATAIN, the MASKWREN needs to be pulled low (0). 
The following shows which MASKWREN bits enable the mask for the DATAIN nibbles:  
 

MASKWREN(3) enables mask for DATAIN(15:12) 

 

MASKWREN(2) enables mask for DATAIN (11:8) 

 

MASKWREN(1) enables mask for DATAIN (7:4) 

 

MASKWREN(0) enables mask for DATAIN(3:0) 

3.

 

STANDBY, SLEEP signals are mutually exclusive. Refer to the Logic Truth Table (Power Modes) section in the datasheet for valid 
values for these signals in different states. 

4.

 

POWEROFF is a signal that controls the built in power switch in each memory block. This signal when driven low (1’b0), shuts 
down the power to the memory. During the off state, there is no memory data retention. 
When POWEROFF is driven high (1’b1), the SPRAM is powered on. 

There are no special attributes needed for SB_SPRAM256KA because it has fixed configuration of 16,384 addresses and 
16 data width, running in Normal mode. The inputs (ADDRESS and DATAIN) are always registered. DATAOUT has no 
registers. 

SB_SPRAM256KA RAM does not support initialization through device configuration. 

Summary of Contents for iCE40 SPRAM Series

Page 1: ...iCE40 SPRAM Usage Guide Technical Note TN1314 Version 1 0 June 2016...

Page 2: ...ons and GUI Options 4 Power Save States for SPRAM 6 3 3 1 Normal State 6 3 2 Standby State 6 3 3 Sleep State 6 3 4 Power Off State 6 Use Cases for User Primitive SB_SPRAM256KA 7 4 4 1 Instantiating Me...

Page 3: ...r 256 kb memory blocks available that is total 1024 kb of Single Port memory Single Port RAM Primitives 2 The iCE40 devices offer four embedded memory blocks of SPRAM Each of these blocks can be confi...

Page 4: ...DATAIN 15 0 D 15 0 Data Input 16b 0000000000000000 The Data Input bus is used to write the data into the memory location specified by Address input port during the write cycle MASKWREN 3 0 WEM 15 0 M...

Page 5: ...us the MASKWREN has to map to WEM as follows MASKWREN 3 WEM 15 MASKWREN 3 WEM 14 MASKWREN 3 WEM 13 MASKWREN 3 WEM 12 MASKWREN 2 WEM 11 MASKWREN 2 WEM 10 MASKWREN 2 WEM 9 MASKWREN 2 WEM 8 MASKWREN 1 WE...

Page 6: ...not change when the RAM is placed in Standby State It is to be noted that Standby State is referred to as Light Sleep state in the RAM datasheet The name STANDBY has been chosen to match and be consis...

Page 7: ...ROFF POWEROFF DATAOUT DATAOUT_A SB_SPRAM256KA ramfn_inst2 DATAIN DATAIN ADDRESS ADDRESS MASKWREN MASKWREN WREN WREN CHIPSELECT CHIPSELECT CLOCK CLOCK STANDBY STANDBY SLEEP SLEEP POWEROFF POWEROFF DATA...

Page 8: ...ogic required will be implemented in the device fabric for creating larger memories Address Cascading or Depth Cascading 4 4 1 Address Depth cascading is useful when the memories are required to have...

Page 9: ...gic is needed essentially for concatenating words from individual SPRAM blocks Figure 4 2 shows an example of the Width cascading of a 16k x 32 SPRAM The rest of the signals that are not shown should...

Page 10: ...are as listed at www latticesemi com legal All other brand or product names are trademarks or registered trademarks of their respective holders The specifications and information herein are subject t...

Page 11: ...d disclaimers are as listed at www latticesemi com legal All other brand or product names are trademarks or registered trademarks of their respective holders The specifications and information herein...

Page 12: ...7 th Floor 111 SW 5 th Avenue Portland OR 97204 USA T 503 268 8000 www latticesemi com...

Reviews: