Previous: Option Summary, Up: Usage


4.2 Configuration Options

There are two ways to pass configuration options to hacknet. One is through the -f option on the command-line, the other way is to pass them in through a configuration file with the -c option. The option value specifications share the same syntax: key=values where values can be blank, a single value, or a comma-separated list of values. A key-value specifier is not permitted to have spaces in the string! The values themselves cannot contain comma characters.

In a configuration file, blank lines are ignored, as well as lines that begin with # (pound). Where boolean values are expected, pass 0 for false, or 1 for true.

The following parameters are used to manage distributed configuration files. This allows one to create incrementally different configurations.

— User Option: config_path paths

Append to list of paths for searching for configuration files, exactly like the -I command-line option. Reminder: paths are comma-separated.

— User Option: config_file files
— User Option: config_file_compat files

Import other configuration file(s), exactly like the -c and -C command-line options. File are searched using the configuration search path. The _compat variation processes old-style configuration files.

The following parameters affect emitted device sizes and units.

— User Option: lambda (real)

Technology-dependent scaling factor for device lengths and widths, the multiplier factor applied to lengths and widths specified in PRS. Default: 1.0

— User Option: length_unit (string)

Suffix-string to append to emitted length and width parameters. Can be a unit such as "u" or "n", or exponent such as "e-6" or "e-9". Default: u (micron)

— User Option: area_unit (string)

Suffix-string to append to emitted area values. Can be a unit such as "p" (for pico), or exponent such as "e-6" or "e-12". Alert: this must be set consistently with respect to length_unit. Default: p (pico, micron-squared)

— User Option: capacitance_unit (string)

Suffix-string to capacitance values. Can be a unit such as "p" (for pico), or exponent such as "e-6" or "e-12". Default: (blank)

— User Option: resistance_unit (string)

Suffix-string to resistance values. Default: (blank)

— User Option: inductance_unit (string)

Suffix-string to inductance values. Default: (blank)

— User Option: std_n_width (real)

Default width (in lambda) for NFETs used in logic, where unspecified.

— User Option: std_p_width (real)

Default width (in lambda) for PFETs used in logic, where unspecified.

— User Option: std_n_length (real)

Default length (in lambda) for NFETs used in logic, where unspecified.

— User Option: std_p_length (real)

Default length (in lambda) for PFETs used in logic, where unspecified.

— User Option: stat_n_width (real)

Default width (in lambda) for NFETs used in keepers (staticizers), where unspecified.

— User Option: stat_p_width (real)

Default width (in lambda) for PFETs used in keepers (staticizers), where unspecified.

— User Option: stat_n_length (real)

Default length (in lambda) for NFETs used in keepers (staticizers), where unspecified.

— User Option: stat_p_length (real)

Default length (in lambda) for PFETs used in keepers (staticizers), where unspecified.

— User Option: min_width (real)

Minimum transistor width in lambda.

— User Option: min_length (real)

Minimum transistor length in lambda.

— User Option: max_p_width (real)

Maximum PFET width.

— User Option: max_n_width (real)

Maximum NFET width.

— User Option: nfet_svt (string)
— User Option: nfet_lvt (string)
— User Option: nfet_hvt (string)
— User Option: pfet_svt (string)
— User Option: pfet_lvt (string)
— User Option: pfet_hvt (string)

Override the default device type names for NFETs and PFETS along with their non-standard threshold voltage variants.

The following options are related to transistor parasitics.

— User Option: emit_parasitics (bool)

If set to 1, include source and drain area and perimeter parameters for every transistor Default: 0

— User Option: fet_perimeter_gate_edge (bool)

When estimating parasitics, when this is true, include the gate edge of the rectangle when estimating perimeter values for parasitic capacitances. Including the gate edge length results in increased capacitance, which can be pessimistic. Default: 1

— User Option: fet_diff_overhang (real)

When computing parasitics, this is the length of diffusion overhang past the end of the drawn transistor, in lambda. Typically, this value comes from the minimum diffusion overhang rule in your process's DRC rule deck. Default: 6.0

