Text
                    OpenRAM
An Open-Source Memory Compiler
Matthew Guthaus
mrg@ucsc.edu

https://vlsida.github.io/OpenRAM/


Banana Slugs https://vlsida.github.io/OpenRAM/
Why an Open Source Memory Compiler? ● Memories have become a commodity part... ○ but there are none available for “free”. ● Many IP cores are available for “free”... ○ but these don’t include necessary memories. ● Memories are a bottleneck for performance and power... ○ but their performance and power vary drastically. ● Memories have a regular structure which leads to automation... ○ but developing for multiple technologies and tool methodologies is hard. https://vlsida.github.io/OpenRAM/
Why NOT an Open Source Memory Compiler? ● ● Bit cells are proprietary from the foundry ○ Lithography issues and DRC waivers ○ Need to characterize real silicon Design rules are not accessible ○ PDKs are hard to access and not “open” ● It’s a lot of work ● You can just buy memory IP https://vlsida.github.io/OpenRAM/
Contemporary Compilers and/or IP Industry compilers: ● Intel rolls their own ● Cadence Legato Memory Solution ● Synopsys DesignWare (acquired Virage Logic) ● ARM Memory IP (acquired Artisan) ● Mobile Semiconductor Trailblaze ● Many others... 2(2𝝅r) is twice as round? Free options depend on commercial tools and only one technology: ● FabMem (NCSU) ● Potstill ( https://github.com/fabianschuiki/potstill ) 5 https://vlsida.github.io/OpenRAM/
Optimists vs Pessimists vs Engineers ● An optimist sees the glass as half full. ● A pessimist sees the glass as half empty. ● An engineer asks why the glass is twice as big as it needs to be. https://vlsida.github.io/OpenRAM/
OpenRAM Guiding Principles 1. Be “extensible” by hardware engineers 2. Be “independent” of technology 3. Be “independent” of specific tools or methodologies 4. Support multiple memory types and configurations https://vlsida.github.io/OpenRAM/
OpenRAM Features ● Implemented in Python 3.5+ ● Licensed with 3-clause BSD ● Provides reference circuit and physical implementations ○ FreePDK45 (generic, non-fabricable 45nm) ○ MOSIS Scalable CMOS (scn4m_subm 0.35um) ● Provides a timing/power characterization methodology and functional verification ● Generates GDSII layout data, SPICE netlist, Verilog model, DRC/LVS verification reports and P&R macro view. ● Wrappers for both open-source and commercial tools 8 https://vlsida.github.io/OpenRAM/
OpenRAM SRAM Architecture ● Bit-cell Array ○ ● Multiport Bitcells Each port: ○ Address Decoder(s) ○ Wordline Driver(s) ○ Column Multiplexer(s) ○ Bitline Precharge(s) ○ Sense Amplifier(s) ○ Write Driver(s) ○ Control Logic with Replica Bitline 9 https://vlsida.github.io/OpenRAM/
OpenRAM Implementation ● Front-end mode for architects/systems people ○ Generates spice, layout views, timing models ■ ● Netlist only mode can skip the physical design too ○ Doesn’t perform DRC/LVS ○ Estimates power/delay analytically Back-end mode for circuits/VLSI people ○ Generates spice, layout views, timing models ○ Performs DRC/LVS ■ ○ Can perform at each level of hierarchy or at the end Simulates power/delay ■ Can be back-annotated or not https://vlsida.github.io/OpenRAM/
Configuration Files ● Usage: $ openram.py myconfig $ openram.py myconfig.py ● Uses Python instead of additional language ● Can specify tools when multiple available ● Can override modules with custom implementations myconfig.py # Size and technology tech_name = "scn4m_subm" word_size = 16 num_words = 256 # Corners are process x supply x temperature process_corners = ["TT"] supply_voltages = [ 3.3 ] temperatures = [ 25 ] # Output storage output_path = "/my/results/directory" output_name = "btb_sram" # Tools spice = "ngspice" drc_name = "magic" lvs_name = "netgen" pex_name = "magic" # Custom logic module decoder = "mydecoder" https://vlsida.github.io/OpenRAM/
Data Sheets are a Feature!? https://vlsida.github.io/OpenRAM/
Unit Tests & DevOps ● Why is testing a “feature”!? ● Uses Python unit test framework ● GitLab runner for code coverage and results ● Tests for... ○ guiding users when porting to new technologies. ○ allowing users to add features without worrying about breaking functionality. ○ functionality, cell verification, timing verification, and technology verification. https://vlsida.github.io/OpenRAM/
Design Classes ● ● ● ● Spice and layout Interfaces ○ Custom cells (read GDS2 and SPICE) ○ Generated cells (creates GDS2 and SPICE “on the fly”) Netlist functions ○ Add (directional) pins ○ Add and connect instances Layout functions ○ Place instances ○ Add wires, routes, vias ○ Channel and Power router Verification functions (wrap around DRC and LVS tools) https://vlsida.github.io/OpenRAM/
Required Custom Design ● A few library cells with layout and spice: ○ Bitcell (and replica bitcell) ■ Could be from the foundry ○ Sense amplifier ○ DFF (from a standard cell library) ○ (Removing soon: write driver, tristate) Standard 6T (1rw) 6.8um x 9.2um ● P&R border layer defined for placement ● Sense amplifier pitch matched width to bitcell https://vlsida.github.io/OpenRAM/
Parameterized Gates and Transistors ● Needs to be “good enough” since not dominant portion of area ● Parameterized transistors ● Parameterized logic gates (pinv, pnand2, pnor2, pnand3) ● Multi-stage drivers ● Precharge ● Column mux ● (Soon: write driver, tristate) https://vlsida.github.io/OpenRAM/
Hierarchical Modules ● ● SRAM building blocks ○ Bank, Control Logic, Decoders, Column Mux, Various arrays (DFF, drivers) ○ Can override every module with a custom one in the configuration file Each module must: ○ ○ ○ Create netlist ■ Define inputs/outputs ■ Instantiate and connect sub-modules and cells Create layout ■ Place and route itself ■ Route vdd/gnd to M3 ■ (Optional) Run DRC/LVS Analytically model timing and power https://vlsida.github.io/OpenRAM/
Tool Portability ● OpenRAM uses a “wrapper” approach for DRC and LVS tools ○ ● Currently supports: Magic+Netgen and some commercial tools ■ Wish list: klayout, more commercial tools ■ Wish list: open source DRC and extraction? OpenRAM uses standard spice syntax ○ Currently supports: ngspice and some commercial tools ■ ○ Wish list: xyce Multi-threaded support is highly recommended (e.g. ngspice with OpenMP) https://vlsida.github.io/OpenRAM/
GDSII Result Samples 512 x 16b x 1rw FreePDK45 2048 x 32b x 1rw FreePDK45 https://vlsida.github.io/OpenRAM/
Area Results 20 https://vlsida.github.io/OpenRAM/
Area and Timing Results https://vlsida.github.io/OpenRAM/
Some Features in Progress ● FreePDK15 (15nm FinFET process) ○ ● Creating a pfinfet.py parameterized FinFET class XFab XH018 (180nm) ○ Working on collaboration to tape out memories ● Asynchronous control interface ● Built in Self Test (BIST) ● Error Correcting Codes (ECC) 22 https://vlsida.github.io/OpenRAM/
Conclusions ● OpenRAM generates the circuit, functional model, and layout of variable-sized SRAMs. ● OpenRAM provides a memory characterizer for synthesis timing and power models. ● OpenRAM is open-sourced, flexible, and portable. ● OpenRAM aims to be independent of specific tools and methodologies. ● We are actively developing new features and improvements. ● We are actively seeking feedback and collaborations (and, of course, funding!) https://vlsida.github.io/OpenRAM/
Contributors ● ● ● Numerous UCSC Graduate Students ○ Bin Wu, Hunter Nichols, Jennifer Sowash, Jesse Cirimelli-Low ○ Former Students: Michael Grimes (Achronix), Jeff Butera (Mentor) Oklahoma State University ○ Prof. James Stine ○ Dr. Samira Ataei (post-doc at Yale now) Other Collaboration ○ Tim Edwards (eFabless, Open Circuit Design) ○ Edmund Humenberger & Others (Symbiotic EDA) https://vlsida.github.io/OpenRAM/
Questions? https://github.com/VLSIDA/OpenRAM Matthew Guthaus mrg@ucsc.edu https://vlsida.github.io/OpenRAM/
Channel Router ● SRAMs typically try to use minimal layers of metal ○ Primarily used to connect decoders, input/output circuitry, or control logic ● Wish list ○ Minimize number of tracks ○ Must consider impact on floorplan Credit: Chen & Chang, EDA Handbook, Chapter 12, Global and detailed routing Sense amp to data flop connection https://vlsida.github.io/OpenRAM/
Power Supply Router ● Power pins are brought up to M3 throughout design ● Horizontal/vertical power grid (M3 and M4) ● ○ Blockage-aware ○ Uses conservative routing pitch ○ Wide metal DRC spacing supported Multi-pass algorithm ○ 1st: Route vertical and horizontal grids (blockage aware, allow connection to correct supply) ○ 2nd: Check direct overlaps of power pins ○ 3rd: Single direction probes to connect ○ 4th: A* maze router https://vlsida.github.io/OpenRAM/
In Progress: OpenRAM Library ● Downloadable IP ● Pre-characterized ● Various sizes and configs ● Technologies ○ SCMOS (scn4m_subm 0.35um) ○ FreePDK45 (45nm) ○ TODO: More https://vlsida.github.io/OpenRAMLibrary/ https://vlsida.github.io/OpenRAM/