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
7630f2bd
Commit
7630f2bd
authored
Jul 18, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temprary changes.
parent
a3559996
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
src/map/if/ifDec16.c
+49
-0
No files found.
src/map/if/ifDec16.c
View file @
7630f2bd
...
...
@@ -20,6 +20,7 @@
#include "if.h"
#include "bool/kit/kit.h"
#include "misc/vec/vecMem.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -77,6 +78,9 @@ extern void Extra_PrintBinary( FILE * pFile, unsigned Sign[], int nBits );
extern
int
If_CluSupportSize
(
word
*
t
,
int
nVars
);
int
s_Count2
=
0
;
int
s_Count3
=
0
;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
@@ -1613,6 +1617,8 @@ If_Grp_t If_CluCheck( If_Man_t * p, word * pTruth0, int nVars, int iVarStart, in
if
(
G1
.
nVars
==
0
)
{
s_Count2
++
;
// detect easy cofs
if
(
iVarStart
==
0
)
G1
=
If_CluDecUsingCofs
(
pTruth
,
nVars
,
nLutLeaf
);
...
...
@@ -1769,6 +1775,7 @@ If_Grp_t If_CluCheck3( If_Man_t * p, word * pTruth0, int nVars, int nLutLeaf, in
return
G1
;
}
}
s_Count3
++
;
// check two-node decomposition
G1
=
If_CluCheck
(
p
,
pTruth0
,
nVars
,
0
,
nLutLeaf
,
nLutRoot
+
nLutLeaf2
-
1
,
&
R2
,
&
Func0
,
&
Func1
,
pLeftOver
,
0
);
...
...
@@ -2024,6 +2031,16 @@ float If_CutDelayLutStruct( If_Man_t * p, If_Cut_t * pCut, char * pStr, float Wi
return
1
.
0
+
If_CluDelayMax
(
&
G3
,
Delays
);
}
//#define IF_TRY_NEW
#ifdef IF_TRY_NEW
static
Vec_Mem_t
*
s_vTtMem
=
NULL
;
static
Vec_Mem_t
*
s_vTtMem2
=
NULL
;
int
If_TtMemCutNum
()
{
return
Vec_MemEntryNum
(
s_vTtMem
);
}
int
If_TtMemCutNum2
()
{
return
Vec_MemEntryNum
(
s_vTtMem2
);
}
// printf( "Unique TTs = %d. Unique classes = %d. ", If_TtMemCutNum(), If_TtMemCutNum2() );
// printf( "Check2 = %d. Check3 = %d.\n", s_Count2, s_Count3 );
#endif
/**Function*************************************************************
...
...
@@ -2040,6 +2057,38 @@ int If_CutPerformCheck16( If_Man_t * p, unsigned * pTruth, int nVars, int nLeave
{
If_Grp_t
G1
=
{
0
};
//, G3 = {0};
int
i
,
nLutLeaf
,
nLutLeaf2
,
nLutRoot
,
Length
;
#ifdef IF_TRY_NEW
{
word
pCopy
[
1024
];
int
nWords
=
Abc_TruthWordNum
(
nVars
);
int
iNum
;
if
(
s_vTtMem
==
NULL
)
{
s_vTtMem
=
Vec_MemAlloc
(
Abc_Truth6WordNum
(
nVars
),
12
);
// 32 KB/page for 6-var functions
Vec_MemHashAlloc
(
s_vTtMem
,
10000
);
}
if
(
s_vTtMem2
==
NULL
)
{
s_vTtMem2
=
Vec_MemAlloc
(
Abc_Truth6WordNum
(
nVars
),
12
);
// 32 KB/page for 6-var functions
Vec_MemHashAlloc
(
s_vTtMem2
,
10000
);
}
memcpy
(
pCopy
,
pTruth
,
sizeof
(
word
)
*
Abc_Truth6WordNum
(
nVars
)
);
if
(
pCopy
[
0
]
&
1
)
for
(
i
=
0
;
i
<
nWords
;
i
++
)
pCopy
[
i
]
=
~
pCopy
[
i
];
iNum
=
Vec_MemHashInsert
(
s_vTtMem
,
pCopy
);
if
(
iNum
==
Vec_MemEntryNum
(
s_vTtMem
)
-
1
)
{
int
pCanonPerm
[
16
];
char
pCanonPermC
[
16
];
Abc_TtCanonicize
(
pCopy
,
nVars
,
pCanonPermC
);
// If_CluSemiCanonicize( pCopy, nVars, pCanonPerm );
Vec_MemHashInsert
(
s_vTtMem2
,
pCopy
);
}
}
#endif
// if cutmin is disabled, minimize the cut
if
(
!
p
->
pPars
->
fCutMin
&&
If_CluSupportSize
((
word
*
)
pTruth
,
nVars
)
<
nLeaves
)
{
...
...
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