2019-04-26 21:21:50 +02:00
|
|
|
# See LICENSE for licensing information.
|
|
|
|
|
#
|
2019-06-14 17:43:41 +02:00
|
|
|
# Copyright (c) 2016-2019 Regents of the University of California and The Board
|
|
|
|
|
# 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
|
|
|
|
|
import getpass
|
2016-11-11 23:05:14 +01:00
|
|
|
import os
|
2016-11-08 18:57:35 +01:00
|
|
|
|
|
|
|
|
class options(optparse.Values):
|
|
|
|
|
"""
|
2018-01-20 01:38:19 +01:00
|
|
|
Class for holding all of the OpenRAM options. All of these options can be over-riden in a configuration file
|
|
|
|
|
that is the sole required command-line positional argument for openram.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 = ""
|
2019-04-01 18:58:59 +02:00
|
|
|
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the name of the technology.
|
|
|
|
|
tech_name = ""
|
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
|
|
|
|
|
|
|
|
|
|
# These will get initialized by the user or the tech file
|
|
|
|
|
supply_voltages = ""
|
|
|
|
|
temperatures = ""
|
|
|
|
|
process_corners = ""
|
|
|
|
|
|
|
|
|
|
# Size parameters must be specified by user in config file.
|
|
|
|
|
#num_words = 0
|
|
|
|
|
#word_size = 0
|
|
|
|
|
# You can manually specify banks, but it is better to auto-detect it.
|
|
|
|
|
num_banks = 1
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Optimization options
|
2019-06-26 00:45:02 +02:00
|
|
|
###################
|
|
|
|
|
rbl_delay_percentage = .5 #Approximate percentage of delay compared to bitlines
|
|
|
|
|
|
|
|
|
|
# Allow manual adjustment of the delay chain over automatic
|
2019-04-01 18:58:59 +02:00
|
|
|
use_tech_delay_chain_size = False
|
2019-06-26 00:45:02 +02:00
|
|
|
delay_chain_stages = 4
|
|
|
|
|
delay_chain_fanout_per_stage = 3
|
|
|
|
|
|
|
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Debug options.
|
|
|
|
|
###################
|
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
|
|
|
|
|
openram_temp = os.path.abspath(os.environ.get("OPENRAM_TMP"))
|
|
|
|
|
except:
|
|
|
|
|
# Else use a unique temporary directory
|
|
|
|
|
openram_temp = "/tmp/openram_{0}_{1}_temp/".format(getpass.getuser(),os.getpid())
|
2016-11-08 18:57:35 +01:00
|
|
|
# This is the verbosity level to control debug information. 0 is none, 1
|
|
|
|
|
# is minimal, etc.
|
|
|
|
|
debug_level = 0
|
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
|
|
|
|
|
route_supplies = False
|
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
|
|
|
|
|
trim_netlist = True
|
|
|
|
|
# Run with extracted parasitics
|
|
|
|
|
use_pex = False
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###################
|
|
|
|
|
# Tool options
|
|
|
|
|
###################
|
2017-11-14 22:24:14 +01:00
|
|
|
# Variable to select the variant of spice
|
2017-11-23 00:57:29 +01:00
|
|
|
spice_name = ""
|
2018-08-28 22:41:26 +02:00
|
|
|
# The spice executable being used which is derived from the user PATH.
|
|
|
|
|
spice_exe = ""
|
|
|
|
|
# Variable to select the variant of drc, lvs, pex
|
|
|
|
|
drc_name = ""
|
|
|
|
|
lvs_name = ""
|
|
|
|
|
pex_name = ""
|
2017-11-14 23:59:14 +01: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
|
2019-04-01 18:58:59 +02:00
|
|
|
|
2018-08-28 22:41:26 +02:00
|
|
|
# Should we print out the banner at startup
|
|
|
|
|
print_banner = True
|
2017-12-19 18:01:24 +01:00
|
|
|
# Use detailed LEF blockages
|
|
|
|
|
detailed_blockages = True
|
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 = ""
|
2017-11-09 20:13:44 +01:00
|
|
|
# Use analytical delay models by default rather than (slow) characterization
|
|
|
|
|
analytical_delay = True
|
2018-02-01 20:53:02 +01:00
|
|
|
# Purge the temp directory after a successful run (doesn't purge on errors, anyhow)
|
|
|
|
|
purge_temp = True
|
2018-02-10 00:33:03 +01:00
|
|
|
|
2018-01-20 01:38:19 +01:00
|
|
|
|
2019-04-01 18:58:59 +02:00
|
|
|
###################
|
2018-01-20 01:38:19 +01:00
|
|
|
# These are the default modules that can be over-riden
|
2019-04-01 18:58:59 +02:00
|
|
|
###################
|
2019-01-17 01:15:38 +01:00
|
|
|
bank_select = "bank_select"
|
|
|
|
|
bitcell_array = "bitcell_array"
|
|
|
|
|
bitcell = "bitcell"
|
|
|
|
|
column_mux_array = "single_level_column_mux_array"
|
|
|
|
|
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"
|
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_bitcell = "replica_bitcell"
|
|
|
|
|
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"
|
2018-01-20 01:38:19 +01:00
|
|
|
|