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
2c7a456c
Commit
2c7a456c
authored
Nov 29, 2022
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suggested bug fix in 'resub' with ODCs.
parent
4e6946ce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
src/base/abci/abcOdc.c
+10
-1
No files found.
src/base/abci/abcOdc.c
View file @
2c7a456c
...
@@ -44,12 +44,13 @@ struct Odc_Obj_t_
...
@@ -44,12 +44,13 @@ struct Odc_Obj_t_
struct
Odc_Man_t_
struct
Odc_Man_t_
{
{
// don
t'
-care parameters
// don
't
-care parameters
int
nVarsMax
;
// the max number of cut variables
int
nVarsMax
;
// the max number of cut variables
int
nLevels
;
// the number of ODC levels
int
nLevels
;
// the number of ODC levels
int
fVerbose
;
// the verbosiness flag
int
fVerbose
;
// the verbosiness flag
int
fVeryVerbose
;
// the verbosiness flag to print per-node stats
int
fVeryVerbose
;
// the verbosiness flag to print per-node stats
int
nPercCutoff
;
// cutoff percentage
int
nPercCutoff
;
// cutoff percentage
int
skipQuant
;
// windowing
// windowing
Abc_Obj_t
*
pNode
;
// the node for windowing
Abc_Obj_t
*
pNode
;
// the node for windowing
...
@@ -177,6 +178,7 @@ Odc_Man_t * Abc_NtkDontCareAlloc( int nVarsMax, int nLevels, int fVerbose, int f
...
@@ -177,6 +178,7 @@ Odc_Man_t * Abc_NtkDontCareAlloc( int nVarsMax, int nLevels, int fVerbose, int f
p
->
fVerbose
=
fVerbose
;
p
->
fVerbose
=
fVerbose
;
p
->
fVeryVerbose
=
fVeryVerbose
;
p
->
fVeryVerbose
=
fVeryVerbose
;
p
->
nPercCutoff
=
10
;
p
->
nPercCutoff
=
10
;
p
->
skipQuant
=
0
;
// windowing
// windowing
p
->
vRoots
=
Vec_PtrAlloc
(
128
);
p
->
vRoots
=
Vec_PtrAlloc
(
128
);
...
@@ -744,7 +746,10 @@ unsigned Abc_NtkDontCareCofactors_rec( Odc_Man_t * p, Odc_Lit_t Lit, unsigned uM
...
@@ -744,7 +746,10 @@ unsigned Abc_NtkDontCareCofactors_rec( Odc_Man_t * p, Odc_Lit_t Lit, unsigned uM
// skip visited objects
// skip visited objects
pObj
=
Odc_Lit2Obj
(
p
,
Lit
);
pObj
=
Odc_Lit2Obj
(
p
,
Lit
);
if
(
Odc_ObjIsTravIdCurrent
(
p
,
pObj
)
)
if
(
Odc_ObjIsTravIdCurrent
(
p
,
pObj
)
)
{
p
->
skipQuant
=
1
;
return
pObj
->
uData
;
return
pObj
->
uData
;
}
Odc_ObjSetTravIdCurrent
(
p
,
pObj
);
Odc_ObjSetTravIdCurrent
(
p
,
pObj
);
// skip objects out of the cone
// skip objects out of the cone
if
(
(
pObj
->
uMask
&
uMask
)
==
0
)
if
(
(
pObj
->
uMask
&
uMask
)
==
0
)
...
@@ -764,6 +769,7 @@ unsigned Abc_NtkDontCareCofactors_rec( Odc_Man_t * p, Odc_Lit_t Lit, unsigned uM
...
@@ -764,6 +769,7 @@ unsigned Abc_NtkDontCareCofactors_rec( Odc_Man_t * p, Odc_Lit_t Lit, unsigned uM
uLit1
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData1
>>
16
),
Odc_ObjFaninC1
(
pObj
)
);
uLit1
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData1
>>
16
),
Odc_ObjFaninC1
(
pObj
)
);
uRes1
=
Odc_And
(
p
,
uLit0
,
uLit1
);
uRes1
=
Odc_And
(
p
,
uLit0
,
uLit1
);
// find the result
// find the result
p
->
skipQuant
=
0
;
return
pObj
->
uData
=
((
uRes1
<<
16
)
|
uRes0
);
return
pObj
->
uData
=
((
uRes1
<<
16
)
|
uRes0
);
}
}
...
@@ -783,6 +789,7 @@ int Abc_NtkDontCareQuantify( Odc_Man_t * p )
...
@@ -783,6 +789,7 @@ int Abc_NtkDontCareQuantify( Odc_Man_t * p )
Odc_Lit_t
uRes0
,
uRes1
;
Odc_Lit_t
uRes0
,
uRes1
;
unsigned
uData
;
unsigned
uData
;
int
i
;
int
i
;
p
->
skipQuant
=
0
;
assert
(
p
->
iRoot
<
0xffff
);
assert
(
p
->
iRoot
<
0xffff
);
assert
(
Vec_PtrSize
(
p
->
vBranches
)
<=
32
);
// the mask size
assert
(
Vec_PtrSize
(
p
->
vBranches
)
<=
32
);
// the mask size
for
(
i
=
0
;
i
<
Vec_PtrSize
(
p
->
vBranches
);
i
++
)
for
(
i
=
0
;
i
<
Vec_PtrSize
(
p
->
vBranches
);
i
++
)
...
@@ -790,6 +797,8 @@ int Abc_NtkDontCareQuantify( Odc_Man_t * p )
...
@@ -790,6 +797,8 @@ int Abc_NtkDontCareQuantify( Odc_Man_t * p )
// compute the cofactors w.r.t. this variable
// compute the cofactors w.r.t. this variable
Odc_ManIncrementTravId
(
p
);
Odc_ManIncrementTravId
(
p
);
uData
=
Abc_NtkDontCareCofactors_rec
(
p
,
Odc_Regular
(
p
->
iRoot
),
(
1
<<
i
)
);
uData
=
Abc_NtkDontCareCofactors_rec
(
p
,
Odc_Regular
(
p
->
iRoot
),
(
1
<<
i
)
);
if
(
p
->
skipQuant
)
continue
;
uRes0
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData
&
0xffff
),
Odc_IsComplement
(
p
->
iRoot
)
);
uRes0
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData
&
0xffff
),
Odc_IsComplement
(
p
->
iRoot
)
);
uRes1
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData
>>
16
),
Odc_IsComplement
(
p
->
iRoot
)
);
uRes1
=
Odc_NotCond
(
(
Odc_Lit_t
)(
uData
>>
16
),
Odc_IsComplement
(
p
->
iRoot
)
);
// quantify this variable existentially
// quantify this variable existentially
...
...
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