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
1c665557
Commit
1c665557
authored
Apr 19, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory abstraction.
parent
09810301
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
15 deletions
+32
-15
src/base/wlc/wlc.h
+1
-0
src/base/wlc/wlcCom.c
+9
-2
src/base/wlc/wlcMem.c
+0
-0
src/base/wlc/wlcNtk.c
+22
-13
No files found.
src/base/wlc/wlc.h
View file @
1c665557
...
...
@@ -395,6 +395,7 @@ extern void Wlc_NtkPrintNode( Wlc_Ntk_t * p, Wlc_Obj_t * pObj );
extern
void
Wlc_NtkPrintNodeArray
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vArray
);
extern
void
Wlc_NtkPrintNodes
(
Wlc_Ntk_t
*
p
,
int
Type
);
extern
void
Wlc_NtkPrintStats
(
Wlc_Ntk_t
*
p
,
int
fDistrib
,
int
fTwoSides
,
int
fVerbose
);
extern
void
Wlc_NtkPrintObjects
(
Wlc_Ntk_t
*
p
);
extern
void
Wlc_NtkTransferNames
(
Wlc_Ntk_t
*
pNew
,
Wlc_Ntk_t
*
p
);
extern
char
*
Wlc_NtkNewName
(
Wlc_Ntk_t
*
p
,
int
iCoId
,
int
fSeq
);
extern
Wlc_Ntk_t
*
Wlc_NtkDupDfs
(
Wlc_Ntk_t
*
p
,
int
fMarked
,
int
fSeq
);
...
...
src/base/wlc/wlcCom.c
View file @
1c665557
...
...
@@ -309,9 +309,10 @@ int Abc_CommandPs( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fShowMem
=
0
;
int
fDistrib
=
0
;
int
fTwoSides
=
0
;
int
fAllObjects
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"cmardtvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"cmardt
o
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -333,6 +334,9 @@ int Abc_CommandPs( Abc_Frame_t * pAbc, int argc, char ** argv )
case
't'
:
fTwoSides
^=
1
;
break
;
case
'o'
:
fAllObjects
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -356,9 +360,11 @@ int Abc_CommandPs( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_NtkPrintNodes
(
pNtk
,
WLC_OBJ_ARI_ADD
);
if
(
fShowMem
)
Wlc_NtkPrintMemory
(
pNtk
);
if
(
fAllObjects
)
Wlc_NtkPrintObjects
(
pNtk
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%ps [-cmardtvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%ps [-cmardt
o
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
prints statistics
\n
"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle printing cones [default = %s]
\n
"
,
fShowCones
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle printing multipliers [default = %s]
\n
"
,
fShowMulti
?
"yes"
:
"no"
);
...
...
@@ -366,6 +372,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-r : toggle printing memories [default = %s]
\n
"
,
fShowMem
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle printing distrubition [default = %s]
\n
"
,
fDistrib
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle printing stats for LHS and RHS [default = %s]
\n
"
,
fTwoSides
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-o : toggle printing all objects [default = %s]
\n
"
,
fAllObjects
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
...
...
src/base/wlc/wlcMem.c
View file @
1c665557
This diff is collapsed.
Click to expand it.
src/base/wlc/wlcNtk.c
View file @
1c665557
...
...
@@ -334,6 +334,8 @@ int Wlc_NtkCreateLevelsRev( Wlc_Ntk_t * p )
Vec_IntWriteEntry
(
&
p
->
vLevels
,
i
,
LevelMax
-
Wlc_ObjLevelId
(
p
,
i
)
);
Wlc_NtkForEachCi
(
p
,
pObj
,
i
)
Vec_IntWriteEntry
(
&
p
->
vLevels
,
Wlc_ObjId
(
p
,
pObj
),
0
);
//Wlc_NtkForEachObj( p, pObj, i )
// printf( "%d -> %d\n", i, Wlc_ObjLevelId(p, i) );
return
LevelMax
;
}
...
...
@@ -624,36 +626,36 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose )
void
Wlc_NtkPrintNode
(
Wlc_Ntk_t
*
p
,
Wlc_Obj_t
*
pObj
)
{
printf
(
"%8d : "
,
Wlc_ObjId
(
p
,
pObj
)
);
printf
(
"%
3d%s"
,
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
" "
);
printf
(
"%
6d%s = "
,
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
" "
);
if
(
pObj
->
Type
==
WLC_OBJ_PI
)
{
printf
(
"
PI
\n
"
);
printf
(
"PI
\n
"
);
return
;
}
if
(
pObj
->
Type
==
WLC_OBJ_FO
)
{
printf
(
"
FO
\n
"
);
printf
(
"FO
\n
"
);
return
;
}
if
(
pObj
->
Type
==
WLC_OBJ_CONST
)
printf
(
" "
);
else
if
(
pObj
->
Type
!=
WLC_OBJ_CONST
)
{
printf
(
"
= %3
d%s %5s "
,
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin0
(
p
,
pObj
))
?
"s"
:
" "
,
Wlc_Names
[(
int
)
pObj
->
Type
]
);
printf
(
"
%6
d%s %5s "
,
Wlc_ObjRange
(
Wlc_ObjFanin0
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin0
(
p
,
pObj
))
?
"s"
:
" "
,
Wlc_Names
[(
int
)
pObj
->
Type
]
);
if
(
Wlc_ObjFaninNum
(
pObj
)
>
1
)
printf
(
"%
3
d%s "
,
Wlc_ObjRange
(
Wlc_ObjFanin1
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin1
(
p
,
pObj
))
?
"s"
:
" "
);
printf
(
"%
6
d%s "
,
Wlc_ObjRange
(
Wlc_ObjFanin1
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin1
(
p
,
pObj
))
?
"s"
:
" "
);
else
printf
(
" "
);
printf
(
"
"
);
if
(
Wlc_ObjFaninNum
(
pObj
)
>
2
)
printf
(
"%
3
d%s "
,
Wlc_ObjRange
(
Wlc_ObjFanin2
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin2
(
p
,
pObj
))
?
"s"
:
" "
);
printf
(
"%
6
d%s "
,
Wlc_ObjRange
(
Wlc_ObjFanin2
(
p
,
pObj
)),
Wlc_ObjIsSigned
(
Wlc_ObjFanin2
(
p
,
pObj
))
?
"s"
:
" "
);
else
printf
(
" "
);
printf
(
"
"
);
}
else
printf
(
" "
);
printf
(
" : "
);
printf
(
"%-12s"
,
Wlc_ObjName
(
p
,
Wlc_ObjId
(
p
,
pObj
))
);
if
(
pObj
->
Type
==
WLC_OBJ_CONST
)
{
printf
(
" =
%d
\'
%sh"
,
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
""
);
printf
(
" = %d
\'
%sh"
,
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
""
);
if
(
pObj
->
fXConst
)
{
int
k
;
...
...
@@ -723,6 +725,12 @@ void Wlc_NtkPrintStats( Wlc_Ntk_t * p, int fDistrib, int fTwoSides, int fVerbose
printf
(
"%2d : %-8s %6d
\n
"
,
i
,
Wlc_Names
[
i
],
p
->
nObjs
[
i
]
);
}
}
void
Wlc_NtkPrintObjects
(
Wlc_Ntk_t
*
p
)
{
Wlc_Obj_t
*
pObj
;
int
i
;
Wlc_NtkForEachObj
(
p
,
pObj
,
i
)
Wlc_NtkPrintNode
(
p
,
pObj
);
}
/**Function*************************************************************
...
...
@@ -928,7 +936,8 @@ Wlc_Ntk_t * Wlc_NtkDupDfs( Wlc_Ntk_t * p, int fMarked, int fSeq )
}
if
(
p
->
pSpec
)
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Wlc_NtkTransferNames
(
pNew
,
p
);
if
(
Wlc_NtkHasNameId
(
p
)
)
Wlc_NtkTransferNames
(
pNew
,
p
);
if
(
Vec_IntSize
(
&
p
->
vPoPairs
)
)
Vec_IntAppend
(
&
pNew
->
vPoPairs
,
&
p
->
vPoPairs
);
return
pNew
;
...
...
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