-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
1.Original code:
// constant node
if ( babc::Abc_NtkIsStrash( pNtk ) ) // AIG
{
pObj = babc::**Abc_AigConst1**( pNtk );
int const_id = babc::Abc_ObjId( pObj );
auto xmlNode_constant = graphNode.append_child( "node" );
xmlNode_constant.append_attribute( "id" ) = const_id;
auto dataType_constant = xmlNode_constant.append_child( "data" );
dataType_constant.append_attribute( "key" ) = "nodeType";
dataType_constant.text().set( "GTECH_**CONST0**" );
auto dataFunc_constant = xmlNode_constant.append_child( "data" );
dataFunc_constant.append_attribute( "key" ) = "nodeFunc";
dataFunc_constant.text().set( NODE_FUNC_MAP.at( "GTECH_**CONST0**" ).c_str() );
}Problem:
The code correctly fetches the Const1 node using babc::Abc_AigConst1, but then seems to incorrectly label its type and function as GTECH_CONST0.
2.Another original code:
if ( Abc_ObjFaninNum( pObj ) == 0 )
{
if ( Abc_NodeIsConst1( pObj ) )
{
fpga_const0_id = babc::Abc_ObjId( babc::Abc_ObjFanout( pObj, 0 ) );
}
else
{
fpga_const1_id = babc::Abc_ObjId( babc::Abc_ObjFanout( pObj, 0 ) );
}
}Problem:
I don't understand why the code recognizes the fanout of the node Const1 as the type Const0.
Metadata
Metadata
Assignees
Labels
No labels