— User Option: fet_spacing_diffonly (real)

When computing parasitics, this is the length of diffusion between adjoining transistors, in lambda. For the purpose of computing parasitic capacitances on shared nodes, this value should actually be half of the minimum spacing between stacked transistors according to your technology's DRC rule deck. This effectively assigns half of the diffusion area to the device on either side. Default: 4.0

hacknet provides several options for formatting the emitted output (because not all SPICEs are created alike).

— User Option: print (bool)

If set to 0, suppress normal netlist output. Default: 1

— User Option: output_format style

Pseudo-option: preset bundle of options for formatting output. Valid choices of style are: spice, spectre.

— User Option: emit_top (bool)

If set to 1, include the top-level instances in the netlist output. Setting this to 0 is useful for producing a library of subcircuit definitions for every type that was instantiated, recursively w.r.t dependencies. Default: 1

— User Option: nested_subcircuits (bool)

If this option is set to 1, then emit local subcircuits as nested definitions within their used definitions. Not sure which variants of SPICE support this. Default: 0

— User Option: empty_subcircuits (bool)

If this option is set to 1, then emit empty subcircuits, i.e. subcircuits with no devices. Probably want to force unused port nodes to be emitted in empty subcircuit definitions, option unused_ports. Default: 0

— User Option: subcircuit_definition_style style

— User Option: instance_port_style style

— User Option: node_ports (bool)

If set to 1, include bools (nodes, wires) in port lists for subcircuit definitions and instances. This is enabled with output_format=spice,spectre. Default: 1

— User Option: struct_ports (bool)

If set to 1, include user-defined structs and channels in port lists for subcircuit definitions and instances. This is enabled with output_format=verilog. Default: 0

— User Option: unused_ports (bool)

If this option is set to 1, then consider all ports used even if they are unconnected, for the purposes of emitting port lists. This is useful empty_subcircuits, which would result in subcircuits with no ports. Default: 0

— User Option: named_port_connections (bool)

If set to 1, emit instances' port connections using .port(local) syntax, otherwise emit port connections positionally. Most spice-like formats support only positional ports, but the Verilog language supports both. Named port connections makes the output more verbose, but less prone to positional connection errors. Default: 0

— User Option: prefer_port_aliases (bool)

Instead of using default heuristic for choosing shallowest or shortest canonical name, prefer any equivalent port name, if applicable. This can make netlists and simulation results easier to grok. Default: 0

— User Option: preferred_names (strings)

Declare local node names that should always take precedence over canonical shortest-names and preferred-port-aliases. This is useful for supply nodes that appear in structures, that are passed around globally. The names passed to this list should be pre-mangled, using the default struct-member-separator, $. Default: (blank)

— User Option: emit_port_summary (bool)

If set to 1, prints out node port information, including signal direction. Default: 0

— User Option: emit_node_aliases (bool)

If set to 1, print a sets of node aliases (equivalent names). Default: 0

— User Option: emit_node_caps (bool)

If set to 1, print a cumulative capaticance components for every local node. Components include: total diffusion perimeter length, total diffusion area, total gate area, and total wire area. Default: 0

— User Option: emit_node_terminals (bool)

If set to 1, print for every node, the terminals to which it connects on all devices. This is useful for debugging the redundant graphical representation used for graph traversals and analysis. Default: 0

— User Option: transistor_prefix (string)

String to print at the beginning of a transistor instance. For spice, this is usually the M card. Default: M

— User Option: subckt_instance_prefix (string)

String to print at the beginning of a subcircuit instance. For spice, this is usually the x card. Default: x

— User Option: pre_line_continue (string)

String to print before emitting a continued line. Default: (none)

— User Option: post_line_continue (string)

String to print after emitting a continued line. Default: +

— User Option: comment_prefix (string)

String to print before whole-line comments. Default: "* "

— User Option: auto_wrap_length (int)

If set to > 0, automatically wrap lines that would be longer than the given length. This is useful when there are external limits to line length that need to be accounted for. Default: 0 (no-wrap)

