ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
verCore.c File Reference
#include "ver.h"
#include "map/mio/mio.h"
#include "base/main/main.h"
Include dependency graph for verCore.c:

Go to the source code of this file.

Classes

struct  Ver_Bundle_t_
 

Typedefs

typedef struct Ver_Bundle_t_ Ver_Bundle_t
 

Enumerations

enum  Ver_SignalType_t {
  VER_SIG_NONE = 0 , VER_SIG_INPUT , VER_SIG_OUTPUT , VER_SIG_INOUT ,
  VER_SIG_REG , VER_SIG_WIRE
}
 DECLARATIONS ///. More...
 
enum  Ver_GateType_t {
  VER_GATE_AND = 0 , VER_GATE_OR , VER_GATE_XOR , VER_GATE_BUF ,
  VER_GATE_NAND , VER_GATE_NOR , VER_GATE_XNOR , VER_GATE_NOT
}
 

Functions

Abc_Des_tVer_ParseFile (char *pFileName, Abc_Des_t *pGateLib, int fCheck, int fUseMemMan)
 MACRO DEFINITIONS ///.
 
void Ver_ParsePrintErrorMessage (Ver_Man_t *p)
 
Abc_Ntk_tVer_ParseFindOrCreateNetwork (Ver_Man_t *pMan, char *pName)
 
Abc_Obj_tVer_ParseFindNet (Abc_Ntk_t *pNtk, char *pName)
 
int Ver_ParseConvertNetwork (Ver_Man_t *pMan, Abc_Ntk_t *pNtk, int fMapped)
 
int Ver_ParseLookupSuffix (Ver_Man_t *pMan, char *pWord, int *pnMsb, int *pnLsb)
 
int Ver_ParseInsertsSuffix (Ver_Man_t *pMan, char *pWord, int nMsb, int nLsb)
 
int Ver_ParseSignalPrefix (Ver_Man_t *pMan, char **ppWord, int *pnMsb, int *pnLsb)
 
int Ver_ParseSignalSuffix (Ver_Man_t *pMan, char *pWord, int *pnMsb, int *pnLsb)
 
int Ver_ParseConstant (Ver_Man_t *pMan, char *pWord)
 
int Ver_FindGateInput (Mio_Gate_t *pGate, char *pName)
 
void Ver_ParseFreeBundle (Ver_Bundle_t *pBundle)
 
int Ver_ParseConnectDefBoxes (Ver_Man_t *pMan)
 
Vec_Ptr_tVer_ParseCollectUndefBoxes (Ver_Man_t *pMan)
 
void Ver_ParseReportUndefBoxes (Ver_Man_t *pMan)
 
int Ver_ParseCheckNondrivenNets (Vec_Ptr_t *vUndefs)
 
int Ver_ParseFormalNetsAreDriven (Abc_Ntk_t *pNtk, char *pNameFormal)
 
Ver_Bundle_tVer_ParseGetNondrivenBundle (Abc_Ntk_t *pNtk, int Counter)
 
int Ver_ParseDriveFormal (Ver_Man_t *pMan, Abc_Ntk_t *pNtk, Ver_Bundle_t *pBundle0)
 
int Ver_ParseDriveInputs (Ver_Man_t *pMan, Vec_Ptr_t *vUndefs)
 
int Ver_ParseMaxBoxSize (Vec_Ptr_t *vUndefs)
 
void Ver_ParsePrintLog (Ver_Man_t *pMan)
 

Variables

int glo_fMapped = 0
 

Typedef Documentation

◆ Ver_Bundle_t

typedef struct Ver_Bundle_t_ Ver_Bundle_t

Definition at line 82 of file verCore.c.

Enumeration Type Documentation

◆ Ver_GateType_t

Enumerator
VER_GATE_AND 
VER_GATE_OR 
VER_GATE_XOR 
VER_GATE_BUF 
VER_GATE_NAND 
VER_GATE_NOR 
VER_GATE_XNOR 
VER_GATE_NOT 

Definition at line 43 of file verCore.c.

