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
99ddb640
Commit
99ddb640
authored
Jan 28, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding support of reading and writing designs using a new internal format.
parent
c8008383
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
19 additions
and
5 deletions
+19
-5
abclib.dsp
+4
-0
src/aig/miniaig/ndr.h
+2
-1
src/base/wlc/module.make
+1
-0
src/base/wlc/wlc.h
+3
-0
src/base/wlc/wlcCom.c
+9
-4
src/base/wlc/wlcNdr.c
+0
-0
No files found.
abclib.dsp
View file @
99ddb640
...
...
@@ -807,6 +807,10 @@ SOURCE=.\src\base\wlc\wlcJson.c
# End Source File
# Begin Source File
SOURCE=.\src\base\wlc\wlcNdr.c
# End Source File
# Begin Source File
SOURCE=.\src\base\wlc\wlcNtk.c
# End Source File
# Begin Source File
...
...
src/aig/miniaig/ndr.h
View file @
99ddb640
...
...
@@ -379,7 +379,7 @@ static inline void Ndr_ModuleWriteVerilog( char * pFileName, void * pModule, cha
}
fprintf
(
pFile
,
"
\n
endmodule
\n\n
"
);
fclose
(
pFile
);
if
(
pFileName
)
fclose
(
pFile
);
}
...
...
@@ -507,6 +507,7 @@ static inline void Ndr_ModuleTest()
// write Verilog for verification
Ndr_ModuleWriteVerilog
(
NULL
,
pModule
,
ppNames
);
Ndr_ModuleWrite
(
"add4.ndr"
,
pModule
);
Ndr_ModuleDelete
(
pModule
);
}
...
...
src/base/wlc/module.make
View file @
99ddb640
...
...
@@ -6,6 +6,7 @@ SRC += src/base/wlc/wlcAbs.c \
src/base/wlc/wlcCom.c
\
src/base/wlc/wlcGraft.c
\
src/base/wlc/wlcJson.c
\
src/base/wlc/wlcNdr.c
\
src/base/wlc/wlcNtk.c
\
src/base/wlc/wlcReadSmt.c
\
src/base/wlc/wlcReadVer.c
\
...
...
src/base/wlc/wlc.h
View file @
99ddb640
...
...
@@ -328,6 +328,9 @@ extern int Wlc_NtkAbsCore2( Wlc_Ntk_t * p, Wlc_Par_t * pPars );
extern
Gia_Man_t
*
Wlc_NtkBitBlast
(
Wlc_Ntk_t
*
p
,
Vec_Int_t
*
vBoxIds
,
int
iOutput
,
int
nRange
,
int
fGiaSimple
,
int
fAddOutputs
,
int
fBooth
,
int
fNoCleanup
,
int
fCreateMiter
,
int
fDecMuxes
);
/*=== wlcCom.c ========================================================*/
extern
void
Wlc_SetNtk
(
Abc_Frame_t
*
pAbc
,
Wlc_Ntk_t
*
pNtk
);
/*=== wlcNdr.c ========================================================*/
extern
Wlc_Ntk_t
*
Wlc_ReadNdr
(
char
*
pFileName
);
extern
void
Wlc_WriteNdr
(
Wlc_Ntk_t
*
pNtk
,
char
*
pFileName
);
/*=== wlcNtk.c ========================================================*/
extern
void
Wlc_ManSetDefaultParams
(
Wlc_Par_t
*
pPars
);
extern
char
*
Wlc_ObjTypeName
(
Wlc_Obj_t
*
p
);
...
...
src/base/wlc/wlcCom.c
View file @
99ddb640
...
...
@@ -176,7 +176,7 @@ int Abc_CommandReadWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
(
pFile
=
fopen
(
pFileName
,
"r"
))
==
NULL
)
{
Abc_Print
(
1
,
"Cannot open input file
\"
%s
\"
. "
,
pFileName
);
if
(
(
pFileName
=
Extra_FileGetSimilarName
(
pFileName
,
".v"
,
".smt"
,
".smt2"
,
NULL
,
NULL
))
)
if
(
(
pFileName
=
Extra_FileGetSimilarName
(
pFileName
,
".v"
,
".smt"
,
".smt2"
,
".ndr"
,
NULL
))
)
Abc_Print
(
1
,
"Did you mean
\"
%s
\"
?"
,
pFileName
);
Abc_Print
(
1
,
"
\n
"
);
return
0
;
...
...
@@ -188,6 +188,8 @@ int Abc_CommandReadWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
pNtk
=
Wlc_ReadVer
(
pFileName
,
NULL
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"smt"
)
||
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"smt2"
)
)
pNtk
=
Wlc_ReadSmt
(
pFileName
,
fOldParser
,
fPrintTree
);
else
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"ndr"
)
)
pNtk
=
Wlc_ReadNdr
(
pFileName
);
else
{
printf
(
"Abc_CommandReadWlc(): Unknown file extension.
\n
"
);
...
...
@@ -261,7 +263,9 @@ int Abc_CommandWriteWlc( Abc_Frame_t * pAbc, int argc, char ** argv )
printf
(
"Output file name should be given on the command line.
\n
"
);
return
0
;
}
if
(
fSplitNodes
)
if
(
!
strcmp
(
Extra_FileNameExtension
(
pFileName
),
"ndr"
)
)
Wlc_WriteNdr
(
pNtk
,
pFileName
);
else
if
(
fSplitNodes
)
{
pNtk
=
Wlc_NtkDupSingleNodes
(
pNtk
);
Wlc_WriteVer
(
pNtk
,
pFileName
,
fAddCos
,
fNoFlops
);
...
...
@@ -1205,8 +1209,9 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
//Wlc_AbcUpdateNtk( pAbc, pNtk );
//Wlc_GenerateSmtStdout( pAbc );
//Wlc_NtkSimulateTest( (Wlc_Ntk_t *)pAbc->pAbcWlc );
pNtk
=
Wlc_NtkDupSingleNodes
(
pNtk
);
Wlc_AbcUpdateNtk
(
pAbc
,
pNtk
);
//pNtk = Wlc_NtkDupSingleNodes( pNtk );
//Wlc_AbcUpdateNtk( pAbc, pNtk );
//Wlc_ReadNdrTest( pNtk );
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: %%test [-vh]
\n
"
);
...
...
src/base/wlc/wlcNdr.c
0 → 100644
View file @
99ddb640
This diff is collapsed.
Click to expand it.
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