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
63ce84d8
Commit
63ce84d8
authored
Jan 08, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of CE extraction for multiple MUXes driving D-inputs of FFs.
parent
4af39856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
51 deletions
+51
-51
src/base/cba/cbaSimple.c
+50
-50
src/sat/bmc/bmcChain.c
+1
-1
No files found.
src/base/cba/cbaSimple.c
View file @
63ce84d8
...
@@ -164,7 +164,7 @@ static int Ptr_ManCheckArray( Vec_Ptr_t * vArray )
...
@@ -164,7 +164,7 @@ static int Ptr_ManCheckArray( Vec_Ptr_t * vArray )
assert
(
0
);
assert
(
0
);
return
0
;
return
0
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Node
(
Abc_Obj_t
*
pObj
)
Vec_Ptr_t
*
Ptr_ManD
erive
Node
(
Abc_Obj_t
*
pObj
)
{
{
Abc_Obj_t
*
pFanin
;
int
i
;
Abc_Obj_t
*
pFanin
;
int
i
;
Vec_Ptr_t
*
vNode
=
Vec_PtrAlloc
(
2
+
Abc_ObjFaninNum
(
pObj
)
);
Vec_Ptr_t
*
vNode
=
Vec_PtrAlloc
(
2
+
Abc_ObjFaninNum
(
pObj
)
);
...
@@ -176,17 +176,17 @@ Vec_Ptr_t * Ptr_ManDumpNode( Abc_Obj_t * pObj )
...
@@ -176,17 +176,17 @@ Vec_Ptr_t * Ptr_ManDumpNode( Abc_Obj_t * pObj )
assert
(
Ptr_ManCheckArray
(
vNode
)
);
assert
(
Ptr_ManCheckArray
(
vNode
)
);
return
vNode
;
return
vNode
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Nodes
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Nodes
(
Abc_Ntk_t
*
pNtk
)
{
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_Obj_t
*
pObj
;
int
i
;
Vec_Ptr_t
*
vNodes
=
Vec_PtrAlloc
(
Abc_NtkNodeNum
(
pNtk
)
);
Vec_Ptr_t
*
vNodes
=
Vec_PtrAlloc
(
Abc_NtkNodeNum
(
pNtk
)
);
Abc_NtkForEachNode
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachNode
(
pNtk
,
pObj
,
i
)
Vec_PtrPush
(
vNodes
,
Ptr_ManD
ump
Node
(
pObj
)
);
Vec_PtrPush
(
vNodes
,
Ptr_ManD
erive
Node
(
pObj
)
);
assert
(
Ptr_ManCheckArray
(
vNodes
)
);
assert
(
Ptr_ManCheckArray
(
vNodes
)
);
return
vNodes
;
return
vNodes
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Box
(
Abc_Obj_t
*
pObj
)
Vec_Ptr_t
*
Ptr_ManD
erive
Box
(
Abc_Obj_t
*
pObj
)
{
{
Abc_Obj_t
*
pNext
;
int
i
;
Abc_Obj_t
*
pNext
;
int
i
;
Abc_Ntk_t
*
pModel
=
Abc_ObjModel
(
pObj
);
Abc_Ntk_t
*
pModel
=
Abc_ObjModel
(
pObj
);
...
@@ -207,17 +207,17 @@ Vec_Ptr_t * Ptr_ManDumpBox( Abc_Obj_t * pObj )
...
@@ -207,17 +207,17 @@ Vec_Ptr_t * Ptr_ManDumpBox( Abc_Obj_t * pObj )
assert
(
Ptr_ManCheckArray
(
vBox
)
);
assert
(
Ptr_ManCheckArray
(
vBox
)
);
return
vBox
;
return
vBox
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Boxes
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Boxes
(
Abc_Ntk_t
*
pNtk
)
{
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_Obj_t
*
pObj
;
int
i
;
Vec_Ptr_t
*
vBoxes
=
Vec_PtrAlloc
(
Abc_NtkBoxNum
(
pNtk
)
);
Vec_Ptr_t
*
vBoxes
=
Vec_PtrAlloc
(
Abc_NtkBoxNum
(
pNtk
)
);
Abc_NtkForEachBox
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachBox
(
pNtk
,
pObj
,
i
)
Vec_PtrPush
(
vBoxes
,
Ptr_ManD
ump
Box
(
pObj
)
);
Vec_PtrPush
(
vBoxes
,
Ptr_ManD
erive
Box
(
pObj
)
);
assert
(
Ptr_ManCheckArray
(
vBoxes
)
);
assert
(
Ptr_ManCheckArray
(
vBoxes
)
);
return
vBoxes
;
return
vBoxes
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Inputs
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Inputs
(
Abc_Ntk_t
*
pNtk
)
{
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_Obj_t
*
pObj
;
int
i
;
Vec_Ptr_t
*
vSigs
=
Vec_PtrAlloc
(
Abc_NtkPiNum
(
pNtk
)
);
Vec_Ptr_t
*
vSigs
=
Vec_PtrAlloc
(
Abc_NtkPiNum
(
pNtk
)
);
...
@@ -226,7 +226,7 @@ Vec_Ptr_t * Ptr_ManDumpInputs( Abc_Ntk_t * pNtk )
...
@@ -226,7 +226,7 @@ Vec_Ptr_t * Ptr_ManDumpInputs( Abc_Ntk_t * pNtk )
assert
(
Ptr_ManCheckArray
(
vSigs
)
);
assert
(
Ptr_ManCheckArray
(
vSigs
)
);
return
vSigs
;
return
vSigs
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Outputs
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Outputs
(
Abc_Ntk_t
*
pNtk
)
{
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_Obj_t
*
pObj
;
int
i
;
Vec_Ptr_t
*
vSigs
=
Vec_PtrAlloc
(
Abc_NtkPoNum
(
pNtk
)
);
Vec_Ptr_t
*
vSigs
=
Vec_PtrAlloc
(
Abc_NtkPoNum
(
pNtk
)
);
...
@@ -235,25 +235,25 @@ Vec_Ptr_t * Ptr_ManDumpOutputs( Abc_Ntk_t * pNtk )
...
@@ -235,25 +235,25 @@ Vec_Ptr_t * Ptr_ManDumpOutputs( Abc_Ntk_t * pNtk )
assert
(
Ptr_ManCheckArray
(
vSigs
)
);
assert
(
Ptr_ManCheckArray
(
vSigs
)
);
return
vSigs
;
return
vSigs
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Ntk
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Ntk
(
Abc_Ntk_t
*
pNtk
)
{
{
Vec_Ptr_t
*
vNtk
=
Vec_PtrAlloc
(
5
);
Vec_Ptr_t
*
vNtk
=
Vec_PtrAlloc
(
5
);
Vec_PtrPush
(
vNtk
,
Abc_NtkName
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Abc_NtkName
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
ump
Inputs
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
erive
Inputs
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
ump
Outputs
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
erive
Outputs
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
ump
Nodes
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
erive
Nodes
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
ump
Boxes
(
pNtk
)
);
Vec_PtrPush
(
vNtk
,
Ptr_ManD
erive
Boxes
(
pNtk
)
);
assert
(
Ptr_ManCheckArray
(
vNtk
)
);
assert
(
Ptr_ManCheckArray
(
vNtk
)
);
return
vNtk
;
return
vNtk
;
}
}
Vec_Ptr_t
*
Ptr_ManD
ump
Des
(
Abc_Ntk_t
*
pNtk
)
Vec_Ptr_t
*
Ptr_ManD
erive
Des
(
Abc_Ntk_t
*
pNtk
)
{
{
Vec_Ptr_t
*
vDes
;
Vec_Ptr_t
*
vDes
;
Abc_Ntk_t
*
pTemp
;
int
i
;
Abc_Ntk_t
*
pTemp
;
int
i
;
vDes
=
Vec_PtrAlloc
(
1
+
Vec_PtrSize
(
pNtk
->
pDesign
->
vModules
)
);
vDes
=
Vec_PtrAlloc
(
1
+
Vec_PtrSize
(
pNtk
->
pDesign
->
vModules
)
);
Vec_PtrPush
(
vDes
,
pNtk
->
pDesign
->
pName
);
Vec_PtrPush
(
vDes
,
pNtk
->
pDesign
->
pName
);
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
pNtk
->
pDesign
->
vModules
,
pTemp
,
i
)
Vec_PtrForEachEntry
(
Abc_Ntk_t
*
,
pNtk
->
pDesign
->
vModules
,
pTemp
,
i
)
Vec_PtrPush
(
vDes
,
Ptr_ManD
ump
Ntk
(
pTemp
)
);
Vec_PtrPush
(
vDes
,
Ptr_ManD
erive
Ntk
(
pTemp
)
);
assert
(
Ptr_ManCheckArray
(
vDes
)
);
assert
(
Ptr_ManCheckArray
(
vDes
)
);
return
vDes
;
return
vDes
;
}
}
...
@@ -269,7 +269,7 @@ Vec_Ptr_t * Ptr_ManDumpDes( Abc_Ntk_t * pNtk )
...
@@ -269,7 +269,7 @@ Vec_Ptr_t * Ptr_ManDumpDes( Abc_Ntk_t * pNtk )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Ptr_ManDumpNode
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNode
)
void
Ptr_ManDumpNodeBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNode
)
{
{
char
*
pName
;
int
i
;
char
*
pName
;
int
i
;
fprintf
(
pFile
,
".names"
);
fprintf
(
pFile
,
".names"
);
...
@@ -278,50 +278,50 @@ void Ptr_ManDumpNodeToBlif( FILE * pFile, Vec_Ptr_t * vNode )
...
@@ -278,50 +278,50 @@ void Ptr_ManDumpNodeToBlif( FILE * pFile, Vec_Ptr_t * vNode )
fprintf
(
pFile
,
" %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNode
,
0
)
);
fprintf
(
pFile
,
" %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNode
,
0
)
);
fprintf
(
pFile
,
"%s"
,
Ptr_TypeToSop
(
(
Ptr_ObjType_t
)
Abc_Ptr2Int
(
Vec_PtrEntry
(
vNode
,
1
))
)
);
fprintf
(
pFile
,
"%s"
,
Ptr_TypeToSop
(
(
Ptr_ObjType_t
)
Abc_Ptr2Int
(
Vec_PtrEntry
(
vNode
,
1
))
)
);
}
}
void
Ptr_ManDumpNodes
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNodes
)
void
Ptr_ManDumpNodesBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNodes
)
{
{
Vec_Ptr_t
*
vNode
;
int
i
;
Vec_Ptr_t
*
vNode
;
int
i
;
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vNodes
,
vNode
,
i
)
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vNodes
,
vNode
,
i
)
Ptr_ManDumpNode
To
Blif
(
pFile
,
vNode
);
Ptr_ManDumpNodeBlif
(
pFile
,
vNode
);
}
}
void
Ptr_ManDumpBox
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBox
)
void
Ptr_ManDumpBoxBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBox
)
{
{
char
*
pName
;
int
i
;
char
*
pName
;
int
i
;
fprintf
(
pFile
,
"%s"
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
0
)
);
fprintf
(
pFile
,
"
.subckt
%s"
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
0
)
);
Vec_PtrForEachEntryStart
(
char
*
,
vBox
,
pName
,
i
,
2
)
Vec_PtrForEachEntryStart
(
char
*
,
vBox
,
pName
,
i
,
2
)
fprintf
(
pFile
,
" %s=%s"
,
pName
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
i
+
1
)
),
i
++
;
fprintf
(
pFile
,
" %s=%s"
,
pName
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
i
+
1
)
),
i
++
;
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
}
}
void
Ptr_ManDumpBoxes
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBoxes
)
void
Ptr_ManDumpBoxesBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBoxes
)
{
{
Vec_Ptr_t
*
vBox
;
int
i
;
Vec_Ptr_t
*
vBox
;
int
i
;
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vBoxes
,
vBox
,
i
)
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vBoxes
,
vBox
,
i
)
Ptr_ManDumpBox
To
Blif
(
pFile
,
vBox
);
Ptr_ManDumpBoxBlif
(
pFile
,
vBox
);
}
}
void
Ptr_ManDumpSignals
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vSigs
,
int
fSkipLastComma
)
void
Ptr_ManDumpSignalsBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vSigs
,
int
fSkipLastComma
)
{
{
char
*
pSig
;
int
i
;
char
*
pSig
;
int
i
;
Vec_PtrForEachEntry
(
char
*
,
vSigs
,
pSig
,
i
)
Vec_PtrForEachEntry
(
char
*
,
vSigs
,
pSig
,
i
)
fprintf
(
pFile
,
" %s"
,
pSig
);
fprintf
(
pFile
,
" %s"
,
pSig
);
}
}
void
Ptr_ManDumpModule
To
Blif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNtk
)
void
Ptr_ManDumpModuleBlif
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNtk
)
{
{
fprintf
(
pFile
,
".model %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNtk
,
0
)
);
fprintf
(
pFile
,
".model %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNtk
,
0
)
);
fprintf
(
pFile
,
".inputs"
);
fprintf
(
pFile
,
".inputs"
);
Ptr_ManDumpSignals
To
Blif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
0
);
Ptr_ManDumpSignalsBlif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
0
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
".outputs"
);
fprintf
(
pFile
,
".outputs"
);
Ptr_ManDumpSignals
To
Blif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
Ptr_ManDumpSignalsBlif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
fprintf
(
pFile
,
"
\n\n
"
);
fprintf
(
pFile
,
"
\n\n
"
);
Ptr_ManDumpNodes
To
Blif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
3
)
);
Ptr_ManDumpNodesBlif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
3
)
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
Ptr_ManDumpBoxes
To
Blif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
4
)
);
Ptr_ManDumpBoxesBlif
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
4
)
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
".end
\n\n
"
);
fprintf
(
pFile
,
".end
\n\n
"
);
}
}
void
Ptr_ManDump
To
Blif
(
char
*
pFileName
,
Vec_Ptr_t
*
vDes
)
void
Ptr_ManDumpBlif
(
char
*
pFileName
,
Vec_Ptr_t
*
vDes
)
{
{
FILE
*
pFile
;
FILE
*
pFile
;
Vec_Ptr_t
*
vNtk
;
int
i
;
Vec_Ptr_t
*
vNtk
;
int
i
;
...
@@ -333,7 +333,7 @@ void Ptr_ManDumpToBlif( char * pFileName, Vec_Ptr_t * vDes )
...
@@ -333,7 +333,7 @@ void Ptr_ManDumpToBlif( char * pFileName, Vec_Ptr_t * vDes )
}
}
fprintf
(
pFile
,
"// Design
\"
%s
\"
written by ABC on %s
\n\n
"
,
(
char
*
)
Vec_PtrEntry
(
vDes
,
0
),
Extra_TimeStamp
()
);
fprintf
(
pFile
,
"// Design
\"
%s
\"
written by ABC on %s
\n\n
"
,
(
char
*
)
Vec_PtrEntry
(
vDes
,
0
),
Extra_TimeStamp
()
);
Vec_PtrForEachEntryStart
(
Vec_Ptr_t
*
,
vDes
,
vNtk
,
i
,
1
)
Vec_PtrForEachEntryStart
(
Vec_Ptr_t
*
,
vDes
,
vNtk
,
i
,
1
)
Ptr_ManDumpModule
To
Blif
(
pFile
,
vNtk
);
Ptr_ManDumpModuleBlif
(
pFile
,
vNtk
);
fclose
(
pFile
);
fclose
(
pFile
);
}
}
...
@@ -348,7 +348,7 @@ void Ptr_ManDumpToBlif( char * pFileName, Vec_Ptr_t * vDes )
...
@@ -348,7 +348,7 @@ void Ptr_ManDumpToBlif( char * pFileName, Vec_Ptr_t * vDes )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
void
Ptr_ManDumpNode
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNode
)
void
Ptr_ManDumpNode
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNode
)
{
{
char
*
pName
;
int
i
;
char
*
pName
;
int
i
;
fprintf
(
pFile
,
"%s"
,
Ptr_TypeToName
(
(
Ptr_ObjType_t
)
Abc_Ptr2Int
(
Vec_PtrEntry
(
vNode
,
1
))
)
);
fprintf
(
pFile
,
"%s"
,
Ptr_TypeToName
(
(
Ptr_ObjType_t
)
Abc_Ptr2Int
(
Vec_PtrEntry
(
vNode
,
1
))
)
);
...
@@ -357,14 +357,14 @@ void Ptr_ManDumpNodeToFile( FILE * pFile, Vec_Ptr_t * vNode )
...
@@ -357,14 +357,14 @@ void Ptr_ManDumpNodeToFile( FILE * pFile, Vec_Ptr_t * vNode )
fprintf
(
pFile
,
", %s"
,
pName
);
fprintf
(
pFile
,
", %s"
,
pName
);
fprintf
(
pFile
,
" );
\n
"
);
fprintf
(
pFile
,
" );
\n
"
);
}
}
void
Ptr_ManDumpNodes
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNodes
)
void
Ptr_ManDumpNodes
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNodes
)
{
{
Vec_Ptr_t
*
vNode
;
int
i
;
Vec_Ptr_t
*
vNode
;
int
i
;
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vNodes
,
vNode
,
i
)
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vNodes
,
vNode
,
i
)
Ptr_ManDumpNode
ToFile
(
pFile
,
vNode
);
Ptr_ManDumpNode
Verilog
(
pFile
,
vNode
);
}
}
void
Ptr_ManDumpBox
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBox
)
void
Ptr_ManDumpBox
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBox
)
{
{
char
*
pName
;
int
i
;
char
*
pName
;
int
i
;
fprintf
(
pFile
,
"%s %s ("
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
0
),
(
char
*
)
Vec_PtrEntry
(
vBox
,
1
)
);
fprintf
(
pFile
,
"%s %s ("
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
0
),
(
char
*
)
Vec_PtrEntry
(
vBox
,
1
)
);
...
@@ -372,37 +372,37 @@ void Ptr_ManDumpBoxToFile( FILE * pFile, Vec_Ptr_t * vBox )
...
@@ -372,37 +372,37 @@ void Ptr_ManDumpBoxToFile( FILE * pFile, Vec_Ptr_t * vBox )
fprintf
(
pFile
,
" .%s(%s)%s"
,
pName
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
i
+
1
),
i
>=
Vec_PtrSize
(
vBox
)
-
2
?
""
:
","
),
i
++
;
fprintf
(
pFile
,
" .%s(%s)%s"
,
pName
,
(
char
*
)
Vec_PtrEntry
(
vBox
,
i
+
1
),
i
>=
Vec_PtrSize
(
vBox
)
-
2
?
""
:
","
),
i
++
;
fprintf
(
pFile
,
" );
\n
"
);
fprintf
(
pFile
,
" );
\n
"
);
}
}
void
Ptr_ManDumpBoxes
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBoxes
)
void
Ptr_ManDumpBoxes
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vBoxes
)
{
{
Vec_Ptr_t
*
vBox
;
int
i
;
Vec_Ptr_t
*
vBox
;
int
i
;
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vBoxes
,
vBox
,
i
)
Vec_PtrForEachEntry
(
Vec_Ptr_t
*
,
vBoxes
,
vBox
,
i
)
Ptr_ManDumpBox
ToFile
(
pFile
,
vBox
);
Ptr_ManDumpBox
Verilog
(
pFile
,
vBox
);
}
}
void
Ptr_ManDumpSignals
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vSigs
,
int
fSkipLastComma
)
void
Ptr_ManDumpSignals
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vSigs
,
int
fSkipLastComma
)
{
{
char
*
pSig
;
int
i
;
char
*
pSig
;
int
i
;
Vec_PtrForEachEntry
(
char
*
,
vSigs
,
pSig
,
i
)
Vec_PtrForEachEntry
(
char
*
,
vSigs
,
pSig
,
i
)
fprintf
(
pFile
,
" %s%s"
,
pSig
,
(
fSkipLastComma
&&
i
==
Vec_PtrSize
(
vSigs
)
-
1
)
?
""
:
","
);
fprintf
(
pFile
,
" %s%s"
,
pSig
,
(
fSkipLastComma
&&
i
==
Vec_PtrSize
(
vSigs
)
-
1
)
?
""
:
","
);
}
}
void
Ptr_ManDumpModule
ToFile
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNtk
)
void
Ptr_ManDumpModule
Verilog
(
FILE
*
pFile
,
Vec_Ptr_t
*
vNtk
)
{
{
fprintf
(
pFile
,
"module %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNtk
,
0
)
);
fprintf
(
pFile
,
"module %s
\n
"
,
(
char
*
)
Vec_PtrEntry
(
vNtk
,
0
)
);
fprintf
(
pFile
,
"(
\n
"
);
fprintf
(
pFile
,
"(
\n
"
);
Ptr_ManDumpSignals
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
0
);
Ptr_ManDumpSignals
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
0
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
Ptr_ManDumpSignals
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
Ptr_ManDumpSignals
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
fprintf
(
pFile
,
"
\n
);
\n
input"
);
fprintf
(
pFile
,
"
\n
);
\n
input"
);
Ptr_ManDumpSignals
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
1
);
Ptr_ManDumpSignals
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
1
),
1
);
fprintf
(
pFile
,
";
\n
output"
);
fprintf
(
pFile
,
";
\n
output"
);
Ptr_ManDumpSignals
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
Ptr_ManDumpSignals
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
2
),
1
);
fprintf
(
pFile
,
";
\n\n
"
);
fprintf
(
pFile
,
";
\n\n
"
);
Ptr_ManDumpNodes
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
3
)
);
Ptr_ManDumpNodes
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
3
)
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
Ptr_ManDumpBoxes
ToFile
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
4
)
);
Ptr_ManDumpBoxes
Verilog
(
pFile
,
(
Vec_Ptr_t
*
)
Vec_PtrEntry
(
vNtk
,
4
)
);
fprintf
(
pFile
,
"endmodule
\n\n
"
);
fprintf
(
pFile
,
"endmodule
\n\n
"
);
}
}
void
Ptr_ManDump
ToFile
(
char
*
pFileName
,
Vec_Ptr_t
*
vDes
)
void
Ptr_ManDump
Verilog
(
char
*
pFileName
,
Vec_Ptr_t
*
vDes
)
{
{
FILE
*
pFile
;
FILE
*
pFile
;
Vec_Ptr_t
*
vNtk
;
int
i
;
Vec_Ptr_t
*
vNtk
;
int
i
;
...
@@ -414,7 +414,7 @@ void Ptr_ManDumpToFile( char * pFileName, Vec_Ptr_t * vDes )
...
@@ -414,7 +414,7 @@ void Ptr_ManDumpToFile( char * pFileName, Vec_Ptr_t * vDes )
}
}
fprintf
(
pFile
,
"// Design
\"
%s
\"
written by ABC on %s
\n\n
"
,
(
char
*
)
Vec_PtrEntry
(
vDes
,
0
),
Extra_TimeStamp
()
);
fprintf
(
pFile
,
"// Design
\"
%s
\"
written by ABC on %s
\n\n
"
,
(
char
*
)
Vec_PtrEntry
(
vDes
,
0
),
Extra_TimeStamp
()
);
Vec_PtrForEachEntryStart
(
Vec_Ptr_t
*
,
vDes
,
vNtk
,
i
,
1
)
Vec_PtrForEachEntryStart
(
Vec_Ptr_t
*
,
vDes
,
vNtk
,
i
,
1
)
Ptr_ManDumpModule
ToFile
(
pFile
,
vNtk
);
Ptr_ManDumpModule
Verilog
(
pFile
,
vNtk
);
fclose
(
pFile
);
fclose
(
pFile
);
}
}
...
@@ -499,14 +499,14 @@ void Ptr_ManFreeDes( Vec_Ptr_t * vDes )
...
@@ -499,14 +499,14 @@ void Ptr_ManFreeDes( Vec_Ptr_t * vDes )
void
Ptr_ManExperiment
(
Abc_Ntk_t
*
pNtk
)
void
Ptr_ManExperiment
(
Abc_Ntk_t
*
pNtk
)
{
{
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
Vec_Ptr_t
*
vDes
=
Ptr_ManDumpDes
(
pNtk
);
char
*
pFileName
=
Extra_FileNameGenericAppend
(
pNtk
->
pDesign
->
pName
,
"_out.blif"
);
Vec_Ptr_t
*
vDes
=
Ptr_ManDeriveDes
(
pNtk
);
printf
(
"Converting to Ptr: Memory = %6.3f MB "
,
1
.
0
*
Ptr_ManMemDes
(
vDes
)
/
(
1
<<
20
)
);
printf
(
"Converting to Ptr: Memory = %6.3f MB "
,
1
.
0
*
Ptr_ManMemDes
(
vDes
)
/
(
1
<<
20
)
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Ptr_ManDump
ToFile
(
Extra_FileNameGenericAppend
(
pNtk
->
pDesign
->
pName
,
"_out.v"
)
,
vDes
);
Ptr_ManDump
Blif
(
pFileName
,
vDes
);
printf
(
"Finished writing output file
\"
%s
\"
.
\n
"
,
Extra_FileNameGenericAppend
(
pNtk
->
pDesign
->
pName
,
"_out.v"
)
);
printf
(
"Finished writing output file
\"
%s
\"
.
"
,
pFileName
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Ptr_ManFreeDes
(
vDes
);
Ptr_ManFreeDes
(
vDes
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
}
}
...
...
src/sat/bmc/bmcChain.c
View file @
63ce84d8
...
@@ -212,7 +212,7 @@ Vec_Int_t * Bmc_ChainFindFailedOutputs( Gia_Man_t * p, Vec_Ptr_t * vCexes )
...
@@ -212,7 +212,7 @@ Vec_Int_t * Bmc_ChainFindFailedOutputs( Gia_Man_t * p, Vec_Ptr_t * vCexes )
Gia_Man_t
*
pInit
;
Gia_Man_t
*
pInit
;
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
sat_solver
*
pSat
;
sat_solver
*
pSat
;
int
i
,
j
,
k
=
0
,
Lit
,
status
=
0
;
int
i
,
j
,
Lit
,
status
=
0
;
// derive output logic cones
// derive output logic cones
pInit
=
Gia_ManDupPosAndPropagateInit
(
p
);
pInit
=
Gia_ManDupPosAndPropagateInit
(
p
);
// derive SAT solver and test
// derive SAT solver and test
...
...
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