43 {
44 VER_GATE_AND = 0,
Ver_GateType_t
Definition verCore.c:43
@ VER_GATE_BUF
Definition verCore.c:47
@ VER_GATE_OR
Definition verCore.c:45
@ VER_GATE_NAND
Definition verCore.c:48
@ VER_GATE_NOT
Definition verCore.c:51
@ VER_GATE_AND
Definition verCore.c:44
@ VER_GATE_NOR
Definition verCore.c:49
@ VER_GATE_XNOR
Definition verCore.c:50
@ VER_GATE_XOR
Definition verCore.c:46

◆ Ver_SignalType_t

DECLARATIONS ///.

CFile****************************************************************

FileName [verCore.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Verilog parser.]

Synopsis [Parses several flavors of structural Verilog.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - August 19, 2006.]

Revision [

Id
verCore.c,v 1.00 2006/08/19 00:00:00 alanmi Exp

]

Enumerator
VER_SIG_NONE 
VER_SIG_INPUT 
VER_SIG_OUTPUT 
VER_SIG_INOUT 
VER_SIG_REG 
VER_SIG_WIRE 

Definition at line 33 of file verCore.c.

33 {
34 VER_SIG_NONE = 0,
Ver_SignalType_t
DECLARATIONS ///.
Definition verCore.c:33
@ VER_SIG_WIRE
Definition verCore.c:39
@ VER_SIG_OUTPUT
Definition verCore.c:36
@ VER_SIG_INOUT
Definition verCore.c:37
@ VER_SIG_REG
Definition verCore.c:38
@ VER_SIG_NONE
Definition verCore.c:34
@ VER_SIG_INPUT
Definition verCore.c:35

Function Documentation

◆ Ver_FindGateInput()

int Ver_FindGateInput ( Mio_Gate_t * pGate,
char * pName )

Function*************************************************************

Synopsis [Returns the index of the given pin the gate.]

Description []

SideEffects []

SeeAlso []

Definition at line 1527 of file verCore.c.

1528{
1529 Mio_Pin_t * pGatePin;
1530 int i;
1531 for ( i = 0, pGatePin = Mio_GateReadPins(pGate); pGatePin != NULL; pGatePin = Mio_PinReadNext(pGatePin), i++ )
1532 if ( strcmp(pName, Mio_PinReadName(pGatePin)) == 0 )
1533 return i;
1534 if ( strcmp(pName, Mio_GateReadOutName(pGate)) == 0 )
1535 return i;
1536 if ( Mio_GateReadTwin(pGate) && strcmp(pName, Mio_GateReadOutName(Mio_GateReadTwin(pGate))) == 0 )
1537 return i+1;
1538 return -1;
1539}
Mio_Pin_t * Mio_GateReadPins(Mio_Gate_t *pGate)
Definition mioApi.c:173
Mio_Gate_t * Mio_GateReadTwin(Mio_Gate_t *pGate)
Definition mioApi.c:176
char * Mio_PinReadName(Mio_Pin_t *pPin)
Definition mioApi.c:208
Mio_Pin_t * Mio_PinReadNext(Mio_Pin_t *pPin)
Definition mioApi.c:217
struct Mio_PinStruct_t_ Mio_Pin_t
Definition mio.h:44
char * Mio_GateReadOutName(Mio_Gate_t *pGate)
Definition mioApi.c:170
int strcmp()
Here is the call graph for this function:

◆ Ver_ParseCheckNondrivenNets()

int Ver_ParseCheckNondrivenNets ( Vec_Ptr_t * vUndefs)

Function*************************************************************

Synopsis [Returns 1 if there are non-driven nets.]

Description []

SideEffects []

SeeAlso []

Definition at line 2442 of file verCore.c.

2443{
2444 Abc_Ntk_t * pNtk;
2445 Ver_Bundle_t * pBundle;
2446 Abc_Obj_t * pBox, * pNet;
2447 int i, k, j, m;
2448 // go through undef box types
2449 Vec_PtrForEachEntry( Abc_Ntk_t *, vUndefs, pNtk, i )
2450 // go through instances of this type
2451 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2452 // go through the bundles of this instance
2453 Vec_PtrForEachEntryReverse( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2454 // go through the actual nets of this bundle
2455 if ( pBundle )
2456 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle->vNetsActual, pNet, m )
2457 {
2458 if ( Abc_ObjFaninNum(pNet) == 0 ) // non-driven
2459 if ( strcmp(Abc_ObjName(pNet), "1\'b0") && strcmp(Abc_ObjName(pNet), "1\'b1") ) // diff from a const
2460 return 1;
2461 }
2462 return 0;
2463}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
ABC_DLL char * Abc_ObjName(Abc_Obj_t *pNode)
DECLARATIONS ///.
Definition abcNames.c:49
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
void * pData
Definition abc.h:203
Abc_Obj_t * pCopy
Definition abc.h:148
Vec_Ptr_t * vNetsActual
Definition verCore.c:86
#define Vec_PtrForEachEntryReverse(Type, vVec, pEntry, i)
Definition vecPtr.h:63
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
Definition vecPtr.h:42
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition vecPtr.h:55
struct Ver_Bundle_t_ Ver_Bundle_t
Definition verCore.c:82
Here is the call graph for this function:

◆ Ver_ParseCollectUndefBoxes()

Vec_Ptr_t * Ver_ParseCollectUndefBoxes ( Ver_Man_t * pMan)

Function*************************************************************

Synopsis [Collects the undef boxes and maps them into their instances.]

Description []

SideEffects []

SeeAlso []

Definition at line 2358 of file verCore.c.

2359{
2360 Vec_Ptr_t * vUndefs;
2361 Abc_Ntk_t * pNtk, * pNtkBox;
2362 Abc_Obj_t * pBox;
2363 int i, k;
2364 // clear the module structures
2365 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2366 pNtk->pData = NULL;
2367 // go through all the blackboxes
2368 vUndefs = Vec_PtrAlloc( 16 );
2369 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2370 {
2371 Abc_NtkForEachBlackbox( pNtk, pBox, k )
2372 {
2373 pNtkBox = (Abc_Ntk_t *)pBox->pData;
2374 if ( pNtkBox == NULL )
2375 continue;
2376 if ( Ver_NtkIsDefined(pNtkBox) )
2377 continue;
2378 if ( pNtkBox->pData == NULL )
2379 {
2380 // save the box
2381 Vec_PtrPush( vUndefs, pNtkBox );
2382 pNtkBox->pData = Vec_PtrAlloc( 16 );
2383 }
2384 // save the instance
2385 Vec_PtrPush( (Vec_Ptr_t *)pNtkBox->pData, pBox );
2386 }
2387 }
2388 return vUndefs;
2389}
#define Abc_NtkForEachBlackbox(pNtk, pObj, i)
Definition abc.h:512
void * pData
Definition abc.h:145

◆ Ver_ParseConnectDefBoxes()

int Ver_ParseConnectDefBoxes ( Ver_Man_t * pMan)

Function*************************************************************

Synopsis [Connects the defined boxes.]

Description [Returns 2 if there are any undef boxes.]

SideEffects []

SeeAlso []

Definition at line 2312 of file verCore.c.

2313{
2314 Abc_Ntk_t * pNtk;
2315 Abc_Obj_t * pBox;
2316 int i, k, RetValue = 1;
2317 // go through all the modules
2318 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2319 {
2320 // go through all the boxes of this module
2321 Abc_NtkForEachBox( pNtk, pBox, k )
2322 {
2323 if ( Abc_ObjIsLatch(pBox) )
2324 continue;
2325 // skip internal boxes of the blackboxes
2326 if ( pBox->pData == NULL )
2327 continue;
2328 // if the network is undefined, it will be connected later
2329 if ( !Ver_NtkIsDefined((Abc_Ntk_t *)pBox->pData) )
2330 {
2331 RetValue = 2;
2332 continue;
2333 }
2334 // connect the box
2335 if ( !Ver_ParseConnectBox( pMan, pBox ) )
2336 return 0;
2337 // if the network is a true blackbox, skip
2338 if ( Abc_NtkHasBlackbox((Abc_Ntk_t *)pBox->pData) )
2339 continue;
2340 // convert the box to the whitebox
2341 Abc_ObjBlackboxToWhitebox( pBox );
2342 }
2343 }
2344 return RetValue;
2345}
#define Abc_NtkForEachBox(pNtk, pObj, i)
Definition abc.h:498

◆ Ver_ParseConstant()

int Ver_ParseConstant ( Ver_Man_t * pMan,
char * pWord )

Function*************************************************************

Synopsis [Returns the values of constant bits.]

Description [The resulting bits are in MSB to LSB order.]

SideEffects []

SeeAlso []

Definition at line 753 of file verCore.c.

754{
755 int nBits, i;
756 assert( pWord[0] >= '1' && pWord[1] <= '9' );
757 nBits = atoi(pWord);
758 // find the next symbol \'
759 while ( *pWord && *pWord != '\'' )
760 pWord++;
761 if ( *pWord == 0 )
762 {
763 sprintf( pMan->sError, "Cannot find symbol \' in the constant." );
765 return 0;
766 }
767 assert( *pWord == '\'' );
768 pWord++;
769 if ( *pWord != 'b' )
770 {
771 sprintf( pMan->sError, "Currently can only handle binary constants." );
773 return 0;
774 }
775 pWord++;
776 // scan the bits
777 Vec_PtrClear( pMan->vNames );
778 for ( i = 0; i < nBits; i++ )
779 {
780 if ( pWord[i] != '0' && pWord[i] != '1' && pWord[i] != 'x' )
781 {
782 sprintf( pMan->sError, "Having problem parsing the binary constant." );
784 return 0;
785 }
786 if ( pWord[i] == 'x' )
787 Vec_PtrPush( pMan->vNames, (void *)0 );
788 else
789 Vec_PtrPush( pMan->vNames, (void *)(ABC_PTRUINT_T)(pWord[i]-'0') );
790 }
791 return 1;
792}
#define assert(ex)
Definition util_old.h:213
char * sprintf()
void Ver_ParsePrintErrorMessage(Ver_Man_t *p)
Definition verCore.c:278
Here is the call graph for this function:

◆ Ver_ParseConvertNetwork()

int Ver_ParseConvertNetwork ( Ver_Man_t * pMan,
Abc_Ntk_t * pNtk,
int fMapped )

Function*************************************************************

Synopsis [Converts the network from the blackbox type into a different one.]

Description []

SideEffects []

SeeAlso []

Definition at line 351 of file verCore.c.

352{
353 if ( fMapped )
354 {
355 // convert from the blackbox into the network with local functions representated by AIGs
356 if ( pNtk->ntkFunc == ABC_FUNC_BLACKBOX )
357 {
358 // change network type
359 assert( pNtk->pManFunc == NULL );
360 pNtk->ntkFunc = ABC_FUNC_MAP;
361 pNtk->pManFunc = pMan->pDesign->pGenlib;
362 }
363 else if ( pNtk->ntkFunc != ABC_FUNC_MAP )
364 {
365 sprintf( pMan->sError, "The network %s appears to have both gates and assign statements. Currently such network are not allowed. One way to fix this problem might be to replace assigns by buffers from the library.", pNtk->pName );
367 return 0;
368 }
369 }
370 else
371 {
372 // convert from the blackbox into the network with local functions representated by AIGs
373 if ( pNtk->ntkFunc == ABC_FUNC_BLACKBOX )
374 {
375 // change network type
376 assert( pNtk->pManFunc == NULL );
377 pNtk->ntkFunc = ABC_FUNC_AIG;
378 pNtk->pManFunc = pMan->pDesign->pManFunc;
379 }
380 else if ( pNtk->ntkFunc != ABC_FUNC_AIG )
381 {
382 sprintf( pMan->sError, "The network %s appears to have both gates and assign statements. Currently such network are not allowed. One way to fix this problem might be to replace assigns by buffers from the library.", pNtk->pName );
384 return 0;
385 }
386 }
387 return 1;
388}
@ ABC_FUNC_BLACKBOX
Definition abc.h:70
@ ABC_FUNC_AIG
Definition abc.h:67
@ ABC_FUNC_MAP
Definition abc.h:68
char * pName
Definition abc.h:158
void * pManFunc
Definition abc.h:191
Abc_NtkFunc_t ntkFunc
Definition abc.h:157
Here is the call graph for this function:

◆ Ver_ParseDriveFormal()

int Ver_ParseDriveFormal ( Ver_Man_t * pMan,
Abc_Ntk_t * pNtk,
Ver_Bundle_t * pBundle0 )

Function*************************************************************

Synopsis [Drives the bundle in the given undef box.]

Description []

SideEffects []

SeeAlso []

Definition at line 2544 of file verCore.c.

2545{
2546 char Buffer[200];
2547 char * pName;
2548 Ver_Bundle_t * pBundle = NULL;
2549 Abc_Obj_t * pBox, * pTerm, * pTermNew, * pNetAct, * pNetFormal;
2550 int k, j, m;
2551
2552 // drive this net in the undef box
2553 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle0->vNetsActual, pNetAct, m )
2554 {
2555 // create the formal net
2556 if ( Vec_PtrSize(pBundle0->vNetsActual) == 1 )
2557 sprintf( Buffer, "%s", pBundle0->pNameFormal );
2558 else
2559 sprintf( Buffer, "%s[%d]", pBundle0->pNameFormal, m );
2560 assert( Abc_NtkFindNet( pNtk, Buffer ) == NULL );
2561 pNetFormal = Abc_NtkFindOrCreateNet( pNtk, Buffer );
2562 // connect it to the box
2563 pTerm = Abc_NtkCreateBo( pNtk );
2564 assert( Abc_NtkBoxNum(pNtk) <= 1 );
2565 pBox = Abc_NtkBoxNum(pNtk)? Abc_NtkBox(pNtk,0) : Abc_NtkCreateBlackbox(pNtk);
2566 Abc_ObjAddFanin( Abc_NtkCreatePo(pNtk), pNetFormal );
2567 Abc_ObjAddFanin( pNetFormal, pTerm );
2568 Abc_ObjAddFanin( pTerm, pBox );
2569 }
2570
2571 // go through instances of this type
2572 pName = Extra_UtilStrsav(pBundle0->pNameFormal);
2573 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2574 {
2575 // find a bundle with the given name in this instance
2576 Vec_PtrForEachEntryReverse( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2577 if ( pBundle && !strcmp( pBundle->pNameFormal, pName ) )
2578 break;
2579 // skip non-driven bundles
2580 if ( j == Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy) )
2581 continue;
2582 // check if any nets are driven in this bundle
2583 assert(pBundle); // Verify pBundle was assigned to.
2584 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle->vNetsActual, pNetAct, m )
2585 if ( Abc_ObjFaninNum(pNetAct) > 0 )
2586 {
2587 sprintf( pMan->sError, "Missing specification of the I/Os of undefined box \"%s\".", Abc_NtkName(pNtk) );
2589 return 0;
2590 }
2591 // drive the nets by the undef box
2592 Vec_PtrForEachEntryReverse( Abc_Obj_t *, pBundle->vNetsActual, pNetAct, m )
2593 {
2594 pTermNew = Abc_NtkCreateBo( pNetAct->pNtk );
2595 Abc_ObjAddFanin( pTermNew, pBox );
2596 Abc_ObjAddFanin( pNetAct, pTermNew );
2597 }
2598 // remove the bundle
2599 Ver_ParseFreeBundle( pBundle ); pBundle = NULL;
2600 Vec_PtrWriteEntry( (Vec_Ptr_t *)pBox->pCopy, j, NULL );
2601 }
2602 ABC_FREE( pName );
2603 return 1;
2604}
ABC_DLL Abc_Obj_t * Abc_NtkFindOrCreateNet(Abc_Ntk_t *pNtk, char *pName)
Definition abcObj.c:587
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition abcFanio.c:84
ABC_DLL Abc_Obj_t * Abc_NtkFindNet(Abc_Ntk_t *pNtk, char *pName)
Definition abcObj.c:515
#define ABC_FREE(obj)
Definition abc_global.h:267
char * Extra_UtilStrsav(const char *s)
Abc_Ntk_t * pNtk
Definition abc.h:130
char * pNameFormal
Definition verCore.c:85
void Ver_ParseFreeBundle(Ver_Bundle_t *pBundle)
Definition verCore.c:2055
Here is the call graph for this function:

