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
3d19d411
Commit
3d19d411
authored
May 18, 2022
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to MiniAIG.
parent
61f2f3db
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
1 deletions
+44
-1
src/aig/gia/giaMini.c
+44
-1
src/aig/miniaig/miniaig.h
+0
-0
No files found.
src/aig/gia/giaMini.c
View file @
3d19d411
...
@@ -182,13 +182,56 @@ void * Abc_FrameGiaOutputMiniAig( Abc_Frame_t * pAbc )
...
@@ -182,13 +182,56 @@ void * Abc_FrameGiaOutputMiniAig( Abc_Frame_t * pAbc )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Gia_ManReadMiniAigNames
(
char
*
pFileName
,
Gia_Man_t
*
pGia
)
{
char
*
filename3
=
Abc_UtilStrsavTwo
(
pFileName
,
".ilo"
);
FILE
*
pFile
=
fopen
(
filename3
,
"rb"
);
if
(
pFile
)
{
char
Buffer
[
5000
],
*
pName
;
int
i
,
iLines
=
0
;
Vec_Ptr_t
*
vTemp
=
Vec_PtrAlloc
(
Gia_ManRegNum
(
pGia
)
);
assert
(
pGia
->
vNamesIn
==
NULL
);
pGia
->
vNamesIn
=
Vec_PtrAlloc
(
Gia_ManCiNum
(
pGia
)
);
assert
(
pGia
->
vNamesOut
==
NULL
);
pGia
->
vNamesOut
=
Vec_PtrAlloc
(
Gia_ManCoNum
(
pGia
)
);
while
(
fgets
(
Buffer
,
5000
,
pFile
)
)
{
if
(
Buffer
[
strlen
(
Buffer
)
-
1
]
==
'\n'
)
Buffer
[
strlen
(
Buffer
)
-
1
]
=
0
;
if
(
iLines
<
Gia_ManPiNum
(
pGia
)
)
Vec_PtrPush
(
pGia
->
vNamesIn
,
Abc_UtilStrsav
(
Buffer
)
);
else
if
(
iLines
<
Gia_ManCiNum
(
pGia
)
)
Vec_PtrPush
(
vTemp
,
Abc_UtilStrsav
(
Buffer
)
);
else
Vec_PtrPush
(
pGia
->
vNamesOut
,
Abc_UtilStrsav
(
Buffer
)
);
iLines
++
;
}
Vec_PtrForEachEntry
(
char
*
,
vTemp
,
pName
,
i
)
{
Vec_PtrPush
(
pGia
->
vNamesIn
,
Abc_UtilStrsav
(
pName
)
);
Vec_PtrPush
(
pGia
->
vNamesOut
,
Abc_UtilStrsavTwo
(
pName
,
"_in"
)
);
}
Vec_PtrFreeFree
(
vTemp
);
fclose
(
pFile
);
printf
(
"Read ILO names into file
\"
%s
\"
.
\n
"
,
filename3
);
}
ABC_FREE
(
filename3
);
}
Gia_Man_t
*
Gia_ManReadMiniAig
(
char
*
pFileName
,
int
fGiaSimple
)
Gia_Man_t
*
Gia_ManReadMiniAig
(
char
*
pFileName
,
int
fGiaSimple
)
{
{
Mini_Aig_t
*
p
=
Mini_AigLoad
(
pFileName
);
Mini_Aig_t
*
p
=
Mini_AigLoad
(
pFileName
);
Gia_Man_t
*
pGia
=
Gia_ManFromMiniAig
(
p
,
NULL
,
fGiaSimple
);
Gia_Man_t
*
p
Temp
,
*
p
Gia
=
Gia_ManFromMiniAig
(
p
,
NULL
,
fGiaSimple
);
ABC_FREE
(
pGia
->
pName
);
ABC_FREE
(
pGia
->
pName
);
pGia
->
pName
=
Extra_FileNameGeneric
(
pFileName
);
pGia
->
pName
=
Extra_FileNameGeneric
(
pFileName
);
Mini_AigStop
(
p
);
Mini_AigStop
(
p
);
Gia_ManReadMiniAigNames
(
pFileName
,
pGia
);
if
(
!
Gia_ManIsNormalized
(
pGia
)
)
{
pGia
=
Gia_ManDupNormalize
(
pTemp
=
pGia
,
0
);
ABC_SWAP
(
Vec_Ptr_t
*
,
pTemp
->
vNamesIn
,
pGia
->
vNamesIn
);
ABC_SWAP
(
Vec_Ptr_t
*
,
pTemp
->
vNamesOut
,
pGia
->
vNamesOut
);
Gia_ManStop
(
pTemp
);
}
return
pGia
;
return
pGia
;
}
}
void
Gia_ManWriteMiniAig
(
Gia_Man_t
*
pGia
,
char
*
pFileName
)
void
Gia_ManWriteMiniAig
(
Gia_Man_t
*
pGia
,
char
*
pFileName
)
...
...
src/aig/miniaig/miniaig.h
View file @
3d19d411
This diff is collapsed.
Click to expand it.
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