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
be874a7a
Commit
be874a7a
authored
Dec 12, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command &read_blif to read hierarchical BLIF directly into the &-space.
parent
ed4f4ade
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
97 additions
and
2 deletions
+97
-2
abclib.dsp
+4
-0
src/base/abc/abc.h
+2
-0
src/base/abc/abcHie.c
+0
-2
src/base/abc/abcHieCec.c
+0
-0
src/base/abc/abcUtil.c
+19
-0
src/base/abc/module.make
+1
-0
src/base/abci/abc.c
+71
-0
No files found.
abclib.dsp
View file @
be874a7a
...
@@ -123,6 +123,10 @@ SOURCE=.\src\base\abc\abcHie.c
...
@@ -123,6 +123,10 @@ SOURCE=.\src\base\abc\abcHie.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\base\abc\abcHieCec.c
# End Source File
# Begin Source File
SOURCE=.\src\base\abc\abcInt.h
SOURCE=.\src\base\abc\abcInt.h
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/base/abc/abc.h
View file @
be874a7a
...
@@ -632,6 +632,7 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkHaigUse( Abc_Ntk_t * pNtk );
...
@@ -632,6 +632,7 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkHaigUse( Abc_Ntk_t * pNtk );
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkFlattenLogicHierarchy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkFlattenLogicHierarchy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkConvertBlackboxes
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkConvertBlackboxes
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkInsertNewLogic
(
Abc_Ntk_t
*
pNtkH
,
Abc_Ntk_t
*
pNtkL
);
extern
ABC_DLL
Abc_Ntk_t
*
Abc_NtkInsertNewLogic
(
Abc_Ntk_t
*
pNtkH
,
Abc_Ntk_t
*
pNtkL
);
extern
ABC_DLL
void
Abc_NtkPrintBoxInfo
(
Abc_Ntk_t
*
pNtk
);
/*=== abcLatch.c ==========================================================*/
/*=== abcLatch.c ==========================================================*/
extern
ABC_DLL
int
Abc_NtkLatchIsSelfFeed
(
Abc_Obj_t
*
pLatch
);
extern
ABC_DLL
int
Abc_NtkLatchIsSelfFeed
(
Abc_Obj_t
*
pLatch
);
extern
ABC_DLL
int
Abc_NtkCountSelfFeedLatches
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkCountSelfFeedLatches
(
Abc_Ntk_t
*
pNtk
);
...
@@ -907,6 +908,7 @@ extern ABC_DLL int Abc_NtkGetTotalFanins( Abc_Ntk_t * pNtk );
...
@@ -907,6 +908,7 @@ extern ABC_DLL int Abc_NtkGetTotalFanins( Abc_Ntk_t * pNtk );
extern
ABC_DLL
void
Abc_NtkCleanCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanData
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanData
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanEquiv
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkCleanEquiv
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkFillTemp
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkCountCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
int
Abc_NtkCountCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkSaveCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
Vec_Ptr_t
*
Abc_NtkSaveCopy
(
Abc_Ntk_t
*
pNtk
);
extern
ABC_DLL
void
Abc_NtkLoadCopy
(
Abc_Ntk_t
*
pNtk
,
Vec_Ptr_t
*
vCopies
);
extern
ABC_DLL
void
Abc_NtkLoadCopy
(
Abc_Ntk_t
*
pNtk
,
Vec_Ptr_t
*
vCopies
);
...
...
src/base/abc/abcHie.c
View file @
be874a7a
...
@@ -519,8 +519,6 @@ Abc_Ntk_t * Abc_NtkFlattenLogicHierarchy( Abc_Ntk_t * pNtk )
...
@@ -519,8 +519,6 @@ Abc_Ntk_t * Abc_NtkFlattenLogicHierarchy( Abc_Ntk_t * pNtk )
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
assert
(
Abc_NtkIsNetlist
(
pNtk
)
);
Abc_NtkPrintBoxInfo
(
pNtk
);
// start the network
// start the network
pNtkNew
=
Abc_NtkAlloc
(
pNtk
->
ntkType
,
pNtk
->
ntkFunc
,
1
);
pNtkNew
=
Abc_NtkAlloc
(
pNtk
->
ntkType
,
pNtk
->
ntkFunc
,
1
);
// duplicate the name and the spec
// duplicate the name and the spec
...
...
src/base/abc/abcHieCec.c
0 → 100644
View file @
be874a7a
This diff is collapsed.
Click to expand it.
src/base/abc/abcUtil.c
View file @
be874a7a
...
@@ -541,6 +541,25 @@ void Abc_NtkCleanEquiv( Abc_Ntk_t * pNtk )
...
@@ -541,6 +541,25 @@ void Abc_NtkCleanEquiv( Abc_Ntk_t * pNtk )
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Cleans the copy field of all objects.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Abc_NtkFillTemp
(
Abc_Ntk_t
*
pNtk
)
{
Abc_Obj_t
*
pObj
;
int
i
;
Abc_NtkForEachObj
(
pNtk
,
pObj
,
i
)
pObj
->
iTemp
=
-
1
;
}
/**Function*************************************************************
Synopsis [Counts the number of nodes having non-trivial copies.]
Synopsis [Counts the number of nodes having non-trivial copies.]
Description []
Description []
...
...
src/base/abc/module.make
View file @
be874a7a
...
@@ -5,6 +5,7 @@ SRC += src/base/abc/abcAig.c \
...
@@ -5,6 +5,7 @@ SRC += src/base/abc/abcAig.c \
src/base/abc/abcFanio.c
\
src/base/abc/abcFanio.c
\
src/base/abc/abcFunc.c
\
src/base/abc/abcFunc.c
\
src/base/abc/abcHie.c
\
src/base/abc/abcHie.c
\
src/base/abc/abcHieCec.c
\
src/base/abc/abcLatch.c
\
src/base/abc/abcLatch.c
\
src/base/abc/abcLib.c
\
src/base/abc/abcLib.c
\
src/base/abc/abcMinBase.c
\
src/base/abc/abcMinBase.c
\
...
...
src/base/abci/abc.c
View file @
be874a7a
...
@@ -326,6 +326,7 @@ static int Abc_CommandAbc8DSec ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -326,6 +326,7 @@ static int Abc_CommandAbc8DSec ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Get
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Get
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Put
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Put
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Read
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Read
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9ReadBlif
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Write
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Write
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Ps
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Ps
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9PFan
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9PFan
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -780,6 +781,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -780,6 +781,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&get"
,
Abc_CommandAbc9Get
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&get"
,
Abc_CommandAbc9Get
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&put"
,
Abc_CommandAbc9Put
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&put"
,
Abc_CommandAbc9Put
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&r"
,
Abc_CommandAbc9Read
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&r"
,
Abc_CommandAbc9Read
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&read_blif"
,
Abc_CommandAbc9ReadBlif
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&w"
,
Abc_CommandAbc9Write
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&w"
,
Abc_CommandAbc9Write
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&ps"
,
Abc_CommandAbc9Ps
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&ps"
,
Abc_CommandAbc9Ps
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&pfan"
,
Abc_CommandAbc9PFan
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&pfan"
,
Abc_CommandAbc9PFan
,
0
);
...
@@ -24308,6 +24310,75 @@ usage:
...
@@ -24308,6 +24310,75 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9ReadBlif
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
extern
Gia_Man_t
*
Abc_NtkHieCecTest
(
char
*
pFileName
,
int
fVerbose
);
Gia_Man_t
*
pAig
;
FILE
*
pFile
;
char
**
pArgvNew
;
char
*
FileName
,
*
pTemp
;
int
nArgcNew
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'v'
:
fVerbose
^=
1
;
break
;
default:
goto
usage
;
}
}
pArgvNew
=
argv
+
globalUtilOptind
;
nArgcNew
=
argc
-
globalUtilOptind
;
if
(
nArgcNew
!=
1
)
{
Abc_Print
(
-
1
,
"There is no file name.
\n
"
);
return
1
;
}
// get the input file name
FileName
=
pArgvNew
[
0
];
// fix the wrong symbol
for
(
pTemp
=
FileName
;
*
pTemp
;
pTemp
++
)
if
(
*
pTemp
==
'>'
)
*
pTemp
=
'\\'
;
if
(
(
pFile
=
fopen
(
FileName
,
"r"
))
==
NULL
)
{
Abc_Print
(
-
1
,
"Cannot open input file
\"
%s
\"
. "
,
FileName
);
if
(
(
FileName
=
Extra_FileGetSimilarName
(
FileName
,
".aig"
,
".blif"
,
".pla"
,
".eqn"
,
".bench"
))
)
Abc_Print
(
1
,
"Did you mean
\"
%s
\"
?"
,
FileName
);
Abc_Print
(
1
,
"
\n
"
);
return
1
;
}
fclose
(
pFile
);
pAig
=
Abc_NtkHieCecTest
(
FileName
,
fVerbose
);
Abc_CommandUpdate9
(
pAbc
,
pAig
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &read_blif [-vh] <file>
\n
"
);
Abc_Print
(
-
2
,
"
\t
reads the current AIG from a hierarchical BLIF file
\n
"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles additional verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<file> : the file name
\n
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Get
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Get
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
extern
Aig_Man_t
*
Abc_NtkToDar
(
Abc_Ntk_t
*
pNtk
,
int
fExors
,
int
fRegisters
);
...
...
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