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
7dc8c81f
Commit
7dc8c81f
authored
Jul 25, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for skipping structural hashing when reading GIA from file.
parent
a40c13a9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
20 deletions
+25
-20
src/aig/gia/gia.h
+2
-2
src/aig/gia/giaAiger.c
+11
-7
src/aig/gia/giaEquiv.c
+5
-5
src/base/abci/abc.c
+6
-5
src/base/cmd/cmdPlugin.c
+1
-1
No files found.
src/aig/gia/gia.h
View file @
7dc8c81f
...
...
@@ -723,8 +723,8 @@ extern void Gia_VtaSetDefaultParams( Gia_ParVta_t * p );
extern
int
Gia_VtaPerform
(
Gia_Man_t
*
pAig
,
Gia_ParVta_t
*
pPars
);
/*=== giaAiger.c ===========================================================*/
extern
int
Gia_FileSize
(
char
*
pFileName
);
extern
Gia_Man_t
*
Gia_ReadAigerFromMemory
(
char
*
pContents
,
int
nFileSize
,
int
fCheck
);
extern
Gia_Man_t
*
Gia_ReadAiger
(
char
*
pFileName
,
int
fCheck
);
extern
Gia_Man_t
*
Gia_ReadAigerFromMemory
(
char
*
pContents
,
int
nFileSize
,
int
f
SkipStrash
,
int
f
Check
);
extern
Gia_Man_t
*
Gia_ReadAiger
(
char
*
pFileName
,
int
f
SkipStrash
,
int
f
Check
);
extern
void
Gia_WriteAiger
(
Gia_Man_t
*
p
,
char
*
pFileName
,
int
fWriteSymbols
,
int
fCompact
);
extern
void
Gia_DumpAiger
(
Gia_Man_t
*
p
,
char
*
pFilePrefix
,
int
iFileNum
,
int
nFileNumDigits
);
extern
Vec_Str_t
*
Gia_WriteAigerIntoMemoryStr
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaAiger.c
View file @
7dc8c81f
...
...
@@ -638,7 +638,7 @@ Gia_Man_t * Gia_ReadAiger2( char * pFileName, int fCheck )
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ReadAigerFromMemory
(
char
*
pContents
,
int
nFileSize
,
int
fCheck
)
Gia_Man_t
*
Gia_ReadAigerFromMemory
(
char
*
pContents
,
int
nFileSize
,
int
f
SkipStrash
,
int
f
Check
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Vec_Int_t
*
vLits
=
NULL
,
*
vPoTypes
=
NULL
;
...
...
@@ -747,7 +747,8 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
}
// create the AND gates
Gia_ManHashAlloc
(
pNew
);
if
(
fSkipStrash
)
Gia_ManHashAlloc
(
pNew
);
for
(
i
=
0
;
i
<
nAnds
;
i
++
)
{
uLit
=
((
i
+
1
+
nInputs
+
nLatches
)
<<
1
);
...
...
@@ -757,10 +758,13 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
iNode0
=
Abc_LitNotCond
(
Vec_IntEntry
(
vNodes
,
uLit0
>>
1
),
uLit0
&
1
);
iNode1
=
Abc_LitNotCond
(
Vec_IntEntry
(
vNodes
,
uLit1
>>
1
),
uLit1
&
1
);
assert
(
Vec_IntSize
(
vNodes
)
==
i
+
1
+
nInputs
+
nLatches
);
// Vec_IntPush( vNodes, Gia_And(pNew, iNode0, iNode1) );
Vec_IntPush
(
vNodes
,
Gia_ManHashAnd
(
pNew
,
iNode0
,
iNode1
)
);
if
(
fSkipStrash
)
Vec_IntPush
(
vNodes
,
Gia_ManAppendAnd
(
pNew
,
iNode0
,
iNode1
)
);
else
Vec_IntPush
(
vNodes
,
Gia_ManHashAnd
(
pNew
,
iNode0
,
iNode1
)
);
}
Gia_ManHashStop
(
pNew
);
if
(
fSkipStrash
)
Gia_ManHashStop
(
pNew
);
// remember the place where symbols begin
pSymbols
=
pCur
;
...
...
@@ -1067,7 +1071,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_ReadAiger
(
char
*
pFileName
,
int
fCheck
)
Gia_Man_t
*
Gia_ReadAiger
(
char
*
pFileName
,
int
f
SkipStrash
,
int
f
Check
)
{
FILE
*
pFile
;
Gia_Man_t
*
pNew
;
...
...
@@ -1083,7 +1087,7 @@ Gia_Man_t * Gia_ReadAiger( char * pFileName, int fCheck )
RetValue
=
fread
(
pContents
,
nFileSize
,
1
,
pFile
);
fclose
(
pFile
);
pNew
=
Gia_ReadAigerFromMemory
(
pContents
,
nFileSize
,
fCheck
);
pNew
=
Gia_ReadAigerFromMemory
(
pContents
,
nFileSize
,
f
SkipStrash
,
f
Check
);
ABC_FREE
(
pContents
);
if
(
pNew
)
{
...
...
src/aig/gia/giaEquiv.c
View file @
7dc8c81f
...
...
@@ -1224,7 +1224,7 @@ void Gia_ManEquivMark( Gia_Man_t * p, char * pFileName, int fSkipSome, int fVerb
return
;
}
// read AIGER file
pMiter
=
Gia_ReadAiger
(
pFileName
,
0
);
pMiter
=
Gia_ReadAiger
(
pFileName
,
0
,
0
);
if
(
pMiter
==
NULL
)
{
printf
(
"Gia_ManEquivMark(): Input file %s could not be read.
\n
"
,
pFileName
);
...
...
@@ -1782,13 +1782,13 @@ int Gia_ManFilterEquivsForSpeculation( Gia_Man_t * pGia, char * pName1, char * p
printf
(
"Equivalences are not defined.
\n
"
);
return
0
;
}
pGia1
=
Gia_ReadAiger
(
pName1
,
0
);
pGia1
=
Gia_ReadAiger
(
pName1
,
0
,
0
);
if
(
pGia1
==
NULL
)
{
printf
(
"Cannot read first file %s.
\n
"
,
pName1
);
return
0
;
}
pGia2
=
Gia_ReadAiger
(
pName2
,
0
);
pGia2
=
Gia_ReadAiger
(
pName2
,
0
,
0
);
if
(
pGia2
==
NULL
)
{
Gia_ManStop
(
pGia2
);
...
...
@@ -1921,13 +1921,13 @@ int Gia_ManFilterEquivsUsingParts( Gia_Man_t * pGia, char * pName1, char * pName
printf
(
"Equivalences are not defined.
\n
"
);
return
0
;
}
pGia1
=
Gia_ReadAiger
(
pName1
,
0
);
pGia1
=
Gia_ReadAiger
(
pName1
,
0
,
0
);
if
(
pGia1
==
NULL
)
{
printf
(
"Cannot read first file %s.
\n
"
,
pName1
);
return
0
;
}
pGia2
=
Gia_ReadAiger
(
pName2
,
0
);
pGia2
=
Gia_ReadAiger
(
pName2
,
0
,
0
);
if
(
pGia2
==
NULL
)
{
Gia_ManStop
(
pGia2
);
...
...
src/base/abci/abc.c
View file @
7dc8c81f
...
...
@@ -840,6 +840,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
{
extern
void
Dar_LibStart
();
// char * pMem = malloc( (1<<30) * 3 / 2 );
Dar_LibStart
();
}
{
...
...
@@ -12731,7 +12732,7 @@ int Abc_CommandRecStart2( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
fclose
(
pFile
);
pGia
=
Gia_ReadAiger
(
FileName
,
0
);
pGia
=
Gia_ReadAiger
(
FileName
,
1
,
0
);
if
(
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Reading AIGER has failed.
\n
"
);
...
...
@@ -13079,7 +13080,7 @@ int Abc_CommandRecMerge2( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
fclose
(
pFile
);
pGia
=
Gia_ReadAiger
(
FileName
,
0
);
pGia
=
Gia_ReadAiger
(
FileName
,
0
,
0
);
if
(
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Reading AIGER has failed.
\n
"
);
...
...
@@ -22725,7 +22726,7 @@ int Abc_CommandAbc9Read( Abc_Frame_t * pAbc, int argc, char ** argv )
}
fclose
(
pFile
);
pAig
=
Gia_ReadAiger
(
FileName
,
0
);
pAig
=
Gia_ReadAiger
(
FileName
,
0
,
0
);
Abc_CommandUpdate9
(
pAbc
,
pAig
);
return
0
;
...
...
@@ -25212,7 +25213,7 @@ int Abc_CommandAbc9Miter( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
fclose
(
pFile
);
pSecond
=
Gia_ReadAiger
(
FileName
,
0
);
pSecond
=
Gia_ReadAiger
(
FileName
,
0
,
0
);
if
(
pSecond
==
NULL
)
{
Abc_Print
(
-
1
,
"Reading AIGER has failed.
\n
"
);
...
...
@@ -26299,7 +26300,7 @@ int Abc_CommandAbc9Cec( Abc_Frame_t * pAbc, int argc, char ** argv )
return
1
;
}
fclose
(
pFile
);
pSecond
=
Gia_ReadAiger
(
FileName
,
0
);
pSecond
=
Gia_ReadAiger
(
FileName
,
0
,
0
);
if
(
pSecond
==
NULL
)
{
Abc_Print
(
-
1
,
"Reading AIGER has failed.
\n
"
);
...
...
src/base/cmd/cmdPlugin.c
View file @
7dc8c81f
...
...
@@ -391,7 +391,7 @@ Gia_Man_t * Abc_ManReadAig( char * pFileName, char * pToken )
fclose
(
pFile
);
}
// derive AIG
pGia
=
Gia_ReadAigerFromMemory
(
pStr
,
nBinaryPart
,
0
);
pGia
=
Gia_ReadAigerFromMemory
(
pStr
,
nBinaryPart
,
0
,
0
);
}
Vec_StrFree
(
vStr
);
return
pGia
;
...
...
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