VIS

src/spfd/spfdAPI.c File Reference

#include "spfdInt.h"
Include dependency graph for spfdAPI.c:

Go to the source code of this file.

Functions

boolean SpfdNodeReadLocked (SpfdApplData_t *applData, Ntk_Node_t *node)
int SpfdNodeReadAuxId (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetAuxId (SpfdApplData_t *applData, Ntk_Node_t *node, int auxId)
bdd_node * SpfdNodeReadSpfd (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeDeleteSpfd (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetSpfd (SpfdApplData_t *applData, Ntk_Node_t *node, bdd_node *spfd)
bdd_node ** SpfdNodeReadParameters (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeDeleteParameters (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetParameters (SpfdApplData_t *applData, Ntk_Node_t *node, bdd_node **parameters, int numParams)
array_t * SpfdNodeReadFaninOrder (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeDeleteFaninOrder (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetFaninOrder (SpfdApplData_t *applData, Ntk_Node_t *node, array_t *faninOrder)
bdd_node * SpfdNodeReadGlobalAlternative (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeDeleteGlobalAlternative (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetGlobalAlternative (SpfdApplData_t *applData, Ntk_Node_t *node, bdd_node *alternative)
bdd_node * SpfdNodeReadLocalAlt (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeDeleteLocalAlt (SpfdApplData_t *applData, Ntk_Node_t *node)
void SpfdNodeSetLocalAlt (SpfdApplData_t *applData, Ntk_Node_t *node, bdd_node *localAlt)
void SpfdNodeSetLocked (SpfdApplData_t *applData, Ntk_Node_t *node, boolean locked)
int SpfdNodeReadNumParams (SpfdApplData_t *applData, Ntk_Node_t *node)
int SpfdNodeReadNetIndex (SpfdApplData_t *applData, Ntk_Node_t *node)

Variables

int sfpdVerbose
float alpha

Function Documentation

void SpfdNodeDeleteFaninOrder ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Delete the sorted array of fanin nodes.]

SideEffects [None]

Definition at line 326 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->faninOrder)
    array_free(nodeData->faninOrder);

  nodeData->faninOrder = NIL(array_t);
  
  return;
  
} /* End of SpfdNodeDeleteFaninOrder */

Here is the caller graph for this function:

void SpfdNodeDeleteGlobalAlternative ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Delete the global BDD of the node. The global BDD is derived from the node's spfd.]

SideEffects [None]

SeeAlso [SpfdNodeReadGlobalAlternative]

Definition at line 405 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->alternative)
    bdd_recursive_deref(applData->ddManager,nodeData->alternative);

  nodeData->alternative = NIL(bdd_node);
  
  return;
  
} /* End of SpfdNodeDeleteGlobalAlternative */

Here is the caller graph for this function:

void SpfdNodeDeleteLocalAlt ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Delete the local BDD, which is in terms of the node's immediate fanin.]

SideEffects [None]

Definition at line 484 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->localAlt)
    bdd_recursive_deref(applData->ddManager,nodeData->localAlt);

  nodeData->localAlt = NIL(bdd_node);
  
  return;
  
} /* End of SpfdNodeDeleteLocalAlt */

Here is the caller graph for this function:

void SpfdNodeDeleteParameters ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Free the array of BDD variables (parameters) associated with the spfd of the node.]

SideEffects [None]

Definition at line 244 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->parameters)
    FREE(nodeData->parameters);

  nodeData->parameters = NIL(bdd_node *);
  nodeData->numParams = 0;
  
  return;
  
} /* End of SpfdNodeDeleteParameters */
void SpfdNodeDeleteSpfd ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Free the BDD representing the spfd of the node.]

SideEffects [None]

Definition at line 166 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->spfd)
    bdd_recursive_deref(applData->ddManager,nodeData->spfd);
  nodeData->spfd = NIL(bdd_node);
  
  return;
  
} /* End of SpfdNodeDeleteSpfd */

Here is the caller graph for this function:

int SpfdNodeReadAuxId ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the auxillary BDD id associated with the node.]

SideEffects [None]

Definition at line 100 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  
  return nodeData->auxId;
  
} /* End of SpfdNodeReadAuxId */

Here is the caller graph for this function:

array_t* SpfdNodeReadFaninOrder ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the sorted array of fanin nodes.]

SideEffects [None]

Definition at line 304 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  
  return nodeData->faninOrder;
  
} /* End of SpfdNodeReadFaninOrder */

Here is the caller graph for this function:

bdd_node* SpfdNodeReadGlobalAlternative ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the global BDD of the node. The global BDD is derived from the node's spfd.]

SideEffects [SpfdNodeDeleteGlobalAlternative]

Definition at line 380 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  
  return nodeData->alternative;
  
} /* End of SpfdNodeReadGlobalAlternative */

Here is the caller graph for this function:

bdd_node* SpfdNodeReadLocalAlt ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the local BDD, which is in terms of the node's immediate fanin.]

SideEffects [None]

Definition at line 461 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  return nodeData->localAlt;
  
} /* End of SpfdNodeReadLocalAlt */

Here is the caller graph for this function:

boolean SpfdNodeReadLocked ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

AutomaticStart AutomaticEnd Function********************************************************************

Synopsis [Returns whether the node is locked.]

SideEffects [None]

Definition at line 78 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  
  return nodeData->locked;
  
} /* End of SpfdNodeReadLocked */

Here is the caller graph for this function:

int SpfdNodeReadNetIndex ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [This is used to get the index of the source of the net data structure used in VPR.]

SideEffects [None]

Definition at line 585 of file spfdAPI.c.

{
  SpfdPlaceData_t *placeData;
  int index = -1;
  
  placeData = applData->placeData;
  st_lookup(placeData->nodeToNetIndex,(char *)node,&index);

  return index;
  
} /* End of SpfdNodeReadNetIndex */
int SpfdNodeReadNumParams ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the number of parameters associated with the node's SPFD.]

SideEffects [None]

Definition at line 563 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  return nodeData->numParams;
  
} /* End of SpfdNodeReadNumParams */
bdd_node** SpfdNodeReadParameters ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the array of BDD variables (parameters) associated with the spfd of the node.]

SideEffects [None]

Definition at line 221 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  return nodeData->parameters;
  
} /* End of SpfdNodeReadParameters */
bdd_node* SpfdNodeReadSpfd ( SpfdApplData_t *  applData,
Ntk_Node_t *  node 
)

Function********************************************************************

Synopsis [Read the node's spfd.]

SideEffects [None]

Definition at line 144 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  
  return nodeData->spfd;
  
} /* End of SpfdNodeReadSpfd */

Here is the caller graph for this function:

void SpfdNodeSetAuxId ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
int  auxId 
)

Function********************************************************************

Synopsis [Set the auxillary BDD id for the node]

SideEffects [None]

Definition at line 122 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  nodeData->auxId = auxId;

} /* End of SpfdNodeSetAuxId */

Here is the caller graph for this function:

void SpfdNodeSetFaninOrder ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
array_t *  faninOrder 
)

Function********************************************************************

Synopsis [Set the array faninOrder required during SPFD computation.]

SideEffects [None]

Definition at line 353 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  if (nodeData->faninOrder) {
    (void) fprintf(vis_stdout,
                   "** spfd warning: <%s: set fanin order> Possible memory leak.\n",
                   Ntk_NodeReadName(node));
  }
  nodeData->faninOrder = faninOrder;

} /* End of SpfdNodeSetFaninOrder */

Here is the call graph for this function:

void SpfdNodeSetGlobalAlternative ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
bdd_node *  alternative 
)

Function********************************************************************

Synopsis [Set the BDD as the node's global BDD.]

SideEffects [None]

Definition at line 432 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  if (nodeData->alternative) {
    (void) fprintf(vis_stdout,
                   "** spfd warning: <%s: set global alternative>"
                   " Possible memory leak.\n",
                   Ntk_NodeReadName(node));
  }
  nodeData->alternative = alternative;
  
} /* End of SpfdNodeSetGlobalAlternative */

Here is the call graph for this function:

Here is the caller graph for this function:

void SpfdNodeSetLocalAlt ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
bdd_node *  localAlt 
)

Function********************************************************************

Synopsis [Set localAlt as the local BDD. localAlt is in terms of the node's immediate fanin.]

SideEffects [None]

Definition at line 512 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);
  if (nodeData->localAlt) {
    (void) fprintf(vis_stdout,
                   "** spfd warning: <%s: set local alt> Possible memory leak.\n",
                   Ntk_NodeReadName(node));
  }
  nodeData->localAlt = localAlt;
  
} /* End of SpfdNodeSetLocalAlt */

Here is the call graph for this function:

Here is the caller graph for this function:

void SpfdNodeSetLocked ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
boolean  locked 
)

Function********************************************************************

Synopsis [Set the node as locked.]

SideEffects [None]

Definition at line 539 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  nodeData->locked = locked;
  
} /* End of SpfdNodeSetLocked */

Here is the caller graph for this function:

void SpfdNodeSetParameters ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
bdd_node **  parameters,
int  numParams 
)

Function********************************************************************

Synopsis [Set the array of BDD variables (parameters) associated with the spfd of the node.]

SideEffects [None]

Definition at line 273 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->parameters) {
    (void) fprintf(vis_stdout,
                   "** spfd warning: <%s: set parameters> Possible memory leak.\n",
                   Ntk_NodeReadName(node));
  }

  nodeData->parameters = parameters;
  nodeData->numParams = numParams;
  
} /* End of SpfdNodeSetParameters */

Here is the call graph for this function:

void SpfdNodeSetSpfd ( SpfdApplData_t *  applData,
Ntk_Node_t *  node,
bdd_node *  spfd 
)

Function********************************************************************

Synopsis [Set the node's spfd]

SideEffects [None]

Definition at line 192 of file spfdAPI.c.

{
  st_table *nodeToData = applData->nodeToData;
  SpfdNodeData_t *nodeData;

  st_lookup(nodeToData,(char *)node,&nodeData);

  if (nodeData->spfd) {
    (void) fprintf(vis_stdout,
                   "** spfd warning: <%s: set spfd> Possible memory leak.\n",
                   Ntk_NodeReadName(node));
  }
  nodeData->spfd = spfd;
  
} /* End of SpfdNodeSetSpfd */

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

float alpha

CFile***********************************************************************

FileName [spfdAPI.c]

PackageName [spfd]

Synopsis [Routines to read, delete and update data structures used in the package.]

Description [Routines to read, delete and update data structures used in the package.]

SeeAlso [spfdUtil.c spfdClean.c]

Author [Balakrishna Kumthekar]

Copyright [This file was created at the University of Colorado at Boulder. The University of Colorado at Boulder makes no warranty about the suitability of this software for any purpose. It is presented on an AS IS basis.]