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 valiues. 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: 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_diff_overhang (real)

When computing parasitics, this is the length of diffusion overhang past the end of the drawn transistor, in lambda. Default: 6.0

— User Option: fet_spacing_diffonly (real)

When computing parasitics, this is the length of diffusion between adjoining transistors, in lambda. Default: 4.0

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

— 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: 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: 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_node_aliases (bool)

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

— 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: "* "

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: 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