AMC
is an open-source asynchronous pipelined memory compiler. AMC
generates SRAM modules with a bundled-data datapath and quasi-delay-insensitive control. AMC
is a Python-base, flexible, user-modifiable and technology-independent memory compiler that generates fabricable SRAM blocks in a broad range of sizes, configurations and process nodes.
AMC
generates GDSII layout data, standard SPICE netlists, Verilog models, DRC/LVS verification reports, timing and power liberty models (.lib), and abstract placement and routing models (.lef).
AMC
source code is available on GitHub AMC
To use AMC, you must set two environment variable to your .bashrc:
export AMC_HOME="$HOME/AMC/compiler" export AMC_TECH="$HOME/AMC/technology"
In case you are using C shell you must add:
setenv AMC_HOME "$HOME/AMC/compiler" setenv AMC_TECH "$HOME/AMC/technology"
You can run AMC
from the command line using a single configuration file. For example:
python $AMC_HOME/AMC.py example_config.py
In example_config.py file you can specify the following parameters: (example_config_scn3me_subm.py is included in git repo for 0.5um technology)
# Data word size, any number greater than 1 is fine word_size = 16 # Number of rows in each memory bank, acceptable values are 32, 64, 128 or 256 num_rows = 64 # Number of words in each memory row (num_columns = word_size * words_per_row). Acceptable values are 1, 2 or 4 words_per_row = 2 # Number of sub-banks in each bank. Acceptable values are 1, 2, 4 or 8 num_subanks = 8 # Branch factors (number of inner-banks and outer-banks). Acceptable tuple values are (1,1), (1,2), (1,4), (2,4) or (4,4) branch_factors = (2,4) # Bank orientations (orientation of inner-banks and outer-banks). # Acceptable tuple values are (("H", "H"), (("V", "H"), (("H", "V"), or (("V", "V") bank_orientations = ("V", "H") # Output directory for the results. output_path = "path_to_AMC_output_files" # Output file name name = "AMC_sram" # Specify the technology name. Default is "scn3me_subm" for SCMOS 0.5um tech_name = "scn3me_subm" # Specify the process corners for characterization. # Transistors models for these process corners should be provided by user. #Transistor models for "scn3me_subm" are available in //AMC/technology/scn3me_subm/models// process_corners = ["TT", "SF"] # Voltage corners to characterize supply_voltages = [5.0, 4.5] # Temperature corners to characterize temperatures = [25, 125]
You can find more configuration options in: AMC/compiler/options.py
Some optional arguments to run the AMC
are:
AMC
puts all output files in a temporary directory (the path of temporary directory is shown in the banner). If AMC
passes, files in temporary directory are deleted. If you don't want to purge the content of temporary directory use -d or –dontpurge. If it fails, first thing to check is the standard output and error output from DRC/LVC which are .out and .err files in temporary directory. Any problem with your Calibre
setup will be shown in either of those files. In case DRC or LVS fails, then you need to check either doc.result or las.result files. You need a layout viewer to debug DRC/LVS errors. You can use any of the following layout viewers:
Also, you can use Calibre DESIGNrev
, Magic
( Magic) or Cadence Virtuoso
to stream the output GDS file for debugging.
To report a bug please submit it to:
If you are interested in submitting a fix or adding a new feature to AMC
use:
AMC
is written in Python2
. Any Python version higher than 2.7 is acceptable for running the compiler. Python NumPy package ( NumPy) is also needed.
Default tool for physical verification of generated layouts by AMC
is Calibre
. A wrapper file for Calibre
is included in compiler (you can find it at AMC/compiler/base/calibre.py). If you are using any other tool for DRC/LVS verification, you can simply add a wrapper file for your tool.
To run the AMC
characterizer or verifying the functionality of SRAM through AMC functional verification tests, you must have access to Synopsys HSIM
and Synopsys VCS
tools. Characterizer and functional tests rely on SPICE simulations.
AMC
has two main directory:
compiler directory contains following sub-directories:
technology directory contains the following sub-directories:
setup_AMC_techname.py
AMC
to generate/characterize the circuits in SCMOS 0.5um technology node:
for scn3me_subm you can find two additional sub-directories mag_lib and tf that contain the Magic layouts and technology file for this technology.These two sub-directories aren't directly used by AMC
and are provided as additional resources for users.
We have successfully ported the AMC
to 0.5um and 65nm technology nodes. Therefore, you should be able to port it to your desired process technology, too! Here is the steps you need to follow for porting AMC
to technology X:
Hint:
It is highly recommend to use unit tests in $AMC_HOME/compiler/tests when porting to a new technology node. Unit tests check the layout format of custom designed cells and are helpful for debugging. For each custom layout, there is an individual test to check all the possible ways that layout may be used in SRAM array. Your custom layout is acceptable by AMC
when it fully passes the test.
For example test 09_sense_amp_array_test.py checks the custom layout for sense amplifier for three possible scenarios:
For correct pin-connection and routing, certain rules must be followed in drawing custom layouts. In case of sense_amp, vdd, gnd, en pins are routed horizontally across the layout, BL and BR are routed vertically across the layout and dout, dout_bar are placed at the bottom left and bottom right corners. Following these rules the custom layout will pass the unit test and can be connected to other modules through abutment.
To get faster verification, AMC adds a functionality unit test (can be run by test 23: AMC/compiler/tests/23_func_sram_test.py) that co-simulates the Verilog and SPICE netlists. In this co-simulation Verilog test-bench drives the SPICE netlist and runs the SPICE simulation at transistor level. The files generated by AMC in functionality verification test are:
Different random input vector patterns can be generated simply by modifying the source.v file. AMC runs the simulation at batch mode. If simulation fails, first thing to check is the standard output and error output from spice which are spice_stderr.log and spice_stdout.log files in temporary directory. Any problem with your SPICE setup will be shown in either of those files. A successful simulation generates the following files (some of these files are generated when simulation is complete):
You can learn more about Verilog-HSIM co-simulation here: HSIM Manual
AMC characterization methodology is similar to functionality verification. Characterization will be performed for the specified process-corners, voltages and temperatures (PVT) in config file. For each PVT a separate Liberty file (.lib) will be generated. Liberty file is the ASCII representation of timing and power parameters. Liberty file generated by AMC has the standard lookup-table format and can be used for synthesis. Generated tables in Liberty file are 3×3, you can simply increase the size of tables by modifying the table size (adding more load and slew scales) in AMC/compiler/characterizer/lib.py file.
Hint:
AMC characterization relies on SPICE simulations and for large SRAM arrays, characterization is slow. To reduce the characterization time you can trim the SPICE netlist using AMC/compiler/characterizer/trim_spice.py file. By timing the SPICE netlist, portions of SRAM array that are not critical during read/write operation will be removed. Trimed netlists can be used for delay calculations. DO NOT use trimed netlist for LVS verification or leakage/energy measurement.
AMC
is licensed under GNU General Public License v2.0 ( LICENSE). AMC project originated from the OpenRAM code (OpenRAM) version 7b5791b from May 9, 2018, developed by Matthew Guthaus from UC Santa Cruz VLSIDA group as the lead architect and also contributed to by Samira Ataei. AMC developers have made a large number of changes that have to do with changing the memory interface circuits, supporting modern design rules and thin-cell SRAM layout, new partitioning and floorplanning, and different timing and characterization methodology. The organization of the code base mirrors the OpenRAM version 7b5791b. As OpenRAM is under BSD 3-Clause License, portions of code that are derived from OpenRAM remain under BSD license ( LICENSE.OR).