◆ Ver_ParseDriveInputs()

int Ver_ParseDriveInputs ( Ver_Man_t * pMan,
Vec_Ptr_t * vUndefs )

Function*************************************************************

Synopsis [Drives the bundle in the given undef box.]

Description []

SideEffects []

SeeAlso []

Definition at line 2618 of file verCore.c.

2619{
2620 char Buffer[200];
2621 Ver_Bundle_t * pBundle;
2622 Abc_Ntk_t * pNtk;
2623 Abc_Obj_t * pBox, * pBox2, * pTerm, * pTermNew, * pNetFormal, * pNetAct;
2624 int i, k, j, m, CountCur, CountTotal = -1;
2625 // iterate through the undef boxes
2626 Vec_PtrForEachEntry( Abc_Ntk_t *, vUndefs, pNtk, i )
2627 {
2628 // count the number of unconnected bundles for instances of this type of box
2629 CountTotal = -1;
2630 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2631 {
2632 CountCur = 0;
2633 Vec_PtrForEachEntry( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2634 CountCur += (pBundle != NULL);
2635 if ( CountTotal == -1 )
2636 CountTotal = CountCur;
2637 else if ( CountTotal != CountCur )
2638 {
2639 sprintf( pMan->sError, "The number of formal inputs (%d) is different from the expected one (%d) when instantiating network %s in box %s.",
2640 CountCur, CountTotal, pNtk->pName, Abc_ObjName(pBox) );
2642 return 0;
2643 }
2644 }
2645
2646 // create formals
2647 pBox = (Abc_Obj_t *)Vec_PtrEntry( (Vec_Ptr_t *)pNtk->pData, 0 );
2648 Vec_PtrForEachEntry( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2649 {
2650 if ( pBundle == NULL )
2651 continue;
2652 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle->vNetsActual, pNetAct, m )
2653 {
2654 // find create the formal net
2655 if ( Vec_PtrSize(pBundle->vNetsActual) == 1 )
2656 sprintf( Buffer, "%s", pBundle->pNameFormal );
2657 else
2658 sprintf( Buffer, "%s[%d]", pBundle->pNameFormal, m );
2659 assert( Abc_NtkFindNet( pNtk, Buffer ) == NULL );
2660 pNetFormal = Abc_NtkFindOrCreateNet( pNtk, Buffer );
2661 // connect
2662 pTerm = Abc_NtkCreateBi( pNtk );
2663 assert( Abc_NtkBoxNum(pNtk) <= 1 );
2664 pBox2 = Abc_NtkBoxNum(pNtk)? Abc_NtkBox(pNtk,0) : Abc_NtkCreateBlackbox(pNtk);
2665 Abc_ObjAddFanin( pNetFormal, Abc_NtkCreatePi(pNtk) );
2666 Abc_ObjAddFanin( pTerm, pNetFormal );
2667 Abc_ObjAddFanin( pBox2, pTerm );
2668 }
2669 }
2670
2671 // go through all the boxes
2672 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2673 {
2674 // go through all the bundles
2675 Vec_PtrForEachEntry( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2676 {
2677 if ( pBundle == NULL )
2678 continue;
2679 // drive the nets by the undef box
2680 Vec_PtrForEachEntryReverse( Abc_Obj_t *, pBundle->vNetsActual, pNetAct, m )
2681 {
2682 pTermNew = Abc_NtkCreateBi( pNetAct->pNtk );
2683 Abc_ObjAddFanin( pBox, pTermNew );
2684 Abc_ObjAddFanin( pTermNew, pNetAct );
2685 }
2686 // remove the bundle
2687 Ver_ParseFreeBundle( pBundle );
2688 Vec_PtrWriteEntry( (Vec_Ptr_t *)pBox->pCopy, j, NULL );
2689 }
2690
2691 // free the bundles
2692 Vec_PtrFree( (Vec_Ptr_t *)pBox->pCopy );
2693 pBox->pCopy = NULL;
2694 }
2695 }
2696 return 1;
2697}
Here is the call graph for this function:

◆ Ver_ParseFile()

Abc_Des_t * Ver_ParseFile ( char * pFileName,
Abc_Des_t * pGateLib,
int fCheck,
int fUseMemMan )

MACRO DEFINITIONS ///.

Function*************************************************************

Synopsis [File parser.]

Description []

SideEffects []

SeeAlso []

Definition at line 165 of file verCore.c.

166{
167 Ver_Man_t * p;
168 Abc_Des_t * pDesign;
169 // start the parser
170 p = Ver_ParseStart( pFileName, pGateLib );
171 p->fMapped = glo_fMapped;
172 p->fCheck = fCheck;
173 p->fUseMemMan = fUseMemMan;
174 if ( glo_fMapped )
175 {
176 Hop_ManStop((Hop_Man_t *)p->pDesign->pManFunc);
177 p->pDesign->pManFunc = NULL;
178 }
179 // parse the file
180 Ver_ParseInternal( p );
181 // save the result
182 pDesign = p->pDesign;
183 p->pDesign = NULL;
184 // stop the parser
185 Ver_ParseStop( p );
186 return pDesign;
187}
struct Abc_Des_t_ Abc_Des_t
BASIC TYPES ///.
Definition abc.h:114
Cube * p
Definition exorList.c:222
typedefABC_NAMESPACE_HEADER_START struct Hop_Man_t_ Hop_Man_t
INCLUDES ///.
Definition hop.h:49
void Hop_ManStop(Hop_Man_t *p)
Definition hopMan.c:84
int glo_fMapped
Definition verCore.c:80
typedefABC_NAMESPACE_HEADER_START struct Ver_Man_t_ Ver_Man_t
INCLUDES ///.
Definition ver.h:45
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ver_ParseFindNet()

Abc_Obj_t * Ver_ParseFindNet ( Abc_Ntk_t * pNtk,
char * pName )

Function*************************************************************

Synopsis [Finds the network by name or create a new blackbox network.]

Description []

SideEffects []

SeeAlso []

Definition at line 328 of file verCore.c.

329{
330 Abc_Obj_t * pObj;
331 if ( (pObj = Abc_NtkFindNet(pNtk, pName)) )
332 return pObj;
333 if ( !strcmp( pName, "1\'b0" ) || !strcmp( pName, "1\'bx" ) )
334 return Abc_NtkFindOrCreateNet( pNtk, "1\'b0" );
335 if ( !strcmp( pName, "1\'b1" ) )
336 return Abc_NtkFindOrCreateNet( pNtk, "1\'b1" );
337 return NULL;
338}
Here is the call graph for this function:

◆ Ver_ParseFindOrCreateNetwork()

Abc_Ntk_t * Ver_ParseFindOrCreateNetwork ( Ver_Man_t * pMan,
char * pName )

Function*************************************************************

Synopsis [Finds the network by name or create a new blackbox network.]

Description []

SideEffects []

SeeAlso []

Definition at line 301 of file verCore.c.

302{
303 Abc_Ntk_t * pNtkNew;
304 // check if the network exists
305 if ( (pNtkNew = Abc_DesFindModelByName( pMan->pDesign, pName )) )
306 return pNtkNew;
307//printf( "Creating network %s.\n", pName );
308 // create new network
309 pNtkNew = Abc_NtkAlloc( ABC_NTK_NETLIST, ABC_FUNC_BLACKBOX, pMan->fUseMemMan );
310 pNtkNew->pName = Extra_UtilStrsav( pName );
311 pNtkNew->pSpec = NULL;
312 // add module to the design
313 Abc_DesAddModel( pMan->pDesign, pNtkNew );
314 return pNtkNew;
315}
ABC_DLL Abc_Ntk_t * Abc_NtkAlloc(Abc_NtkType_t Type, Abc_NtkFunc_t Func, int fUseMemMan)
DECLARATIONS ///.
Definition abcNtk.c:53
@ ABC_NTK_NETLIST
Definition abc.h:56
ABC_DLL Abc_Ntk_t * Abc_DesFindModelByName(Abc_Des_t *p, char *pName)
Definition abcLib.c:249
ABC_DLL int Abc_DesAddModel(Abc_Des_t *p, Abc_Ntk_t *pNtk)
Definition abcLib.c:226
char * pSpec
Definition abc.h:159
Here is the call graph for this function:

◆ Ver_ParseFormalNetsAreDriven()

int Ver_ParseFormalNetsAreDriven ( Abc_Ntk_t * pNtk,
char * pNameFormal )

Function*************************************************************

Synopsis [Checks if formal nets with the given name are driven in any of the instances of undef boxes.]

Description []

SideEffects []

SeeAlso []

Definition at line 2476 of file verCore.c.

2477{
2478 Ver_Bundle_t * pBundle = NULL;
2479 Abc_Obj_t * pBox, * pNet;
2480 int k, j, m;
2481 // go through instances of this type
2482 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2483 {
2484 // find a bundle with the given name in this instance
2485 Vec_PtrForEachEntryReverse( Ver_Bundle_t *, (Vec_Ptr_t *)pBox->pCopy, pBundle, j )
2486 if ( pBundle && !strcmp( pBundle->pNameFormal, pNameFormal ) )
2487 break;
2488 // skip non-driven bundles
2489 if ( j == Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy) )
2490 continue;
2491 // check if all nets are driven in this bundle
2492 assert(pBundle); // Verify that pBundle was assigned to.
2493 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle->vNetsActual, pNet, m )
2494 if ( Abc_ObjFaninNum(pNet) > 0 )
2495 return 1;
2496 }
2497 return 0;
2498}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ver_ParseFreeBundle()

