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
5a20a27c
Commit
5a20a27c
authored
Apr 02, 2020
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend ISOP to return the truth table.
parent
65dce2fa
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
abclib.dsp
+0
-4
src/bool/kit/kit.h
+1
-1
src/bool/kit/kitGraph.c
+1
-1
src/bool/kit/kitIsop.c
+10
-1
No files found.
abclib.dsp
View file @
5a20a27c
...
...
@@ -5227,10 +5227,6 @@ SOURCE=.\src\bool\kit\kit.h
# End Source File
# Begin Source File
SOURCE=.\src\bool\kit\kit_.c
# End Source File
# Begin Source File
SOURCE=.\src\bool\kit\kitAig.c
# End Source File
# Begin Source File
...
...
src/bool/kit/kit.h
View file @
5a20a27c
...
...
@@ -575,7 +575,7 @@ extern int Kit_GraphLeafDepth_rec( Kit_Graph_t * pGraph, Kit_Node_t
//extern Hop_Obj_t * Kit_CoverToHop( Hop_Man_t * pMan, Vec_Int_t * vCover, int nVars, Vec_Int_t * vMemory );
/*=== kitIsop.c ==========================================================*/
extern
int
Kit_TruthIsop
(
unsigned
*
puTruth
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
);
extern
int
Kit_TruthIsop2
(
unsigned
*
puTruth0
,
unsigned
*
puTruth1
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
);
extern
int
Kit_TruthIsop2
(
unsigned
*
puTruth0
,
unsigned
*
puTruth1
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
,
int
fReturnTt
);
extern
void
Kit_TruthIsopPrint
(
unsigned
*
puTruth
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
);
extern
void
Kit_TruthIsopPrintCover
(
Vec_Int_t
*
vCover
,
int
nVars
,
int
fCompl
);
/*=== kitPla.c ==========================================================*/
...
...
src/bool/kit/kitGraph.c
View file @
5a20a27c
...
...
@@ -385,7 +385,7 @@ Kit_Graph_t * Kit_TruthToGraph2( unsigned * pTruth0, unsigned * pTruth1, int nVa
Kit_Graph_t
*
pGraph
;
int
RetValue
;
// derive SOP
RetValue
=
Kit_TruthIsop2
(
pTruth0
,
pTruth1
,
nVars
,
vMemory
,
1
);
// tried 1 and found not useful in "renode"
RetValue
=
Kit_TruthIsop2
(
pTruth0
,
pTruth1
,
nVars
,
vMemory
,
1
,
0
);
// tried 1 and found not useful in "renode"
if
(
RetValue
==
-
1
)
return
NULL
;
if
(
Vec_IntSize
(
vMemory
)
>
(
1
<<
16
)
)
...
...
src/bool/kit/kitIsop.c
View file @
5a20a27c
...
...
@@ -52,7 +52,7 @@ static unsigned Kit_TruthIsop5_rec( unsigned uOn, unsigned uOnDc, int nVars, K
SeeAlso []
***********************************************************************/
int
Kit_TruthIsop2
(
unsigned
*
puTruth0
,
unsigned
*
puTruth1
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
)
int
Kit_TruthIsop2
(
unsigned
*
puTruth0
,
unsigned
*
puTruth1
,
int
nVars
,
Vec_Int_t
*
vMemory
,
int
fTryBoth
,
int
fReturnTt
)
{
Kit_Sop_t
cRes
,
*
pcRes
=
&
cRes
;
Kit_Sop_t
cRes2
,
*
pcRes2
=
&
cRes2
;
...
...
@@ -102,8 +102,17 @@ int Kit_TruthIsop2( unsigned * puTruth0, unsigned * puTruth1, int nVars, Vec_Int
}
// printf( "%d ", vMemory->nSize );
// move the cover representation to the beginning of the memory buffer
if
(
fReturnTt
)
{
int
nWords
=
Kit_TruthWordNum
(
nVars
);
memmove
(
vMemory
->
pArray
,
pResult
,
nWords
*
sizeof
(
unsigned
)
);
Vec_IntShrink
(
vMemory
,
nWords
);
}
else
{
memmove
(
vMemory
->
pArray
,
pcRes
->
pCubes
,
pcRes
->
nCubes
*
sizeof
(
unsigned
)
);
Vec_IntShrink
(
vMemory
,
pcRes
->
nCubes
);
}
return
RetValue
;
}
...
...
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