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
4e52703b
Commit
4e52703b
authored
Oct 27, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to LMS code.
parent
ab2dfec2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
src/base/abci/abcRec3.c
+4
-18
No files found.
src/base/abci/abcRec3.c
View file @
4e52703b
...
...
@@ -42,10 +42,9 @@ struct Lms_Man_t_
// internal data
Gia_Man_t
*
pGia
;
// the record
Vec_Mem_t
*
vTtMem
;
// truth tables of primary outputs
Vec_Int_t
*
vTruthPo
;
// for each semi-canonical class, la
st PO where this truth table was seen
// Vec_Int_t * vTruthPo; // for each semi-canonical class, fir
st PO where this truth table was seen
// subgraph attributes (1-to-1 correspondence with POs of Gia)
Vec_Int_t
*
vTruthIds
;
// truth table IDs of this PO
Vec_Int_t
*
vEquivs
;
// link to the previous PO of the same functional class
Vec_Wrd_t
*
vDelays
;
// pin-to-pin delays of this PO
Vec_Str_t
*
vCosts
;
// number of AND gates in this PO
// sugraph usage statistics
...
...
@@ -130,10 +129,9 @@ Lms_Man_t * Lms_ManStart( int nVars, int nCuts, int fFuncOnly, int fVerbose )
// truth tables
p
->
vTtMem
=
Vec_MemAlloc
(
p
->
nWords
,
12
);
// 32 KB/page for 6-var functions
Vec_MemHashAlloc
(
p
->
vTtMem
,
10000
);
p
->
vTruthPo
=
Vec_IntAlloc
(
1000
);
//
p->vTruthPo = Vec_IntAlloc( 1000 );
// subgraph attributes
p
->
vTruthIds
=
Vec_IntAlloc
(
1000
);
p
->
vEquivs
=
Vec_IntAlloc
(
1000
);
p
->
vDelays
=
Vec_WrdAlloc
(
1000
);
p
->
vCosts
=
Vec_StrAlloc
(
1000
);
// sugraph usage statistics
...
...
@@ -149,10 +147,9 @@ void Lms_ManStop( Lms_Man_t * p )
Vec_IntFree
(
p
->
vLabels
);
Vec_PtrFree
(
p
->
vNodes
);
// subgraph attributes
Vec_IntFree
(
p
->
vEquivs
);
Vec_WrdFree
(
p
->
vDelays
);
Vec_StrFree
(
p
->
vCosts
);
Vec_IntFree
(
p
->
vTruthPo
);
//
Vec_IntFree( p->vTruthPo );
// sugraph usage statistics
// Vec_IntFree( p->vFreqs );
// truth tables
...
...
@@ -354,7 +351,6 @@ clk = clock();
printf( "Truth table verification has failed.\n" );
*/
Vec_IntPush
(
s_pMan
->
vTruthIds
,
-
1
);
// truth table IDs
Vec_IntPush
(
s_pMan
->
vEquivs
,
-
1
);
// truth table IDs
Vec_WrdPush
(
s_pMan
->
vDelays
,
0
);
Vec_StrPush
(
s_pMan
->
vCosts
,
0
);
s_pMan
->
nFilterTruth
++
;
...
...
@@ -368,18 +364,8 @@ clk = clock();
Index
=
Vec_MemHashInsert
(
s_pMan
->
vTtMem
,
s_pMan
->
pTemp1
);
Vec_IntPush
(
s_pMan
->
vTruthIds
,
Index
);
// truth table IDs
assert
(
Gia_ManPoNum
(
pGia
)
==
Vec_IntSize
(
s_pMan
->
vTruthIds
)
);
if
(
Index
<
Vec_IntSize
(
s_pMan
->
vTruthPo
)
)
// old ID -- add to linked list
{
Vec_IntPush
(
s_pMan
->
vEquivs
,
Vec_IntEntry
(
s_pMan
->
vTruthPo
,
Index
)
);
Vec_IntWriteEntry
(
s_pMan
->
vTruthPo
,
Index
,
Gia_ManPoNum
(
pGia
)
-
1
);
}
else
{
assert
(
Index
==
Vec_IntSize
(
s_pMan
->
vTruthPo
)
);
Vec_IntPush
(
s_pMan
->
vTruthPo
,
Gia_ManPoNum
(
pGia
)
-
1
);
Vec_IntPush
(
s_pMan
->
vEquivs
,
-
1
);
if
(
Index
==
Vec_MemEntryNum
(
s_pMan
->
vTtMem
)
-
1
)
s_pMan
->
nAddedFuncs
++
;
}
Vec_WrdPush
(
s_pMan
->
vDelays
,
0
);
Vec_StrPush
(
s_pMan
->
vCosts
,
0
);
s_pMan
->
timeInsert
+=
clock
()
-
clk
;
...
...
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