void Ver_ParseFreeBundle ( Ver_Bundle_t * pBundle)

Function*************************************************************

Synopsis [Connects one box to the network]

Description []

SideEffects []

SeeAlso []

Definition at line 2055 of file verCore.c.

2056{
2057 ABC_FREE( pBundle->pNameFormal );
2058 Vec_PtrFree( pBundle->vNetsActual );
2059 ABC_FREE( pBundle );
2060}
Here is the caller graph for this function:

◆ Ver_ParseGetNondrivenBundle()

Ver_Bundle_t * Ver_ParseGetNondrivenBundle ( Abc_Ntk_t * pNtk,
int Counter )

Function*************************************************************

Synopsis [Returns the non-driven bundle that is given distance from the end.]

Description []

SideEffects []

SeeAlso []

Definition at line 2511 of file verCore.c.

2512{
2513 Ver_Bundle_t * pBundle;
2514 Abc_Obj_t * pBox, * pNet;
2515 int k, m;
2516 // go through instances of this type
2517 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2518 {
2519 if ( Counter >= Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy) )
2520 continue;
2521 // get the bundle given distance away
2522 pBundle = (Ver_Bundle_t *)Vec_PtrEntry( (Vec_Ptr_t *)pBox->pCopy, Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy) - 1 - Counter );
2523 if ( pBundle == NULL )
2524 continue;
2525 // go through the actual nets of this bundle
2526 Vec_PtrForEachEntry( Abc_Obj_t *, pBundle->vNetsActual, pNet, m )
2527 if ( !Abc_ObjFaninNum(pNet) && !Ver_ParseFormalNetsAreDriven(pNtk, pBundle->pNameFormal) ) // non-driven
2528 return pBundle;
2529 }
2530 return NULL;
2531}
int Ver_ParseFormalNetsAreDriven(Abc_Ntk_t *pNtk, char *pNameFormal)
Definition verCore.c:2476
Here is the call graph for this function:

