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
079a309a
Commit
079a309a
authored
Nov 08, 2021
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix in processing NDR.
parent
621d6355
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
src/base/wlc/wlcBlast.c
+1
-1
src/base/wlc/wlcNdr.c
+7
-2
src/proof/acec/acecFadds.c
+16
-0
No files found.
src/base/wlc/wlcBlast.c
View file @
079a309a
...
@@ -2110,7 +2110,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
...
@@ -2110,7 +2110,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
// complement flop inputs whose init state is 1
// complement flop inputs whose init state is 1
for
(
i
=
0
;
i
<
nFf2Regs
;
i
++
)
for
(
i
=
0
;
i
<
nFf2Regs
;
i
++
)
Gia_ManAppendCo
(
pNew
,
Gia_ManAppendCi
(
pNew
)
);
Gia_ManAppendCo
(
pNew
,
Gia_ManAppendCi
(
pNew
)
);
//
Gia_ManSetRegNum( pNew, nFf2Regs );
Gia_ManSetRegNum
(
pNew
,
nFf2Regs
);
}
}
else
else
{
{
...
...
src/base/wlc/wlcNdr.c
View file @
079a309a
...
@@ -368,7 +368,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
...
@@ -368,7 +368,7 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
Ndr_Data_t
*
p
=
(
Ndr_Data_t
*
)
pData
;
Ndr_Data_t
*
p
=
(
Ndr_Data_t
*
)
pData
;
Wlc_Obj_t
*
pObj
;
Vec_Int_t
*
vName2Obj
,
*
vFanins
=
Vec_IntAlloc
(
100
);
Wlc_Obj_t
*
pObj
;
Vec_Int_t
*
vName2Obj
,
*
vFanins
=
Vec_IntAlloc
(
100
);
int
Mod
=
2
,
i
,
k
,
Obj
,
*
pArray
,
nDigits
,
fFound
,
NameId
,
NameIdMax
;
int
Mod
=
2
,
i
,
k
,
Obj
,
*
pArray
,
nDigits
,
fFound
,
NameId
,
NameIdMax
;
Vec_Wrd_t
*
vTruths
=
NULL
;
Vec_Wrd_t
*
vTruths
=
NULL
;
int
nTruths
[
2
]
=
{
0
};
Wlc_Ntk_t
*
pTemp
,
*
pNtk
=
Wlc_NtkAlloc
(
"top"
,
Ndr_DataObjNum
(
p
,
Mod
)
+
1
);
Wlc_Ntk_t
*
pTemp
,
*
pNtk
=
Wlc_NtkAlloc
(
"top"
,
Ndr_DataObjNum
(
p
,
Mod
)
+
1
);
Wlc_NtkCheckIntegrity
(
pData
);
Wlc_NtkCheckIntegrity
(
pData
);
Vec_IntClear
(
&
pNtk
->
vFfs
);
Vec_IntClear
(
&
pNtk
->
vFfs
);
...
@@ -415,11 +415,14 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
...
@@ -415,11 +415,14 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
Vec_IntPush
(
&
pNtk
->
vFfs2
,
iObj
);
Vec_IntPush
(
&
pNtk
->
vFfs2
,
iObj
);
if
(
Type
==
ABC_OPER_LUT
)
if
(
Type
==
ABC_OPER_LUT
)
{
{
word
*
pTruth
;
if
(
vTruths
==
NULL
)
if
(
vTruths
==
NULL
)
vTruths
=
Vec_WrdStart
(
1000
);
vTruths
=
Vec_WrdStart
(
1000
);
if
(
NameId
>=
Vec_WrdSize
(
vTruths
)
)
if
(
NameId
>=
Vec_WrdSize
(
vTruths
)
)
Vec_WrdFillExtra
(
vTruths
,
2
*
NameId
,
0
);
Vec_WrdFillExtra
(
vTruths
,
2
*
NameId
,
0
);
Vec_WrdWriteEntry
(
vTruths
,
NameId
,
*
((
word
*
)
Ndr_ObjReadBodyP
(
p
,
Obj
,
NDR_FUNCTION
))
);
pTruth
=
(
word
*
)
Ndr_ObjReadBodyP
(
p
,
Obj
,
NDR_FUNCTION
);
Vec_WrdWriteEntry
(
vTruths
,
NameId
,
pTruth
?
*
pTruth
:
0
);
nTruths
[
pTruth
!=
NULL
]
++
;
}
}
if
(
Type
==
ABC_OPER_SLICE
)
if
(
Type
==
ABC_OPER_SLICE
)
Vec_IntPushTwo
(
vFanins
,
End
,
Beg
);
Vec_IntPushTwo
(
vFanins
,
End
,
Beg
);
...
@@ -437,6 +440,8 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
...
@@ -437,6 +440,8 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
Wlc_ObjFanin1
(
pNtk
,
pObj
)
->
Signed
=
1
;
Wlc_ObjFanin1
(
pNtk
,
pObj
)
->
Signed
=
1
;
}
}
}
}
if
(
nTruths
[
0
]
)
printf
(
"Warning! The number of LUTs without function is %d (out of %d).
\n
"
,
nTruths
[
0
],
nTruths
[
0
]
+
nTruths
[
1
]
);
// mark primary outputs
// mark primary outputs
Ndr_ModForEachPo
(
p
,
Mod
,
Obj
)
Ndr_ModForEachPo
(
p
,
Mod
,
Obj
)
{
{
...
...
src/proof/acec/acecFadds.c
View file @
079a309a
...
@@ -314,6 +314,9 @@ void Dtc_ManCutMerge( Gia_Man_t * p, int iObj, int * pList0, int * pList1, Vec_I
...
@@ -314,6 +314,9 @@ void Dtc_ManCutMerge( Gia_Man_t * p, int iObj, int * pList0, int * pList1, Vec_I
if
(
Type
==
0
)
if
(
Type
==
0
)
continue
;
continue
;
vTemp
=
Type
==
1
?
vCutsXor
:
vCutsMaj
;
vTemp
=
Type
==
1
?
vCutsXor
:
vCutsMaj
;
if
(
0
&&
Type
==
2
)
{
fVerbose
=
1
;
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"%d = %s("
,
iObj
,
Type
==
1
?
"XOR"
:
"MAJ"
);
printf
(
"%d = %s("
,
iObj
,
Type
==
1
?
"XOR"
:
"MAJ"
);
for
(
c
=
1
;
c
<=
pCut
[
0
];
c
++
)
for
(
c
=
1
;
c
<=
pCut
[
0
];
c
++
)
...
@@ -324,6 +327,8 @@ void Dtc_ManCutMerge( Gia_Man_t * p, int iObj, int * pList0, int * pList1, Vec_I
...
@@ -324,6 +327,8 @@ void Dtc_ManCutMerge( Gia_Man_t * p, int iObj, int * pList0, int * pList1, Vec_I
}
}
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
" )
\n
"
);
printf
(
" )
\n
"
);
fVerbose
=
0
;
}
Vec_IntPush
(
vTemp
,
iObj
);
Vec_IntPush
(
vTemp
,
iObj
);
}
}
}
}
...
@@ -450,6 +455,16 @@ Vec_Int_t * Gia_ManDetectFullAdders( Gia_Man_t * p, int fVerbose, Vec_Int_t ** p
...
@@ -450,6 +455,16 @@ Vec_Int_t * Gia_ManDetectFullAdders( Gia_Man_t * p, int fVerbose, Vec_Int_t ** p
Vec_IntFree
(
vCutsMaj
);
Vec_IntFree
(
vCutsMaj
);
return
vFadds
;
return
vFadds
;
}
}
void
Gia_ManDetectFullAdders2
(
Gia_Man_t
*
p
,
int
fVerbose
)
{
Vec_Int_t
*
vCutsXor2
,
*
vCutsXor
,
*
vCutsMaj
;
Dtc_ManComputeCuts
(
p
,
&
vCutsXor2
,
&
vCutsXor
,
&
vCutsMaj
,
fVerbose
);
if
(
fVerbose
)
printf
(
"XOR3 cuts = %d. MAJ cuts = %d.
\n
"
,
Vec_IntSize
(
vCutsXor
)
/
4
,
Vec_IntSize
(
vCutsMaj
)
/
4
);
Vec_IntFree
(
vCutsXor2
);
Vec_IntFree
(
vCutsXor
);
Vec_IntFree
(
vCutsMaj
);
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -1238,6 +1253,7 @@ Gia_Man_t * Gia_ManDupWithArtificialBoxes( Gia_Man_t * p, int DelayC, int nPathM
...
@@ -1238,6 +1253,7 @@ Gia_Man_t * Gia_ManDupWithArtificialBoxes( Gia_Man_t * p, int DelayC, int nPathM
return
pNew
;
return
pNew
;
}
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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