⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ntkint.h

📁 主要进行大规模的电路综合
💻 H
字号:
/**CFile****************************************************************  FileName    [ntkInt.h]  PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]  Synopsis    [Declarations of the network/node package.]  Author      [MVSIS Group]    Affiliation [UC Berkeley]  Date        [Ver. 1.0. Started - February 1, 2003.]  Revision    [$Id: ntkInt.h,v 1.35 2003/05/27 23:14:22 alanmi Exp $]***********************************************************************/ #ifndef __NTK_INT_H__#define __NTK_INT_H__///////////////////////////////////////////////////////////////////////////                          INCLUDES                                ///////////////////////////////////////////////////////////////////////////#include "mv.h"///////////////////////////////////////////////////////////////////////////                         PARAMETERS                               //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                    STRUCTURE DEFINITIONS                         ////////////////////////////////////////////////////////////////////////////*    Latches are represented by latch structures, which has the pointer    to the node (without fanout) representing the reset table of the     latch and the pointers to the latch output and the latch input.    These are treated as inputs/output to the network and are placed     in the linked lists of PIs/POs.         In the case when the latch output is also a primary input,     or when the latch input is also a primary output, there is only     one PI/PO used, which is pointed to by the corresponding latch.     Note that the node, representing latch reset, is not treated as a     node of the network. It is not placed in the network's node     name table and in the network's linked list of nodes.*/typedef struct NtkPinListStruct    Ntk_PinList_t;   // double linked list of pinstypedef struct NtkNodeListStruct   Ntk_NodeList_t;  // double linked list of nodestypedef struct NtkLatchListStruct  Ntk_LatchList_t; // double linked list of latches// various listsstruct NtkPinListStruct{    Ntk_Pin_t *      pHead;      // the first pin in the list    Ntk_Pin_t *      pTail;      // the last pin in the list    int              nItems;     // the number of pins in the list};struct NtkNodeListStruct{    Ntk_Node_t *     pHead;      // the first node in the list    Ntk_Node_t *     pTail;      // the last node in the list    int              nItems;     // the number of nodes in the list};struct NtkLatchListStruct{    Ntk_Latch_t *    pHead;      // the first latch in the list    Ntk_Latch_t *    pTail;      // the last latch in the list    int              nItems;     // the number of latches in the list};// pinstruct NtkPinStruct{    Ntk_Pin_t *      pNext;      // the next pin in the linked list    Ntk_Pin_t *      pPrev;      // the previous pin in the linked list    Ntk_Pin_t *      pLink;      // the cross link between the fanin and fanout pin    Ntk_Node_t *     pNode;      // the node pointed to by this pin (for a fanin pin, this is the fanin)    char *           pData;      // used for temporary data};// latchstruct NtkLatchStruct{    Ntk_Latch_t *    pNext;      // the double linked list of latches    Ntk_Latch_t *    pPrev;      // the double linked list of latches    int              Type;       // the type of the latch (currently not used)    int              Reset;      // the short cut to the reset value for constant reset nodes    Ntk_Node_t *     pInput;     // the pointer to the input node (PO)    Ntk_Node_t *     pOutput;    // the pointer to the output node (PI)     Ntk_Node_t *     pNode;      // the pointer to the node representing functionality    Ntk_Network_t *  pNet;       // the network, to which this latch belongs    char *           pData;      // used for temporary data};// nodestruct NtkNodeStruct{    Ntk_Node_t *     pNext;       // the linked list of all nodes in the network    Ntk_Node_t *     pPrev;       // the linked list of all nodes in the network    Ntk_Node_t *     pOrder;      // the single-linked list for node ordering (DFS, etc)    int              Id;          // the picture ID of the node    int              TravId;      // the current traversal ID of the node    char *           pName;       // the name (if given by the user)    short            Type;        // type of this node (PI, PO, INTERNAL)    short            Subtype;     // subtype of PI/PO node    short            Level;       // the logic level of this node    char             nValues;     // the number of values    char             fNdTfi;      // the node has ND nodes in its TFI    Ntk_PinList_t    lFanins;     // the linked list of fanins    Ntk_PinList_t    lFanouts;    // the linked list of fanouts    Fnc_Function_t * pF;          // the node's functionality    char *           pData;       // used by the application packages    Ntk_Node_t *     pCopy;       // used internally by the Ntk package    Ntk_Network_t *  pNet;        // the network, to which this node belongs};// networkstruct NtkNetworkStruct {    // general information about the network    // network and node names    char *           pName;      // the network name    st_table *       tName2Node; // the table hashing node name into their pointers    // unique node IDs    int              nIds;       // the counter of unique node IDs (is not the same as number of nodes)    Ntk_Node_t **    pId2Node;   // the table of nodes by their unique ID    int              nIdsAlloc;  // the max number of entries in the ID table    // unique traversal IDs    int              nTravIds;   // the counter of unique traversal IDs    // the network nodes    Ntk_NodeList_t   lCis;       // the linked list of only primary inputs    Ntk_NodeList_t   lCos;       // the linked list of only primary outputs    Ntk_NodeList_t   lNodes;     // the linked list of only internal nodes    Ntk_LatchList_t  lLatches;   // the linked list of latches    Ntk_Node_t *     pOrder;     // special ordering of nodes (such as DFS)    Ntk_Node_t **    ppTail;     // the pointer to the place where next entry is added (internal use only)    // the levelized network    Ntk_Node_t **    ppLevels;   // the linked lists of noded by level    int              nLevels;    // the number of pointer to the linked lists allocated    // the functionality    Fnc_Manager_t *  pMan;       // the functionality manager    Mv_Frame_t *     pMvsis;     // the MVSIS framework to which this network belongs    // the EXDC network    Ntk_Network_t *  pNetExdc;    char *           pData;      // miscellaneous data    char *           pSpec;      // the name of the spec file if present    // the backup network and the step number    Ntk_Network_t *  pNetBackup; // the pointer to the previous backup network    int              iStep;      // the generation number for the given network    // memory management    mm_fixed *       pManPin;    // the pin memory manager    mm_fixed *       pManNode;   // the node memory manager    mm_flex *        pNames;     // storage for the externally visible node names (PIs, POs)    // temporary storage    Ntk_Node_t **    pArray1;    // after updating memory manager, will be unnecessary    Ntk_Node_t **    pArray2;    // after updating memory manager, will be unnecessary    Ntk_Node_t **    pArray3;    // after updating memory manager, will be unnecessary};///////////////////////////////////////////////////////////////////////////                       MACRO DEFITIONS                            //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                     FUNCTION DEFITIONS                           ////////////////////////////////////////////////////////////////////////////*=== ntkList.c ====================================================*/extern int              Ntk_NetworkNumInternal( Ntk_Network_t * pNet );extern void             Ntk_NetworkNodeListAddFirst( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeListAddLast( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeListDelete( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCiListAddFirst( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCiListAddLast( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCiListDelete( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCoListAddFirst( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCoListAddLast( Ntk_Node_t * pNode );extern void             Ntk_NetworkNodeCoListDelete( Ntk_Node_t * pNode );extern void             Ntk_NetworkLatchListAddFirst( Ntk_Latch_t * pLatch );extern void             Ntk_NetworkLatchListAddLast( Ntk_Latch_t * pLatch );extern void             Ntk_NetworkLatchListDelete( Ntk_Latch_t * pLatch );extern void             Ntk_NodeFaninListAddFirst( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );extern void             Ntk_NodeFaninListAddLast( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );extern void             Ntk_NodeFaninListDelete( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );extern void             Ntk_NodeFanoutListAddFirst( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );extern void             Ntk_NodeFanoutListAddLast( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );extern void             Ntk_NodeFanoutListDelete( Ntk_Node_t * pNode, Ntk_Pin_t * pPin );///////////////////////////////////////////////////////////////////////////                       END OF FILE                                ///////////////////////////////////////////////////////////////////////////#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -