/**CFile**************************************************************** FileName [nwkFlow.c] SystemName [ABC: Logic synthesis and verification system.] PackageName [Netlist representation.] Synopsis [Max-flow/min-cut computation.] Author [Alan Mishchenko] Affiliation [UC Berkeley] Date [Ver. 1.0. Started - June 20, 2005.] Revision [$Id: nwkFlow.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] ***********************************************************************/ #include "nwk.h" ABC_NAMESPACE_IMPL_START /* This code is based on the papers: A. Hurst, A. Mishchenko, and R. Brayton, "Fast minimum-register retiming via binary maximum-flow", Proc. FMCAD '07, pp. 181-187. A. Hurst, A. Mishchenko, and R. Brayton, "Scalable min-area retiming under simultaneous delay and initial state constraints". Proc. DAC'08. */ int DepthFwd, DepthBwd, DepthFwdMax, DepthBwdMax; //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// // predecessors static inline Nwk_Obj_t * Nwk_ObjPred( Nwk_Obj_t * pObj ) { return pObj->pCopy; } static inline int Nwk_ObjSetPred( Nwk_Obj_t * pObj, Nwk_Obj_t * p ) { pObj->pCopy = p; return 1; } // sink static inline int Nwk_ObjIsSink( Nwk_Obj_t * pObj ) { return pObj->MarkA; } static inline void Nwk_ObjSetSink( Nwk_Obj_t * pObj ) { pObj->MarkA = 1; } // flow static inline int Nwk_ObjHasFlow( Nwk_Obj_t * pObj ) { return pObj->MarkB; } static inline void Nwk_ObjSetFlow( Nwk_Obj_t * pObj ) { pObj->MarkB = 1; } static inline void Nwk_ObjClearFlow( Nwk_Obj_t * pObj ) { pObj->MarkB = 0; } // representation of visited nodes // pObj->TravId < pNtk->nTravIds-2 --- not visited // pObj->TravId == pNtk->nTravIds-2 --- visited bot only // pObj->TravId == pNtk->nTravIds-1 --- visited top only // pObj->TravId == pNtk->nTravIds --- visited bot and top static inline int Nwk_ObjVisitedBotOnly( Nwk_Obj_t * pObj ) { return pObj->TravId == pObj->pMan->nTravIds - 2; } static inline int Nwk_ObjVisitedBot( Nwk_Obj_t * pObj ) { return pObj->TravId == pObj->pMan->nTravIds - 2 || pObj->TravId == pObj->pMan->nTravIds; } static inline int Nwk_ObjVisitedTop( Nwk_Obj_t * pObj ) { return pObj->TravId == pObj->pMan->nTravIds - 1 || pObj->TravId == pObj->pMan->nTravIds; } static inline void Nwk_ObjSetVisitedBot( Nwk_Obj_t * pObj ) { if ( pObj->TravId < pObj->pMan->nTravIds - 2 ) pObj->TravId = pObj->pMan->nTravIds - 2; else if ( pObj->TravId == pObj->pMan->nTravIds - 1 ) pObj->TravId = pObj->pMan->nTravIds; else assert( 0 ); } static inline void Nwk_ObjSetVisitedTop( Nwk_Obj_t * pObj ) { if ( pObj->TravId < pObj->pMan->nTravIds - 2 ) pObj->TravId = pObj->pMan->nTravIds - 1; else if ( pObj->TravId == pObj->pMan->nTravIds - 2 ) pObj->TravId = pObj->pMan->nTravIds; else assert( 0 ); } static inline Nwk_ManIncrementTravIdFlow( Nwk_Man_t * pMan ) { Nwk_ManIncrementTravId( pMan ); Nwk_ManIncrementTravId( pMan ); Nwk_ManIncrementTravId( pMan ); } static int Nwk_ManPushForwardTop_rec( Nwk_Obj_t * pObj, Nwk_Obj_t * pPred ); static int Nwk_ManPushForwardBot_rec( Nwk_Obj_t * pObj, Nwk_Obj_t * pPred ); static int Nwk_ManPushBackwardTop_rec( Nwk_Obj_t * pObj, Nwk_Obj_t * pPred ); static int Nwk_ManPushBackwardBot_rec( Nwk_Obj_t * pObj, Nwk_Obj_t * pPred ); //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// /**Function************************************************************* Synopsis [Marks TFI of the node.] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ void Nwk_Ma
/* Copyright 2017 Jack Humbert
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PROCESS_TERMINAL_H
#define PROCESS_TERMINAL_H
#include "quantum.h"
#define TERM_ON KC_NO
#define TERM_OFF KC_NO
#endif