◆ Ver_ParseInsertsSuffix()

int Ver_ParseInsertsSuffix ( Ver_Man_t * pMan,
char * pWord,
int nMsb,
int nLsb )

Function*************************************************************

Synopsis [Lookups the suffix of the signal of the form [m:n].]

Description []

SideEffects []

SeeAlso []

Definition at line 587 of file verCore.c.

588{
589 unsigned Value;
590 if ( pMan->tName2Suffix == NULL )
591 pMan->tName2Suffix = st__init_table( strcmp, st__strhash );
592 if ( st__is_member( pMan->tName2Suffix, pWord ) )
593 return 1;
594 assert( nMsb >= 0 && nMsb < 128 );
595 assert( nLsb >= 0 && nLsb < 128 );
596 Value = (nMsb << 8) | nLsb;
597 st__insert( pMan->tName2Suffix, Extra_UtilStrsav(pWord), (char *)(ABC_PTRUINT_T)Value );
598 return 1;
599}
int st__strhash(const char *string, int modulus)
Definition st.c:449
st__table * st__init_table(st__compare_func_type compare, st__hash_func_type hash)
Definition st.c:72
int st__insert(st__table *table, const char *key, char *value)
Definition st.c:171
#define st__is_member(table, key)
Definition st.h:70
Here is the call graph for this function:

◆ Ver_ParseLookupSuffix()

int Ver_ParseLookupSuffix ( Ver_Man_t * pMan,
char * pWord,
int * pnMsb,
int * pnLsb )

Function*************************************************************

Synopsis [Lookups the suffix of the signal of the form [m:n].]

Description []

SideEffects []

SeeAlso []

Definition at line 563 of file verCore.c.

564{
565 unsigned Value;
566 *pnMsb = *pnLsb = -1;
567 if ( pMan->tName2Suffix == NULL )
568 return 1;
569 if ( ! st__lookup( pMan->tName2Suffix, (char *)pWord, (char **)&Value ) )
570 return 1;
571 *pnMsb = (Value >> 8) & 0xff;
572 *pnLsb = Value & 0xff;
573 return 1;
574}
int st__lookup(st__table *table, const char *key, char **value)
Definition st.c:114
Here is the call graph for this function:

◆ Ver_ParseMaxBoxSize()

int Ver_ParseMaxBoxSize ( Vec_Ptr_t * vUndefs)

Function*************************************************************

Synopsis [Returns the max size of any undef box.]

Description []

SideEffects []

SeeAlso []

Definition at line 2711 of file verCore.c.

2712{
2713 Abc_Ntk_t * pNtk;
2714 Abc_Obj_t * pBox;
2715 int i, k, nMaxSize = 0;
2716 // go through undef box types
2717 Vec_PtrForEachEntry( Abc_Ntk_t *, vUndefs, pNtk, i )
2718 // go through instances of this type
2719 Vec_PtrForEachEntry( Abc_Obj_t *, (Vec_Ptr_t *)pNtk->pData, pBox, k )
2720 // check the number of bundles of this instance
2721 if ( nMaxSize < Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy) )
2722 nMaxSize = Vec_PtrSize((Vec_Ptr_t *)pBox->pCopy);
2723 return nMaxSize;
2724}

◆ Ver_ParsePrintErrorMessage()

void Ver_ParsePrintErrorMessage ( Ver_Man_t * p)

Function*************************************************************

Synopsis [Prints the error message including the file name and line number.]

Description []

SideEffects []

SeeAlso []

Definition at line 278 of file verCore.c.

