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
3309ccab
Commit
3309ccab
authored
Aug 26, 2023
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaning up AIG output in EQN format.
parent
750f8f17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
src/base/abc/abcNetlist.c
+1
-1
src/base/abci/abcGen.c
+1
-1
src/base/io/ioWriteEqn.c
+6
-2
No files found.
src/base/abc/abcNetlist.c
View file @
3309ccab
...
...
@@ -220,7 +220,7 @@ Abc_Ntk_t * Abc_NtkLogicToNetlist( Abc_Ntk_t * pNtk )
if
(
pObj
->
pCopy
->
pCopy
)
// the net of the new object is already created
continue
;
// create the new net
sprintf
(
Buffer
,
"new_%s
_
"
,
Abc_ObjName
(
pObj
)
);
sprintf
(
Buffer
,
"new_%s"
,
Abc_ObjName
(
pObj
)
);
//pNet = Abc_NtkFindOrCreateNet( pNtkNew, Abc_ObjName(pObj) ); // here we create net names such as "n48", where 48 is the ID of the node
pNet
=
Abc_NtkFindOrCreateNet
(
pNtkNew
,
Buffer
);
Abc_ObjAddFanin
(
pNet
,
pObj
->
pCopy
);
...
...
src/base/abci/abcGen.c
View file @
3309ccab
...
...
@@ -706,7 +706,7 @@ void Abc_GenRandom( char * pFileName, int nPis )
unsigned
*
pTruth
;
int
i
,
b
,
w
,
nWords
=
Abc_TruthWordNum
(
nPis
);
int
nDigitsIn
;
Aig_ManRandom
(
1
);
//
Aig_ManRandom( 1 );
pTruth
=
ABC_ALLOC
(
unsigned
,
nWords
);
for
(
w
=
0
;
w
<
nWords
;
w
++
)
pTruth
[
w
]
=
Aig_ManRandom
(
0
);
...
...
src/base/io/ioWriteEqn.c
View file @
3309ccab
...
...
@@ -85,6 +85,10 @@ void Io_WriteEqn( Abc_Ntk_t * pNtk, char * pFileName )
SeeAlso []
***********************************************************************/
char
*
Io_NamePrepro
(
char
*
pName
)
{
return
strncmp
(
pName
,
"new_"
,
4
)
?
pName
:
pName
+
4
;
}
void
Io_NtkWriteEqnOne
(
FILE
*
pFile
,
Abc_Ntk_t
*
pNtk
)
{
Vec_Vec_t
*
vLevels
;
...
...
@@ -108,10 +112,10 @@ void Io_NtkWriteEqnOne( FILE * pFile, Abc_Ntk_t * pNtk )
Abc_NtkForEachNode
(
pNtk
,
pNode
,
i
)
{
Extra_ProgressBarUpdate
(
pProgress
,
i
,
NULL
);
fprintf
(
pFile
,
"%s = "
,
Abc_ObjName
(
Abc_ObjFanout0
(
pNode
)
)
);
fprintf
(
pFile
,
"%s = "
,
Io_NamePrepro
(
Abc_ObjName
(
Abc_ObjFanout0
(
pNode
))
)
);
// set the input names
Abc_ObjForEachFanin
(
pNode
,
pFanin
,
k
)
Hop_IthVar
((
Hop_Man_t
*
)
pNtk
->
pManFunc
,
k
)
->
pData
=
Abc_ObjName
(
pFanin
);
Hop_IthVar
((
Hop_Man_t
*
)
pNtk
->
pManFunc
,
k
)
->
pData
=
Io_NamePrepro
(
Abc_ObjName
(
pFanin
)
);
// write the formula
Hop_ObjPrintEqn
(
pFile
,
(
Hop_Obj_t
*
)
pNode
->
pData
,
vLevels
,
0
);
fprintf
(
pFile
,
";
\n
"
);
...
...
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