2019-04-26 21:21:50 +02:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2021-01-22 20:23:28 +01:00
|
|
|
# Copyright (c) 2016-2021 Regents of the University of California and The Board
|
2019-06-14 17:43:41 +02:00
|
|
|
# of Regents for the Oklahoma Agricultural and Mechanical College
|
|
|
|
|
# (acting for and on behalf of Oklahoma State University)
|
|
|
|
|
# All rights reserved.
|
2019-04-26 21:21:50 +02:00
|
|
|
#
|
2016-11-08 18:57:35 +01:00
|
|
|
import optparse
|
2016-11-11 23:05:14 +01:00
|
|
|
import os
|
2016-11-08 18:57:35 +01:00
|
|
|
|
2021-05-15 01:16:25 +02:00
|
|
|
|
2016-11-08 18:57:35 +01:00
|
|
|
class options(optparse.Values):
|
|
|
|
|
"""
|
2019-10-03 01:26:02 +02:00
|
|
|
Class for holding all of the OpenRAM options. All
|
|
|
|
|
of these options can be over-riden in a configuration file
|
2022-11-06 23:05:08 +01:00
|
|
|
that is the sole required command-line positional argument for sram_compiler.py.
|
2016-11-08 18:57:35 +01:00
|
|
|
"""
|
2016-11-15 17:57:06 +01:00
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
###################
|
|
|
|
|
# Configuration options
|
|
|
|
|
###################
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the technology directory.
|
|
|
|
|
openram_tech = ""
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the name of the technology.
|
|
|
|
|
tech_name = ""
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
# Port configuration (1-2 ports allowed)
|
|
|
|
|
num_rw_ports = 1
|
|
|
|
|
num_r_ports = 0
|
|
|
|
|
num_w_ports = 0
|
2019-06-29 00:43:09 +02:00
|
|
|
|
2020-11-19 19:48:35 +01:00
|
|
|
# By default, don't use hierarchical wordline
|
|
|
|
|
local_array_size = 0
|
2020-11-03 15:29:17 +01:00
|
|
|
|
2019-06-29 00:43:09 +02:00
|
|
|
# Write mask size, default will be overwritten with word_size if not user specified
|
|
|
|
|
write_size = None
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
# These will get initialized by the user or the tech file
|
2019-11-29 21:08:53 +01:00
|
|
|
nominal_corner_only = False
|
2019-04-01 18:58:59 +02:00
|
|
|
supply_voltages = ""
|
|
|
|
|
temperatures = ""
|
|
|
|
|
process_corners = ""
|
2020-10-16 22:52:36 +02:00
|
|
|
load_scales = ""
|
|
|
|
|
slew_scales = ""
|
2019-04-01 18:58:59 +02:00
|
|
|
|
|
|
|
|
# Size parameters must be specified by user in config file.
|
2019-10-03 01:26:02 +02:00
|
|
|
# num_words = 0
|
|
|
|
|
# word_size = 0
|
2019-04-01 18:58:59 +02:00
|
|
|
# You can manually specify banks, but it is better to auto-detect it.
|
|
|
|
|
num_banks = 1
|
2020-07-13 21:37:56 +02:00
|
|
|
words_per_row = None
|
2020-03-22 21:54:49 +01:00
|
|
|
num_spare_rows = 0
|
2020-07-13 21:37:56 +02:00
|
|
|
num_spare_cols = 0
|
2019-04-01 18:58:59 +02:00
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Optimization options
|
2019-06-26 00:45:02 +02:00
|
|
|
###################
|
2019-10-03 01:26:02 +02:00
|
|
|
# Approximate percentage of delay compared to bitlines
|
|
|
|
|
rbl_delay_percentage = 0.5
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2019-06-26 00:45:02 +02:00
|
|
|
# Allow manual adjustment of the delay chain over automatic
|
2021-06-23 01:13:33 +02:00
|
|
|
auto_delay_chain_sizing = False
|
2019-08-05 22:52:32 +02:00
|
|
|
delay_chain_stages = 9
|
|
|
|
|
delay_chain_fanout_per_stage = 4
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2020-06-25 15:44:07 +02:00
|
|
|
accuracy_requirement = 0.75
|
2019-04-01 18:58:59 +02:00
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Debug options.
|
2020-05-28 05:03:11 +02:00
|
|
|
###################
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the temp directory where all intermediate results are stored.
|
2019-03-08 20:12:30 +01:00
|
|
|
try:
|
|
|
|
|
# If user defined the temporary location in their environment, use it
|
2021-06-23 01:13:33 +02:00
|
|
|
|
2019-03-08 20:12:30 +01:00
|
|
|
openram_temp = os.path.abspath(os.environ.get("OPENRAM_TMP"))
|
2021-06-23 01:13:33 +02:00
|
|
|
|
2019-03-08 20:12:30 +01:00
|
|
|
except:
|
2021-02-11 00:39:12 +01:00
|
|
|
openram_temp = "/tmp"
|
2021-06-23 01:13:33 +02:00
|
|
|
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the verbosity level to control debug information. 0 is none, 1
|
|
|
|
|
# is minimal, etc.
|
2020-11-05 22:12:26 +01:00
|
|
|
verbose_level = 0
|
|
|
|
|
# Drop to pdb on failure?
|
|
|
|
|
debug = False
|
2020-12-18 00:32:15 +01:00
|
|
|
# Only use corners in config file. Disables generated corners
|
|
|
|
|
only_use_config_corners = False
|
2021-01-22 09:50:28 +01:00
|
|
|
# A list of PVT tuples and be given and only these will be characterized
|
|
|
|
|
use_specified_corners = None
|
2021-01-25 23:24:54 +01:00
|
|
|
# Allows specification of model data
|
|
|
|
|
sim_data_path = None
|
2021-02-25 01:43:34 +01:00
|
|
|
# A list of load/slew tuples
|
|
|
|
|
use_specified_load_slew = None
|
2019-04-01 18:58:59 +02:00
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Run-time vs accuracy options.
|
2019-04-01 19:35:17 +02:00
|
|
|
# Default, sacrifice accuracy/completeness for speed.
|
|
|
|
|
# Must turn on options for verification, final routing, etc.
|
2019-04-01 18:58:59 +02:00
|
|
|
###################
|
2018-08-27 23:33:02 +02:00
|
|
|
# When enabled, layout is not generated (and no DRC or LVS are performed)
|
|
|
|
|
netlist_only = False
|
2019-04-01 18:58:59 +02:00
|
|
|
# Whether we should do the final power routing
|
2020-12-23 16:25:07 +01:00
|
|
|
route_supplies = "tree"
|
2021-05-28 20:55:50 +02:00
|
|
|
supply_pin_type = "ring"
|
2018-11-14 01:51:19 +01:00
|
|
|
# This determines whether LVS and DRC is checked at all.
|
2019-04-01 19:35:17 +02:00
|
|
|
check_lvsdrc = False
|
2018-11-14 01:51:19 +01:00
|
|
|
# This determines whether LVS and DRC is checked for every submodule.
|
|
|
|
|
inline_lvsdrc = False
|
2019-04-01 18:58:59 +02:00
|
|
|
# Remove noncritical memory cells for characterization speed-up
|
2021-04-08 00:19:12 +02:00
|
|
|
trim_netlist = True
|
2019-04-01 18:58:59 +02:00
|
|
|
# Run with extracted parasitics
|
|
|
|
|
use_pex = False
|
2020-09-09 03:40:39 +02:00
|
|
|
# Output config with all options
|
2021-01-06 21:45:34 +01:00
|
|
|
output_extended_config = False
|
|
|
|
|
# Output temporary file used to format HTML page
|
2021-01-07 00:53:22 +01:00
|
|
|
output_datasheet_info = False
|
2020-12-09 21:54:11 +01:00
|
|
|
# Determines which analytical model to use.
|
|
|
|
|
# Available Models: elmore, linear_regression
|
2020-12-14 23:37:53 +01:00
|
|
|
model_name = "elmore"
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
###################
|
|
|
|
|
# Tool options
|
|
|
|
|
###################
|
2017-11-14 22:24:14 +01:00
|
|
|
# Variable to select the variant of spice
|
2021-06-02 01:41:14 +02:00
|
|
|
spice_name = None
|
2018-08-28 22:41:26 +02:00
|
|
|
# The spice executable being used which is derived from the user PATH.
|
2021-06-02 01:41:14 +02:00
|
|
|
spice_exe = None
|
2018-08-28 22:41:26 +02:00
|
|
|
# Variable to select the variant of drc, lvs, pex
|
2021-06-02 01:41:14 +02:00
|
|
|
drc_name = None
|
|
|
|
|
lvs_name = None
|
|
|
|
|
pex_name = None
|
2019-10-03 01:26:02 +02:00
|
|
|
# The DRC/LVS/PEX executable being used
|
|
|
|
|
# which is derived from the user PATH.
|
2018-01-12 23:39:42 +01:00
|
|
|
drc_exe = None
|
|
|
|
|
lvs_exe = None
|
|
|
|
|
pex_exe = None
|
2020-06-15 22:58:26 +02:00
|
|
|
# For sky130, we need magic for filtering.
|
|
|
|
|
magic_exe = None
|
2021-06-23 01:13:33 +02:00
|
|
|
|
2020-11-17 22:30:18 +01:00
|
|
|
# Number of threads to use
|
2021-03-08 23:40:36 +01:00
|
|
|
num_threads = 1
|
2021-02-03 23:19:11 +01:00
|
|
|
# Number of threads to use in ngspice/hspice
|
2021-05-14 20:45:10 +02:00
|
|
|
num_sim_threads = 3
|
2020-05-28 05:03:11 +02:00
|
|
|
|
2021-05-15 01:16:25 +02:00
|
|
|
# Some tools (e.g. Xyce) use other separators like ":"
|
|
|
|
|
hier_seperator = "."
|
2021-06-23 01:13:33 +02:00
|
|
|
|
2018-08-28 22:41:26 +02:00
|
|
|
# Should we print out the banner at startup
|
|
|
|
|
print_banner = True
|
2019-11-29 21:01:33 +01:00
|
|
|
|
2016-11-08 18:57:35 +01:00
|
|
|
# Define the output file paths
|
2018-01-20 01:38:19 +01:00
|
|
|
output_path = "."
|
2016-11-08 18:57:35 +01:00
|
|
|
# Define the output file base name
|
2018-02-12 20:22:47 +01:00
|
|
|
output_name = ""
|
2019-10-03 01:26:02 +02:00
|
|
|
# Use analytical delay models by default
|
|
|
|
|
# rather than (slow) characterization
|
2017-11-09 20:13:44 +01:00
|
|
|
analytical_delay = True
|
2019-10-03 01:26:02 +02:00
|
|
|
# Purge the temp directory after a successful
|
|
|
|
|
# run (doesn't purge on errors, anyhow)
|
2020-06-15 01:44:10 +02:00
|
|
|
|
|
|
|
|
# Route the input/output pins to the perimeter
|
2020-12-23 16:25:07 +01:00
|
|
|
perimeter_pins = True
|
2020-11-03 15:29:17 +01:00
|
|
|
|
2021-04-21 19:07:37 +02:00
|
|
|
# Detailed or abstract LEF view
|
|
|
|
|
detailed_lef = False
|
|
|
|
|
|
2020-11-05 22:12:26 +01:00
|
|
|
keep_temp = False
|
|
|
|
|
|
2018-01-20 01:38:19 +01:00
|
|
|
# These are the default modules that can be over-riden
|
2019-01-17 01:15:38 +01:00
|
|
|
bank_select = "bank_select"
|
|
|
|
|
bitcell_array = "bitcell_array"
|
|
|
|
|
bitcell = "bitcell"
|
2020-09-17 23:45:49 +02:00
|
|
|
buf_dec = "pbuf"
|
2022-05-17 22:32:19 +02:00
|
|
|
column_decoder = "column_decoder"
|
2020-11-20 10:11:08 +01:00
|
|
|
column_mux_array = "column_mux_array"
|
2019-01-17 01:15:38 +01:00
|
|
|
control_logic = "control_logic"
|
2018-01-20 01:38:19 +01:00
|
|
|
decoder = "hierarchical_decoder"
|
2019-01-17 01:15:38 +01:00
|
|
|
delay_chain = "delay_chain"
|
2018-09-13 20:40:24 +02:00
|
|
|
dff_array = "dff_array"
|
2018-02-15 00:16:28 +01:00
|
|
|
dff = "dff"
|
2020-05-14 20:20:37 +02:00
|
|
|
inv_dec = "pinv"
|
|
|
|
|
nand2_dec = "pnand2"
|
|
|
|
|
nand3_dec = "pnand3"
|
2020-12-09 21:54:11 +01:00
|
|
|
nand4_dec = "pnand4" # Not available right now
|
2021-03-15 17:44:14 +01:00
|
|
|
precharge = "precharge"
|
2018-01-20 01:38:19 +01:00
|
|
|
precharge_array = "precharge_array"
|
2019-01-17 01:56:06 +01:00
|
|
|
ptx = "ptx"
|
2019-01-17 01:15:38 +01:00
|
|
|
replica_bitline = "replica_bitline"
|
|
|
|
|
sense_amp_array = "sense_amp_array"
|
|
|
|
|
sense_amp = "sense_amp"
|
2018-01-20 01:38:19 +01:00
|
|
|
tri_gate_array = "tri_gate_array"
|
2019-01-17 01:15:38 +01:00
|
|
|
tri_gate = "tri_gate"
|
2018-01-20 01:38:19 +01:00
|
|
|
wordline_driver = "wordline_driver"
|
2019-01-17 01:15:38 +01:00
|
|
|
write_driver_array = "write_driver_array"
|
|
|
|
|
write_driver = "write_driver"
|
2019-07-25 00:01:20 +02:00
|
|
|
write_mask_and_array = "write_mask_and_array"
|