Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
4b7dd692
Commit
4b7dd692
authored
Jun 19, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new debugging feature to Wlc_Ntk_t.
parent
6e4ef763
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
1 deletions
+57
-1
src/base/wlc/wlc.h
+1
-0
src/base/wlc/wlcCom.c
+3
-1
src/base/wlc/wlcNtk.c
+53
-0
No files found.
src/base/wlc/wlc.h
View file @
4b7dd692
...
...
@@ -258,6 +258,7 @@ extern void Wlc_NtkPrintNodes( Wlc_Ntk_t * p, int Type );
extern
void
Wlc_NtkPrintStats
(
Wlc_Ntk_t
*
p
,
int
fDistrib
,
int
fVerbose
);
extern
Wlc_Ntk_t
*
Wlc_NtkDupDfs
(
Wlc_Ntk_t
*
p
);
extern
void
Wlc_NtkTransferNames
(
Wlc_Ntk_t
*
pNew
,
Wlc_Ntk_t
*
p
);
extern
Wlc_Ntk_t
*
Wlc_NtkDupSingleNodes
(
Wlc_Ntk_t
*
p
);
/*=== wlcReadSmt.c ========================================================*/
extern
Wlc_Ntk_t
*
Wlc_ReadSmtBuffer
(
char
*
pFileName
,
char
*
pBuffer
,
char
*
pLimit
);
extern
Wlc_Ntk_t
*
Wlc_ReadSmt
(
char
*
pFileName
);
...
...
src/base/wlc/wlcCom.c
View file @
4b7dd692
...
...
@@ -385,7 +385,9 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
//pNtk = Wlc_NtkAbstractNodes( pNtk, NULL );
//Wlc_AbcUpdateNtk( pAbc, pNtk );
//Wlc_GenerateSmtStdout( pAbc );
Wlc_NtkSimulateTest
(
(
Wlc_Ntk_t
*
)
pAbc
->
pAbcWlc
);
//Wlc_NtkSimulateTest( (Wlc_Ntk_t *)pAbc->pAbcWlc );
pNtk
=
Wlc_NtkDupSingleNodes
(
pNtk
);
Wlc_AbcUpdateNtk
(
pAbc
,
pNtk
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%test [-vh]
\n
"
);
...
...
src/base/wlc/wlcNtk.c
View file @
4b7dd692
...
...
@@ -499,6 +499,59 @@ void Wlc_NtkTransferNames( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p )
pNew
->
vTables
=
p
->
vTables
;
p
->
vTables
=
NULL
;
}
/**Function*************************************************************
Synopsis [Duplicates the network by copying each node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Wlc_Ntk_t
*
Wlc_NtkDupSingleNodes
(
Wlc_Ntk_t
*
p
)
{
Wlc_Ntk_t
*
pNew
;
Vec_Int_t
*
vFanins
;
Wlc_Obj_t
*
pObj
,
*
pObjNew
;
Wlc_Obj_t
*
pFanin
,
*
pFaninNew
;
int
i
,
k
,
iFanin
,
iFaninNew
,
iObjNew
,
Count
=
0
;
// count objects
Wlc_NtkForEachObj
(
p
,
pObj
,
i
)
if
(
!
Wlc_ObjIsCi
(
pObj
)
)
Count
+=
1
+
Wlc_ObjFaninNum
(
pObj
);
// copy objects
Wlc_NtkCleanCopy
(
p
);
vFanins
=
Vec_IntAlloc
(
100
);
pNew
=
Wlc_NtkAlloc
(
p
->
pName
,
p
->
nObjsAlloc
);
Wlc_NtkForEachObj
(
p
,
pObj
,
i
)
{
if
(
Wlc_ObjIsCi
(
pObj
)
)
continue
;
if
(
pObj
->
Type
==
WLC_OBJ_ARI_MULTI
)
continue
;
// create CIs for the fanins
Wlc_ObjForEachFanin
(
pObj
,
iFanin
,
k
)
{
pFanin
=
Wlc_NtkObj
(
p
,
iFanin
);
iFaninNew
=
Wlc_ObjAlloc
(
pNew
,
WLC_OBJ_PI
,
pFanin
->
Signed
,
pFanin
->
End
,
pFanin
->
Beg
);
pFaninNew
=
Wlc_NtkObj
(
pNew
,
iFaninNew
);
Wlc_ObjSetCopy
(
p
,
iFanin
,
iFaninNew
);
//Wlc_ObjSetCi( pNew, pFaninNew );
}
// create object
iObjNew
=
Wlc_ObjDup
(
pNew
,
p
,
i
,
vFanins
);
pObjNew
=
Wlc_NtkObj
(
pNew
,
iObjNew
);
pObjNew
->
fIsPo
=
1
;
Vec_IntPush
(
&
pNew
->
vPos
,
iObjNew
);
}
Vec_IntFree
(
vFanins
);
Wlc_NtkTransferNames
(
pNew
,
p
);
return
pNew
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment