/**CHeaderFile***************************************************************** FileName [tbl.h] PackageName [tbl] Synopsis [Routines for manipulating a multi-valued relation representation.] Description [A Tbl_Table_t is a data structure that contains all the information found in the blif_mv tables (refer to blif_mv document), and represents a multivalued function or group of functions. This can be thought of as a table with inputs and outputs, and the entries in this table describe how the inputs are related to the outputs. The entries in a table may be of two types: they are either a list of ranges that contain values that an entry may take, or are set equal to some other entry in the table. Notice that blif_mv files also have the complement construct, which is absent in the table struct. There are functions for complementing, and canonicalizing a list of ranges] SeeAlso [tblInt.h, ntk.h] Author [ Gitanjali M. Swamy] Copyright [Copyright (c) 1994-1996 The Regents of the Univ. of California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.] Revision [$Id: tbl.h,v 1.15 2009/04/11 02:01:29 fabio Exp $] ******************************************************************************/ #ifndef _TBL #define _TBL #include "mvf.h" #include "mvfaig.h" /*---------------------------------------------------------------------------*/ /* Constant declarations */ /*---------------------------------------------------------------------------*/ typedef enum { Tbl_EntryEqual_c, Tbl_EntryNormal_c, Tbl_EntryUniverse_c, Tbl_EntryUnassigned_c } Tbl_EntryType_t; /*---------------------------------------------------------------------------*/ /* Type declarations */ /*---------------------------------------------------------------------------*/ typedef struct TblEntryStruct Tbl_Entry_t; typedef struct TblTableStruct Tbl_Table_t; typedef struct TblDataStruct Tbl_Data_t; typedef struct TblRowStruct Tbl_Row_t; typedef struct TblRangeStruct Tbl_Range_t; /*---------------------------------------------------------------------------*/ /* Macro declarations */ /*---------------------------------------------------------------------------*/ /**Macro*********************************************************************** Synopsis [ Generates all entries of the table. ] Description [ This is an iterator that generates all entries of the table in smallest column first, smallest row first and input first order. This must be supplied with int colNum, rowNum,i (flag to indicate output or input, and Tbl_Entry_t * entry] SideEffects [ ] SeeAlso [ Tbl_TableForeachOutputEntry] ******************************************************************************/ #define Tbl_TableForEachEntry( \ /* Tbl_Table_t * */ table /* The table to iterate over */, \ /* int */ rowNum /* The row number */, \ /* int */ colNum /* The column number */, \ /* int */ i /* The input output flag */, \ /* Tbl_Entry_t * */ entry /* The table entry */ \ ) \ for(rowNum=0;rowNum