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
aec5d338
Commit
aec5d338
authored
Jan 01, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backward reachability using circuit cofactoring.
parent
1e20e2cc
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
123 additions
and
5 deletions
+123
-5
abclib.dsp
+4
-0
src/aig/gia/giaAbsVta.c
+13
-3
src/aig/gia/giaFrames.c
+0
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+105
-2
No files found.
abclib.dsp
View file @
aec5d338
...
@@ -4023,6 +4023,10 @@ SOURCE=.\src\aig\gia\giaBidec.c
...
@@ -4023,6 +4023,10 @@ SOURCE=.\src\aig\gia\giaBidec.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaCCof.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaCof.c
SOURCE=.\src\aig\gia\giaCof.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/aig/gia/giaAbsVta.c
View file @
aec5d338
...
@@ -212,7 +212,7 @@ void Vga_ManGrow( Vta_Man_t * p, int fThis )
...
@@ -212,7 +212,7 @@ void Vga_ManGrow( Vta_Man_t * p, int fThis )
static
int
PrevF
=
-
1
;
static
int
PrevF
=
-
1
;
Gia_Obj_t
*
pObj
,
*
pObj2
;
Gia_Obj_t
*
pObj
,
*
pObj2
;
int
Beg
,
End
,
One
,
i
,
c
,
f
,
iOutVar
,
nClauses
;
int
Beg
,
End
,
One
,
i
,
c
,
f
,
iOutVar
,
nClauses
;
assert
(
++
PrevF
==
f
);
assert
(
++
PrevF
==
f
This
);
assert
(
fThis
>=
0
&&
fThis
<
p
->
nFramesMax
);
assert
(
fThis
>=
0
&&
fThis
<
p
->
nFramesMax
);
// create variable for the output
// create variable for the output
...
@@ -435,10 +435,15 @@ Vec_Int_t * Gia_VtaCollect( Gia_Man_t * p, Vec_Int_t ** pvFraLims, Vec_Int_t **
...
@@ -435,10 +435,15 @@ Vec_Int_t * Gia_VtaCollect( Gia_Man_t * p, Vec_Int_t ** pvFraLims, Vec_Int_t **
Gia_ManForEachPo
(
p
,
pObj
,
i
)
Gia_ManForEachPo
(
p
,
pObj
,
i
)
Vec_IntPush
(
vRoots
,
Gia_ObjId
(
p
,
pObj
)
);
Vec_IntPush
(
vRoots
,
Gia_ObjId
(
p
,
pObj
)
);
// collects nodes/flops
// start order
vFraLims
=
Vec_IntAlloc
(
1000
);
vOrder
=
Vec_IntAlloc
(
Gia_ManObjNum
(
p
)
);
vOrder
=
Vec_IntAlloc
(
Gia_ManObjNum
(
p
)
);
Vec_IntPush
(
vOrder
,
-
1
);
Vec_IntPush
(
vOrder
,
-
1
);
// start limits
vFraLims
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
vFraLims
,
Vec_IntSize
(
vOrder
)
);
// collect new nodes
StopPoint
=
Vec_IntSize
(
vRoots
);
StopPoint
=
Vec_IntSize
(
vRoots
);
Gia_ManForEachObjVec
(
vRoots
,
p
,
pObj
,
i
)
Gia_ManForEachObjVec
(
vRoots
,
p
,
pObj
,
i
)
{
{
...
@@ -487,6 +492,7 @@ Gia_Man_t * Gia_VtaTest( Gia_Man_t * p )
...
@@ -487,6 +492,7 @@ Gia_Man_t * Gia_VtaTest( Gia_Man_t * p )
{
{
Vec_Int_t
*
vOrder
,
*
vFraLims
,
*
vRoots
;
Vec_Int_t
*
vOrder
,
*
vFraLims
,
*
vRoots
;
Gia_Man_t
*
pCopy
;
Gia_Man_t
*
pCopy
;
int
i
,
Entry
;
// the new AIG orders flops and PIs in the "natural" order
// the new AIG orders flops and PIs in the "natural" order
vOrder
=
Gia_VtaCollect
(
p
,
&
vFraLims
,
&
vRoots
);
vOrder
=
Gia_VtaCollect
(
p
,
&
vFraLims
,
&
vRoots
);
...
@@ -497,6 +503,10 @@ Gia_Man_t * Gia_VtaTest( Gia_Man_t * p )
...
@@ -497,6 +503,10 @@ Gia_Man_t * Gia_VtaTest( Gia_Man_t * p )
Gia_ManObjNum
(
p
)
-
Gia_ManCoNum
(
p
)
-
Vec_IntSize
(
vOrder
),
Gia_ManObjNum
(
p
)
-
Gia_ManCoNum
(
p
)
-
Vec_IntSize
(
vOrder
),
Vec_IntSize
(
vFraLims
)
-
1
);
Vec_IntSize
(
vFraLims
)
-
1
);
Vec_IntForEachEntry
(
vFraLims
,
Entry
,
i
)
printf
(
"%d=%d "
,
i
,
Entry
);
printf
(
"
\n
"
);
pCopy
=
Gia_VtaDup
(
p
,
vOrder
);
pCopy
=
Gia_VtaDup
(
p
,
vOrder
);
// Gia_ManStopP( &pCopy );
// Gia_ManStopP( &pCopy );
...
...
src/aig/gia/giaFrames.c
View file @
aec5d338
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
aec5d338
...
@@ -4,6 +4,7 @@ SRC += src/aig/gia/gia.c \
...
@@ -4,6 +4,7 @@ SRC += src/aig/gia/gia.c \
src/aig/gia/giaAig.c
\
src/aig/gia/giaAig.c
\
src/aig/gia/giaAiger.c
\
src/aig/gia/giaAiger.c
\
src/aig/gia/giaBidec.c
\
src/aig/gia/giaBidec.c
\
src/aig/gia/giaCCof.c
\
src/aig/gia/giaCof.c
\
src/aig/gia/giaCof.c
\
src/aig/gia/giaCSatOld.c
\
src/aig/gia/giaCSatOld.c
\
src/aig/gia/giaCSat.c
\
src/aig/gia/giaCSat.c
\
...
...
src/base/abci/abc.c
View file @
aec5d338
...
@@ -383,6 +383,7 @@ static int Abc_CommandAbc9GlaDerive ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -383,6 +383,7 @@ static int Abc_CommandAbc9GlaDerive ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9GlaCba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaCba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9BackReach
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachM
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachM
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachP
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReachP
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -839,6 +840,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -839,6 +840,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_cba"
,
Abc_CommandAbc9GlaCba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_cba"
,
Abc_CommandAbc9GlaCba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_pba"
,
Abc_CommandAbc9GlaPba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_pba"
,
Abc_CommandAbc9GlaPba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reparam"
,
Abc_CommandAbc9Reparam
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reparam"
,
Abc_CommandAbc9Reparam
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&back_reach"
,
Abc_CommandAbc9BackReach
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&posplit"
,
Abc_CommandAbc9Posplit
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&posplit"
,
Abc_CommandAbc9Posplit
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachm"
,
Abc_CommandAbc9ReachM
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachm"
,
Abc_CommandAbc9ReachM
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachp"
,
Abc_CommandAbc9ReachP
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reachp"
,
Abc_CommandAbc9ReachP
,
0
);
...
@@ -26256,13 +26258,16 @@ usage:
...
@@ -26256,13 +26258,16 @@ usage:
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Frames
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Frames
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
Gia_Man_t
*
Gia_ManFrames2
(
Gia_Man_t
*
pAig
,
Gia_ParFra_t
*
pPars
);
Gia_Man_t
*
pTemp
;
Gia_Man_t
*
pTemp
;
Gia_ParFra_t
Pars
,
*
pPars
=
&
Pars
;
Gia_ParFra_t
Pars
,
*
pPars
=
&
Pars
;
int
c
;
int
c
;
int
nCofFanLit
=
0
;
int
nCofFanLit
=
0
;
int
nNewAlgo
=
1
;
Gia_ManFraSetDefaultParams
(
pPars
);
Gia_ManFraSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FLivh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FLi
a
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -26291,6 +26296,9 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -26291,6 +26296,9 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'i'
:
case
'i'
:
pPars
->
fInit
^=
1
;
pPars
->
fInit
^=
1
;
break
;
break
;
case
'a'
:
nNewAlgo
^=
1
;
break
;
case
'v'
:
case
'v'
:
pPars
->
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
break
;
break
;
...
@@ -26312,17 +26320,20 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -26312,17 +26320,20 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
nCofFanLit
)
if
(
nCofFanLit
)
pTemp
=
Gia_ManUnrollAndCofactor
(
pAbc
->
pGia
,
pPars
->
nFrames
,
nCofFanLit
,
pPars
->
fVerbose
);
pTemp
=
Gia_ManUnrollAndCofactor
(
pAbc
->
pGia
,
pPars
->
nFrames
,
nCofFanLit
,
pPars
->
fVerbose
);
else
if
(
nNewAlgo
)
pTemp
=
Gia_ManFrames2
(
pAbc
->
pGia
,
pPars
);
else
else
pTemp
=
Gia_ManFrames
(
pAbc
->
pGia
,
pPars
);
pTemp
=
Gia_ManFrames
(
pAbc
->
pGia
,
pPars
);
Abc_CommandUpdate9
(
pAbc
,
pTemp
);
Abc_CommandUpdate9
(
pAbc
,
pTemp
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &frames [-FL <num>] [-ivh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &frames [-FL <num>] [-
a
ivh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
unrolls the design for several timeframes
\n
"
);
Abc_Print
(
-
2
,
"
\t
unrolls the design for several timeframes
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : the number of frames to unroll [default = %d]
\n
"
,
pPars
->
nFrames
);
Abc_Print
(
-
2
,
"
\t
-F num : the number of frames to unroll [default = %d]
\n
"
,
pPars
->
nFrames
);
Abc_Print
(
-
2
,
"
\t
-L num : the limit on fanout count of resets/enables to cofactor [default = %d]
\n
"
,
nCofFanLit
);
Abc_Print
(
-
2
,
"
\t
-L num : the limit on fanout count of resets/enables to cofactor [default = %d]
\n
"
,
nCofFanLit
);
Abc_Print
(
-
2
,
"
\t
-i : toggle initializing registers [default = %s]
\n
"
,
pPars
->
fInit
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-i : toggle initializing registers [default = %s]
\n
"
,
pPars
->
fInit
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle using new algorithm [default = %s]
\n
"
,
nNewAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -29434,6 +29445,98 @@ usage:
...
@@ -29434,6 +29445,98 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9BackReach
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Gia_ManCofTest
(
Gia_Man_t
*
pGia
,
int
nFrameMax
,
int
nConfMax
,
int
nTimeMax
,
int
fVerbose
);
Gia_Man_t
*
pTemp
=
NULL
;
int
c
,
fVerbose
=
0
;
int
nFrameMax
=
1000000
;
int
nConfMax
=
1000000
;
int
nTimeMax
=
10
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FCTvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'F'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-F
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nFrameMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nFrameMax
<
0
)
goto
usage
;
break
;
case
'C'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-C
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nConfMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nConfMax
<
0
)
goto
usage
;
break
;
case
'T'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-T
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nTimeMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nTimeMax
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9BackReach(): There is no AIG.
\n
"
);
return
1
;
}
if
(
Gia_ManPoNum
(
pAbc
->
pGia
)
!=
1
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9BackReach(): The number of POs is different from 1.
\n
"
);
return
1
;
}
pTemp
=
Gia_ManCofTest
(
pAbc
->
pGia
,
nFrameMax
,
nConfMax
,
nTimeMax
,
fVerbose
);
Abc_CommandUpdate9
(
pAbc
,
pTemp
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &back_reach [-FCT <num>] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs input trimming and reparameterization
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : the limit on the depth of induction [default = %d]
\n
"
,
nFrameMax
);
Abc_Print
(
-
2
,
"
\t
-C num : the conflict limit at a node during induction [default = %d]
\n
"
,
nConfMax
);
Abc_Print
(
-
2
,
"
\t
-T num : the timeout for property directed reachability [default = %d]
\n
"
,
nTimeMax
);
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
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
Aig_Man_t
*
Aig_ManSplit
(
Aig_Man_t
*
p
,
int
nVars
,
int
fVerbose
);
extern
Aig_Man_t
*
Aig_ManSplit
(
Aig_Man_t
*
p
,
int
nVars
,
int
fVerbose
);
...
...
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