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
cd8843c0
Commit
cd8843c0
authored
Jan 09, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preventing command history from being overwritten by internal scripts.
parent
bf96f0b3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
1 deletions
+23
-1
src/aig/gia/giaDeep.c
+13
-0
src/base/abc/abcUtil.c
+6
-0
src/base/cmd/cmdHist.c
+2
-1
src/base/main/main.h
+1
-0
src/base/main/mainFrame.c
+1
-0
No files found.
src/aig/gia/giaDeep.c
View file @
cd8843c0
...
...
@@ -74,11 +74,24 @@ Gia_Man_t * Gia_ManDeepSynOne( int nNoImpr, int TimeOut, int nAnds, int Seed, in
pComp
=
"; &dc2"
;
sprintf
(
Command
,
"&dch%s; &if -a -K %d; &mfs -e -W 20 -L 20%s%s"
,
fDch
?
" -f"
:
""
,
KLut
,
fFx
?
"; &fx"
:
""
,
pComp
);
if
(
Abc_FrameIsBatchMode
()
)
{
if
(
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
Command
)
)
{
Abc_Print
(
1
,
"Something did not work out with the command
\"
%s
\"
.
\n
"
,
Command
);
return
NULL
;
}
}
else
{
Abc_FrameSetBatchMode
(
1
);
if
(
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
Command
)
)
{
Abc_Print
(
1
,
"Something did not work out with the command
\"
%s
\"
.
\n
"
,
Command
);
return
NULL
;
}
Abc_FrameSetBatchMode
(
0
);
}
pTemp
=
Abc_FrameReadGia
(
Abc_FrameGetGlobalFrame
());
if
(
Gia_ManAndNum
(
pNew
)
>
Gia_ManAndNum
(
pTemp
)
)
{
...
...
src/base/abc/abcUtil.c
View file @
cd8843c0
...
...
@@ -3123,7 +3123,9 @@ Vec_Wec_t * Abc_SopSynthesize( Vec_Ptr_t * vSops )
int
i
,
k
,
iNode
=
0
;
Abc_FrameReplaceCurrentNetwork
(
Abc_FrameReadGlobalFrame
(),
pNtk
);
//Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "fx; strash; balance; dc2; map -a" );
Abc_FrameSetBatchMode
(
1
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"st; collapse; sop; fx; strash; &get; &ps; &deepsyn -I 4 -J 50 -T 5 -S 111 -t; &ps; &put; map -a"
);
Abc_FrameSetBatchMode
(
0
);
pNtkNew
=
Abc_FrameReadNtk
(
Abc_FrameReadGlobalFrame
()
);
vRes
=
Vec_WecStart
(
Abc_NtkPiNum
(
pNtkNew
)
+
Abc_NtkNodeNum
(
pNtkNew
)
+
Abc_NtkPoNum
(
pNtkNew
)
);
Abc_NtkForEachPi
(
pNtkNew
,
pObj
,
i
)
...
...
@@ -3150,7 +3152,9 @@ Vec_Wec_t * Abc_GiaSynthesize( Vec_Ptr_t * vGias, Gia_Man_t * pMulti )
Abc_Obj_t
*
pObj
,
*
pFanin
;
int
i
,
k
,
iNode
=
0
;
Abc_FrameReplaceCurrentNetwork
(
Abc_FrameReadGlobalFrame
(),
pNtk
);
Abc_FrameSetBatchMode
(
1
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"compress2rs; dch; map -a; strash; compress2rs; dch; map -a; strash; compress2rs; dch; map -a"
);
Abc_FrameSetBatchMode
(
0
);
pNtkNew
=
Abc_FrameReadNtk
(
Abc_FrameReadGlobalFrame
()
);
vRes
=
Vec_WecStart
(
Abc_NtkPiNum
(
pNtkNew
)
+
Abc_NtkNodeNum
(
pNtkNew
)
+
Abc_NtkPoNum
(
pNtkNew
)
);
Abc_NtkForEachPi
(
pNtkNew
,
pObj
,
i
)
...
...
@@ -3254,9 +3258,11 @@ Gia_Man_t * Abc_SopSynthesizeOne( char * pSop, int fClp )
pNtk
=
Abc_NtkCreateFromSops
(
"top"
,
vSops
);
Vec_PtrFree
(
vSops
);
Abc_FrameReplaceCurrentNetwork
(
Abc_FrameReadGlobalFrame
(),
pNtk
);
Abc_FrameSetBatchMode
(
1
);
if
(
fClp
)
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"clp; sop"
);
Cmd_CommandExecute
(
Abc_FrameGetGlobalFrame
(),
"fx; strash; balance; dc2"
);
Abc_FrameSetBatchMode
(
0
);
pNtkNew
=
Abc_FrameReadNtk
(
Abc_FrameReadGlobalFrame
()
);
return
Abc_NtkStrashToGia
(
pNtkNew
);
}
...
...
src/base/cmd/cmdHist.c
View file @
cd8843c0
...
...
@@ -65,7 +65,8 @@ void Cmd_HistoryAddCommand( Abc_Frame_t * p, const char * command )
strncmp
(
Buffer
,
"time"
,
4
)
&&
strncmp
(
Buffer
,
"quit"
,
4
)
&&
strncmp
(
Buffer
,
"alias"
,
5
)
&&
// strncmp(Buffer,"source",6) &&
strncmp
(
Buffer
,
"source abc.rc"
,
13
)
&&
strncmp
(
Buffer
,
"source ..
\\
abc.rc"
,
16
)
&&
strncmp
(
Buffer
,
"history"
,
7
)
&&
strncmp
(
Buffer
,
"hi "
,
3
)
&&
strcmp
(
Buffer
,
"hi"
)
&&
Buffer
[
strlen
(
Buffer
)
-
1
]
!=
'?'
)
{
...
...
src/base/main/main.h
View file @
cd8843c0
...
...
@@ -111,6 +111,7 @@ extern ABC_DLL char * Abc_FrameReadSpecName();
extern
ABC_DLL
char
*
Abc_FrameReadFlag
(
char
*
pFlag
);
extern
ABC_DLL
int
Abc_FrameIsFlagEnabled
(
char
*
pFlag
);
extern
ABC_DLL
int
Abc_FrameIsBatchMode
();
extern
ABC_DLL
void
Abc_FrameSetBatchMode
(
int
Mode
);
extern
ABC_DLL
int
Abc_FrameIsBridgeMode
();
extern
ABC_DLL
void
Abc_FrameSetBridgeMode
();
...
...
src/base/main/mainFrame.c
View file @
cd8843c0
...
...
@@ -108,6 +108,7 @@ void Abc_FrameSetSignalNames( Vec_Ptr_t * vNames ) { if ( s_GlobalFram
void
Abc_FrameSetSpecName
(
char
*
pFileName
)
{
ABC_FREE
(
s_GlobalFrame
->
pSpecName
);
s_GlobalFrame
->
pSpecName
=
pFileName
;
}
int
Abc_FrameIsBatchMode
()
{
return
s_GlobalFrame
?
s_GlobalFrame
->
fBatchMode
:
0
;
}
void
Abc_FrameSetBatchMode
(
int
Mode
)
{
if
(
s_GlobalFrame
)
s_GlobalFrame
->
fBatchMode
=
Mode
;
}
int
Abc_FrameIsBridgeMode
()
{
return
s_GlobalFrame
?
s_GlobalFrame
->
fBridgeMode
:
0
;
}
void
Abc_FrameSetBridgeMode
()
{
if
(
s_GlobalFrame
)
s_GlobalFrame
->
fBridgeMode
=
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