279{
280 p->fError = 1;
281 if ( p->fTopLevel ) // the line number is not given
282 fprintf( p->Output, "%s: %s\n", p->pFileName, p->sError );
283 else // print the error message with the line number
284 fprintf( p->Output, "%s (line %d): %s\n",
285 p->pFileName, Ver_StreamGetLineNumber(p->pReader), p->sError );
286 // free the data
287 Ver_ParseFreeData( p );
288}
int Ver_StreamGetLineNumber(Ver_Stream_t *p)
Definition verStream.c:224
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ver_ParsePrintLog()

void Ver_ParsePrintLog ( Ver_Man_t * pMan)

Function*************************************************************

Synopsis [Prints the comprehensive report into a log file.]

Description []

SideEffects []

SeeAlso []

Definition at line 2737 of file verCore.c.

2738{
2739 Abc_Ntk_t * pNtk, * pNtkBox;
2740 Abc_Obj_t * pBox;
2741 FILE * pFile;
2742 char * pNameGeneric;
2743 char Buffer[1000];
2744 int i, k, Count1 = 0;
2745
2746 // open the log file
2747 pNameGeneric = Extra_FileNameGeneric( pMan->pFileName );
2748 sprintf( Buffer, "%s.log", pNameGeneric );
2749 ABC_FREE( pNameGeneric );
2750 pFile = fopen( Buffer, "w" );
2751
2752 // count the total number of instances and how many times they occur
2753 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2754 pNtk->fHieVisited = 0;
2755 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2756 Abc_NtkForEachBox( pNtk, pBox, k )
2757 {
2758 if ( Abc_ObjIsLatch(pBox) )
2759 continue;
2760 pNtkBox = (Abc_Ntk_t *)pBox->pData;
2761 if ( pNtkBox == NULL )
2762 continue;
2763 pNtkBox->fHieVisited++;
2764 }
2765 // print each box and its stats
2766 fprintf( pFile, "The hierarhical design %s contains %d modules:\n", pMan->pFileName, Vec_PtrSize(pMan->pDesign->vModules) );
2767 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2768 {
2769 fprintf( pFile, "%-50s : ", Abc_NtkName(pNtk) );
2770 if ( !Ver_NtkIsDefined(pNtk) )
2771 fprintf( pFile, "undefbox" );
2772 else if ( Abc_NtkHasBlackbox(pNtk) )
2773 fprintf( pFile, "blackbox" );
2774 else
2775 fprintf( pFile, "logicbox" );
2776 fprintf( pFile, " instantiated %6d times ", pNtk->fHieVisited );
2777// fprintf( pFile, "\n " );
2778 fprintf( pFile, " pi = %4d", Abc_NtkPiNum(pNtk) );
2779 fprintf( pFile, " po = %4d", Abc_NtkPoNum(pNtk) );
2780 fprintf( pFile, " nd = %8d", Abc_NtkNodeNum(pNtk) );
2781 fprintf( pFile, " lat = %6d", Abc_NtkLatchNum(pNtk) );
2782 fprintf( pFile, " box = %6d", Abc_NtkBoxNum(pNtk)-Abc_NtkLatchNum(pNtk) );
2783 fprintf( pFile, "\n" );
2784 Count1 += (Abc_NtkPoNum(pNtk) == 1);
2785 }
2786 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2787 pNtk->fHieVisited = 0;
2788 fprintf( pFile, "The number of modules with one output = %d (%.2f %%).\n", Count1, 100.0 * Count1/Vec_PtrSize(pMan->pDesign->vModules) );
2789
2790 // report instances with dangling outputs
2791 if ( Vec_PtrSize(pMan->pDesign->vModules) > 1 )
2792 {
2793 Vec_Ptr_t * vBundles;
2794 Ver_Bundle_t * pBundle;
2795 int j, nActNets, Counter = 0;
2796 // count the number of instances with dangling outputs
2797 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2798 {
2799 Abc_NtkForEachBox( pNtk, pBox, k )
2800 {
2801 if ( Abc_ObjIsLatch(pBox) )
2802 continue;
2803 vBundles = (Vec_Ptr_t *)pBox->pCopy;
2804 pNtkBox = (Abc_Ntk_t *)pBox->pData;
2805 if ( pNtkBox == NULL )
2806 continue;
2807 if ( !Ver_NtkIsDefined(pNtkBox) )
2808 continue;
2809 // count the number of actual nets
2810 nActNets = 0;
2811 Vec_PtrForEachEntry( Ver_Bundle_t *, vBundles, pBundle, j )
2812 nActNets += Vec_PtrSize(pBundle->vNetsActual);
2813 // the box is defined and will be connected
2814 if ( nActNets != Abc_NtkPiNum(pNtkBox) + Abc_NtkPoNum(pNtkBox) )
2815 Counter++;
2816 }
2817 }
2818 if ( Counter == 0 )
2819 fprintf( pFile, "The outputs of all box instances are connected.\n" );
2820 else
2821 {
2822 fprintf( pFile, "\n" );
2823 fprintf( pFile, "The outputs of %d box instances are not connected:\n", Counter );
2824 // enumerate through the boxes
2825 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2826 {
2827 Abc_NtkForEachBox( pNtk, pBox, k )
2828 {
2829 if ( Abc_ObjIsLatch(pBox) )
2830 continue;
2831 vBundles = (Vec_Ptr_t *)pBox->pCopy;
2832 pNtkBox = (Abc_Ntk_t *)pBox->pData;
2833 if ( pNtkBox == NULL )
2834 continue;
2835 if ( !Ver_NtkIsDefined(pNtkBox) )
2836 continue;
2837 // count the number of actual nets
2838 nActNets = 0;
2839 Vec_PtrForEachEntry( Ver_Bundle_t *, vBundles, pBundle, j )
2840 nActNets += Vec_PtrSize(pBundle->vNetsActual);
2841 // the box is defined and will be connected
2842 if ( nActNets != Abc_NtkPiNum(pNtkBox) + Abc_NtkPoNum(pNtkBox) )
2843 fprintf( pFile, "In module \"%s\" instance \"%s\" of box \"%s\" has different numbers of actual/formal nets (%d/%d).\n",
2844 Abc_NtkName(pNtk), Abc_ObjName(pBox), Abc_NtkName(pNtkBox), nActNets, Abc_NtkPiNum(pNtkBox) + Abc_NtkPoNum(pNtkBox) );
2845 }
2846 }
2847 }
2848 }
2849 fclose( pFile );
2850 printf( "Hierarchy statistics can be found in log file \"%s\".\n", Buffer );
2851}
char * Extra_FileNameGeneric(char *FileName)
int fHieVisited
Definition abc.h:182
Here is the call graph for this function:

