VIS

src/tbl/tblAigEntryUtil.c

Go to the documentation of this file.
00001 
00019 #include "tblInt.h"
00020 #include "baig.h"
00021 
00022 static char rcsid[] UNUSED = "$Id: tblAigEntryUtil.c,v 1.4 2005/04/17 14:37:23 awedh Exp $";
00023 
00026 /*---------------------------------------------------------------------------*/
00027 /* Static function prototypes                                                */
00028 /*---------------------------------------------------------------------------*/
00029 
00030 
00032 /*---------------------------------------------------------------------------*/
00033 /* Definition of exported functions                                          */
00034 /*---------------------------------------------------------------------------*/
00035 
00036 
00037 /*---------------------------------------------------------------------------*/
00038 /* Definition of internal functions                                          */
00039 /*---------------------------------------------------------------------------*/
00040 
00054 mAigEdge_t
00055 TblEntryNormalConstructAig(
00056     mAig_Manager_t *manager,
00057     Tbl_Entry_t    *entry,
00058     array_t        *mAigArray)
00059 {
00060   lsGen gen;
00061   Tbl_Range_t *range;
00062   int i;
00063   mAigEdge_t result, temp, x;
00064     
00065   result = mAig_Zero;
00066   lsForEachItem(entry->EntryData.listOfRanges, gen, range) {
00067     for (i=range->begin; i< (range->end +1); i++) {
00068       temp = result;
00069       x = MvfAig_FunctionReadComponent(mAigArray,i);
00070       result = mAig_Or(manager, temp, x);
00071     }
00072   }
00073   return result;
00074 }
00075 
00089 mAigEdge_t 
00090 TblEntryEqualConstructMAig(
00091     mAig_Manager_t    * manager,
00092     Tbl_Entry_t       * entry,
00093     MvfAig_Function_t * mAigArray,
00094     MvfAig_Function_t * mEigArray)
00095 {
00096   lsGen        gen;
00097   Tbl_Range_t *range;
00098   int          i;
00099   mAigEdge_t   result, temp, x;
00100 
00101   assert(entry->type == Tbl_EntryNormal_c);
00102   result = mAig_Zero;
00103   lsForEachItem(entry->EntryData.listOfRanges, gen, range) {
00104     for (i=range->begin; i< (range->end +1); i++) {
00105       temp = result;
00106       x = MvfAig_FunctionReadComponent(mAigArray,i);
00107       result = mAig_Or(manager, temp, x);
00108       temp = result;
00109       x = MvfAig_FunctionReadComponent(mAigArray,i);
00110       result = mAig_Or(manager, temp, x);
00111     }
00112   }
00113   return result;
00114 }
00115 
00116 
00117