2 <head><title>The bnet package
</title></head>
5 <h1>The bnet package
</h1>
6 <h2>Simple-minded package to read a blif file.
</h2>
10 <li><a href=
"bnetExtAbs.html"><h3>External abstracts
</h3></a>
11 <li><a href=
"bnetAllAbs.html"><h3>All abstracts
</h3></a>
12 <li><a href=
"bnetExtDet.html#prototypes"><h3>External functions
</h3></a>
13 <li><a href=
"bnetAllDet.html#prototypes"><h3>All functions
</h3></a>
18 <a name=
"description">
23 <!-- Function Prototypes and description -->
26 <a name=
"prototypes"></a>
29 <a name=
"Bnet_BuildNodeBDD"><b>Bnet_BuildNodeBDD
</b></a>(
30 DdManager *
<b>dd
</b>,
<i>DD manager
</i>
31 BnetNode *
<b>nd
</b>,
<i>node of the boolean network
</i>
32 st_table *
<b>hash
</b>,
<i>symbol table of the boolean network
</i>
33 int
<b>params
</b>,
<i>type of DD to be built
</i>
34 int
<b>nodrop
</b> <i>retain the intermediate node DDs until the end
</i>
37 <dd> 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.
40 <dd> <b>Side Effects
</b> Sets the dd field of the node.
45 <a name=
"Bnet_DfsVariableOrder"><b>Bnet_DfsVariableOrder
</b></a>(
46 DdManager *
<b>dd
</b>,
<i></i>
47 BnetNetwork *
<b>net
</b> <i></i>
50 <dd> Orders the BDD variables by DFS. Returns
1 in case of success;
0 otherwise.
53 <dd> <b>Side Effects
</b> Uses the visited flags of the nodes.
58 <a name=
"Bnet_FreeNetwork"><b>Bnet_FreeNetwork
</b></a>(
59 BnetNetwork *
<b>net
</b> <i></i>
62 <dd> Frees a boolean network created by Bnet_ReadNetwork.
65 <dd> <b>Side Effects
</b> None
68 <dd> <b>See Also
</b> <code><a href=
"bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork
</a>
73 <a name=
"Bnet_PrintNetwork"><b>Bnet_PrintNetwork
</b></a>(
74 BnetNetwork *
<b>net
</b> <i>boolean network
</i>
77 <dd> 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.
80 <dd> <b>Side Effects
</b> None
83 <dd> <b>See Also
</b> <code><a href=
"bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork
</a>
88 <a name=
"Bnet_PrintOrder"><b>Bnet_PrintOrder
</b></a>(
89 BnetNetwork *
<b>net
</b>,
<i></i>
90 DdManager *
<b>dd
</b> <i></i>
93 <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.
96 <dd> <b>Side Effects
</b> None
100 BnetNetwork *
<i></i>
101 <a name=
"Bnet_ReadNetwork"><b>Bnet_ReadNetwork
</b></a>(
102 FILE *
<b>fp
</b>,
<i>pointer to the blif file
</i>
103 int
<b>pr
</b> <i>verbosity level
</i>
106 <dd> Reads a boolean network from a blif file. A very restricted subset of blif is supported. Specifically:
<ul> <li> The only directives recognized are:
<ul> <li> .model
<li> .inputs
<li> .outputs
<li> .latch
<li> .names
<li> .exdc
<li> .wire_load_slope
<li> .end
</ul> <li> Latches must have an initial values and no other parameters specified.
<li> Lines must not exceed MAXLENGTH-
1 characters, and individual names must not exceed
1023 characters.
</ul> 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.
109 <dd> <b>Side Effects
</b> None
112 <dd> <b>See Also
</b> <code><a href=
"bnetAllDet.html#Bnet_PrintNetwork">Bnet_PrintNetwork
</a>
113 <a href=
"bnetAllDet.html#Bnet_FreeNetwork">Bnet_FreeNetwork
</a>
118 <a name=
"Bnet_ReadOrder"><b>Bnet_ReadOrder
</b></a>(
119 DdManager *
<b>dd
</b>,
<i></i>
120 char *
<b>ordFile
</b>,
<i></i>
121 BnetNetwork *
<b>net
</b>,
<i></i>
122 int
<b>locGlob
</b>,
<i></i>
123 int
<b>nodrop
</b> <i></i>
126 <dd> Reads the variable order from a file. Returns
1 if successful;
0 otherwise.
129 <dd> <b>Side Effects
</b> The BDDs for the primary inputs and present state variables are built.
134 <a name=
"Bnet_bddArrayDump"><b>Bnet_bddArrayDump
</b></a>(
135 DdManager *
<b>dd
</b>,
<i>DD manager
</i>
136 BnetNetwork *
<b>network
</b>,
<i>network whose BDDs should be dumped
</i>
137 char *
<b>dfile
</b>,
<i>file name
</i>
138 DdNode **
<b>outputs
</b>,
<i>BDDs to be dumped
</i>
139 char **
<b>onames
</b>,
<i>names of the BDDs to be dumped
</i>
140 int
<b>noutputs
</b>,
<i>number of BDDs to be dumped
</i>
141 int
<b>dumpFmt
</b> <i>0 -
> dot
</i>
144 <dd> 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.
147 <dd> <b>Side Effects
</b> None
152 <a name=
"Bnet_bddDump"><b>Bnet_bddDump
</b></a>(
153 DdManager *
<b>dd
</b>,
<i>DD manager
</i>
154 BnetNetwork *
<b>network
</b>,
<i>network whose BDDs should be dumped
</i>
155 char *
<b>dfile
</b>,
<i>file name
</i>
156 int
<b>dumpFmt
</b>,
<i>0 -
> dot
</i>
157 int
<b>reencoded
</b> <i>whether variables have been reencoded
</i>
160 <dd> 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.
163 <dd> <b>Side Effects
</b> None
171 Generated automatically by
<code>extdoc
</code> on
1010215