MinCirc: Optimum circuits generator


Program Manual - MinCirc ver. 1.4 (July 2019)

Command-line syntax

MinCirc [options]

Options

Description of the function to be implemented
-k n The number of circuit inputs. n < 31 [default: 4].
Is is overriden by the -pla option.
-n n The number of nodes. Forces implementation consisted of exactly n nodes. Does not return any solution, if such implementation does not exist [default: find minimum].
-f n Implement function #n. n < 2k. n is a decimal description of a truth table. [default: 1 (which is NOR)].
Is is overriden by the -pla option.
-fh n Implement function #n (in hexadecimal). n < 2k. n is a hexadecimal description of a truth table. [default: 1 (which is NOR)].
Is is overriden by the -pla option.
-truth fn Read/write truth table in ABC format. If -f specified, it is written, read otherwise.
Cannot be used together with -pla.
-pla fn Implement function given by a PLA file fn. All PLA types are supported.
If specified, overrides -n, -f, and -fh options.
Description of node functions and graph properties.
-nodefuncts s Node functions in a hex string. One hexadecimal digit represents one function, as a truth table. The order of digits is insignificant here, but the same order is used in the -gatecosts parameter. Properties (symmetry, negation symmetry) of the functions are recognized automatically [default: "8" (AND only)].
-gatecosts s Costs of node functions in a string of decimal digits, ordered as the -nodefuncts argument. [default: "1"].
-noinv Toggle allowing inverted edges [default: true (use inverters)].
-noconst Toggle allowing constants [default: true (constants can be used)].
-polyedges Toggle allowing polymorphic edges [default: false (do not use polymorphic edges)].
Functions generation
-best Generate only delay-optimum solution(s).
-enum Generate all solutions.
When used together with the -best option, generates all delay-optimum solutions.
-difftopology Enumerate all optimum solutions with different topology. Must be used with -enum.
-continue Save intermediate constraints periodically. Continue from these constraints, when interrupted.
To be used with -enum. Incompleteness indicated by a presence of 'constr.cnf' file.
Output
-save_dot fn Saves the resulting DOT file to file fn.
-save_blif fn Saves the resulting BLIF file to file fn.
-save_aag fn Saves the resulting AAG file to file fn. Supported formats (recognized automatically): AAG, XAAG, PAAG, PXAAG.
Statistics and other
-stats Prints statistics of the result to stderr.
-enumstats Prints statistics of the result to stderr during enumeration.
-v Print version

Truth tables examples

The functions to be implemented, when described by the -f or -fh option, are to be specified by a truth table. The output of an all-zero input corresponds to the least siginficant bit.

Example of a function F = x2'x0'x1' + x2'x0x1 + x2.x1:

x2x1x0F
0001
0010
0100
0111
1000
1010
1101
1111

This function can be described as:
Binary (the 000 entry is the LSB): 11001001
Decimal (for the the -f option): 201
Hexadecimal (for the the -fh option): C9

Node functions

All supported 2-input node functions are listed here (constants are not supported). The values given in "Hexadecimal representation" are to be the arguments in the -nodefuncts option.

Function Binary representation Hexadecimal representation
(to be used in the -nodefuncts parameter
NOR (a+b)' 0001 1
a'b 0010 2
a' 0011 3
ab' 0100 4
b' 0101 5
XOR a'b+ab' 0110 6
NAND (ab)' 0111 7
AND ab 1000 8
XNOR ab+a'b' 1001 9
b 1010 A
IMPLY a'+b 1011 B
a 1100 C
a+b' 1101 D
OR a+b 1110 E

Note that single-input node functions are supported too, but still they will be represented as a 2-input gate, with one input serving as a buffer or inverter input, while the second input will be connected arbitrarily. Therefore, it is suggested not to use these functions.

Polymorphic edges

Using polymorphic edges is allowed by the -polyedges option. They are implemented as negated (double-negated) edges, where the negation is controlled by an external signal. In the truth table description, this signal is the MSB. This signal is not considered as a function input.

Example

P stands for the polymorphy controlling input.

Example of a function F = P'(x0'x1' + x0x1) + P.x1:

Px1x0F
0001
0010
0100
0111
1000
1010
1101
1111

This function can be described as:
Binary (the 000 entry is the LSB): 11001001
Decimal (for the the -f option): 201
Hexadecimal (for the the -fh option): C9

Note that -k 2 must be specified.

Examples

T.B.D.