2018-11-15 20:07:04 +01:00
|
|
|
# OpenRAM
|
|
|
|
|
[](https://scone.soe.ucsc.edu:8888/mrg/PrivateRAM/commits/dev)
|
|
|
|
|
[](./LICENSE)
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
An open-source static random access memory (SRAM) compiler.
|
|
|
|
|
|
|
|
|
|
# Why OpenRAM?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Basic Setup
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2017-11-09 20:24:42 +01:00
|
|
|
The OpenRAM compiler has very few dependencies:
|
2018-11-15 20:07:04 +01:00
|
|
|
+ ngspice-26 (or later) or HSpice I-2013.12-1 (or later) or CustomSim 2017 (or later)
|
|
|
|
|
+ Python 3.5 and higher
|
|
|
|
|
+ Python numpy (pip3 install numpy to install)
|
|
|
|
|
+ flask_table (pip3 install flask to install)
|
|
|
|
|
+ a setup script for each technology you want to use
|
|
|
|
|
+ a technology directory for each technology with the base cells (comes with [SCMOS][SCMOS] and [FreePDK45][FreePDK45])
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-02-06 19:54:47 +01:00
|
|
|
If you want to perform DRC and LVS, you will need either:
|
2018-11-15 20:07:04 +01:00
|
|
|
+ Calibre (for [FreePDK45][FreePDK45] or [SCMOS][SCMOS])
|
|
|
|
|
+ Magic + Netgen (for [SCMOS][SCMOS] only)
|
2018-02-06 19:54:47 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
You must set two environment variables: OPENRAM\_HOME should point to
|
|
|
|
|
the compiler source directory. OPENERAM\_TECH should point to a root
|
2017-11-09 20:24:42 +01:00
|
|
|
technology directory that contains subdirs of all other technologies.
|
|
|
|
|
For example, in bash, add to your .bashrc:
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
2018-10-22 17:37:22 +02:00
|
|
|
export OPENRAM_HOME="$HOME/openram/compiler"
|
|
|
|
|
export OPENRAM_TECH="$HOME/openram/technology"
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
2017-11-09 20:24:42 +01:00
|
|
|
For example, in csh/tcsh, add to your .cshrc/.tcshrc:
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
2018-10-22 17:37:22 +02:00
|
|
|
setenv OPENRAM_HOME "$HOME/openram/compiler"
|
|
|
|
|
setenv OPENRAM_TECH "$HOME/openram/technology"
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
2018-06-29 19:05:40 +02:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
We include the tech files necessary for FreePDK and [SCMOS][SCMOS]. The [SCMOS][SCMOS]
|
2018-06-29 19:05:40 +02:00
|
|
|
spice models, however, are generic and should be replaced with foundry
|
|
|
|
|
models.
|
2017-11-09 20:24:42 +01:00
|
|
|
If you are using FreePDK, you should also have that set up and have the
|
|
|
|
|
environment variable point to the PDK.
|
|
|
|
|
For example, in bash, add to your .bashrc:
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
|
|
|
|
export FREEPDK45="/bsoe/software/design-kits/FreePDK45"
|
|
|
|
|
```
|
2017-11-09 20:24:42 +01:00
|
|
|
For example, in csh/tcsh, add to your .tcshrc:
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
|
|
|
|
setenv FREEPDK45 "/bsoe/software/design-kits/FreePDK45"
|
|
|
|
|
```
|
2018-11-15 20:07:04 +01:00
|
|
|
We do not distribute the PDK, but you may download [FreePDK45][FreePDK45]
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
If you are using [SCMOS][SCMOS], you should install [Magic][Magic] and [Netgen][Netgen].
|
|
|
|
|
We have included the SCN4M design rules from [Qflow][Qflow].
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
# Directory Structure
|
2017-11-09 19:57:24 +01:00
|
|
|
|
|
|
|
|
* compiler - openram compiler itself (pointed to by OPENRAM_HOME)
|
2018-06-29 19:05:40 +02:00
|
|
|
* compiler/base - base data structure modules
|
|
|
|
|
* compiler/pgates - parameterized cells (e.g. logic gates)
|
2018-10-22 17:37:22 +02:00
|
|
|
* compiler/bitcells - various bitcell styles
|
2018-06-29 19:05:40 +02:00
|
|
|
* compiler/modules - high-level modules (e.g. decoders, etc.)
|
2018-10-22 17:37:22 +02:00
|
|
|
* compiler/verify - DRC and LVS verification wrappers
|
2017-11-09 19:57:24 +01:00
|
|
|
* compiler/characterizer - timing characterization code
|
|
|
|
|
* compiler/gdsMill - GDSII reader/writer
|
2018-10-22 17:37:22 +02:00
|
|
|
* compiler/router - router for signals and power supplies
|
2017-11-09 19:57:24 +01:00
|
|
|
* compiler/tests - unit tests
|
|
|
|
|
* technology - openram technology directory (pointed to by OPENRAM_TECH)
|
|
|
|
|
* technology/freepdk45 - example configuration library for freepdk45 technology node
|
2018-11-15 20:07:04 +01:00
|
|
|
* technology/scn4m_subm - example configuration library [SCMOS][SCMOS] technology node
|
2018-10-22 17:37:22 +02:00
|
|
|
* technology/scn3me_subm - unsupported configuration (not enough metal layers)
|
2017-11-09 19:57:24 +01:00
|
|
|
* technology/setup_scripts - setup scripts to customize your PDKs and OpenRAM technologies
|
2018-10-22 17:37:22 +02:00
|
|
|
* docs - LaTeX manual (outdated)
|
2018-06-29 19:05:40 +02:00
|
|
|
* lib - IP library of pregenerated memories
|
2017-11-09 19:57:24 +01:00
|
|
|
|
|
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
# Unit Tests
|
2017-11-09 19:57:24 +01:00
|
|
|
|
|
|
|
|
Regression testing performs a number of tests for all modules in OpenRAM.
|
|
|
|
|
|
|
|
|
|
Use the command:
|
|
|
|
|
```
|
|
|
|
|
python regress.py
|
|
|
|
|
```
|
|
|
|
|
To run a specific test:
|
|
|
|
|
```
|
|
|
|
|
python {unit test}.py
|
|
|
|
|
```
|
|
|
|
|
The unit tests take the same arguments as openram.py itself.
|
|
|
|
|
|
|
|
|
|
To increase the verbosity of the test, add one (or more) -v options:
|
|
|
|
|
```
|
|
|
|
|
python tests/00_code_format_check_test.py -v -t freepdk45
|
|
|
|
|
```
|
|
|
|
|
To specify a particular technology use "-t <techname>" such as
|
2018-11-15 20:07:04 +01:00
|
|
|
"-t freepdk45" or "-t scn4m\_subm". The default for a unit test is scn4m_subm.
|
2018-10-19 18:16:54 +02:00
|
|
|
The default for openram.py is specified in the configuration file.
|
2017-11-09 19:57:24 +01:00
|
|
|
|
|
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
# Creating Custom Technologies
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
All setup scripts should be in the setup\_scripts directory under the
|
|
|
|
|
$OPENRAM\_TECH directory. Please look at the following file for an
|
2017-11-09 20:22:14 +01:00
|
|
|
example of what is needed for OpenRAM:
|
2017-11-09 19:57:24 +01:00
|
|
|
```
|
|
|
|
|
$OPENRAM_TECH/setup_scripts/setup_openram_freepdk45.py
|
|
|
|
|
```
|
2018-11-15 20:07:04 +01:00
|
|
|
Each setup script should be named as: setup\_openram\_{tech name}.py.
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2017-11-09 20:22:14 +01:00
|
|
|
Each specific technology (e.g., freepdk45) should be a subdirectory
|
|
|
|
|
(e.g., $OPENRAM_TECH/freepdk45) and include certain folders and files:
|
2017-11-09 19:57:24 +01:00
|
|
|
1. gds_lib folder with all the .gds (premade) library cells. At a
|
|
|
|
|
minimum this includes:
|
|
|
|
|
* ms_flop.gds
|
|
|
|
|
* sense_amp.gds
|
|
|
|
|
* write_driver.gds
|
|
|
|
|
* cell_6t.gds
|
|
|
|
|
* replica_cell_6t.gds
|
|
|
|
|
* tri_gate.gds
|
|
|
|
|
2. sp_lib folder with all the .sp (premade) library netlists for the above cells.
|
|
|
|
|
3. layers.map
|
|
|
|
|
4. A valid tech Python module (tech directory with __init__.py and tech.py) with:
|
|
|
|
|
* References in tech.py to spice models
|
|
|
|
|
* DRC/LVS rules needed for dynamic cells and routing
|
|
|
|
|
* Layer information
|
|
|
|
|
* etc.
|
|
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
# License
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
OpenRAM is licensed under the [BSD 3-clause License](./LICENSE).
|
2018-02-06 20:22:22 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
# Contributors & Acknowledgment
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
- [Matthew Guthaus][Matthew Guthaus] created the OpenRAM project and is the lead architect.
|
2017-11-09 19:57:24 +01:00
|
|
|
|
|
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
* * *
|
2017-11-09 19:57:24 +01:00
|
|
|
|
2018-11-15 20:07:04 +01:00
|
|
|
[Matthew Guthaus]: https://users.soe.ucsc.edu/~mrg
|
|
|
|
|
[Github releases]: https://github.com/PrivateRAM/PrivateRAM/releases
|
|
|
|
|
[Github issues]: https://github.com/PrivateRAM/PrivateRAM/issues
|
|
|
|
|
[Github pull requests]: https://github.com/PrivateRAM/PrivateRAM/pulls
|
|
|
|
|
[Github projects]: https://github.com/PrivateRAM/PrivateRAM/projects
|
|
|
|
|
[Github insights]: https://github.com/PrivateRAM/PrivateRAM/pulse
|
|
|
|
|
[email me]: mailto:mrg+openram@ucsc.edu
|
|
|
|
|
[VLSIDA]: https://vlsida.soe.ucsc.edu
|
|
|
|
|
[OSUPDK]: https://vlsiarch.ecen.okstate.edu/flow/
|
|
|
|
|
[Magic]: http://opencircuitdesign.com/magic/
|
|
|
|
|
[Netgen]: http://opencircuitdesign.com/netgen/
|
|
|
|
|
[Qflow]: http://opencircuitdesign.com/qflow/history.html
|
|
|
|
|
[FreePDK45]: https://www.eda.ncsu.edu/wiki/FreePDK45:Contents
|
|
|
|
|
[SCMOS]: https://www.mosis.com/files/scmos/scmos.pdf
|