◆ Ver_ParseReportUndefBoxes()

void Ver_ParseReportUndefBoxes ( Ver_Man_t * pMan)

Function*************************************************************

Synopsis [Reports how many times each type of undefined box occurs.]

Description []

SideEffects []

SeeAlso []

Definition at line 2402 of file verCore.c.

2403{
2404 Abc_Ntk_t * pNtk;
2405 Abc_Obj_t * pBox;
2406 int i, k, nBoxes;
2407 // clean
2408 nBoxes = 0;
2409 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2410 {
2411 pNtk->fHiePath = 0;
2412 if ( !Ver_NtkIsDefined(pNtk) )
2413 nBoxes++;
2414 }
2415 // count
2416 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2417 Abc_NtkForEachBlackbox( pNtk, pBox, k )
2418 if ( pBox->pData && !Ver_NtkIsDefined((Abc_Ntk_t *)pBox->pData) )
2419 ((Abc_Ntk_t *)pBox->pData)->fHiePath++;
2420 // print the stats
2421 printf( "Warning: The design contains %d undefined object types interpreted as blackboxes:\n", nBoxes );
2422 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2423 if ( !Ver_NtkIsDefined(pNtk) )
2424 printf( "%s (%d) ", Abc_NtkName(pNtk), pNtk->fHiePath );
2425 printf( "\n" );
2426 // clean
2427 Vec_PtrForEachEntry( Abc_Ntk_t *, pMan->pDesign->vModules, pNtk, i )
2428 pNtk->fHiePath = 0;
2429}
int fHiePath
Definition abc.h:183

◆ Ver_ParseSignalPrefix()

int Ver_ParseSignalPrefix ( Ver_Man_t * pMan,
char ** ppWord,
int * pnMsb,
int * pnLsb )

Function*************************************************************

Synopsis [Determine signal prefix of the form [Beg:End].]

Description []

SideEffects []

SeeAlso []

Definition at line 635 of file verCore.c.

636{
637 char * pWord = *ppWord, * pTemp;
638 int nMsb, nLsb;
639 assert( pWord[0] == '[' );
640 // get the beginning
641 nMsb = atoi( pWord + 1 );
642 // find the splitter
643 while ( *pWord && *pWord != ':' && *pWord != ']' )
644 pWord++;
645 if ( *pWord == 0 )
646 {
647 sprintf( pMan->sError, "Cannot find closing bracket in this line." );
649 return 0;
650 }
651 if ( *pWord == ']' )
652 nLsb = nMsb;
653 else
654 {
655 assert( *pWord == ':' );
656 nLsb = atoi( pWord + 1 );
657 // find the closing parenthesis
658 while ( *pWord && *pWord != ']' )
659 pWord++;
660 if ( *pWord == 0 )
661 {
662 sprintf( pMan->sError, "Cannot find closing bracket in this line." );
664 return 0;
665 }
666 assert( *pWord == ']' );
667 pWord++;
668
669 // fix the case when <name> follows after [] without space
670 if ( *pWord == '\\' )
671 {
672 pWord++;
673 pTemp = pWord;
674 while ( *pTemp && *pTemp != ' ' )
675 pTemp++;
676 if ( *pTemp == ' ' )
677 *pTemp = 0;
678 }
679 }
680 assert( nMsb >= 0 && nLsb >= 0 );
681 // return
682 *ppWord = pWord;
683 *pnMsb = nMsb;
684 *pnLsb = nLsb;
685 return 1;
686}
Here is the call graph for this function:

◆ Ver_ParseSignalSuffix()

int Ver_ParseSignalSuffix ( Ver_Man_t * pMan,
char * pWord,
int * pnMsb,
int * pnLsb )

Function*************************************************************

Synopsis [Determine signal suffix of the form [m:n].]

Description []

SideEffects []

SeeAlso []

Definition at line 699 of file verCore.c.

700{
701 char * pCur;
702 int Length;
703 Length = strlen(pWord);
704 assert( pWord[Length-1] == ']' );
705 // walk backward
706 for ( pCur = pWord + Length - 2; pCur != pWord; pCur-- )
707 if ( *pCur == ':' || *pCur == '[' )
708 break;
709 if ( pCur == pWord )
710 {
711 sprintf( pMan->sError, "Cannot find opening bracket in signal name %s.", pWord );
713 return 0;
714 }
715 if ( *pCur == '[' )
716 {
717 *pnMsb = *pnLsb = atoi(pCur+1);
718 *pCur = 0;
719 return 1;
720 }
721 assert( *pCur == ':' );
722 // get the end of the interval
723 *pnLsb = atoi(pCur+1);
724 // find the beginning
725 for ( pCur = pWord + Length - 2; pCur != pWord; pCur-- )
726 if ( *pCur == '[' )
727 break;
728 if ( pCur == pWord )
729 {
730 sprintf( pMan->sError, "Cannot find opening bracket in signal name %s.", pWord );
732 return 0;
733 }
734 assert( *pCur == '[' );
735 // get the beginning of the interval
736 *pnMsb = atoi(pCur+1);
737 // cut the word
738 *pCur = 0;
739 return 1;
740}
int strlen()
Here is the call graph for this function:

Variable Documentation

◆ glo_fMapped

int glo_fMapped = 0

Definition at line 80 of file verCore.c.