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
7e0f7eba
Commit
7e0f7eba
authored
Feb 19, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to LUT mappers.
parent
6ad7dae1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
31 deletions
+9
-31
src/aig/gia/giaJf.c
+2
-23
src/map/if/if.h
+1
-0
src/map/if/ifDsd.c
+0
-0
src/map/if/ifMan.c
+0
-3
src/misc/vec/vecMem.h
+6
-5
No files found.
src/aig/gia/giaJf.c
View file @
7e0f7eba
...
...
@@ -371,16 +371,7 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars )
p
->
pGia
=
pGia
;
p
->
pPars
=
pPars
;
if
(
pPars
->
fCutMin
&&
!
pPars
->
fFuncDsd
)
{
word
uTruth
[
JF_WORD_MAX
];
int
Value
,
nWords
=
Abc_Truth6WordNum
(
pPars
->
nLutSize
);
p
->
vTtMem
=
Vec_MemAlloc
(
nWords
,
12
);
// 32 KB/page for 6-var functions
Vec_MemHashAlloc
(
p
->
vTtMem
,
10000
);
memset
(
uTruth
,
0x00
,
sizeof
(
word
)
*
nWords
);
Value
=
Vec_MemHashInsert
(
p
->
vTtMem
,
uTruth
);
assert
(
Value
==
0
);
memset
(
uTruth
,
0xAA
,
sizeof
(
word
)
*
nWords
);
Value
=
Vec_MemHashInsert
(
p
->
vTtMem
,
uTruth
);
assert
(
Value
==
1
);
}
p
->
vTtMem
=
Vec_MemAllocForTT
(
pPars
->
nLutSize
);
else
if
(
pPars
->
fCutMin
&&
pPars
->
fFuncDsd
)
{
p
->
pDsd
=
Sdm_ManRead
();
...
...
@@ -401,18 +392,6 @@ Jf_Man_t * Jf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars )
p
->
clkStart
=
Abc_Clock
();
return
p
;
}
void
Jf_ManDumpTruthTables
(
Jf_Man_t
*
p
)
{
char
pFileName
[
1000
];
FILE
*
pFile
;
sprintf
(
pFileName
,
"tt_%s_%02d.txt"
,
Gia_ManName
(
p
->
pGia
),
p
->
pPars
->
nLutSize
);
pFile
=
fopen
(
pFileName
,
"wb"
);
Vec_MemDump
(
pFile
,
p
->
vTtMem
);
fclose
(
pFile
);
printf
(
"Dumped %d %d-var truth tables into file
\"
%s
\"
(%.2f MB).
\n
"
,
Vec_MemEntryNum
(
p
->
vTtMem
),
p
->
pPars
->
nLutSize
,
pFileName
,
17
.
0
*
Vec_MemEntryNum
(
p
->
vTtMem
)
/
(
1
<<
20
)
);
}
void
Jf_ManFree
(
Jf_Man_t
*
p
)
{
if
(
p
->
pPars
->
fVerbose
&&
p
->
pDsd
)
...
...
@@ -1748,7 +1727,7 @@ Gia_Man_t * Jf_ManPerformMapping( Gia_Man_t * pGia, Jf_Par_t * pPars )
Jf_ManPropagateEla
(
p
,
1
);
Jf_ManPrintStats
(
p
,
"Edge "
);
}
if
(
p
->
pPars
->
fVeryVerbose
&&
p
->
pPars
->
fCutMin
&&
!
p
->
pPars
->
fFuncDsd
)
Jf_ManDumpTruthTables
(
p
);
Vec_MemDumpTruthTables
(
p
->
vTtMem
,
Gia_ManName
(
p
->
pGia
),
p
->
pPars
->
nLutSize
);
if
(
p
->
pPars
->
fPureAig
)
pNew
=
Jf_ManDeriveGia
(
p
);
else
if
(
p
->
pPars
->
fCutMin
)
...
...
src/map/if/if.h
View file @
7e0f7eba
...
...
@@ -515,6 +515,7 @@ extern int If_CluCheckExt3( void * p, word * pTruth, int nVars, int
char
*
pLut0
,
char
*
pLut1
,
char
*
pLut2
,
word
*
pFunc0
,
word
*
pFunc1
,
word
*
pFunc2
);
/*=== ifDsd.c =============================================================*/
extern
If_DsdMan_t
*
If_DsdManAlloc
(
int
nLutSize
);
extern
void
If_DsdManDump
(
If_DsdMan_t
*
p
);
extern
void
If_DsdManPrint
(
If_DsdMan_t
*
p
,
char
*
pFileName
);
extern
void
If_DsdManFree
(
If_DsdMan_t
*
p
);
extern
int
If_DsdManCompute
(
If_DsdMan_t
*
p
,
word
*
pTruth
,
int
nLeaves
,
unsigned
char
*
pPerm
);
...
...
src/map/if/ifDsd.c
View file @
7e0f7eba
This diff is collapsed.
Click to expand it.
src/map/if/ifMan.c
View file @
7e0f7eba
...
...
@@ -153,10 +153,7 @@ void If_ManStop( If_Man_t * p )
if
(
p
->
pPars
->
fVerbose
&&
p
->
nCuts5
)
Abc_Print
(
1
,
"Statistics about 5-cuts: Total = %d Non-decomposable = %d (%.2f %%)
\n
"
,
p
->
nCuts5
,
p
->
nCuts5
-
p
->
nCuts5a
,
100
.
0
*
(
p
->
nCuts5
-
p
->
nCuts5a
)
/
p
->
nCuts5
);
if
(
p
->
pPars
->
fUseDsd
)
{
If_DsdManPrint
(
p
->
pIfDsdMan
,
NULL
);
If_DsdManFree
(
p
->
pIfDsdMan
);
}
// Abc_PrintTime( 1, "Truth", p->timeTruth );
// Abc_Print( 1, "Small support = %d.\n", p->nSmallSupp );
Vec_IntFreeP
(
&
p
->
vCoAttrs
);
...
...
src/misc/vec/vecMem.h
View file @
7e0f7eba
...
...
@@ -281,7 +281,7 @@ static inline void Vec_MemDump( FILE * pFile, Vec_Mem_t * pVec )
word
*
pEntry
;
int
i
,
w
,
d
;
if
(
pFile
==
stdout
)
printf
(
"Memory vector has %d entries: "
,
Vec_MemEntryNum
(
pVec
)
);
printf
(
"Memory vector has %d entries:
\n
"
,
Vec_MemEntryNum
(
pVec
)
);
Vec_MemForEachEntry
(
pVec
,
pEntry
,
i
)
{
for
(
w
=
pVec
->
nEntrySize
-
1
;
w
>=
0
;
w
--
)
...
...
@@ -392,12 +392,13 @@ static inline void Vec_MemDumpTruthTables( Vec_Mem_t * p, char * pName, int nLut
{
FILE
*
pFile
;
char
pFileName
[
1000
];
sprintf
(
pFileName
,
"tt_%s_%02d.txt"
,
pName
,
nLutSize
);
pFile
=
fopen
(
pFileName
,
"wb"
)
;
sprintf
(
pFileName
,
"tt_%s_%02d.txt"
,
pName
?
pName
:
NULL
,
nLutSize
);
pFile
=
pName
?
fopen
(
pFileName
,
"wb"
)
:
stdout
;
Vec_MemDump
(
pFile
,
p
);
fclose
(
pFile
);
if
(
pFile
!=
stdout
)
fclose
(
pFile
);
printf
(
"Dumped %d %d-var truth tables into file
\"
%s
\"
(%.2f MB).
\n
"
,
Vec_MemEntryNum
(
p
),
nLutSize
,
p
FileName
,
Vec_MemEntryNum
(
p
),
nLutSize
,
p
Name
?
pFileName
:
"stdout"
,
8
.
0
*
Vec_MemEntryNum
(
p
)
*
Vec_MemEntrySize
(
p
)
/
(
1
<<
20
)
);
}
...
...
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