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 

 

 

Use Cases for User Primitive SB_SPRAM256KA

 

4.

This section describes the use cases of the SB_SPRAM256KA RAM blocks while instantiating, inferring, and cascading 
these blocks.  

4.1.

 

Instantiating Memories

 

SB_SPRAM256KA primitive can be directly instantiated using both Verilog and VHDL at the top level. An example of 
instantiating SB_SPRAM256KA RAM using Verilog: 

// spram256  user modules // 
SB_SPRAM256KA  ramfn_inst1( 
                .DATAIN(DATAIN), 
                .ADDRESS(ADDRESS), 
                .MASKWREN(MASKWREN), 
                .WREN(WREN), 
                .CHIPSELECT(CHIPSELECT), 
                .CLOCK(CLOCK), 
                .STANDBY(STANDBY), 
                .SLEEP(SLEEP), 
                .POWEROFF(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), 
                .DATAOUT(DATAOUT_B) 
)  

4.2.

 

Inferring Memories 

The memory also supports memory inferring where a behavioral code for the SPRAM is synthesized in iCEcube2 to 
create the RAM using the RAM primitives of ICE40 device. In order to use SB_SPRAM256KA RAM blocks, users can use 
syn_ramstyle attribute. 

The power save states (Standby, Sleep, and Power Off States) are not available when inferring the RAM. When 
implementing the inferred RAM using SB_SPRAM256KA primitives, software should tie off the STANDBY, SLEEP and 
SHUTDOWN ports to “0”. If power save features are desired, then users should use the method of instantiation and 
connect these ports as per design requirements. 

4.3.

 

Output Pipeline Registers 

The SB_SPRAM256KA does not include output registers.  
When desired, pipeline registers are required to be implemented in the fabric. While inferring the RAM, the software 
should implement the output pipeline registers in the fabric. 

Содержание iCE40 SPRAM Series

Страница 1: ...iCE40 SPRAM Usage Guide Technical Note TN1314 Version 1 0 June 2016...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 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...

Страница 12: ...7 th Floor 111 SW 5 th Avenue Portland OR 97204 USA T 503 268 8000 www latticesemi com...

Отзывы: