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
b79fd69f
Commit
b79fd69f
authored
Apr 04, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Making sure the names are transfered when &get -n is used.
parent
3a15f343
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
13 deletions
+31
-13
src/aig/gia/giaIf.c
+5
-0
src/base/abc/abcNames.c
+19
-13
src/base/abci/abc.c
+7
-0
No files found.
src/aig/gia/giaIf.c
View file @
b79fd69f
...
...
@@ -2038,6 +2038,11 @@ void Gia_ManTransferTiming( Gia_Man_t * p, Gia_Man_t * pGia )
p
->
DefInArrs
=
pGia
->
DefInArrs
;
p
->
DefOutReqs
=
pGia
->
DefOutReqs
;
}
if
(
pGia
->
vNamesIn
||
pGia
->
vNamesOut
)
{
p
->
vNamesIn
=
pGia
->
vNamesIn
;
pGia
->
vNamesIn
=
NULL
;
p
->
vNamesOut
=
pGia
->
vNamesOut
;
pGia
->
vNamesOut
=
NULL
;
}
if
(
pGia
->
pManTime
==
NULL
||
p
==
pGia
)
return
;
p
->
pManTime
=
pGia
->
pManTime
;
pGia
->
pManTime
=
NULL
;
...
...
src/base/abc/abcNames.c
View file @
b79fd69f
...
...
@@ -507,20 +507,10 @@ void Abc_NtkShortNames( Abc_Ntk_t * pNtk )
SeeAlso []
***********************************************************************/
void
Abc_Ntk
MoveNames
(
Abc_Ntk_t
*
pNtk
,
Abc_Ntk_t
*
pOld
)
void
Abc_Ntk
RedirectCiCo
(
Abc_Ntk_t
*
pNtk
)
{
Abc_Obj_t
*
pObj
,
*
pObjCi
,
*
pFanin
;
int
i
,
Count
=
0
;
Nm_ManFree
(
pNtk
->
pManName
);
pNtk
->
pManName
=
Nm_ManCreate
(
Abc_NtkCiNum
(
pNtk
)
+
Abc_NtkCoNum
(
pNtk
)
+
Abc_NtkBoxNum
(
pNtk
)
);
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
Abc_ObjAssignName
(
pObj
,
Abc_ObjName
(
Abc_NtkPi
(
pOld
,
i
)),
NULL
);
Abc_NtkForEachPo
(
pNtk
,
pObj
,
i
)
Abc_ObjAssignName
(
pObj
,
Abc_ObjName
(
Abc_NtkPo
(
pOld
,
i
)),
NULL
);
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
Abc_ObjAssignName
(
Abc_ObjFanin0
(
pObj
),
Abc_ObjName
(
Abc_ObjFanin0
(
Abc_NtkBox
(
pOld
,
i
))),
NULL
);
Abc_ObjAssignName
(
Abc_ObjFanout0
(
pObj
),
Abc_ObjName
(
Abc_ObjFanout0
(
Abc_NtkBox
(
pOld
,
i
))),
NULL
);
}
Abc_Obj_t
*
pObj
,
*
pObjCi
,
*
pFanin
;
int
i
,
Count
=
0
;
// if CO points to CI with the same name, remove buffer between them
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
{
...
...
@@ -541,6 +531,22 @@ void Abc_NtkMoveNames( Abc_Ntk_t * pNtk, Abc_Ntk_t * pOld )
if
(
Count
)
printf
(
"Redirected %d POs from buffers to PIs with the same name.
\n
"
,
Count
);
}
void
Abc_NtkMoveNames
(
Abc_Ntk_t
*
pNtk
,
Abc_Ntk_t
*
pOld
)
{
Abc_Obj_t
*
pObj
;
int
i
;
Nm_ManFree
(
pNtk
->
pManName
);
pNtk
->
pManName
=
Nm_ManCreate
(
Abc_NtkCiNum
(
pNtk
)
+
Abc_NtkCoNum
(
pNtk
)
+
Abc_NtkBoxNum
(
pNtk
)
);
Abc_NtkForEachPi
(
pNtk
,
pObj
,
i
)
Abc_ObjAssignName
(
pObj
,
Abc_ObjName
(
Abc_NtkPi
(
pOld
,
i
)),
NULL
);
Abc_NtkForEachPo
(
pNtk
,
pObj
,
i
)
Abc_ObjAssignName
(
pObj
,
Abc_ObjName
(
Abc_NtkPo
(
pOld
,
i
)),
NULL
);
Abc_NtkForEachLatch
(
pNtk
,
pObj
,
i
)
{
Abc_ObjAssignName
(
Abc_ObjFanin0
(
pObj
),
Abc_ObjName
(
Abc_ObjFanin0
(
Abc_NtkBox
(
pOld
,
i
))),
NULL
);
Abc_ObjAssignName
(
Abc_ObjFanout0
(
pObj
),
Abc_ObjName
(
Abc_ObjFanout0
(
Abc_NtkBox
(
pOld
,
i
))),
NULL
);
}
Abc_NtkRedirectCiCo
(
pNtk
);
}
/**Function*************************************************************
...
...
src/base/abci/abc.c
View file @
b79fd69f
...
...
@@ -26003,6 +26003,8 @@ usage:
int
Abc_CommandAbc9Put
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Abc_Ntk_t
*
Abc_NtkFromDarChoices
(
Abc_Ntk_t
*
pNtkOld
,
Aig_Man_t
*
pMan
);
extern
void
Abc_NtkRedirectCiCo
(
Abc_Ntk_t
*
pNtk
);
Aig_Man_t
*
pMan
;
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
int
c
,
fVerbose
=
0
;
...
...
@@ -26086,6 +26088,11 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
}
// decouple CI/CO with the same name
if
(
pAbc
->
pGia
->
vNamesIn
||
pAbc
->
pGia
->
vNamesOut
)
Abc_NtkRedirectCiCo
(
pNtk
);
// transfer timing information
if
(
pAbc
->
pGia
->
vInArrs
||
pAbc
->
pGia
->
vOutReqs
)
{
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