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.
Append to list of paths for searching for configuration files, exactly like the -I command-line option. Reminder: paths are comma-separated.
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.
Technology-dependent scaling factor for device lengths and widths, the multiplier factor applied to lengths and widths specified in PRS. Default: 1.0
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)
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)
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)
Default width (in lambda) for NFETs used in logic, where unspecified.
Default width (in lambda) for PFETs used in logic, where unspecified.
Default length (in lambda) for NFETs used in logic, where unspecified.
Default length (in lambda) for PFETs used in logic, where unspecified.
Default width (in lambda) for NFETs used in keepers (staticizers), where unspecified.
Default width (in lambda) for PFETs used in keepers (staticizers), where unspecified.
Default length (in lambda) for NFETs used in keepers (staticizers), where unspecified.
Default length (in lambda) for PFETs used in keepers (staticizers), where unspecified.
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.
If set to 1, include source and drain area and perimeter parameters for every transistor Default: 0
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
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
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).
Pseudo-option: preset bundle of options for formatting output. Valid choices of style are: spice, spectre.
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
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
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
- spice - .subckt CKT ... .ends
- spectre - subckt CKT ... ends CKT
- spice - inst ports ... type
- spectre - inst (ports ...) type
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
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
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
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
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
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)
If set to 1, prints out node port information, including signal direction. Default: 0
If set to 1, print a sets of node aliases (equivalent names). Default: 0
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
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
String to print at the beginning of a transistor instance. For spice, this is usually the M card. Default: M
String to print at the beginning of a subcircuit instance. For spice, this is usually the x card. Default: x
String to print before emitting a continued line. Default: (none)
String to print after emitting a continued line. Default: +
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.
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.
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: .
String used to separate members of datatype and channel instances. Default: .
Mangle the `]' character with a replacement string.
Mangle the `<>' sequence with a replacement string. This is applied before < and > are mangled.
Mangle the `,' character with a replacement string.
Mangle the `{' character with a replacement string.
Mangle the `}' character with a replacement string.
Mangle the `::' sequence with a replacement string. This is applied before : is mangled.
Mangle the `@' character (designating named internal node) with a replacement string.
Mangle the `#' character (designating auxiliary node) with a replacement string.
Mangle the `!' character (designating implicit supply node) with a replacement string.
Mangle the `"' character (from template parameter strings) with a replacement string.
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
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
If set to 1, print a list of manglings in comments. Default: 0
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".
Set error-handling policy when encountering unknown configuration options. Default: warn
Set error-handling policy when an internal node is used in a different supply domain than the one it was defined in. Default: warn
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
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
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