You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
6.0 KiB

  1. <html>
  2. <head><title>The bnet package</title></head>
  3. <body>
  4. <h1>The bnet package</h1>
  5. <h2>Simple-minded package to read a blif file.</h2>
  6. <h3></h3>
  7. <hr>
  8. <ul>
  9. <li><a href="bnetExtAbs.html"><h3>External abstracts</h3></a>
  10. <li><a href="bnetAllAbs.html"><h3>All abstracts</h3></a>
  11. <li><a href="bnetExtDet.html#prototypes"><h3>External functions</h3></a>
  12. <li><a href="bnetAllDet.html#prototypes"><h3>All functions</h3></a>
  13. </ul>
  14. <hr>
  15. <a name="description">
  16. </a>
  17. <hr>
  18. <!-- Function Prototypes and description -->
  19. <dl>
  20. <a name="prototypes"></a>
  21. <dt><pre>
  22. int <i></i>
  23. <a name="Bnet_BuildNodeBDD"><b>Bnet_BuildNodeBDD</b></a>(
  24. DdManager * <b>dd</b>, <i>DD manager</i>
  25. BnetNode * <b>nd</b>, <i>node of the boolean network</i>
  26. st_table * <b>hash</b>, <i>symbol table of the boolean network</i>
  27. int <b>params</b>, <i>type of DD to be built</i>
  28. int <b>nodrop</b> <i>retain the intermediate node DDs until the end</i>
  29. )
  30. </pre>
  31. <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.
  32. <p>
  33. <dd> <b>Side Effects</b> Sets the dd field of the node.
  34. <p>
  35. <dt><pre>
  36. int <i></i>
  37. <a name="Bnet_DfsVariableOrder"><b>Bnet_DfsVariableOrder</b></a>(
  38. DdManager * <b>dd</b>, <i></i>
  39. BnetNetwork * <b>net</b> <i></i>
  40. )
  41. </pre>
  42. <dd> Orders the BDD variables by DFS. Returns 1 in case of success; 0 otherwise.
  43. <p>
  44. <dd> <b>Side Effects</b> Uses the visited flags of the nodes.
  45. <p>
  46. <dt><pre>
  47. void <i></i>
  48. <a name="Bnet_FreeNetwork"><b>Bnet_FreeNetwork</b></a>(
  49. BnetNetwork * <b>net</b> <i></i>
  50. )
  51. </pre>
  52. <dd> Frees a boolean network created by Bnet_ReadNetwork.
  53. <p>
  54. <dd> <b>Side Effects</b> None
  55. <p>
  56. <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
  57. </code>
  58. <dt><pre>
  59. void <i></i>
  60. <a name="Bnet_PrintNetwork"><b>Bnet_PrintNetwork</b></a>(
  61. BnetNetwork * <b>net</b> <i>boolean network</i>
  62. )
  63. </pre>
  64. <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.
  65. <p>
  66. <dd> <b>Side Effects</b> None
  67. <p>
  68. <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_ReadNetwork">Bnet_ReadNetwork</a>
  69. </code>
  70. <dt><pre>
  71. int <i></i>
  72. <a name="Bnet_PrintOrder"><b>Bnet_PrintOrder</b></a>(
  73. BnetNetwork * <b>net</b>, <i></i>
  74. DdManager * <b>dd</b> <i></i>
  75. )
  76. </pre>
  77. <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.
  78. <p>
  79. <dd> <b>Side Effects</b> None
  80. <p>
  81. <dt><pre>
  82. BnetNetwork * <i></i>
  83. <a name="Bnet_ReadNetwork"><b>Bnet_ReadNetwork</b></a>(
  84. FILE * <b>fp</b>, <i>pointer to the blif file</i>
  85. int <b>pr</b> <i>verbosity level</i>
  86. )
  87. </pre>
  88. <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.
  89. <p>
  90. <dd> <b>Side Effects</b> None
  91. <p>
  92. <dd> <b>See Also</b> <code><a href="bnetAllDet.html#Bnet_PrintNetwork">Bnet_PrintNetwork</a>
  93. <a href="bnetAllDet.html#Bnet_FreeNetwork">Bnet_FreeNetwork</a>
  94. </code>
  95. <dt><pre>
  96. int <i></i>
  97. <a name="Bnet_ReadOrder"><b>Bnet_ReadOrder</b></a>(
  98. DdManager * <b>dd</b>, <i></i>
  99. char * <b>ordFile</b>, <i></i>
  100. BnetNetwork * <b>net</b>, <i></i>
  101. int <b>locGlob</b>, <i></i>
  102. int <b>nodrop</b> <i></i>
  103. )
  104. </pre>
  105. <dd> Reads the variable order from a file. Returns 1 if successful; 0 otherwise.
  106. <p>
  107. <dd> <b>Side Effects</b> The BDDs for the primary inputs and present state variables are built.
  108. <p>
  109. <dt><pre>
  110. int <i></i>
  111. <a name="Bnet_bddArrayDump"><b>Bnet_bddArrayDump</b></a>(
  112. DdManager * <b>dd</b>, <i>DD manager</i>
  113. BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
  114. char * <b>dfile</b>, <i>file name</i>
  115. DdNode ** <b>outputs</b>, <i>BDDs to be dumped</i>
  116. char ** <b>onames</b>, <i>names of the BDDs to be dumped</i>
  117. int <b>noutputs</b>, <i>number of BDDs to be dumped</i>
  118. int <b>dumpFmt</b> <i>0 -> dot</i>
  119. )
  120. </pre>
  121. <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.
  122. <p>
  123. <dd> <b>Side Effects</b> None
  124. <p>
  125. <dt><pre>
  126. int <i></i>
  127. <a name="Bnet_bddDump"><b>Bnet_bddDump</b></a>(
  128. DdManager * <b>dd</b>, <i>DD manager</i>
  129. BnetNetwork * <b>network</b>, <i>network whose BDDs should be dumped</i>
  130. char * <b>dfile</b>, <i>file name</i>
  131. int <b>dumpFmt</b>, <i>0 -> dot</i>
  132. int <b>reencoded</b> <i>whether variables have been reencoded</i>
  133. )
  134. </pre>
  135. <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.
  136. <p>
  137. <dd> <b>Side Effects</b> None
  138. <p>
  139. </dl>
  140. <hr>
  141. Generated automatically by <code>extdoc</code> on 1010215
  142. </body></html>