int
Bnet_BuildNodeBDD(
DdManager * dd, DD manager
BnetNode * nd, node of the boolean network
st_table * hash, symbol table of the boolean network
int params, type of DD to be built
int nodrop retain the intermediate node DDs until the end
)
- Builds the BDD for the function of a node and stores a pointer to it in the dd field of the node itself. The reference count of the BDD is incremented. If params is BNET_LOCAL_DD, then the BDD is built in terms of the local inputs to the node; otherwise, if params is BNET_GLOBAL_DD, the BDD is built in terms of the network primary inputs. To build the global BDD of a node, the BDDs for its local inputs must exist. If that is not the case, Bnet_BuildNodeBDD recursively builds them. Likewise, to create the local BDD for a node, the local inputs must have variables assigned to them. If that is not the case, Bnet_BuildNodeBDD recursively assigns variables to nodes. Bnet_BuildNodeBDD returns 1 in case of success; 0 otherwise.
- Side Effects Sets the dd field of the node.
int
Bnet_DfsVariableOrder(
DdManager * dd,
BnetNetwork * net
)
- Orders the BDD variables by DFS. Returns 1 in case of success; 0 otherwise.
- Side Effects Uses the visited flags of the nodes.
void
Bnet_FreeNetwork(
BnetNetwork * net
)
- Frees a boolean network created by Bnet_ReadNetwork.
- Side Effects None
- See Also
Bnet_ReadNetwork
void
Bnet_PrintNetwork(
BnetNetwork * net boolean network
)
- Prints to the standard output a boolean network created by Bnet_ReadNetwork. Uses the blif format; this way, one can verify the equivalence of the input and the output with, say, sis.
- Side Effects None
- See Also
Bnet_ReadNetwork
int
Bnet_PrintOrder(
BnetNetwork * net,
DdManager * dd
)
- Prints the order of the DD variables of a network. Only primary inputs and present states are printed. Returns 1 if successful; 0 otherwise.
- Side Effects None
BnetNetwork *
Bnet_ReadNetwork(
FILE * fp, pointer to the blif file
int pr verbosity level
)
- Reads a boolean network from a blif file. A very restricted subset of blif is supported. Specifically:
- The only directives recognized are:
- .model
- .inputs
- .outputs
- .latch
- .names
- .exdc
- .wire_load_slope
- .end
- Latches must have an initial values and no other parameters specified.
- Lines must not exceed MAXLENGTH-1 characters, and individual names must not exceed 1023 characters.
Caveat emptor: There may be other limitations as well. One should check the syntax of the blif file with some other tool before relying on this parser. Bnet_ReadNetwork returns a pointer to the network if successful; NULL otherwise.
- Side Effects None
- See Also
Bnet_PrintNetwork
Bnet_FreeNetwork
int
Bnet_ReadOrder(
DdManager * dd,
char * ordFile,
BnetNetwork * net,
int locGlob,
int nodrop
)
- Reads the variable order from a file. Returns 1 if successful; 0 otherwise.
- Side Effects The BDDs for the primary inputs and present state variables are built.
int
Bnet_bddArrayDump(
DdManager * dd, DD manager
BnetNetwork * network, network whose BDDs should be dumped
char * dfile, file name
DdNode ** outputs, BDDs to be dumped
char ** onames, names of the BDDs to be dumped
int noutputs, number of BDDs to be dumped
int dumpFmt 0 -> dot
)
- Writes an array of BDDs to a file in dot, blif, DDcal, factored-form, or daVinci format. The BDDs and their names are passed as arguments. The inputs and their names are taken from the network. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
- Side Effects None
int
Bnet_bddDump(
DdManager * dd, DD manager
BnetNetwork * network, network whose BDDs should be dumped
char * dfile, file name
int dumpFmt, 0 -> dot
int reencoded whether variables have been reencoded
)
- Writes the network BDDs to a file in dot, blif, or daVinci format. If "-" is passed as file name, the BDDs are dumped to the standard output. Returns 1 in case of success; 0 otherwise.
- Side Effects None