OpenRAM
An Open-Source Memory Compiler
Matthew Guthaus
mrg@ucsc.edu
https://vlsida.github.io/OpenRAM/
Contributors/Collaborators
2
https://vlsida.github.io/OpenRAM/
OpenRAM Dependencies
3
https://vlsida.github.io/OpenRAM/
Supported Technologies
4
https://vlsida.github.io/OpenRAM/
Multiport Bitcells
https://vlsida.github.io/OpenRAM/
Relative Bitcell Sizes
(0.35um SCMOS)
DFF
21.9um x 21.2um
(from OSU standard cell library)
Isolated Read 10T (1rw, 1r)
10.9um x 13.9um
Standard 6T (1rw)�6.8um x 9.2um
https://vlsida.github.io/OpenRAM/
“Thin” SRAM Bitcells (130nm)
Single Port�1.2um x 1.58um
Dual Port�2.40um x 1.58um
DFF (for reference)
5.83um x 7.07 um
Dual Port �(w/ straps & taps)�3.12um x 1.97um
Actual cells from SKY130!
Single Port �(w/ straps & taps)�2.49um x 1.58um
https://vlsida.github.io/OpenRAM/
OpenRAM SRAM Architecture
8
https://vlsida.github.io/OpenRAM/
Implementation
Technology and Tool Portability
10
https://vlsida.github.io/OpenRAM/
Basic Usage
11
https://vlsida.github.io/OpenRAM/
Environment Variable Setup (assuming bash)
12
https://vlsida.github.io/OpenRAM/
Command line usage
Basic command line (with or without py suffix):
openram.py config
openram.py config.py
Common arguments:
13
https://vlsida.github.io/OpenRAM/
Configuration Files
14
# Data word size
word_size = 2
# Number of words in the memory
num_words = 16
# Technology to use in $OPENRAM_TECH
tech_name = "scn4m_subm"
# Process corners to characterize
process_corners = ["TT"]
# Voltage corners to characterize
supply_voltages = [ 3.3 ]
# Temperature corners to characterize
temperatures = [ 25 ]
# Output directory for the results
output_path = "temp"
# Output file base name
output_name = "sram_16x2”
# Disable analytical models for full characterization (WARNING: slow!)
# analytical_delay = False
# To force this to use magic and netgen for DRC/LVS/PEX
# Could be calibre for FreePDK45
drc_name = "magic"
lvs_name = "netgen"
pex_name = "magic"
https://vlsida.github.io/OpenRAM/
Common configuration file options
15
https://vlsida.github.io/OpenRAM/
Output Files
The output files are placed in the output_dir defined in the configuration file.
The base name is specified by output_name and suffixes are added.
The final results files are:
16
https://vlsida.github.io/OpenRAM/
Data Sheets
https://vlsida.github.io/OpenRAM/
Debugging and Unit Testing
18
https://vlsida.github.io/OpenRAM/
Unit Tests
OpenRAM has the set of thorough regression tests implemented with the Python unit test framework:
19
https://vlsida.github.io/OpenRAM/
Unit Test Organization
20
https://vlsida.github.io/OpenRAM/
Running Unit Tests
21
https://vlsida.github.io/OpenRAM/
Successful Unit Tests
22
openram/compiler/tests$ ./regress.py� ______________________________________________________________________________
|==============================================================================|
|========= Running Test for: =========|
|========= scn4m_subm =========|
|========= ./regress.py =========|
|========= /tmp/openram_mrg_13245_temp/ =========|
|==============================================================================|
runTest (00_code_format_check_test.code_format_test) ... ok
runTest (01_library_drc_test.library_drc_test) ... ok
runTest (02_library_lvs_test.library_lvs_test) ... ok
runTest (03_contact_test.contact_test) ... ok
runTest (03_path_test.path_test) ... ok
etc.
openram/compiler/tests$ ./03_ptx_1finger_nmos_test.py
______________________________________________________________________________
|==============================================================================|
|========= Running Test for: =========|
|========= scn4m_subm =========|
|========= ./03_ptx_1finger_nmos_test.py =========|
|========= /tmp/openram_mrg_13750_temp/ =========|
|==============================================================================|
.
----------------------------------------------------------------------
Ran 1 test in 0.596s
OK
https://vlsida.github.io/OpenRAM/
Debugging Unsuccessful Unit Tests (or openram.py)
23
______________________________________________________________________________
|==============================================================================|
|========= Running Test for: =========|
|========= scn4m_subm =========|
|========= ./04_pinv_10x_test.py =========|
|========= /tmp/mydir =========|
|==============================================================================|
ERROR: file magic.py: line 174: DRC Errors pinv_0 2
F
======================================================================
FAIL: runTest (__main__.pinv_test)
----------------------------------------------------------------------
Traceback (most recent call last):
File "./04_pinv_10x_test.py", line 22, in runTest
self.local_check(tx)
File "/Users/mrg/openram/compiler/tests/testutils.py", line 45, in local_check
self.fail("DRC failed: {}".format(a.name))
AssertionError: DRC failed: pinv_0
----------------------------------------------------------------------
Ran 1 test in 0.609s
FAILED (failures=1)
https://vlsida.github.io/OpenRAM/
It didn’t finish... where are my files?
/tmp/openram_<user>_<pid>_temp
24
https://vlsida.github.io/OpenRAM/
Temporary Output Files
25
https://vlsida.github.io/OpenRAM/
Technology Setup
26
https://vlsida.github.io/OpenRAM/
Technology Directories
27
techname/
__init__.py -- Sets up PDK environment
tech/ -- Contains technology configuration
__init__.py -- Loads all modules
tech.py -- SPICE, DRC, GDS, and layer config
gds_lib/ -- Contains .gds files for each lib cell
sp_lib/ -- Contains .sp file for each lib cell
models/ -- Contains SPICE device corner models
(tf/) -- May contain some PDK material
(mag_lib/) -- May contain other layout formats
https://vlsida.github.io/OpenRAM/
Technology Configuration: Layer Map
28
layer={}
layer["vtg"] = -1
layer["vth"] = -1
layer["contact"] = 47
layer["pwell"] = 41
...
layer["metal4"] = 31
layer["text"] = 63
layer["boundary"] = 63
layer["blockage"] = 83
https://vlsida.github.io/OpenRAM/
Technology Configuration: GDS
29
#GDS file info
GDS={}
# gds units
GDS["unit"]=(0.001,1e-6)
# default label zoom
GDS["zoom"] = 0.5
https://vlsida.github.io/OpenRAM/
Technology Configuration: DRC
30
# Minimum spacing of metal3 wider than 0.09 & longer than 0.3 = 0.09
# Minimum spacing of metal3 wider than 0.27 & longer than 0.9 = 0.27
# Minimum spacing of metal3 wider than 0.5 & longer than 1.8 = 0.5
# Minimum spacing of metal3 wider than 0.9 & longer than 2.7 = 0.9
# Minimum spacing of metal3 wider than 1.5 & longer than 4.0 = 1.5
drc["metal3_to_metal3"] = drc_lut({(0.00, 0.0) : 0.07,
(0.09, 0.3) : 0.09,
(0.27, 0.9) : 0.27,
(0.50, 1.8) : 0.5,
(0.90, 2.7) : 0.9,
(1.50, 4.0) : 1.5})
https://vlsida.github.io/OpenRAM/
Technology Configuration: SPICE
31
https://vlsida.github.io/OpenRAM/
Technology Configuration: Parameters
32
https://vlsida.github.io/OpenRAM/
Library Cells
33
https://vlsida.github.io/OpenRAM/
Required Hard/Custom Cells
Standard 6T (1rw)�6.8um x 9.2um
Bitcell(s)
35
https://vlsida.github.io/OpenRAM/
Multiport Bitcells
Parameterized Bitcell
37
Sense Amplifier
38
https://vlsida.github.io/OpenRAM/
DFF
39
https://vlsida.github.io/OpenRAM/
Tristate/Write Driver
40
https://vlsida.github.io/OpenRAM/
Base Data Structures
41
https://vlsida.github.io/OpenRAM/
Design Classes
Base Class Inheritance
43
hierarchy_design.py�DRC/LVS functions
hierarchy_spice.py�Netlist related functionality
hierarchy_layout.py�Layout related functionality
gds_read
gds_write
get_blockages�etc.
Functions:
add_{layout_pin,rect,...} �place_inst�create_channel_route�etc.
sp_read�sp_write�Power data
Delay data
Functions:�add_pins�add_inst�
design.py
General design and helper DRC constants
Parameterized Transistor (ptx or pfinfet)
44
https://vlsida.github.io/OpenRAM/
Parameterized Cells
Dynamically generated cells (in $OPENRAM_HOME/pgates)
45
https://vlsida.github.io/OpenRAM/
Hierarchical Design Modules
46
https://vlsida.github.io/OpenRAM/
Hierarchical Design Modules
Bank
48
Port Data
49
Port Address
50
Plain Bitcell Array
51
Variations of Bitcells Needed
52
Replica Bitcell Array
B
B
B
B
B
B
B
B
D
D
R
R
R
R
R
D
D
D
D
D
D
D
D
D
D
R
R
R
R
R
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
wl0_0
wl0_1
wl0_2
wl0_3
bl0_0
br0_0
bl0_1
br0_1
rbl_bl0
rbl_br0
rbl_wl0
1D Arrays
54
2D Arrays
55
Delay Line
56
Hierarchical (Address) Decoder
57
Control Logic and Timing
58
https://vlsida.github.io/OpenRAM/
Read Timing
59
https://vlsida.github.io/OpenRAM/
Read Timing Simulation
60
https://vlsida.github.io/OpenRAM/
Write Timing
61
https://vlsida.github.io/OpenRAM/
Write Timing Simulation
62
https://vlsida.github.io/OpenRAM/
External Control Signals
63
https://vlsida.github.io/OpenRAM/
Internal Control Signals
64
https://vlsida.github.io/OpenRAM/
Replica Bitline (RBL)
65
Bitcell Array
Delay Line
rbl_bl
Replica Column
rbl_wl
s_en
pre_s_en
Replica Column is actually a part of the replica bitcell array to the match lithographic environment and wordline load.
Replica Bitcell Array
https://vlsida.github.io/OpenRAM/
Internal Control Signals Diagram (Read)
66
https://vlsida.github.io/OpenRAM/
Internal Control Signals Diagram (Write)
67
https://vlsida.github.io/OpenRAM/
Clock Distribution
68
https://vlsida.github.io/OpenRAM/
Routing
69
https://vlsida.github.io/OpenRAM/
Power Supply Options
70
https://vlsida.github.io/OpenRAM/
Power Routing
71
https://vlsida.github.io/OpenRAM/
Power Supply Algorithm
Channel Router
Sense amp to data flop connection
Credit: Chen & Chang, EDA Handbook, Chapter 12, Global and detailed routing
https://vlsida.github.io/OpenRAM/
Characterization
74
https://vlsida.github.io/OpenRAM/
Characterization Overview
Measures the timing/power through SPICE simulation:
75
https://vlsida.github.io/OpenRAM/
Characterizer Organization
76
https://vlsida.github.io/OpenRAM/
Characterization Options
77
https://vlsida.github.io/OpenRAM/
Characterization Measurements
*Note: Rise delays are dependent on the clock period if measured from negative clock edge due to precharge.
78
https://vlsida.github.io/OpenRAM/
Analytical Characterization
79
https://vlsida.github.io/OpenRAM/
Multiport Characterization
80
https://vlsida.github.io/OpenRAM/
Characterizer Unit Test Use
81
https://vlsida.github.io/OpenRAM/
Functional Simulation
https://vlsida.github.io/OpenRAM/
Power/Delay Characterization
https://vlsida.github.io/OpenRAM/
84
Timing Graph
https://vlsida.github.io/OpenRAM/
85
Graph Creation Example: Buffer
Xbuf1 A Z vdd gnd Buffer
https://vlsida.github.io/OpenRAM/
86
Graph Creation Example: Buffer
https://vlsida.github.io/OpenRAM/
87
Graph Creation Example: Buffer
https://vlsida.github.io/OpenRAM/
88
Graph Module Exclusion
https://vlsida.github.io/OpenRAM/
89
Graph Module Exclusion
Graph without Exclusion
Graph with Exclusion
https://vlsida.github.io/OpenRAM/
Timing Measurement Checks
In addition to measurements done for characterization. Several measurements are done to help debug memory failures.
90
https://vlsida.github.io/OpenRAM/
Results
91
https://vlsida.github.io/OpenRAM/
Small Layouts
512 x 16b x 1rw FreePDK45
2048 x 32b x 1rw FreePDK45
Relative Planar Bitcells
(0.35um SCMOS)
DFF
21.9um x 21.2um
(from OSU standard cell library)
Isolated Read 10T (1rw, 1r)
10.9um x 13.9um
Standard 6T (1rw)�6.8um x 9.2um
SRAM Area
94
https://vlsida.github.io/OpenRAM/
Generated Layout by OpenRAM for a multiport
(6R/2W) SRAM in 32 nm SOI CMOS Technology
95
https://vlsida.github.io/OpenRAM/
Timing and Density Results for Generated SRAMs
96
https://vlsida.github.io/OpenRAM/
Comparison with Fabricated SRAMs
97
Ref. | Feature Size | Tech. | Density [Mb/mm2] |
IEEE-VLSI’08 | 65 nm | CMOS | 0.7700 |
JSSC’11 | 45 nm | CMOS | 0.3300 |
JSSC’13 | 40 nm | CMOS | 0.9400 |
OpenRAM | 45 nm | FreePDK45 | 0.8260 |
JSSC’92 | 0.5 um | CMOS | 0.0036 |
JSSC’94 | 0.5 um | BICMOS | 0.0020 |
JSSC’99 | 0.5 um | CMOS | 0.0050 |
OpenRAM | 0.5 um | SCMOS | 0.0050 |
https://vlsida.github.io/OpenRAM/
Conclusions
98
https://vlsida.github.io/OpenRAM/