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
a8f6e5c6
Commit
a8f6e5c6
authored
Feb 25, 2017
by
Yen-Sheng Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added an option -b to %pdra
parent
a7bc919b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
237 additions
and
32 deletions
+237
-32
src/base/wlc/wlc.h
+2
-0
src/base/wlc/wlcAbs.c
+188
-17
src/base/wlc/wlcCom.c
+7
-3
src/base/wlc/wlcNtk.c
+40
-12
No files found.
src/base/wlc/wlc.h
View file @
a8f6e5c6
...
...
@@ -174,6 +174,7 @@ struct Wlc_Par_t_
int
fPushClauses
;
// Push clauses in the reloaded trace
int
fMFFC
;
// Refine the entire MFFC of a PPI
int
fPdra
;
// Use pdr -nct
int
fProofRefine
;
// Use proof-based refinement
int
fVerbose
;
// verbose output
int
fPdrVerbose
;
// verbose output
};
...
...
@@ -311,6 +312,7 @@ 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
);
extern
Wlc_Ntk_t
*
Wlc_NtkDupDfsAbs
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vPisOld
,
Vec_Int_t
*
vPisNew
,
Vec_Int_t
*
vFlops
);
extern
Wlc_Ntk_t
*
Wlc_NtkDupDfsSimple
(
Wlc_Ntk_t
*
p
);
extern
void
Wlc_NtkCleanMarks
(
Wlc_Ntk_t
*
p
);
extern
void
Wlc_NtkMarkCone
(
Wlc_Ntk_t
*
p
,
int
iCoId
,
int
Range
,
int
fSeq
,
int
fAllPis
);
extern
void
Wlc_NtkProfileCones
(
Wlc_Ntk_t
*
p
);
...
...
src/base/wlc/wlcAbs.c
View file @
a8f6e5c6
This diff is collapsed.
Click to expand it.
src/base/wlc/wlcCom.c
View file @
a8f6e5c6
...
...
@@ -462,7 +462,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
Wlc_ManSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"AMXFIacpmxvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"AMXFIa
b
cpmxvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -524,6 +524,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'a'
:
pPars
->
fPdra
^=
1
;
break
;
case
'b'
:
pPars
->
fProofRefine
^=
1
;
break
;
case
'x'
:
pPars
->
fXorOutput
^=
1
;
break
;
...
...
@@ -556,7 +559,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_NtkPdrAbs
(
pNtk
,
pPars
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%pdra [-AMXFI num] [-acpmxvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%pdra [-AMXFI num] [-a
b
cpmxvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
abstraction for word-level networks
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]
\n
"
,
pPars
->
nBitsAdd
);
Abc_Print
(
-
2
,
"
\t
-M num : minimum bit-width of a multiplier to abstract [default = %d]
\n
"
,
pPars
->
nBitsMul
);
...
...
@@ -564,7 +567,8 @@ usage:
Abc_Print
(
-
2
,
"
\t
-F num : minimum bit-width of a flip-flop to abstract [default = %d]
\n
"
,
pPars
->
nBitsFlop
);
Abc_Print
(
-
2
,
"
\t
-I num : maximum number of CEGAR iterations [default = %d]
\n
"
,
pPars
->
nIterMax
);
Abc_Print
(
-
2
,
"
\t
-x : toggle XORing outputs of word-level miter [default = %s]
\n
"
,
pPars
->
fXorOutput
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle running pdr with -nct [default = %s]
\n
"
,
pPars
->
fPdra
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle running pdr with -nct [default = %s]
\n
"
,
pPars
->
fPdra
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle using proof-based refinement [default = %s]
\n
"
,
pPars
->
fProofRefine
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle checking clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fCheckClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : toggle pushing clauses in the reloaded trace [default = %s]
\n
"
,
pPars
->
fPushClauses
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-m : toggle refining the whole MFFC of a PPI [default = %s]
\n
"
,
pPars
->
fMFFC
?
"yes"
:
"no"
);
...
...
src/base/wlc/wlcNtk.c
View file @
a8f6e5c6
...
...
@@ -108,18 +108,19 @@ char * Wlc_ObjTypeName( Wlc_Obj_t * p ) { return Wlc_Names[p->Type]; }
void
Wlc_ManSetDefaultParams
(
Wlc_Par_t
*
pPars
)
{
memset
(
pPars
,
0
,
sizeof
(
Wlc_Par_t
)
);
pPars
->
nBitsAdd
=
ABC_INFINITY
;
// adder bit-width
pPars
->
nBitsMul
=
ABC_INFINITY
;
// multiplier bit-widht
pPars
->
nBitsMux
=
ABC_INFINITY
;
// MUX bit-width
pPars
->
nBitsFlop
=
ABC_INFINITY
;
// flop bit-width
pPars
->
nIterMax
=
1000
;
// the max number of iterations
pPars
->
fXorOutput
=
1
;
// XOR outputs of word-level miter
pPars
->
fCheckClauses
=
1
;
// Check clauses in the reloaded trace
pPars
->
fPushClauses
=
0
;
// Push clauses in the reloaded trace
pPars
->
fMFFC
=
1
;
// Refine the entire MFFC of a PPI
pPars
->
fPdra
=
0
;
// Use pdr -nct
pPars
->
fVerbose
=
0
;
// verbose output`
pPars
->
fPdrVerbose
=
0
;
// show verbose PDR output
pPars
->
nBitsAdd
=
ABC_INFINITY
;
// adder bit-width
pPars
->
nBitsMul
=
ABC_INFINITY
;
// multiplier bit-widht
pPars
->
nBitsMux
=
ABC_INFINITY
;
// MUX bit-width
pPars
->
nBitsFlop
=
ABC_INFINITY
;
// flop bit-width
pPars
->
nIterMax
=
1000
;
// the max number of iterations
pPars
->
fXorOutput
=
1
;
// XOR outputs of word-level miter
pPars
->
fCheckClauses
=
1
;
// Check clauses in the reloaded trace
pPars
->
fPushClauses
=
0
;
// Push clauses in the reloaded trace
pPars
->
fMFFC
=
1
;
// Refine the entire MFFC of a PPI
pPars
->
fPdra
=
0
;
// Use pdr -nct
pPars
->
fProofRefine
=
0
;
// Use proof-based refinement
pPars
->
fVerbose
=
0
;
// verbose output`
pPars
->
fPdrVerbose
=
0
;
// show verbose PDR output
}
/**Function*************************************************************
...
...
@@ -832,6 +833,33 @@ void Wlc_NtkDupDfs_rec( Wlc_Ntk_t * pNew, Wlc_Ntk_t * p, int iObj, Vec_Int_t * v
Wlc_NtkDupDfs_rec
(
pNew
,
p
,
iFanin
,
vFanins
);
Wlc_ObjDup
(
pNew
,
p
,
iObj
,
vFanins
);
}
Wlc_Ntk_t
*
Wlc_NtkDupDfsSimple
(
Wlc_Ntk_t
*
p
)
{
Wlc_Ntk_t
*
pNew
;
Wlc_Obj_t
*
pObj
;
Vec_Int_t
*
vFanins
;
int
i
;
Wlc_NtkCleanCopy
(
p
);
vFanins
=
Vec_IntAlloc
(
100
);
pNew
=
Wlc_NtkAlloc
(
p
->
pName
,
p
->
nObjsAlloc
);
pNew
->
fSmtLib
=
p
->
fSmtLib
;
Wlc_NtkForEachCi
(
p
,
pObj
,
i
)
Wlc_ObjDup
(
pNew
,
p
,
Wlc_ObjId
(
p
,
pObj
),
vFanins
);
Wlc_NtkForEachCo
(
p
,
pObj
,
i
)
Wlc_NtkDupDfs_rec
(
pNew
,
p
,
Wlc_ObjId
(
p
,
pObj
),
vFanins
);
Wlc_NtkForEachCo
(
p
,
pObj
,
i
)
Wlc_ObjSetCo
(
pNew
,
Wlc_ObjCopyObj
(
pNew
,
p
,
pObj
),
pObj
->
fIsFi
);
if
(
p
->
vInits
)
pNew
->
vInits
=
Vec_IntDup
(
p
->
vInits
);
if
(
p
->
pInits
)
pNew
->
pInits
=
Abc_UtilStrsav
(
p
->
pInits
);
Vec_IntFree
(
vFanins
);
if
(
p
->
pSpec
)
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
return
pNew
;
}
Wlc_Ntk_t
*
Wlc_NtkDupDfs
(
Wlc_Ntk_t
*
p
,
int
fMarked
,
int
fSeq
)
{
Wlc_Ntk_t
*
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