Professional Documents
Culture Documents
OpenRAM ICCAD 2016 Presentation
OpenRAM ICCAD 2016 Presentation
Contributors
• Presenters
• Prof. Matthew R. Guthaus (mrg@ucsc.edu)
• Samira Ataei (ataei@ostatemail.okstate.edu)
• Authors
• Prof. Matthew R. Guthaus, Prof. James E. Stine, Samira Ataei, Brian
Chen, Bin Wu, Mehedi Sarwar
• Other student contributors
• Jeff Butera, Tom Golubev, Seokjoong Kim, Matthew Gaalswyk, and
Son Bui
8 November 2016 OpenRAM : An Open-Source Memory Compiler 2
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
2
8 November 2016 OpenRAM : An Open-Source Memory Compiler 3
3
8 November 2016 OpenRAM : An Open-Source Memory Compiler 4
OpenRAM Motivation
• We believe in OpenRAM
• It is free and open-source
• Helpful to community
• Integrates into computer architecture and digital systems easily.
• Allows researchers to modify and use for existing SRAM
architectures and any memory design (even memresistors).
• We also believe in community
• We want circuits and system research as well as EDA to prosper
• Academic research in memory is important!
8 November 2016 OpenRAM : An Open-Source Memory Compiler 6
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
6
8 November 2016 OpenRAM : An Open-Source Memory Compiler 7
OpenRAM Features
● OpenRAM is implemented in the Python programming language.
● OpenRAM provides reference circuit and physical implementations in a non-
fabricable generic 45nm technology (FreePDK45) and fabricable Scalable
CMOS (SCMOS) by non-confidential MOSIS foundry services.
● OpenRAM includes a characterizer to generate the timing/power results in a
Liberty (lib) file.
● OpenRAM generates GDSII layout data, SPICE netlist, Verilog model,
DRC/LVS verification reports and .lef file for place and route.
● OpenRAM is independent of any specific commercial tool.
● OpenRAM is completely user-modifiable since all source code is open source.
7
8 November 2016 OpenRAM : An Open-Source Memory Compiler 8
What is Python?
• Object-oriented rapid prototyping language
• Not just a scripting language
• Not just another Perl
• Rich set of libraries
• numpy, SciPy, etc.
• Easy to learn, read, and use
• Extensible (add new modules)
• C/C++/Fortran/whatever
• Java (through Jython)
• Embeddable in applications
8 November 2016 OpenRAM : An Open-Source Memory Compiler 9
High-Level Properties
• Extremely portable
• Unix/Linux, Windows, Mac, PalmOS, WindowsCE, RiscOS, VxWorks,
QNX, OS/2, OS/390, AS/400, PlayStation, Sharp Zaurus, BeOS,
VMS…
• Compiles to interpreted byte code
• Compilation is implicit and automatic
• Memory management automatic
• Reference counting for most situations
• Garbage Collection added for cycle detection
• “Safe”: no core dumps due to your bugs
8 November 2016 OpenRAM : An Open-Source Memory Compiler 11
Language Properties
• Everything is an object
• Packages, modules, classes, functions
• Exception handling
• Dynamic typing, polymorphism
• Static scoping
• Operator overloading
• Indentation for block structure
• Otherwise conventional syntax
8 November 2016 OpenRAM : An Open-Source Memory Compiler 12
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
12
8 November 2016 OpenRAM : An Open-Source Memory Compiler 13
Memory Organization
• Special circuit tricks are used for the cell array to improve storage density.
• RAM/ROM naming convention:
• examples: 32 X 8, "32 by 8" => 32 8-bit words
• 1M X 1, "1 meg by 1" => 1M 1-bit words
• Standard address, data and control signal names
8 November 2016 OpenRAM : An Open-Source Memory Compiler 14
AK Storage Cell
Row Decode
M*2K
A0
Column Decode
AK-1 Selects appropriate word
(i.e., multiplexer)
Input-Output
(M bits)
8 November 2016 OpenRAM : An Open-Source Memory Compiler 15
Chip Enable
Address Memory Matrix
…
Pins
Data in out
Pins
If enable=0
… Read out = Z
Write enable
Logic
Sense Amps/Drivers Output Enable
If enable =1
Column Decoder
out = in
• Address pins drive row and column • Output Enable gates the chip’s tristate driver
decoders
• Write Enable sets the memory’s read/write mode
• Data pins are bidirectional, shared by
reads and writes • Chip Enable/Chip Select acts as a “master switch”
8 November 2016 OpenRAM : An Open-Source Memory Compiler 16
VDD
M2 M4
Q
M5 Q M6
M1
1 M3
BL BR
8 November 2016 OpenRAM : An Open-Source Memory Compiler 18
6T SRAM Cell
WL
ü Simple with Differential Structure
VDD
X High Leakage
M1 M3
1
X Write Half-Select Disturbance
X Low Stability at Low Voltages
BL BR
8 November 2016 OpenRAM : An Open-Source Memory Compiler 19
M2 M4
Q Q /Q
M5 Q M6
WL
VDD VTHInv
RBL
6T BL BR
BL is discharged
by (r/h)% when RC SCLK
SA is enabled. Optimum SAE
Timing
SCLK
OEb
8 November 2016 OpenRAM : An Open-Source Memory Compiler 25
Wordline Driver
Decoder
Bit Cell Array
• Hierarchical Address Decoder CLK Control
CSb Logic
• Wordline Driver OEb
&
Replica
• Column Multiplexer WEb Bit-line
Predecdoer
• Bitline Precharger Column Mux
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
26
8 November 2016 OpenRAM : An Open-Source Memory Compiler 27
Getting OpenRAM
• https://github.com/mguthaus/OpenRAM
• https://openram.soe.ucsc.edu/
Dependencies
• Python 2.7
• numpy: http://www.numpy.org/
• Options to custom name the SRAM (-o testsram), specify a design directory
(-p /designdir/testsram), disable DRC/LVS (-n), specify SPICE simulator (-s
ngspice), increase verbosity (-v), override technology (-t scn3me_subm),
etc. -h for help.
8 November 2016 OpenRAM : An Open-Source Memory Compiler 32
Clock/E1
OE
WE
Address Address for write Address for read
Tech Library
Front-End Memory Compiler
Methodology (Python)
Simulator
Logical Front-End Memory Characterizer (e.g. ngspice,
Physical (Python) spectre)
Back-End
Methodology Annotated
Liberty (.lib) Spice Timing/Power
35
8 November 2016 OpenRAM : An Open-Source Memory Compiler 36
Row Decoder
Logic Chip Enable
Memory
Clocking provides input
…
Address matrix
Data
synchronization and Pins
Pins
encourages more reliable … Read
operation at high speeds Sense Amps/Drivers
Column Decoder
Logic Output Enable
R1 R2 W3 R4 W5
CE
WE
CLK
Address A1 A2 A3 A4 A5
[G. Hom, MIT]
Data Q1 Q2 D3 Q4 D5
8 November 2016 OpenRAM : An Open-Source Memory Compiler 37
R1 R2 W3 R4 W5
CE
WE
CLK
Address A1 A2 A3 A4 A5
Data Q1 Q2 D3 Q4 D5
[G. Hom, MIT]
Write to A3 Data D3 Write to A5 Data D5
requested loaded requested loaded
8 November 2016 OpenRAM : An Open-Source Memory Compiler 38
38
8 November 2016 OpenRAM : An Open-Source Memory Compiler 39
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
40
8 November 2016 OpenRAM : An Open-Source Memory Compiler 41
OpenRAM Structure
• OpenRAM has an integrated, custom GDSII library (gdsMill) to read, write, and manipulate
GDSII files.
• To make the interfacing easier, OpenRAM implements a geometry wrapper class
(geometry.py). openram
design sram
bank control_logic
hierarchy_layout hierarchy_spice
add_inst() add_pin()
add_label() add_mod()
add_rec() connect_pin() bitcell_array writedriver_array hierarchical_decoder replica_bitline
gds_read() sp_read()
gds_write() sp_write()
.
.
.
. bitcell writedriver inverter nand2 nand3 replica_cell
Test
Units
Tech
files
globals
Calibre
DRC/LVS
41
8 November 2016 OpenRAM : An Open-Source Memory Compiler 42
43
8 November 2016 OpenRAM : An Open-Source Memory Compiler 44
height
• Pins are parsed from subckt
• Cells that are premade in OpenRAM
• 6t cell
• replica 6t cell
• sense amplifier
• flip-flop
• write driver
• tristate gate
width
8 November 2016 OpenRAM : An Open-Source Memory Compiler 45
• For technologies that have specific design requirements, such as specialized well
contacts, the user can include helper functions in the technology directory. These will be
called through technology call-back mechanisms.
• OpenRAM provides a wrapper interface with DRC/LVS tools that allow flexibility of any
DRC/LVS tool, the default is Calibre nmDRC and nmLVS.
• DRC/LVS are performed at all levels of the design hierarchy to enhance bug tracking.
• DRC/LVS can be disabled for improved run-time or if tool is not available.
47
8 November 2016 OpenRAM : An Open-Source Memory Compiler 48
OpenRAM Characterizer
Characterizer measures the timing/power characteristics through SPICE
simulation in 4 main steps:
OpenRAM
Memory Compiler
.LIB Model
48
8 November 2016 OpenRAM : An Open-Source Memory Compiler 49
Characterization
• Setup/Hold for Rise/Fall
• Bisection search using generic SPICE
syntax
• First, finds a feasible period by doubling
the time
• Starts with a “hint” from the technology file,
but not required.
• Min Period/Delay for Rise/Fall
• Measures data out delay while minimizing
the period
• First half of period is address decoding
• Second half of period is access time
• Performs a bisection search on the period
• Power Characterization
• Measures read and write during rise/fall
delay
8 November 2016 OpenRAM : An Open-Source Memory Compiler 50
51
8 November 2016 OpenRAM : An Open-Source Memory Compiler 52
OK
8 November 2016 OpenRAM : An Open-Source Memory Compiler 53
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
53
8 November 2016 OpenRAM : An Open-Source Memory Compiler 54
54
8 November 2016 OpenRAM : An Open-Source Memory Compiler 55
55
8 November 2016 OpenRAM : An Open-Source Memory Compiler 56
56
8 November 2016 OpenRAM : An Open-Source Memory Compiler 57
Wire for (M2, Via1, M1) Path for M1 Contacts in different sizes
57
8 November 2016 OpenRAM : An Open-Source Memory Compiler 58
58
Inverter NAND2 NAND3 NOR2
8 November 2016 OpenRAM : An Open-Source Memory Compiler 59
4:1 column_multiplexer
59
3x3 bitcell_array 2:4 decoder
8 November 2016 OpenRAM : An Open-Source Memory Compiler 60
1x4 write_driver_array
1x3 precharge_array 1x3 sense_amp_array (there is column_mux in array) 60
8 November 2016 OpenRAM : An Open-Source Memory Compiler 61
Control_logic (master-slave FF, Nand, Nor, Inverter and RBL) Replica Bitline 61
8 November 2016 OpenRAM : An Open-Source Memory Compiler 62
• Bitcell-array
• Sense-amp-array
• Write-driver-array
• Hierarchical-decoder
• Wordline-driver
• Precharge-array
• Column-multiplexer (if needed)
• MS-flipflop-array
• Trigate-array
64
8 November 2016 OpenRAM : An Open-Source Memory Compiler 65
• Copy the config_20_freepdk45.py for each size memory and modify the
size and technology:
• tech_name
• word_size
• num_words
• num_banks
66
8 November 2016 OpenRAM : An Open-Source Memory Compiler 67
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
67
8 November 2016 OpenRAM : An Open-Source Memory Compiler 68
Make sure it
has a
Boundary
layer and
pin labels.
68
8 November 2016 OpenRAM : An Open-Source Memory Compiler 69
.ENDS cell_12t
8 November 2016 OpenRAM : An Open-Source Memory Compiler 70
class cell_12t:
"""
A single bit 12T cell.
""”
pins = ["BL", "BR", "WL", "vdd", "gnd"]
chars = utils.auto_measure_libcell(pins, "cell_12t", GDS["unit"],layer["boundary"])
…
tri_gate_array = "tri_gate_array"
wordline_driver = "wordline_driver" Oh, replica too!!
replica_bitcell = "replica_cell_12t”
bitcell = ”cell_12t"
delay_chain = "logic_effort_dc"
8 November 2016 OpenRAM : An Open-Source Memory Compiler 72
72
8 November 2016 OpenRAM : An Open-Source Memory Compiler 73
class bitcell_array(design.design):
"""
Creates a rows x cols array of memory cells. Assumes bit-lines
and word line are connected by abutment.
Connects the word lines and bit lines.
"""
8 November 2016 OpenRAM : An Open-Source Memory Compiler 74
c = reload(__import__(OPTS.config.bitcell))
self.mod_bitcell = getattr(c, OPTS.config.bitcell)
self.add_pins()
self.create_layout()
self.add_labels()
self.DRC_LVS()
8 November 2016 OpenRAM : An Open-Source Memory Compiler 75
def add_pins(self):
for col in range(self.column_size):
self.add_pin("bl[{0}]".format(col))
self.add_pin("br[{0}]".format(col))
for row in range(self.row_size):
self.add_pin("wl[{0}]".format(row))
self.add_pin("vdd")
self.add_pin("gnd")
8 November 2016 OpenRAM : An Open-Source Memory Compiler 76
Outline
• Background on Memory Compilers
• OpenRAM Features
• OpenRAM Architecture and Circuits
• OpenRAM Usage
• OpenRAM Development
• How to port OpenRAM to a New Technology
• How to change the OpenRAM Circuits/Modules
• Conclusion
79
8 November 2016 OpenRAM : An Open-Source Memory Compiler 80
WWL2
WBL1 WBR1 5.2 um
VDD
WBL2 WBR2 Read Port #1 Write Port #1 Write Port #2 Read Port #2
Bistable Circuitry
and Read Buffers
Cross-Coupled
/Q
Q
Cross-Coupled
1.6 um
RWL1
Bistable Circuitry
RWL2
RBR1 RBL1
and Read Buffers
RBR2 RBL2
RWL3
Read Ports
RBR3 RBL3
RWL4
RBR4 RBL4 Read Port #3 Read Port #4 Read Port #5 Read Port #6
RWL5
RBR5 RBL5
RWL6
RBR6 RBL6
Predecoder
Predecoder
Predecoder
Predecoder
Predecoder
128.87 um
Decoder 1 - 4
Decoder 5 - 8
Decoder W1
Decoder W2
Decoder R2
Decoder R3
Decoder R5
64 x 64
Decoder R6
Decoder R4
Decoder R1
Multi-Port
Bitcell Array
(64 x 64)
Bitcell Array
82
8 November 2016 OpenRAM : An Open-Source Memory Compiler 83
Conclusions
● The main motivation behind OpenRAM is to promote memory-related research in
academia and provides a platform to implement and test new memory designs.
● OpenRAM is open-sourced, flexible, and portable and can be adapted to various
technologies.
● OpenRAM generates the circuit, functional model, and layout of variable-sized
SRAMs and provides a memory characterizer for synthesis timing/power models.
● We are also continuously introducing new features, such as non-6T memories,
variability characterization, word-line segmenting, characterization speed-up, and
a graphical user interface (GUI).
● We hope to engage an active community in the future development of OpenRAM.
84
8 November 2016 OpenRAM : An Open-Source Memory Compiler 85
Future Work
• Porting to FreePDK15
• Multi-port memories
• Internal clock buffers
• Variability analysis
• Create a maze router
• Alternate cells: 8T? 10T?
8 November 2016 OpenRAM : An Open-Source Memory Compiler 86
Acknowledgment
• Many thanks to National Science Foundation
• This material is based upon work supported by the National Science
Foundation under Grant No. CNS-1205685.
• We give thanks to other students who have contributed to
the project, as well.
• We hope many will use and contribute to project!
8 November 2016 OpenRAM : An Open-Source Memory Compiler 87
• https://openram.soe.ucsc.edu/
• Contact:
• Prof. Matthew Guthaus (mrg@ucsc.edu)
• Samira Ataei (ataei@okstate.edu)
• Prof. James Stine (james.stine@okstate.edu)
8 November 2016 OpenRAM : An Open-Source Memory Compiler
OPENRAM
AN OPEN-SOURCE MEMORY COMPILER
Matthew R. Guthaus1, James E. Stine2, Samira Ataei2
Brian Chen1, Bin Wu1, Mehedi Sarwar2
1 VLSI Design and Automation Group at UCSC
2 VLSI Architecture Research Group at Oklahoma State University