The following options are used for name mangling type-names and instance-names. By default, no mangling is done to keep the output (more) human-readable.

— User Option: mangle_underscore (string)

Substitute the `_' (underscore) character with another string, which may contain more underscores. Alert: It is essential to set this appropriately if underscores are to be used in other mangling replacement strings.

— User Option: mangle_process_member_separator (char)

String used to separate members of process instances. e.g., the `.' in `a.b' usually denotes that b is a member of typeof(a). Default: .

— User Option: mangle_struct_member_separator (char)

String used to separate members of datatype and channel instances. Default: .

— User Option: mangle_array_index_open (string)

Mangle the `[' character with a replacement string.

— User Option: mangle_array_index_close (string)

Mangle the `]' character with a replacement string.

— User Option: mangle_template_open (string)

Mangle the `<' character with a replacement string.

— User Option: mangle_template_close (string)

Mangle the `>' character with a replacement string.

— User Option: mangle_template_empty (string)

Mangle the `<>' sequence with a replacement string. This is applied before < and > are mangled.

— User Option: mangle_parameter_separator (string)

Mangle the `,' character with a replacement string.

— User Option: mangle_parameter_group_open (string)

Mangle the `{' character with a replacement string.

— User Option: mangle_parameter_group_close (string)

Mangle the `}' character with a replacement string.

— User Option: mangle_scope (string)

Mangle the `::' sequence with a replacement string. This is applied before : is mangled.

— User Option: mangle_colon (string)

Mangle the `:' character with a replacement string.

— User Option: mangle_internal_at (string)

Mangle the `@' character (designating named internal node) with a replacement string.

— User Option: mangle_auxiliary_pound (string)

Mangle the `#' character (designating auxiliary node) with a replacement string.

— User Option: mangle_implicit_bang (string)

Mangle the `!' character (designating implicit supply node) with a replacement string.

— User Option: mangle_double_quote (string)

Mangle the `"' character (from template parameter strings) with a replacement string.

— User Option: mangle_escaped_instance_identifiers (bool)

Verilog-style escaped identifiers. Wrap all instance names with slash and a space, e.g. \foo[0] . This is enabled for output_style=verilog by default. Default: 0

— User Option: mangle_escaped_type_identifiers (bool)

Verilog-style escaped identifiers. Wrap all type names with slash and a space, e.g. \foo[0] . This is disabled for output_style=verilog by default. Default: 0

— User Option: emit_mangle_map (bool)

If set to 1, print a list of manglings in comments. Default: 0

— User Option: reserved_names (strings)

Amend the set of names that should be rejected from normal use in the netlist because they have special meaning to other back-ends. Issuing a blank value will clear out all previous values. Comparison is done using the post-mangled names. Default: (blank)

Option policies control the behavior of certain diagnostics. Policy options accept the values "ignore", "warn", or "error".

— User Option: unknown_option (string)

Set error-handling policy when encountering unknown configuration options. Default: warn

— User Option: internal_node_supply_mismatch (string)

Set error-handling policy when an internal node is used in a different supply domain than the one it was defined in. Default: warn

— User Option: undriven_node (string)

Set error handling policy for subcircuits that find nodes that are neither used (connected to source, gate terminals) but not driven (connected to drain terminal) nor coming from subcircuit port. This check is always skipped for top-level circuits. Default: warn

— User Option: case_collision (string)

Set error handling policy for names that collide when case is ignored (insensitive). For this policy warnings are promoted to errors; use ignore to completely disable. If the value is anything but ignore, then the set of reserved names will also be transformed when detecting collisions. Default: warn

— User Option: non_CMOS_precharge (string)

Set the error handling policy for precharge expressions that are written non-CMOS, i.e. not fully-restoring. (for example, using an NMOS expression to pull-up an internal node in an NMOS stack) Such nets will only charge or precharge to 1 Vt from the supply rail. Be very careful with this option, it allows you to write nonsense like ‘a &{+x & ~y} b & c -> o-’. Default: warn

— User Option: below_min_width (string)

Set the error handling policy when a transistor width is clamped to the minimum width (from configuration). Default: warn