Exemplo n.º 1
0
bool CirMgr::print_io(){
    cout << "========= PRINT_IO =========" << endl; 
    cout << "GATE:" << endl;
    for(size_t i=0 ; i<GateList[0].size() ; ++i){
        cout << "(" << i << ")";
        cout << " ID = " << GateList[0][i]->getId();
        cout << ", Type = " << GateList[0][i]->getType();
        cout << ", Fanin0 = " << GateList[0][i]->getFin0()->getId();
        if(GateList[0][i]->getFin1()!=0)
            cout << ", Fanin1 = " << GateList[0][i]->getFin1()->getId();
        cout << ", Fanout = " << GateList[0][i]->getFout()->getId();
        cout << endl;
    }

    cout << "WIRE: " << endl;
    for(size_t i=0 ; i<WireList[0].size() ; ++i){
        cout << "(" << i << ")";
        cout << " ID = " << WireList[0][i]->getId();
        if(WireList[0][i]->getFin()!=0){
            cout << ", Fanin = " << WireList[0][i]->getFin()->getId() << " (";
            Gate* gate = WireList[0][i]->getFin();
            cout << " " << gate->getFin0()->getId();
            if(gate->getFin1()!=0)
                cout << " " << gate->getFin1()->getId();
            cout << " )";
        }
        cout << endl;
    }
    cout << endl;
    return true;
}