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
7592aa8a
Commit
7592aa8a
authored
Oct 21, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding commands backup/restore.
parent
83bc1148
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
0 deletions
+88
-0
abclib.dsp
+4
-0
src/base/abci/abc.c
+82
-0
src/base/main/mainFrame.c
+1
-0
src/base/main/mainInt.h
+1
-0
No files found.
abclib.dsp
View file @
7592aa8a
...
@@ -3919,6 +3919,10 @@ SOURCE=.\src\aig\gia\giaPat.c
...
@@ -3919,6 +3919,10 @@ SOURCE=.\src\aig\gia\giaPat.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaQbf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaResub.c
SOURCE=.\src\aig\gia\giaResub.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abci/abc.c
View file @
7592aa8a
...
@@ -187,6 +187,9 @@ static int Abc_CommandNpnSave ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -187,6 +187,9 @@ static int Abc_CommandNpnSave ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandSendAig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandSendAig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandSendStatus
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandSendStatus
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandBackup
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandRestore
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandIStrash
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandIStrash
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandICut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandICut
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandIRewrite
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandIRewrite
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -785,6 +788,9 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -785,6 +788,9 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"send_aig"
,
Abc_CommandSendAig
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"send_aig"
,
Abc_CommandSendAig
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"send_status"
,
Abc_CommandSendStatus
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"send_status"
,
Abc_CommandSendStatus
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"backup"
,
Abc_CommandBackup
,
0
);
Cmd_CommandAdd
(
pAbc
,
"Various"
,
"restore"
,
Abc_CommandRestore
,
0
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"istrash"
,
Abc_CommandIStrash
,
1
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"istrash"
,
Abc_CommandIStrash
,
1
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"icut"
,
Abc_CommandICut
,
0
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"icut"
,
Abc_CommandICut
,
0
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"irw"
,
Abc_CommandIRewrite
,
1
);
Cmd_CommandAdd
(
pAbc
,
"New AIG"
,
"irw"
,
Abc_CommandIRewrite
,
1
);
...
@@ -13178,6 +13184,82 @@ usage:
...
@@ -13178,6 +13184,82 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandBackup
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
int
c
;
// set defaults
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pNtk
==
NULL
)
{
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
}
if
(
pAbc
->
pNtkBackup
)
Abc_NtkDelete
(
pAbc
->
pNtkBackup
);
pAbc
->
pNtkBackup
=
Abc_NtkDup
(
pNtk
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: backup [-h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
backs up the current network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
int
Abc_CommandRestore
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
;
// set defaults
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"h"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pNtkBackup
==
NULL
)
{
Abc_Print
(
-
1
,
"There is no backup network.
\n
"
);
return
1
;
}
Abc_FrameReplaceCurrentNetwork
(
pAbc
,
Abc_NtkDup
(
pAbc
->
pNtkBackup
)
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: restore [-h]
\n
"
);
Abc_Print
(
-
2
,
"
\t
restores the current network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandFraig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandFraig
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
char
Buffer
[
100
];
char
Buffer
[
100
];
src/base/main/mainFrame.c
View file @
7592aa8a
...
@@ -198,6 +198,7 @@ void Abc_FrameDeallocate( Abc_Frame_t * p )
...
@@ -198,6 +198,7 @@ void Abc_FrameDeallocate( Abc_Frame_t * p )
if
(
p
->
pSave4
)
Aig_ManStop
(
(
Aig_Man_t
*
)
p
->
pSave4
);
if
(
p
->
pSave4
)
Aig_ManStop
(
(
Aig_Man_t
*
)
p
->
pSave4
);
if
(
p
->
pManDsd
)
If_DsdManFree
(
(
If_DsdMan_t
*
)
p
->
pManDsd
,
0
);
if
(
p
->
pManDsd
)
If_DsdManFree
(
(
If_DsdMan_t
*
)
p
->
pManDsd
,
0
);
if
(
p
->
pManDsd2
)
If_DsdManFree
(
(
If_DsdMan_t
*
)
p
->
pManDsd2
,
0
);
if
(
p
->
pManDsd2
)
If_DsdManFree
(
(
If_DsdMan_t
*
)
p
->
pManDsd2
,
0
);
if
(
p
->
pNtkBackup
)
Abc_NtkDelete
(
p
->
pNtkBackup
);
if
(
p
->
vPlugInComBinPairs
)
if
(
p
->
vPlugInComBinPairs
)
{
{
char
*
pTemp
;
char
*
pTemp
;
...
...
src/base/main/mainInt.h
View file @
7592aa8a
...
@@ -68,6 +68,7 @@ struct Abc_Frame_t_
...
@@ -68,6 +68,7 @@ struct Abc_Frame_t_
Abc_Ntk_t
*
pNtkCur
;
// the current network
Abc_Ntk_t
*
pNtkCur
;
// the current network
Abc_Ntk_t
*
pNtkBestDelay
;
// the current network
Abc_Ntk_t
*
pNtkBestDelay
;
// the current network
Abc_Ntk_t
*
pNtkBestArea
;
// the current network
Abc_Ntk_t
*
pNtkBestArea
;
// the current network
Abc_Ntk_t
*
pNtkBackup
;
// the current network
int
nSteps
;
// the counter of different network processed
int
nSteps
;
// the counter of different network processed
int
fSource
;
// marks the source mode
int
fSource
;
// marks the source mode
int
fAutoexac
;
// marks the autoexec mode
int
fAutoexac
;
// marks the autoexec mode
...
...
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