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
6ab0d68d
Commit
6ab0d68d
authored
Apr 04, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tuning LUT mapping to work while saving the best network.
parent
f6ae0e41
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
13 deletions
+21
-13
src/base/abci/abc.c
+4
-4
src/base/abci/abcPrint.c
+3
-0
src/map/if/if.h
+1
-1
src/map/if/ifCut.c
+2
-2
src/map/if/ifMap.c
+3
-3
src/map/if/ifTime.c
+8
-3
No files found.
src/base/abci/abc.c
View file @
6ab0d68d
...
...
@@ -15017,8 +15017,8 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
// enable truth table computation if choices are selected
if
(
(
c
=
Abc_NtkGetChoiceNum
(
pNtk
))
)
{
if
(
!
Abc_FrameReadFlag
(
"silentmode"
)
)
Abc_Print
(
0
,
"Performing LUT mapping with %d choices.
\n
"
,
c
);
//
if ( !Abc_FrameReadFlag("silentmode") )
//
Abc_Print( 0, "Performing LUT mapping with %d choices.\n", c );
pPars
->
fExpRed
=
0
;
}
...
...
@@ -29749,8 +29749,8 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
// enable truth table computation if choices are selected
if
(
Gia_ManHasChoices
(
pAbc
->
pGia
)
)
{
if
(
!
Abc_FrameReadFlag
(
"silentmode"
)
)
Abc_Print
(
0
,
"Performing LUT mapping with choices.
\n
"
);
//
if ( !Abc_FrameReadFlag("silentmode") )
//
Abc_Print( 0, "Performing LUT mapping with choices.\n" );
pPars
->
fExpRed
=
0
;
}
src/base/abci/abcPrint.c
View file @
6ab0d68d
...
...
@@ -101,7 +101,10 @@ int Abc_NtkCompareAndSaveBest( Abc_Ntk_t * pNtk )
ParsBest
.
nPis
=
ParsNew
.
nPis
;
ParsBest
.
nPos
=
ParsNew
.
nPos
;
// writ the network
if
(
strcmp
(
pNtk
->
pSpec
+
strlen
(
pNtk
->
pSpec
)
-
strlen
(
"_best.blif"
),
"_best.blif"
)
)
pFileNameOut
=
Extra_FileNameGenericAppend
(
pNtk
->
pSpec
,
"_best.blif"
);
else
pFileNameOut
=
pNtk
->
pSpec
;
Io_Write
(
pNtk
,
pFileNameOut
,
IO_FILE_BLIF
);
return
1
;
}
...
...
src/map/if/if.h
View file @
6ab0d68d
...
...
@@ -490,7 +490,7 @@ extern int If_ManPerformMapping( If_Man_t * p );
extern
int
If_ManPerformMappingComb
(
If_Man_t
*
p
);
/*=== ifCut.c ============================================================*/
extern
int
If_CutVerifyCuts
(
If_Set_t
*
pCutSet
,
int
fOrdered
);
extern
int
If_CutFilter
(
If_Set_t
*
pCutSet
,
If_Cut_t
*
pCut
);
extern
int
If_CutFilter
(
If_Set_t
*
pCutSet
,
If_Cut_t
*
pCut
,
int
fSaveCut0
);
extern
void
If_CutSort
(
If_Man_t
*
p
,
If_Set_t
*
pCutSet
,
If_Cut_t
*
pCut
);
extern
void
If_CutOrder
(
If_Cut_t
*
pCut
);
extern
int
If_CutMergeOrdered
(
If_Man_t
*
p
,
If_Cut_t
*
pCut0
,
If_Cut_t
*
pCut1
,
If_Cut_t
*
pCut
);
...
...
src/map/if/ifCut.c
View file @
6ab0d68d
...
...
@@ -143,7 +143,7 @@ static inline int If_CutCheckDominance( If_Cut_t * pDom, If_Cut_t * pCut )
SeeAlso []
***********************************************************************/
int
If_CutFilter
(
If_Set_t
*
pCutSet
,
If_Cut_t
*
pCut
)
int
If_CutFilter
(
If_Set_t
*
pCutSet
,
If_Cut_t
*
pCut
,
int
fSaveCut0
)
{
If_Cut_t
*
pTemp
;
int
i
,
k
;
...
...
@@ -154,7 +154,7 @@ int If_CutFilter( If_Set_t * pCutSet, If_Cut_t * pCut )
if
(
pTemp
->
nLeaves
>
pCut
->
nLeaves
)
{
// do not fiter the first cut
if
(
i
==
0
&&
pCutSet
->
nCuts
>
1
&&
pCutSet
->
ppCuts
[
1
]
->
fUseless
)
if
(
i
==
0
&&
((
pCutSet
->
nCuts
>
1
&&
pCutSet
->
ppCuts
[
1
]
->
fUseless
)
||
(
fSaveCut0
&&
pCutSet
->
nCuts
==
1
))
)
continue
;
// skip the non-contained cuts
if
(
(
pTemp
->
uSign
&
pCut
->
uSign
)
!=
pCut
->
uSign
)
...
...
src/map/if/ifMap.c
View file @
6ab0d68d
...
...
@@ -184,7 +184,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
p
->
nCutsMerged
++
;
p
->
nCutsTotal
++
;
// check if this cut is contained in any of the available cuts
if
(
!
p
->
pPars
->
fSkipCutFilter
&&
If_CutFilter
(
pCutSet
,
pCut
)
)
if
(
!
p
->
pPars
->
fSkipCutFilter
&&
If_CutFilter
(
pCutSet
,
pCut
,
p
->
pPars
->
fUserRecLib
||
p
->
pPars
->
fDelayOpt
)
)
continue
;
// compute the truth table
pCut
->
iCutFunc
=
-
1
;
...
...
@@ -202,7 +202,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
fChange
=
If_CutComputeTruth
(
p
,
pCut
,
pCut0
,
pCut1
,
pObj
->
fCompl0
,
pObj
->
fCompl1
);
if
(
p
->
pPars
->
fVerbose
)
p
->
timeCache
[
4
]
+=
Abc_Clock
()
-
clk
;
if
(
!
p
->
pPars
->
fSkipCutFilter
&&
fChange
&&
If_CutFilter
(
pCutSet
,
pCut
)
)
if
(
!
p
->
pPars
->
fSkipCutFilter
&&
fChange
&&
If_CutFilter
(
pCutSet
,
pCut
,
p
->
pPars
->
fUserRecLib
||
p
->
pPars
->
fDelayOpt
)
)
continue
;
if
(
p
->
pPars
->
fUseDsd
)
{
...
...
@@ -385,7 +385,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
// copy the cut into storage
If_CutCopy
(
p
,
pCut
,
pCutTemp
);
// check if this cut is contained in any of the available cuts
if
(
If_CutFilter
(
pCutSet
,
pCut
)
)
if
(
If_CutFilter
(
pCutSet
,
pCut
,
p
->
pPars
->
fUserRecLib
||
p
->
pPars
->
fDelayOpt
)
)
continue
;
// check if the cut satisfies the required times
assert
(
pCut
->
Delay
==
If_CutDelay
(
p
,
pTemp
,
pCut
)
);
...
...
src/map/if/ifTime.c
View file @
6ab0d68d
...
...
@@ -378,12 +378,17 @@ int If_CutDelaySopCost( If_Man_t * p, If_Cut_t * pCut )
}
// get the cost
If_AndClear
(
&
Leaf
);
if
(
Vec_WrdSize
(
vAnds
)
)
if
(
Vec_WrdSize
(
vAnds
)
>
0
)
Leaf
=
If_WrdToAnd
(
Vec_WrdEntryLast
(
vAnds
)
);
if
(
pCut
->
nLeaves
>
2
&&
Vec_WrdSize
(
vAnds
)
>
(
int
)
pCut
->
nLeaves
)
pCut
->
Cost
=
Vec_WrdSize
(
vAnds
)
-
pCut
->
nLeaves
;
else
Leaf
.
Delay
=
0
;
if
(
Vec_WrdSize
(
vAnds
)
>
(
int
)
pCut
->
nLeaves
)
pCut
->
Cost
=
Vec_WrdSize
(
vAnds
)
-
pCut
->
nLeaves
;
else
if
(
pCut
->
nLeaves
==
1
)
pCut
->
Cost
=
1
;
else
if
(
pCut
->
nLeaves
==
0
)
pCut
->
Cost
=
0
;
else
assert
(
0
);
// get the permutation
for
(
i
=
0
;
i
<
(
int
)
pCut
->
nLeaves
;
i
++
)
{
...
...
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