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
d3c018cd
Commit
d3c018cd
authored
Jul 01, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reducing memory usage in bmc2 and bmc3.
parent
a4908534
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
7 deletions
+80
-7
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaFrames.c
+60
-0
src/aig/saig/saigBmc2.c
+0
-0
src/aig/saig/saigBmc3.c
+0
-0
src/base/abci/abc.c
+19
-7
No files found.
src/aig/gia/gia.h
View file @
d3c018cd
...
...
@@ -739,6 +739,7 @@ extern void Gia_ManUnrollStop( void * pMan );
extern
int
Gia_ManUnrollLastLit
(
void
*
pMan
);
extern
void
Gia_ManFraSetDefaultParams
(
Gia_ParFra_t
*
p
);
extern
Gia_Man_t
*
Gia_ManFrames
(
Gia_Man_t
*
pAig
,
Gia_ParFra_t
*
pPars
);
extern
Gia_Man_t
*
Gia_ManFramesInitSpecial
(
Gia_Man_t
*
pAig
,
int
nFrames
,
int
fVerbose
);
/*=== giaFront.c ==========================================================*/
extern
Gia_Man_t
*
Gia_ManFront
(
Gia_Man_t
*
p
);
extern
void
Gia_ManFrontTest
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaFrames.c
View file @
d3c018cd
...
...
@@ -915,6 +915,66 @@ Gia_Man_t * Gia_ManFrames( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
return
pFrames
;
}
/**Function*************************************************************
Synopsis [Perform init unrolling as long as PO(s) are constant 0.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ManFramesInitSpecial
(
Gia_Man_t
*
pAig
,
int
nFrames
,
int
fVerbose
)
{
Gia_Man_t
*
pFrames
,
*
pTemp
;
Gia_Obj_t
*
pObj
;
int
i
,
f
;
assert
(
Gia_ManRegNum
(
pAig
)
>
0
);
if
(
nFrames
>
0
)
printf
(
"Computing specialized unrolling with %d frames...
\n
"
,
nFrames
);
pFrames
=
Gia_ManStart
(
Gia_ManObjNum
(
pAig
)
);
pFrames
->
pName
=
Abc_UtilStrsav
(
pAig
->
pName
);
Gia_ManHashAlloc
(
pFrames
);
Gia_ManConst0
(
pAig
)
->
Value
=
0
;
for
(
f
=
0
;
nFrames
==
0
||
f
<
nFrames
;
f
++
)
{
if
(
fVerbose
&&
(
f
%
100
==
0
)
)
{
printf
(
"%6d : "
,
f
);
Gia_ManPrintStats
(
pFrames
,
0
,
0
);
}
Gia_ManForEachRo
(
pAig
,
pObj
,
i
)
pObj
->
Value
=
f
?
Gia_ObjRoToRi
(
pAig
,
pObj
)
->
Value
:
0
;
Gia_ManForEachPi
(
pAig
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pFrames
);
Gia_ManForEachAnd
(
pAig
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pFrames
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManForEachPo
(
pAig
,
pObj
,
i
)
if
(
Gia_ObjFanin0Copy
(
pObj
)
!=
0
)
break
;
if
(
i
<
Gia_ManPoNum
(
pAig
)
)
break
;
Gia_ManForEachRi
(
pAig
,
pObj
,
i
)
pObj
->
Value
=
Gia_ObjFanin0Copy
(
pObj
);
}
if
(
fVerbose
)
printf
(
"Computed prefix of %d frames.
\n
"
,
f
);
Gia_ManForEachRi
(
pAig
,
pObj
,
i
)
Gia_ManAppendCo
(
pFrames
,
pObj
->
Value
);
Gia_ManHashStop
(
pFrames
);
pFrames
=
Gia_ManCleanup
(
pTemp
=
pFrames
);
if
(
fVerbose
)
printf
(
"Before cleanup = %d nodes. After cleanup = %d nodes.
\n
"
,
Gia_ManAndNum
(
pTemp
),
Gia_ManAndNum
(
pFrames
)
);
Gia_ManStop
(
pTemp
);
return
pFrames
;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...
...
src/aig/saig/saigBmc2.c
View file @
d3c018cd
This diff is collapsed.
Click to expand it.
src/aig/saig/saigBmc3.c
View file @
d3c018cd
This diff is collapsed.
Click to expand it.
src/base/abci/abc.c
View file @
d3c018cd
...
...
@@ -19927,6 +19927,11 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Does not work for combinational networks.
\n
"
);
return
0
;
}
if
(
Abc_NtkConstrNum
(
pNtk
)
>
0
)
{
Abc_Print
(
-
1
,
"Constraints have to be folded (use
\"
fold
\"
).
\n
"
);
return
0
;
}
pAbc
->
Status
=
Abc_NtkDarBmc3
(
pNtk
,
pPars
,
fOrDecomp
);
pAbc
->
nFrames
=
pPars
->
iFrame
;
Abc_FrameReplaceCex
(
pAbc
,
&
pNtk
->
pSeqModel
);
...
...
@@ -24162,10 +24167,11 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_ParFra_t
Pars
,
*
pPars
=
&
Pars
;
int
c
;
int
nCofFanLit
=
0
;
int
nNewAlgo
=
1
;
int
fNewAlgo
=
1
;
int
fInitSpecial
=
0
;
Gia_ManFraSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FLiavh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FLia
s
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -24195,7 +24201,10 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
fInit
^=
1
;
break
;
case
'a'
:
nNewAlgo
^=
1
;
fNewAlgo
^=
1
;
break
;
case
's'
:
fInitSpecial
^=
1
;
break
;
case
'v'
:
pPars
->
fVerbose
^=
1
;
...
...
@@ -24216,9 +24225,11 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
return
0
;
}
if
(
nCofFanLit
)
if
(
fInitSpecial
)
pTemp
=
Gia_ManFramesInitSpecial
(
pAbc
->
pGia
,
pPars
->
nFrames
,
pPars
->
fVerbose
);
else
if
(
nCofFanLit
)
pTemp
=
Gia_ManUnrollAndCofactor
(
pAbc
->
pGia
,
pPars
->
nFrames
,
nCofFanLit
,
pPars
->
fVerbose
);
else
if
(
n
NewAlgo
)
else
if
(
f
NewAlgo
)
pTemp
=
Gia_ManFrames2
(
pAbc
->
pGia
,
pPars
);
else
pTemp
=
Gia_ManFrames
(
pAbc
->
pGia
,
pPars
);
...
...
@@ -24226,12 +24237,13 @@ int Abc_CommandAbc9Frames( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &frames [-FL <num>] [-
ai
vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &frames [-FL <num>] [-
ias
vh]
\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
-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
-a : toggle using new algorithm [default = %s]
\n
"
,
nNewAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle using new algorithm [default = %s]
\n
"
,
fNewAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle computing special AIG for BMC [default = %s]
\n
"
,
fInitSpecial
?
"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
"
);
return
1
;
...
...
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