Fsm_TokenType 
FsmString2Token(
  char * keyword String representing the keyword
)
Converts a token from string to enum

Side Effects None

Defined in fsmToken.c

char * 
FsmToken2String(
  Fsm_TokenType  token token in enum (integer) format
)
Converts a token from enum to string

Side Effects None

Defined in fsmToken.c

char * 
Fsm_BddFormatInt2String(
  int  intValue 
)
Given an Integer Returns a string

Side Effects none

Defined in fsmUtil.c

int 
Fsm_BddFormatString2Int(
  char * string String to Analyze
)
It receives a string; to facilitate the user that string can be an easy-to-remember predefined code or an integer number (interpreted as a string). It returns the integer DDDMP value.

Side Effects none

Defined in fsmUtil.c

Fsm_Mgr_t * 
Fsm_MgrDup(
  Fsm_Mgr_t * fsmMgr FSM Manager
)
Duplicates FSM structure.

Side Effects none

See Also Fsm_MgrInit ()
Defined in fsmMgr.c

void 
Fsm_MgrFree(
  Fsm_Mgr_t * fsmMgr FSM Manager
)
Frees unused FSM structure members

Side Effects none

See Also Ddi_DdArrayFree();Ddi_VarArrayFree()
Defined in fsmMgr.c

Fsm_Mgr_t * 
Fsm_MgrInit(
  char * fsmName Name of the FSM structure
)
Initializes the FSM structure.

Side Effects none

Defined in fsmMgr.c

int 
Fsm_MgrLoadFromBlif(
  Fsm_Mgr_t ** fsmMgrP, FSM Pointer
  Ddi_DdMgr * dd, dd manager
  char * fileFsmName, FSM File Name
  char * fileOrdName, ORD File Name
  int  bddFlag Not Used For Now
)
The function gives a compatible DDI:

Side Effects None

Defined in fsmPort.c

int 
Fsm_MgrLoad(
  Fsm_Mgr_t ** fsmMgrP, FSM Pointer
  Ddi_DdMgr * dd, Main DD manager
  char * fileFsmName, Input file name
  char * fileOrdName, ORD File Name
  int  bddFlag 0=Do non load BDD (default), 1=Load BDD
)

See Also get_name_file readFsm
Defined in fsmLoad.c

int 
Fsm_MgrOperation(
  Fsm_Mgr_t * fsmMgr, FSM Manager
  char * string, String
  Pdtutil_MgrOp_t  operationFlag, Operation Flag
  void ** voidPointer, Generic Pointer
  Pdtutil_MgrRet_t * returnFlagP Type of the Pointer Returned
)

See Also CmdMgrOperation CmdRegOperation Trav_MgrOperation Tr_MgrOperation
Defined in fsmMgr.c

int 
Fsm_MgrPMBuild(
  Fsm_Mgr_t ** fsmMgrPMP, FSM Product Machine Pointer
  Fsm_Mgr_t * fsmMgr1, First FSM
  Fsm_Mgr_t * fsmMgr2 Second FSM
)

See Also get_name_file readFsm
Defined in fsmProMac.c

void 
Fsm_MgrPrintPrm(
  Fsm_Mgr_t * fsmMgr 
)
Prints the permutation on file "tmp.prm"

Side Effects none

Defined in fsmUtil.c

void 
Fsm_MgrPrintStats(
  Fsm_Mgr_t * fsmMgr 
)
Prints Statistics on the FSM Structure

Side Effects none

See Also Ddi_MgrPrintStats Tr_MgrPrintStats Trav_MgrPrintStats
Defined in fsmUtil.c

