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
81b263e3
Commit
81b263e3
authored
Jan 18, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the problem with outputting word-level CEXes after retiming.
parent
4d8c72d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
12 deletions
+28
-12
src/base/io/io.c
+28
-12
No files found.
src/base/io/io.c
View file @
81b263e3
...
@@ -2475,24 +2475,40 @@ int IoCommandWriteCex( Abc_Frame_t * pAbc, int argc, char **argv )
...
@@ -2475,24 +2475,40 @@ int IoCommandWriteCex( Abc_Frame_t * pAbc, int argc, char **argv )
}
}
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"
\n
"
);
fprintf
(
pFile
,
"# COUNTEREXAMPLE LENGTH: %u
\n
"
,
pCex
->
iFrame
+
1
);
fprintf
(
pFile
,
"# COUNTEREXAMPLE LENGTH: %u
\n
"
,
pCex
->
iFrame
+
1
);
// output flop values (unaffected by the minimization)
if
(
(
vNamesIn
=
Abc_FrameReadCexCiNames
(
pAbc
))
!=
NULL
)
if
(
(
vNamesIn
=
Abc_FrameReadCexCiNames
(
pAbc
))
!=
NULL
)
{
// output flop values (unaffected by the minimization)
Vec_PtrForEachEntryStart
(
char
*
,
vNamesIn
,
pObjName
,
i
,
Abc_NtkPiNum
(
pNtk
)
)
Vec_PtrForEachEntryStart
(
char
*
,
vNamesIn
,
pObjName
,
i
,
Abc_NtkPiNum
(
pNtk
)
)
IoCommandPrintLatchName
(
pFile
,
pNtk
,
NULL
,
pObjName
,
pCex
,
pCare
);
IoCommandPrintLatchName
(
pFile
,
pNtk
,
NULL
,
pObjName
,
pCex
,
pCare
);
// output PI values (while skipping the minimized ones)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
Vec_PtrForEachEntryStop
(
char
*
,
vNamesIn
,
pObjName
,
i
,
Abc_NtkPiNum
(
pNtk
)
)
{
// skip names with "_init" in the end
int
NameLen
=
strlen
(
pObjName
);
if
(
NameLen
>
5
&&
!
strncmp
(
pObjName
+
NameLen
-
5
,
"_init"
,
5
)
)
continue
;
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
nPis
*
f
+
i
)
)
fprintf
(
pFile
,
"%s@%d=%c
\n
"
,
pObjName
,
f
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
}
}
else
else
{
// output flop values (unaffected by the minimization)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
IoCommandPrintLatchName
(
pFile
,
pNtk
,
pObj
,
Abc_ObjName
(
Abc_ObjFanout0
(
pObj
)),
pCex
,
pCare
);
IoCommandPrintLatchName
(
pFile
,
pNtk
,
pObj
,
Abc_ObjName
(
Abc_ObjFanout0
(
pObj
)),
pCex
,
pCare
);
// output PI values (while skipping the minimized ones)
// output PI values (while skipping the minimized ones)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
for
(
f
=
0
;
f
<=
pCex
->
iFrame
;
f
++
)
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
{
{
// skip names with "_init" in the end
// skip names with "_init" in the end
int
NameLen
=
strlen
(
Abc_ObjName
(
pObj
));
int
NameLen
=
strlen
(
Abc_ObjName
(
pObj
));
if
(
NameLen
>
5
&&
!
strncmp
(
Abc_ObjName
(
pObj
)
+
NameLen
-
5
,
"_init"
,
5
)
)
if
(
NameLen
>
5
&&
!
strncmp
(
Abc_ObjName
(
pObj
)
+
NameLen
-
5
,
"_init"
,
5
)
)
continue
;
continue
;
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
nPis
*
f
+
i
)
)
if
(
!
pCare
||
Abc_InfoHasBit
(
pCare
->
pData
,
pCare
->
nRegs
+
pCare
->
nPis
*
f
+
i
)
)
fprintf
(
pFile
,
"%s@%d=%c
\n
"
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
fprintf
(
pFile
,
"%s@%d=%c
\n
"
,
Abc_ObjName
(
pObj
),
f
,
'0'
+
Abc_InfoHasBit
(
pCex
->
pData
,
pCex
->
nRegs
+
pCex
->
nPis
*
f
+
i
)
);
}
}
}
Abc_CexFreeP
(
&
pCare
);
Abc_CexFreeP
(
&
pCare
);
}
}
else
else
...
...
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