Giter VIP home page Giter VIP logo

Comments (2)

Luo-Yun-Rong avatar Luo-Yun-Rong commented on June 30, 2024 3

Thanks. It is a good observation. You may refer to abc.h and notice that objects may have following types.

// object types
typedef enum { 
    ABC_OBJ_NONE = 0,   //  0:  unknown
    ABC_OBJ_CONST1,     //  1:  constant 1 node (AIG only)
    ABC_OBJ_PI,         //  2:  primary input terminal
    ABC_OBJ_PO,         //  3:  primary output terminal
    ....
    ABC_OBJ_NODE,       //  7:  node
    ....
} Abc_ObjType_t;

The iterator Abc_NtkForEachNode only gives you objects with type ABC_OBJ_NODE.

#define Abc_NtkForEachNode( pNtk, pNode, i )                                                       \
    for ( i = 0; (i < Vec_PtrSize((pNtk)->vObjs)) && (((pNode) = Abc_NtkObj(pNtk, i)), 1); i++ )   \
        if ( (pNode) == NULL || !Abc_ObjIsNode(pNode) ) {} else
static inline int   Abc_ObjIsNode( Abc_Obj_t * pObj )   { return pObj->Type == ABC_OBJ_NODE;    }

You may miss the constant object with type ABC_OBJ_CONST1.

from lsv-pa.

kevinchang73 avatar kevinchang73 commented on June 30, 2024

@Luo-Yun-Rong Hi TA, for the case "ctrl.aig", the reference answer tells the first MSFC is {n0}. However, there is no "n0" node when I use lsv_print_nodes (the example command). Similar situations also occur in "i2c", "mem_ctrl", "router" and "square". So, I wonder if Abc_NtkForEachNode may miss some nodes or the answers may be incorrect? Thanks a lot!

from lsv-pa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.