bool HHChannel::setGatePower( const Eref& e, double power, double *assignee, const string& gateType ) { if ( doubleEq( power, *assignee ) ) return false; if ( doubleEq( *assignee, 0.0 ) && power > 0 ) { createGate( e, gateType ); } else if ( doubleEq( power, 0.0 ) ) { // destroyGate( e, gateType ); } *assignee = power; return true; }
bool HHChannel2D::setGatePower( const Eref& e, const Qinfo* q, double power, double *assignee, const string& gateType ) { if ( power < 0 ) { cout << "Error: HHChannel2D::set" << gateType << "power: Cannot use negative power: " << power << endl; return 0; } if ( doubleEq( power, *assignee ) ) return 0; if ( doubleEq( *assignee, 0.0 ) && power > 0 ) { createGate( e, q, gateType ); } else if ( doubleEq( power, 0.0 ) ) { destroyGate( e, q, gateType ); } *assignee = power; return 1; }
void V3Ntk::createConst(const V3NetId& id) { assert (validNetId(id)); assert (!isV3NetInverted(id)); createGate(dynamic_cast<const V3BvNtk*>(this) ? BV_CONST : AIG_FALSE, id); _ConstList.push_back(id); }
void V3Ntk::createLatch(const V3NetId& id) { assert (validNetId(id)); assert (!isV3NetInverted(id)); createGate(V3_FF, id); _FFList.push_back(id); }
void V3Ntk::createInout(const V3NetId& id) { assert (validNetId(id)); assert (!isV3NetInverted(id)); createGate(V3_PIO, id); _IOList[2].push_back(id); }