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
302f7d7a
Commit
302f7d7a
authored
Jul 15, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Other changes to enable new features in the mapper (bug fix).
parent
96e44e31
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
1 deletions
+51
-1
src/base/abci/abcIf.c
+51
-1
No files found.
src/base/abci/abcIf.c
View file @
302f7d7a
...
@@ -254,7 +254,7 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
...
@@ -254,7 +254,7 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
{
{
ProgressBar
*
pProgress
;
ProgressBar
*
pProgress
;
Abc_Ntk_t
*
pNtkNew
;
Abc_Ntk_t
*
pNtkNew
;
Abc_Obj_t
*
pNode
,
*
pNodeNew
;
Abc_Obj_t
*
pNode
,
*
pNodeNew
,
*
pExor
;
Vec_Int_t
*
vCover
;
Vec_Int_t
*
vCover
;
int
i
,
nDupGates
;
int
i
,
nDupGates
;
// create the new network
// create the new network
...
@@ -274,6 +274,55 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
...
@@ -274,6 +274,55 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
// process the nodes in topological order
// process the nodes in topological order
vCover
=
Vec_IntAlloc
(
1
<<
16
);
vCover
=
Vec_IntAlloc
(
1
<<
16
);
pProgress
=
Extra_ProgressBarStart
(
stdout
,
Abc_NtkCoNum
(
pNtk
)
);
pProgress
=
Extra_ProgressBarStart
(
stdout
,
Abc_NtkCoNum
(
pNtk
)
);
if
(
pIfMan
->
pPars
->
fEnableRealPos
)
{
// collect drivers
Vec_Ptr_t
*
vDrivers
,
*
vFanins
;
vDrivers
=
Vec_PtrAlloc
(
Abc_NtkCoNum
(
pNtk
)
);
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
{
Extra_ProgressBarUpdate
(
pProgress
,
i
,
"Final"
);
pNodeNew
=
Abc_NodeFromIf_rec
(
pNtkNew
,
pIfMan
,
If_ObjFanin0
(
If_ManCo
(
pIfMan
,
i
)),
vCover
);
pNodeNew
=
Abc_ObjNotCond
(
pNodeNew
,
If_ObjFaninC0
(
If_ManCo
(
pIfMan
,
i
))
);
// Abc_ObjAddFanin( pNode->pCopy, pNodeNew );
if
(
Abc_ObjIsComplement
(
pNodeNew
)
)
pNodeNew
=
Abc_NtkCreateNodeInv
(
pNtkNew
,
Abc_ObjRegular
(
pNodeNew
)
);
else
pNodeNew
=
Abc_NtkCreateNodeBuf
(
pNtkNew
,
pNodeNew
);
Vec_PtrPush
(
vDrivers
,
pNodeNew
);
}
// update drivers
vFanins
=
Vec_PtrAlloc
(
2
);
for
(
i
=
pNtk
->
nRealPos
;
i
<
Abc_NtkPoNum
(
pNtk
);
i
+=
5
)
{
// create first XOR
Vec_PtrClear
(
vFanins
);
Vec_PtrPush
(
vFanins
,
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
+
0
)
);
Vec_PtrPush
(
vFanins
,
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
+
1
)
);
pExor
=
Abc_NtkCreateNodeExor
(
pNtkNew
,
vFanins
);
// create second XOR
Vec_PtrClear
(
vFanins
);
Vec_PtrPush
(
vFanins
,
pExor
);
Vec_PtrPush
(
vFanins
,
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
+
2
)
);
pNode
=
Abc_NtkCreateNodeExor
(
pNtkNew
,
vFanins
);
Vec_PtrWriteEntry
(
vDrivers
,
i
+
3
,
pNode
);
// create MUX
pNode
=
Abc_NtkCreateNodeMux
(
pNtkNew
,
pExor
,
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
+
2
),
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
+
1
)
);
Vec_PtrWriteEntry
(
vDrivers
,
i
+
4
,
pNode
);
}
Vec_PtrFree
(
vFanins
);
// connect drivers
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
Abc_ObjAddFanin
(
pNode
->
pCopy
,
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDrivers
,
i
)
);
Vec_PtrFree
(
vDrivers
);
// sweep
nDupGates
=
Abc_NtkCleanup
(
pNtkNew
,
0
);
printf
(
"The number of removed nodes = %d.
\n
"
,
nDupGates
);
}
else
{
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
Abc_NtkForEachCo
(
pNtk
,
pNode
,
i
)
{
{
Extra_ProgressBarUpdate
(
pProgress
,
i
,
"Final"
);
Extra_ProgressBarUpdate
(
pProgress
,
i
,
"Final"
);
...
@@ -281,6 +330,7 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
...
@@ -281,6 +330,7 @@ Abc_Ntk_t * Abc_NtkFromIf( If_Man_t * pIfMan, Abc_Ntk_t * pNtk )
pNodeNew
=
Abc_ObjNotCond
(
pNodeNew
,
If_ObjFaninC0
(
If_ManCo
(
pIfMan
,
i
))
);
pNodeNew
=
Abc_ObjNotCond
(
pNodeNew
,
If_ObjFaninC0
(
If_ManCo
(
pIfMan
,
i
))
);
Abc_ObjAddFanin
(
pNode
->
pCopy
,
pNodeNew
);
Abc_ObjAddFanin
(
pNode
->
pCopy
,
pNodeNew
);
}
}
}
Extra_ProgressBarStop
(
pProgress
);
Extra_ProgressBarStop
(
pProgress
);
Vec_IntFree
(
vCover
);
Vec_IntFree
(
vCover
);
// remove the constant node if not used
// remove the constant node if not used
...
...
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