int 
Fsm_MgrReadBddFormat(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_DdMgr * 
Fsm_MgrReadDdManager(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_DdArray_t * 
Fsm_MgrReadDeltaBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadDeltaName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadFileName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

void 
Fsm_MgrReadFileOrd(
  FILE * fp, 
  Fsm_Mgr_t * fsmMgr 
)
Reads variable order from a .ord file

Defined in fsmLoad.c

Ddi_Dd_t * 
Fsm_MgrReadFromBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadFromName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadFromString(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadFsmName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadIndexI(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadIndexNS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadIndexO(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadIndexPS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_Dd_t * 
Fsm_MgrReadInitBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadInitName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadInitString(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadInvauxids(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_DdArray_t * 
Fsm_MgrReadLambdaBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadLambdaName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int 
Fsm_MgrReadNI(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int 
Fsm_MgrReadNL(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int 
Fsm_MgrReadNO(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadNameI(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadNameNS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadNameO(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadNamePS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadOrdFileName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadOrdNodeName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadOrdNodeid(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_Dd_t * 
Fsm_MgrReadReachedBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadReachedName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadReachedString(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadSX(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_Dd_t * 
Fsm_MgrReadTrBDD(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadTrName(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char * 
Fsm_MgrReadTrString(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadVarI(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadVarNS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadVarO(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadVarPS(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

int * 
Fsm_MgrReadVarauxids(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

char ** 
Fsm_MgrReadVarnames(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Pdtutil_VerbLevel_e 
Fsm_MgrReadVerbosity(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadY(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

Ddi_VarArray_t * 
Fsm_MgrReadZ(
  Fsm_Mgr_t * fsmMgr 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetBddFormat(
  Fsm_Mgr_t * fsmMgr, 
  int  var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetDdManager(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_DdMgr * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetDeltaBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_DdArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetDeltaName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetFileName(
  Fsm_Mgr_t * fsmMgr, 
  char * fileName 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetFromBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_Dd_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetFromName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetFromString(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetFsmName(
  Fsm_Mgr_t * fsmMgr, 
  char * fsmName 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetIndexI(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetIndexNS(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetIndexO(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetIndexPS(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetInitBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_Dd_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetInitName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetInitString(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetInvauxids(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetLambdaBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_DdArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetLambdaName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNI(
  Fsm_Mgr_t * fsmMgr, 
  int  var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNL(
  Fsm_Mgr_t * fsmMgr, 
  int  var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNO(
  Fsm_Mgr_t * fsmMgr, 
  int  var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNameI(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNameNS(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNameO(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetNamePS(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetOrdFileName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetOrdNodeName(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetOrdNodeid(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetReachedBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_Dd_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetReachedName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetReachedString(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetSX(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetTrBDD(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_Dd_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetTrName(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetTrString(
  Fsm_Mgr_t * fsmMgr, 
  char * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarI(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarNS(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarO(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarPS(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarauxids(
  Fsm_Mgr_t * fsmMgr, 
  int * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarnamesOne(
  Fsm_Mgr_t * fsmMgr, 
  char * var, 
  int  i 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVarnames(
  Fsm_Mgr_t * fsmMgr, 
  char ** var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetVerbosity(
  Fsm_Mgr_t * fsmMgr, 
  Pdtutil_VerbLevel_e  var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetY(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

void 
Fsm_MgrSetZ(
  Fsm_Mgr_t * fsmMgr, 
  Ddi_VarArray_t * var 
)

Defined in fsmMgr.c

int 
Fsm_MgrStore(
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * fileName, output file name
  FILE * fp, file pointer
  int  bddFlag, Flag to Store or Not BDD on Files
  int  bddFormat 0 = default, 1 = text, 2 = binary
)
Stores (on file o stdout) of FSM structure

See Also Ddi_DdArrayStore Ddi_DdArrayFetch Ddi_DdArray_n
Defined in fsmStore.c

int 
Fsm_PortBnetBuildNodeBDD(
  DdManager * dd, DD manager
  FsmPortBnetNode_t * nd, node of the boolean network
  st_table * hash, symbol table of the boolean network
  int  params, type of DD to be built
  int  nodrop retain the intermediate node DDs until the end
)
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 PORT_BNETLOCAL_DD, then the BDD is built in terms of the local inputs to the node; otherwise, if params is PORT_BNETGLOBAL_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, Fsm_PortBnetBuildNodeBDD 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, Fsm_PortBnetBuildNodeBDD recursively assigns variables to nodes. Fsm_PortBnetBuildNodeBDD returns 1 in case of success; 0 otherwise.

Side Effects Sets the dd field of the node.

Defined in fsmPortBnet.c

int 
Fsm_PortBnetDfsVariableOrder(
  DdManager * dd, 
  FsmPortBnetNetwork_t * net 
)
Orders the BDD variables by DFS. Returns 1 in case of success; 0 otherwise.

Side Effects Uses the visited flags of the nodes.

Defined in fsmPortBnet.c

void 
Fsm_PortBnetFreeNetwork(
  FsmPortBnetNetwork_t * net 
)
Frees a boolean network created by Fsm_PortBnetReadNetwork.

Side Effects None

See Also Fsm_PortBnetReadNetwork
Defined in fsmPortBnet.c

FsmPortBnetNetwork_t * 
Fsm_PortBnetReadNetwork(
  FILE * fp, pointer to the blif file
  int  pr verbosity level
)
Reads a boolean network from a blif file. A very restricted subset of blif is supfsmPorted. Specifically: 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. Fsm_PortBnetReadNetwork returns a pointer to the network if successful; NULL otherwise.

Side Effects None

See Also Fsm_PortBnetPrintNetwork Fsm_PortBnetFreeNetwork
Defined in fsmPortBnet.c

int 
Fsm_PortBnetReadOrder(
  DdManager * dd, 
  char * ordFile, 
  FsmPortBnetNetwork_t * net, 
  int  locGlob, 
  int  nodrop 
)
Reads the variable order from a file. Returns 1 if successful; 0 otherwise.

Side Effects The BDDs for the primary inputs and present state variables are built.

Defined in fsmPortBnet.c

int 
Fsm_PortNtrBuildDDs(
  FsmPortBnetNetwork_t * net, network for which DDs are to be built
  DdManager * dd, DD manager
  FsmPortNtrOptions_t * option, option structure
  FsmPortBnetNetwork_t * net2 companion network with which inputs may be shared
)
Builds DDs for a network outputs and next state functions. The method is really brain-dead, but it is very simple. Returns 1 in case of success; 0 otherwise. Some inputs to the network may be shared with another network whose DDs have already been built. In this case we want to share the DDs as well.

Side Effects the dd fields of the network nodes are modified. Uses the count fields of the nodes.

Defined in fsmPortNtr.c

DdNode * 
Fsm_PortNtrInitState(
  DdManager * dd, 
  FsmPortBnetNetwork_t * net, 
  FsmPortNtrOptions_t * option 
)
Builds the BDD of the initial state(s). Returns a BDD if successful; NULL otherwise.

Side Effects None

Defined in fsmPortNtr.c

Ddi_Dd_t * 
Pdtutil_ReadConstrain(
  Fsm_Mgr_t * fsmMgr, 
  char * diagfile 
)
Reads constrain

Side Effects none

Defined in fsmUtil.c

static int 
buildExorBDD(
  DdManager * dd, 
  FsmPortBnetNode_t * nd, 
  st_table * hash, 
  int  params, 
  int  nodrop 
)
Checks whether a function is a XOR with 2 or 3 inputs. If so, it builds the BDD. Returns 1 if the BDD has been built; 0 otherwise.

Side Effects None

Defined in fsmPortBnet.c

static int 
buildMuxBDD(
  DdManager * dd, 
  FsmPortBnetNode_t * nd, 
  st_table * hash, 
  int  params, 
  int  nodrop 
)
Checks whether a function is a 2-to-1 multiplexer. If so, it builds the BDD. Returns 1 if the BDD has been built; 0 otherwise.

Side Effects None

Defined in fsmPortBnet.c

static int 
fsmPortBnetDfsOrder(
  DdManager * dd, 
  FsmPortBnetNetwork_t * net, 
  FsmPortBnetNode_t * node 
)
Does a DFS from a node ordering the inputs. Returns 1 if successful; 0 otherwise.

Side Effects Changes visited fields of the nodes it visits.

See Also Fsm_PortBnetDfsVariableOrder
Defined in fsmPortBnet.c

static int 
fsmPortBnetLevelCompare(
  FsmPortBnetNode_t ** x, 
  FsmPortBnetNode_t ** y 
)
Comparison function used by qsort to order the variables according to the number of keys in the subtables. Returns the difference in number of keys between the two variables being compared.

Side Effects None

Defined in fsmPortBnet.c

static int 
fsmPortBnetLevelDFS(
  FsmPortBnetNetwork_t * net, 
  FsmPortBnetNode_t * node 
)
Does a DFS from a node setting the level field. Returns 1 if successful; 0 otherwise.

Side Effects Changes the level and visited fields of the nodes it visits.

See Also fsmPortBnetSetLevel
Defined in fsmPortBnet.c

static FsmPortBnetNode_t ** 
fsmPortBnetOrderRoots(
  FsmPortBnetNetwork_t * net, 
  int * nroots 
)
Orders network roots for variable ordering. Returns an array with the ordered outputs and next state variables if successful; NULL otherwise.

Side Effects None

Defined in fsmPortBnet.c

static int 
fsmPortBnetSetLevel(
  FsmPortBnetNetwork_t * net 
)
Sets the level of each node. Returns 1 if successful; 0 otherwise.

Side Effects Changes the level and visited fields of the nodes it visits.

See Also fsmPortBnetLevelDFS
Defined in fsmPortBnet.c

static void 
fsmPortNtrCountDFS(
  FsmPortBnetNetwork_t * net, 
  FsmPortBnetNode_t * node 
)
Does a DFS from a node setting the count field.

Side Effects Changes the count and visited fields of the nodes it visits.

See Also fsmPortNtrLevelDFS
Defined in fsmPortNtr.c

static void 
fsmPortNtrInitializeCount(
  FsmPortBnetNetwork_t * net, 
  FsmPortNtrOptions_t * option 
)
Initializes the count fields used to drop DDs. Before actually building the BDDs, we perform a DFS from the outputs to initialize the count fields of the nodes. The initial value of the count field will normally coincide with the fanout of the node. However, if there are nodes with no path to any primary output or next state variable, then the initial value of count for some nodes will be less than the fanout. For primary outputs and next state functions we add 1, so that we will never try to free their DDs. The count fields of the nodes that are not reachable from the outputs are set to -1.

Side Effects Changes the count fields of the network nodes. Uses the visited fields.

Defined in fsmPortNtr.c

static int * 
get_integer_array(
  FILE * fp, 
  char * word, 
  int  size number of expected items
)
Trasforma le parole estratte da "get_token" in interi per mezzo della procedura "number". Tramite la procedura "Ddi_DdArrayInsert" inserisce i numeri in cima all'array "datum_nmb".

See Also number Ddi_DdArrayInsert
Defined in fsmLoad.c

static int 
get_number(
  FILE * fp, 
  char * word 
)
Returns the current word as integer.

Defined in fsmLoad.c

static char ** 
get_string_array(
  FILE * fp, 
  char * word, 
  int  size number of expected items
)
Inse le parole in cima all'array "datum_str".

See Also array_insert
Defined in fsmLoad.c

Fsm_TokenType 
get_token(
  FILE * fp, 
  char * word Current Word
)
Read a String from the File. It returns the string and a code that indicates the type of the string.

See Also get_line
Defined in fsmLoad.c

static FsmPortNtrOptions_t * 
mainInit(
    
)
This function was taken from main.c in nanotrav package

Side Effects none

See Also Fsm_MgrLoadFromBlif
Defined in fsmPort.c

static void 
printList(
  char ** list, list of pointers to strings
  int  n length of the list
)
Prints a list of strings to the standard output. The list is in the format created by readList.

Side Effects None

See Also readList Fsm_PortBnetPrintNetwork
Defined in fsmPortBnet.c

static void 
readBddFile(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  Ddi_DdMgr * dd, DD manager
  char * word, parola corrente
  char ** pName, return file name by reference
  Ddi_Dd_t ** pBdd, return bdd by reference
  Ddi_DdArray_t ** pBddArray, return bdd array by reference
  int  bddFlag Load - NotLoad BDD from files
)
read a BDD dump file. Returns an array of BDD roots

Defined in fsmLoad.c

static void 
readFsmDelta(
  FILE * fp, File
  Fsm_Mgr_t * fsmMgr, FSM Manager
  char * word, Current Word
  int  bddFlag 
)
Reads ".delta" section of the new ".fsm" file format and then loads the FSM structure with future state function BDDs. In order to do that, uses "Ddi_DdArrayLoad" procedure, preceded by "Pdtutil_OpenFile" and followed by "Pdtutil_CloseFile" in case BDD is specified with a fileName.

See Also Poli_bddRead_new
Defined in fsmLoad.c

static void 
readFsmFrom(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word, parola corrente
  int  bddFlag 
)
Reads ".from" section.

See Also Poli_bddRead_new
Defined in fsmLoad.c

static void 
readFsmIndex(
  FILE * fp, File
  Fsm_Mgr_t * fsmMgr, FSM Strutture
  char * word Current Word
)
Reads ".name" section of the new ".fsm" file format and then loads the FSM structure by means of "get_integer_array" with input (".i"), output (".o"), latch input (".ps") and latch output (".ns") indexes in the circuit.

See Also get_integer_array
Defined in fsmLoad.c

static void 
readFsmInitState(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word, parola corrente
  int  bddFlag 
)
Reads ".init" section of the new ".fsm" file format and then loads the FSM structure with initial state BDD. In order to do that, it uses "Ddi_DdArrayLoad" procedure, preceded by "Pdtutil_OpenFile" and followed by "Pdtutil_CloseFile" in case BDD is specified with a fileName. if , instead, initial state is specified directly within ".initstate" section as string made up with 0s and 1s, calls "readInitFile".

See Also Poli_bddRead_new readInitFile
Defined in fsmLoad.c

static void 
readFsmLambda(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word, parola corrente
  int  bddFlag 
)
Reads ".lambda" section of the new ".fsm" file format and then loads the FSM structure with output function BDD. In order to do that, it uses "Ddi_DdArrayLoad" procedure, preceded by "Pdtutil_OpenFile" and followed by "Pdtutil_CloseFile" in case BDD is specified with a fileName.

See Also Poli_bddRead_new
Defined in fsmLoad.c

static void 
readFsmName(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word parola corrente
)
Reads ".name" section of the new ".fsm" file format and then loads the FSM structure by means of "get_string_array" with input (".i"), output (".o"), latch input (".ps") and latch output (".ns") names in the circuit.

See Also get_string_array
Defined in fsmLoad.c

static void 
readFsmOrd(
  FILE * fp, File Pointer
  Fsm_Mgr_t * fsmMgr, FSM Manager
  char * fileOrdName, 
  char * word Current Word
)
Reads .ord section of the .fsm file.

See Also get_string_array
Defined in fsmLoad.c

static void 
readFsmReached(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word, parola corrente
  int  bddFlag 
)
Reads ".reached" section.

See Also Poli_bddRead_new
Defined in fsmLoad.c

static void 
readFsmSize(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word parola corrente
)
Looks up ".size" section of the new ".fsm" file format for input, output and latch number to be loaded in the FSM structure.

See Also number
Defined in fsmLoad.c

static void 
readFsmTransRel(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word, parola corrente
  int  bddFlag 
)
Reads ".tr" section of the new ".fsm" file format and then loads the FSM structure with transition relation BDD. In order to do that, it uses "Ddi_DdArrayLoad" procedure, preceded by "Pdtutil_OpenFile" and followed by "Pdtutil_CloseFile" in case BDD is specified with a fileName.

See Also Poli_bddRead_new
Defined in fsmLoad.c

static int 
readFsm(
  FILE * fp, File
  Fsm_Mgr_t * fsmMgr, FSM Manager
  char * fileOrdName, File Name for the Order File
  int  bddFlag 
)
Reads current section of the .fsm file.

See Also readFsmSize readFsmName readFsmIndex readFsmDelta readFsmLambda readFsmTransRel readFsmInitState
Defined in fsmLoad.c

static void 
readInitFile(
  FILE * fp, file
  Fsm_Mgr_t * fsmMgr, struttura FSM
  char * word parola corrente
)
Reads directly in the new ".fsm" format file initial state; afterwards, creates the corresponding BDD. The initial state must be a string made up with 0s and/or 1s ; don't care ("-") is not valid.

Defined in fsmLoad.c

static char ** 
readList(
  FILE * fp, pointer to the file from which the list is read
  int * n on return, number of strings in the list
)
Reads a list of strings from a line of a file. The strings are sequences of characters separated by spaces or tabs. The total length of the list, white space included, must not exceed MAXLENGTH-1 characters. readList allocates memory for the strings and creates an array of pointers to the individual lists. Only two pieces of memory are allocated by readList: One to hold all the strings, and one to hold the pointers to them. Therefore, when freeing the memory allocated by readList, only the pointer to the list of pointers, and the pointer to the beginning of the first string should be freed. readList returns the pointer to the list of pointers if successful; NULL otherwise.

Side Effects n is set to the number of strings in the list.

See Also readString printList
Defined in fsmPortBnet.c

static void 
readOrdFile(
  FILE * fp, File Pointer
  Fsm_Mgr_t * fsmMgr FSM Manager
)
Reads the order in the .ord file.

Defined in fsmLoad.c

static char * 
readString(
  FILE * fp pointer to the file from which the string is read
)
Reads a string from a file. The string can be MAXLENGTH-1 characters at most. readString allocates memory to hold the string and returns a pointer to the result if successful. It returns NULL otherwise.

Side Effects None

See Also readList
Defined in fsmPortBnet.c

 
(
    
)
Returns 1 if the two arguments are identical strings.

Side Effects none

Defined in fsmInt.h

Last updated on 990617 11h53