Memory and Memory Compiler

Memory and
Memory Compiler
Chih-Tsun Huang (黃稚存)
Department of Computer Science
National Tsing Hua University
Common Memory Types

SRAM


DRAM


Static Random-Access Memory
Dynamic Random-Access Memory
Non-Volatile Memory:

ROM


Read-Only Memory
Flash memory
Spring 2011 CS4120
Chih-Tsun Huang
2
Memory in System Hierarchy

Commodity memory



External IC
Chip select, output enable
Embedded memory

Internal module
Spring 2011 CS4120
Chih-Tsun Huang
3
Common Memory Interface
cen
oen
address
q
data
write
SRAM
read
clk
Spring 2011 CS4120
Chih-Tsun Huang
4
Dual-Port vs. 2-Read-1-Write
Spring 2011 CS4120
Chih-Tsun Huang
5
Chih-Tsun Huang
6
Memory Array
Spring 2011 CS4120
Artisan SRAM Compiler


This is not a step-by-step documentation
Read the user guide for the details
Spring 2011 CS4120
Chih-Tsun Huang
7
SRAM Compiler (Generator)

Common SRAM compiler tool



By Artisan
Free (not really)
Common SRAM types
 Single-port SRAM





High-speed
High-density
Dual-port SRAM
Single-port, two-port register file
Thanks to the (free?) memory compiler, it is very
common to use a large amount of memory instances
in digital designs

Several hundreds to a few thousands
Spring 2011 CS4120
Chih-Tsun Huang
8
Location of Memory Compiler

Artisan memory compiler comes with the library usually
 For UMC 0.18um process, it’s in
/theda21_2/CBDK018_UMC_Artisan/cur/CIC/Memory
TSMC 0.18um process:
/theda21_2/CBDK018_TSMC_Artisan/cur/CIC/Memory
 Three memory types are supported




ra1sh: high-speed single-port SRAM
ra1sh: high-speed borderless bit-cell single-port SRAM
ra2sh: high-speed dual-port SRAM
Other naming convension:




sd: high-density
rf: register files
rod: diffusion programmable ROM
The usage is similar to other Artisan cell library
Spring 2011 CS4120
Chih-Tsun Huang
9
Documents and Executables
(UMC 0.18um)



The user guides are in
 ra1sh_1/doc/user_guide/ra1sh.pdf
 ra1sh_2/doc/user_guide/ra1sh.pdf
 ra2sh/doc/user_guide/ra2sh.pdf
The executables (Java byte-code)
 ra1sh_1/bin/ra1sh
 ra1sh_2/bin/ra1sh
 ra2sh/bin/ra1sh
Invoke the binary by
/theda21_2/CBDK018_UMC_Artisan/cur/CIC/Memory/ra1sh_1/bin/ra1sh

The usage is very clear if you refer to the documents
Spring 2011 CS4120
Chih-Tsun Huang
10
Documents and Executables
(TSMC 0.18um)



The user guides are in
 ra1shd/doc/user_guide/ra1shd.pdf
 ra2sh/doc/user_guide/ra2sh.pdf
 rf1sh/doc/user_guide/rf1sh.pdf
 rf2sh/doc/user_guide/rf2sh.pdf
 rodshd/doc/user_guide/rodsh.pdf
The executables (Java byte-code)
 ra1shd/bin/ra1shd
 ra2sh/bin/ra2sh
 rf1sh/bin/rf1sh
 rf2sh/bin/rf2sh
 rodshd/bin/rodshd
Invoke the binary by
/theda21_2/CBDK018_TSMC_Artisan/cur/CIC/Memory/ra1sh/bin/ra1shd

The usage is very clear if you refer to the documents
Spring 2011 CS4120
Chih-Tsun Huang
11
Interface

Parameters







Instance name: memory module name
Number of words: total addresses
Number of bits: bits of a word
Multiplexer width
Frequency
Ring width: power rings of the memory
Views (models/documents)

Postscript Datasheet: *.ps
Verilog model: *.v

Synopsys model: *.lib







Memory simulation model
Synthesis models: fast, typical, slow
You should assign a user-specified library name for these model
PrimeTime model
LVS netlist
GDS II layout
Spring 2011 CS4120
Chih-Tsun Huang
12
Note





Every time you change the parameter, select Update button to
make it effective
Most of the parameters have valid range, you should check the
log window to see if the input value is invalid
Multiplexer width is used to change the aspect ratio (geometric
shape) of memory
 Usually a square is preferred
 You can preview it in relative footprint window
Postscript can be converted to PDF if you don’t have a postscript
viewer
 Online converter: http://ps2pdf.com/convert.htm
You can also save a specification file and load it afterward
 » Utilities » Write Spec
ra1sh –spec <spec_file>
Spring 2011 CS4120
Chih-Tsun Huang
13
Chih-Tsun Huang
14
HS-SRAM-SP
Spring 2011 CS4120
SRAM-SP
(TSMC 018)
Spring 2011 CS4120
Chih-Tsun Huang
15
Chih-Tsun Huang
16
HS-SRAM-DP
Spring 2011 CS4120
Datasheet

Modern SRAM designs are synchronous





The control is very simple
Can you control the single-port SRAM?
How about the dual-port SRAM?
How to perform the Verilog simulation?
How to perform the APR process?
Spring 2011 CS4120
Chih-Tsun Huang
17
Synthesis Using Design
Compiler

When generating synthesis model, there is a prompt to enter
library name
 USERLIB by default
 If the memory instance is called RAM1024x16
 There will be 3 plaintext synthesis library





RAM1024x16_slow_syn.lib
RAM1024x16_typical_syn.lib
RAM1024x16_fast_syn.lib
You can convert them into binary DB format
In dc_shell
read_lib RAM1024x16_slow_syn.lib
write_lib USERLIB
lappend link_library "USERLIB.db"
lappend target_library "USERLIB.db"
Spring 2011 CS4120
Chih-Tsun Huang
18
Single-Port SRAM Output-Enable
Timing
Spring 2011 CS4120
Chih-Tsun Huang
19
Single-Port SRAM Read-Cycle Timing
Spring 2011 CS4120
Chih-Tsun Huang
20
Practical Read-Cycle Timing
Spring 2011 CS4120
Chih-Tsun Huang
21
Single-Port SRAM Write-Cycle Timing
Spring 2011 CS4120
Chih-Tsun Huang
22
Practical Write-Cycle Timing
Spring 2011 CS4120
Chih-Tsun Huang
23
Single-Port SRAM Timing Parameters
Spring 2011 CS4120
Chih-Tsun Huang
24
Modern SRAM Controls

Chip Enable (CEN)

Output enable (OEN)

Write Through

Write Mask

Sometime by multi-bit WEN
Spring 2011 CS4120
Chih-Tsun Huang
25
Remarks – Embedded Memory


Black boxes to the designer in both front-end and backend phases
Very Important to master the memories for a realistic
design


The amount of embedded memories


Many interfaces are similar to memory protocol
 BUS interface
 Memory-based IOs
Several hundreds to a few thousands
Area of memories dominates the system area
Spring 2011 CS4120
Chih-Tsun Huang
26