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
8efc9cb7
Commit
8efc9cb7
authored
Jul 07, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixing in %blast when blasting mod operator (handling zero divisor).
parent
43ad54b9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
11 deletions
+33
-11
src/base/abci/abcPrint.c
+2
-2
src/base/wlc/wlc.h
+1
-1
src/base/wlc/wlcBlast.c
+2
-1
src/base/wlc/wlcCom.c
+22
-4
src/base/wlc/wlcNtk.c
+2
-0
src/base/wlc/wlcReadVer.c
+1
-1
src/base/wlc/wlcWriteVer.c
+3
-2
No files found.
src/base/abci/abcPrint.c
View file @
8efc9cb7
...
...
@@ -443,13 +443,13 @@ void Abc_NtkPrintIo( FILE * pFile, Abc_Ntk_t * pNtk, int fPrintFlops )
fprintf
(
pFile
,
"Primary inputs (%d): "
,
Abc_NtkPiNum
(
pNtk
)
);
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
fprintf
(
pFile
,
" %
s"
,
Abc_ObjName
(
pObj
)
);
fprintf
(
pFile
,
" %
d=%s"
,
i
,
Abc_ObjName
(
pObj
)
);
// fprintf( pFile, " %s(%d)", Abc_ObjName(pObj), Abc_ObjFanoutNum(pObj) );
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"Primary outputs (%d):"
,
Abc_NtkPoNum
(
pNtk
)
);
Abc_NtkForEachPo
(
pNtk
,
pObj
,
i
)
fprintf
(
pFile
,
" %
s"
,
Abc_ObjName
(
pObj
)
);
fprintf
(
pFile
,
" %
d=%s"
,
i
,
Abc_ObjName
(
pObj
)
);
fprintf
(
pFile
,
"
\n
"
);
if
(
!
fPrintFlops
)
...
...
src/base/wlc/wlc.h
View file @
8efc9cb7
...
...
@@ -270,7 +270,7 @@ extern int Wlc_StdinProcessSmt( Abc_Frame_t * pAbc, char * pCmd );
/*=== wlcReadVer.c ========================================================*/
extern
Wlc_Ntk_t
*
Wlc_ReadVer
(
char
*
pFileName
);
/*=== wlcWriteVer.c ========================================================*/
extern
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
);
extern
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
,
int
fAddCos
);
ABC_NAMESPACE_HEADER_END
...
...
src/base/wlc/wlcBlast.c
View file @
8efc9cb7
...
...
@@ -742,7 +742,8 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Vec_Int_t * vBoxIds )
else
Wlc_BlastDivider
(
pNew
,
pArg0
,
nRangeMax
,
pArg1
,
nRangeMax
,
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
,
vRes
);
Vec_IntShrink
(
vRes
,
nRange
);
Wlc_BlastZeroCondition
(
pNew
,
pFans1
,
nRange1
,
vRes
);
if
(
pObj
->
Type
==
WLC_OBJ_ARI_DIVIDE
)
Wlc_BlastZeroCondition
(
pNew
,
pFans1
,
nRange1
,
vRes
);
}
else
if
(
pObj
->
Type
==
WLC_OBJ_ARI_MINUS
)
{
...
...
src/base/wlc/wlcCom.c
View file @
8efc9cb7
...
...
@@ -178,12 +178,20 @@ int Abc_CommandWriteWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Wlc_Ntk_t
*
pNtk
=
Wlc_AbcGetNtk
(
pAbc
);
char
*
pFileName
=
NULL
;
int
fAddCos
=
0
;
int
fSplitNodes
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
an
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'a'
:
fAddCos
^=
1
;
break
;
case
'n'
:
fSplitNodes
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -207,12 +215,22 @@ int Abc_CommandWriteWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
printf
(
"Output file name should be given on the command line.
\n
"
);
return
0
;
}
Wlc_WriteVer
(
pNtk
,
pFileName
);
if
(
fSplitNodes
)
{
pNtk
=
Wlc_NtkDupSingleNodes
(
pNtk
);
Wlc_WriteVer
(
pNtk
,
pFileName
,
fAddCos
);
Wlc_NtkFree
(
pNtk
);
}
else
Wlc_WriteVer
(
pNtk
,
pFileName
,
fAddCos
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%write [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: %%write [-
an
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
writes the design into a file
\n
"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle adding a CO for each node [default = %s]
\n
"
,
fAddCos
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-n : toggle splitting into individual nodes [default = %s]
\n
"
,
fSplitNodes
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
...
...
src/base/wlc/wlcNtk.c
View file @
8efc9cb7
...
...
@@ -531,6 +531,8 @@ Wlc_Ntk_t * Wlc_NtkDupSingleNodes( Wlc_Ntk_t * p )
continue
;
if
(
pObj
->
Type
==
WLC_OBJ_ARI_MULTI
)
continue
;
if
(
pObj
->
Type
==
WLC_OBJ_MUX
&&
Wlc_ObjFaninNum
(
pObj
)
>
3
)
continue
;
// create CIs for the fanins
Wlc_ObjForEachFanin
(
pObj
,
iFanin
,
k
)
{
...
...
src/base/wlc/wlcReadVer.c
View file @
8efc9cb7
...
...
@@ -1194,7 +1194,7 @@ void Io_ReadWordTest( char * pFileName )
Wlc_Ntk_t
*
pNtk
=
Wlc_ReadVer
(
pFileName
);
if
(
pNtk
==
NULL
)
return
;
Wlc_WriteVer
(
pNtk
,
"test.v"
);
Wlc_WriteVer
(
pNtk
,
"test.v"
,
0
);
pNew
=
Wlc_NtkBitBlast
(
pNtk
,
NULL
);
Gia_AigerWrite
(
pNew
,
"test.aig"
,
0
,
0
);
...
...
src/base/wlc/wlcWriteVer.c
View file @
8efc9cb7
...
...
@@ -381,7 +381,7 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
assert
(
!
p
->
vInits
||
iFanin
==
(
int
)
strlen
(
p
->
pInits
)
);
fprintf
(
pFile
,
"endmodule
\n\n
"
);
}
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
)
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
,
int
fAddCos
)
{
FILE
*
pFile
;
pFile
=
fopen
(
pFileName
,
"w"
);
...
...
@@ -393,7 +393,8 @@ void Wlc_WriteVer( Wlc_Ntk_t * p, char * pFileName )
fprintf
(
pFile
,
"// Benchmark
\"
%s
\"
written by ABC on %s
\n
"
,
p
->
pName
,
Extra_TimeStamp
()
);
fprintf
(
pFile
,
"
\n
"
);
Wlc_WriteTables
(
pFile
,
p
);
// Wlc_WriteAddPos( p );
if
(
fAddCos
)
Wlc_WriteAddPos
(
p
);
Wlc_WriteVerInt
(
pFile
,
p
);
fprintf
(
pFile
,
"
\n
"
);
fclose
(
pFile
);
...
...
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