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
693b587c
Commit
693b587c
authored
Aug 08, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding truth table occurrence counters for 'if -c'.
parent
713976f2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
src/map/if/if.h
+1
-0
src/map/if/ifMan.c
+8
-0
src/map/if/ifTruth.c
+5
-0
No files found.
src/map/if/if.h
View file @
693b587c
...
...
@@ -253,6 +253,7 @@ struct If_Man_t_
Vec_Str_t
*
vTtPerms
[
IF_MAX_FUNC_LUTSIZE
+
1
];
// mapping of truth table into permutations
Vec_Str_t
*
vTtVars
[
IF_MAX_FUNC_LUTSIZE
+
1
];
// mapping of truth table into selected vars
Vec_Int_t
*
vTtDecs
[
IF_MAX_FUNC_LUTSIZE
+
1
];
// mapping of truth table into decomposition pattern
Vec_Int_t
*
vTtOccurs
[
IF_MAX_FUNC_LUTSIZE
+
1
];
// truth table occurange counters
Hash_IntMan_t
*
vPairHash
;
// hashing pairs of truth tables
Vec_Int_t
*
vPairRes
;
// resulting truth table
Vec_Str_t
*
vPairPerms
;
// resulting permutation
...
...
src/map/if/ifMan.c
View file @
693b587c
...
...
@@ -125,6 +125,12 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
Vec_StrFill
(
p
->
vPairPerms
,
p
->
pPars
->
nLutSize
,
0
);
p
->
vPairRes
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vPairRes
,
-
1
);
for
(
v
=
6
;
v
<=
Abc_MaxInt
(
6
,
p
->
pPars
->
nLutSize
);
v
++
)
p
->
vTtOccurs
[
v
]
=
Vec_IntAlloc
(
1000
);
for
(
v
=
0
;
v
<
6
;
v
++
)
p
->
vTtOccurs
[
v
]
=
p
->
vTtOccurs
[
6
];
for
(
v
=
6
;
v
<=
Abc_MaxInt
(
6
,
p
->
pPars
->
nLutSize
);
v
++
)
Vec_IntPushTwo
(
p
->
vTtOccurs
[
v
],
0
,
0
);
}
if
(
pPars
->
fUseCofVars
)
{
...
...
@@ -274,6 +280,8 @@ void If_ManStop( If_Man_t * p )
Vec_MemFreeP
(
&
p
->
vTtMem
[
i
]
);
for
(
i
=
6
;
i
<=
Abc_MaxInt
(
6
,
p
->
pPars
->
nLutSize
);
i
++
)
Vec_WecFreeP
(
&
p
->
vTtIsops
[
i
]
);
for
(
i
=
6
;
i
<=
Abc_MaxInt
(
6
,
p
->
pPars
->
nLutSize
);
i
++
)
Vec_IntFreeP
(
&
p
->
vTtOccurs
[
i
]
);
Mem_FixedStop
(
p
->
pMemObj
,
0
);
ABC_FREE
(
p
->
pMemCi
);
ABC_FREE
(
p
->
pMemAnd
);
...
...
src/map/if/ifTruth.c
View file @
693b587c
...
...
@@ -244,10 +244,15 @@ p->timeCache[3] += Abc_Clock() - clk;
else
assert
(
pCut
->
uSign
==
If_ObjCutSignCompute
(
pCut
)
);
assert
(
Vec_IntSize
(
p
->
vTtOccurs
[
pCut
->
nLeaves
])
==
Vec_MemEntryNum
(
p
->
vTtMem
[
pCut
->
nLeaves
])
);
// hash function
fCompl
=
((
p
->
uCanonPhase
>>
pCut
->
nLeaves
)
&
1
);
truthId
=
Vec_MemHashInsert
(
p
->
vTtMem
[
pCut
->
nLeaves
],
pTruth
);
pCut
->
iCutFunc
=
Abc_Var2Lit
(
truthId
,
fCompl
);
// count how many time this truth table is used
if
(
Vec_IntSize
(
p
->
vTtOccurs
[
pCut
->
nLeaves
])
<
Vec_MemEntryNum
(
p
->
vTtMem
[
pCut
->
nLeaves
])
)
Vec_IntPush
(
p
->
vTtOccurs
[
pCut
->
nLeaves
],
0
);
Vec_IntAddToEntry
(
p
->
vTtOccurs
[
pCut
->
nLeaves
],
truthId
,
1
);
if
(
fVerbose
)
{
...
...
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