summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-10-26 16:29:05 +0300
committerAlan Mishchenko <alanmi@berkeley.edu>2019-10-26 16:29:05 +0300
commitfeb3e7943de06c7c5ba16c53a23df00aa3c46cd0 (patch)
tree50162430a1f6274617bd01681b28e64e1f9ba997 /src/base
parent35c2b4216499e26242ed36a77d6bde5aab88363d (diff)
downloadabc-feb3e7943de06c7c5ba16c53a23df00aa3c46cd0.tar.gz
abc-feb3e7943de06c7c5ba16c53a23df00aa3c46cd0.tar.bz2
abc-feb3e7943de06c7c5ba16c53a23df00aa3c46cd0.zip
Adding limit on the depth of recursion when counting exact area in 'amap'.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/cmd/cmdApi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/base/cmd/cmdApi.c b/src/base/cmd/cmdApi.c
index 64e11ae8..2ee10229 100644
--- a/src/base/cmd/cmdApi.c
+++ b/src/base/cmd/cmdApi.c
@@ -99,11 +99,11 @@ void Cmd_CommandAdd( Abc_Frame_t * pAbc, const char * sGroup, const char * sName
int Cmd_CommandHandleSpecial( Abc_Frame_t * pAbc, const char * sCommand )
{
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
- int piCountNew = pNtk ? Abc_NtkCiNum(pNtk) : 0, piCount = 0;
- int poCountNew = pNtk ? Abc_NtkCoNum(pNtk) : 0, poCount = 0;
- int ndCountNew = pNtk ? Abc_NtkNodeNum(pNtk) : 0, ndCount = 0;
- double AreaNew = pNtk ? Abc_NtkGetMappedArea(pNtk) : 0, Area = 0;
- int DepthNew = pNtk ? Abc_NtkLevel(pNtk) : 0, Depth = 0;
+ int piCountNew = (pNtk && Abc_NtkHasMapping(pNtk)) ? Abc_NtkCiNum(pNtk) : 0, piCount = 0;
+ int poCountNew = (pNtk && Abc_NtkHasMapping(pNtk)) ? Abc_NtkCoNum(pNtk) : 0, poCount = 0;
+ int ndCountNew = (pNtk && Abc_NtkHasMapping(pNtk)) ? Abc_NtkNodeNum(pNtk) : 0, ndCount = 0;
+ double AreaNew = (pNtk && Abc_NtkHasMapping(pNtk)) ? Abc_NtkGetMappedArea(pNtk) : 0, Area = 0;
+ int DepthNew = (pNtk && Abc_NtkHasMapping(pNtk)) ? Abc_NtkLevel(pNtk) : 0, Depth = 0;
if ( strstr(sCommand, "#PS") )
{
printf( "pi=%d ", piCountNew );