Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
abc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kestrel Collaboration
Kestrel Tooling
abc
Commits
22f36299
Commit
22f36299
authored
Nov 22, 2020
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an option to keep PI/PO names unchanged in 'short_names'.
parent
2e92256f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
4 deletions
+23
-4
src/base/abc/abc.h
src/base/abc/abc.h
+1
-0
src/base/abc/abcNames.c
src/base/abc/abcNames.c
+11
-0
src/base/abci/abc.c
src/base/abci/abc.c
+11
-4
No files found.
src/base/abc/abc.h
View file @
22f36299
...
...
@@ -752,6 +752,7 @@ extern ABC_DLL void Abc_NtkAddDummyPiNames( Abc_Ntk_t * pNtk );
extern
ABC_DLL
void
Abc_NtkAddDummyPoNames
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkAddDummyBoxNames
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkShortNames
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanNames
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkStartNameIds
(
Abc_Ntk_t
*
p
);
extern
ABC_DLL
void
Abc_NtkTransferNameIds
(
Abc_Ntk_t
*
p
,
Abc_Ntk_t
*
pNew
);
extern
ABC_DLL
void
Abc_NtkUpdateNameIds
(
Abc_Ntk_t
*
p
);
...
...
src/base/abc/abcNames.c
View file @
22f36299
...
...
@@ -606,6 +606,17 @@ void Abc_NtkShortNames( Abc_Ntk_t * pNtk )
Abc_NtkAddDummyPoNames
(
pNtk
);
Abc_NtkAddDummyBoxNames
(
pNtk
);
}
void
Abc_NtkCleanNames
(
Abc_Ntk_t
*
pNtk
)
{
Abc_Obj_t
*
pObj
;
int
i
;
Nm_Man_t
*
pManName
=
Nm_ManCreate
(
Abc_NtkCiNum
(
pNtk
)
+
Abc_NtkCoNum
(
pNtk
)
+
Abc_NtkBoxNum
(
pNtk
)
);
Abc_NtkForEachCi
(
pNtk
,
pObj
,
i
)
Nm_ManStoreIdName
(
pManName
,
pObj
->
Id
,
pObj
->
Type
,
Abc_ObjName
(
pObj
),
NULL
);
Abc_NtkForEachCo
(
pNtk
,
pObj
,
i
)
Nm_ManStoreIdName
(
pManName
,
pObj
->
Id
,
pObj
->
Type
,
Abc_ObjName
(
pObj
),
NULL
);
Nm_ManFree
(
pNtk
->
pManName
);
pNtk
->
pManName
=
pManName
;
}
/**Function*************************************************************
...
...
src/base/abci/abc.c
View file @
22f36299
...
...
@@ -12196,13 +12196,16 @@ usage:
int Abc_CommandShortNames( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
int c;
int c
, fKeepIo = 0
;
// set defaults
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
while ( ( c = Extra_UtilGetopt( argc, argv, "
k
h" ) ) != EOF )
{
switch ( c )
{
case 'k':
fKeepIo ^= 1;
break;
case 'h':
goto usage;
default:
...
...
@@ -12215,12 +12218,16 @@ int Abc_CommandShortNames( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Empty network.\n" );
return 1;
}
Abc_NtkShortNames( pNtk );
if ( fKeepIo )
Abc_NtkCleanNames( pNtk );
else
Abc_NtkShortNames( pNtk );
return 0;
usage:
Abc_Print( -2, "usage: short_names [-h]\n" );
Abc_Print( -2, "usage: short_names [-
k
h]\n" );
Abc_Print( -2, "\t replaces PI/PO/latch names by short char strings\n" );
Abc_Print( -2, "\t-k : toggle keeping PI/PO names unchanged [default = %s]\n", fKeepIo? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}
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