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
362b2d9d
Commit
362b2d9d
authored
Apr 05, 2019
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supporting LUT in NDR and WLC.
parent
0739bd7f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
5 deletions
+30
-5
src/aig/miniaig/abcOper.h
+1
-0
src/base/wlc/wlc.h
+1
-0
src/base/wlc/wlcBlast.c
+1
-1
src/base/wlc/wlcNdr.c
+2
-2
src/base/wlc/wlcWriteVer.c
+9
-0
src/base/wln/wlnRetime.c
+7
-2
src/base/wln/wlnWriteVer.c
+9
-0
No files found.
src/aig/miniaig/abcOper.h
View file @
362b2d9d
...
@@ -226,6 +226,7 @@ static inline const char * Abc_OperName( int Type )
...
@@ -226,6 +226,7 @@ static inline const char * Abc_OperName( int Type )
if
(
Type
==
ABC_OPER_CONST
)
return
"const"
;
if
(
Type
==
ABC_OPER_CONST
)
return
"const"
;
if
(
Type
==
ABC_OPER_TABLE
)
return
"table"
;
if
(
Type
==
ABC_OPER_TABLE
)
return
"table"
;
if
(
Type
==
ABC_OPER_LUT
)
return
"lut"
;
if
(
Type
==
ABC_OPER_LAST
)
return
NULL
;
if
(
Type
==
ABC_OPER_LAST
)
return
NULL
;
assert
(
0
);
assert
(
0
);
return
NULL
;
return
NULL
;
...
...
src/base/wlc/wlc.h
View file @
362b2d9d
...
@@ -101,6 +101,7 @@ typedef enum {
...
@@ -101,6 +101,7 @@ typedef enum {
WLC_OBJ_ARI_ADDSUB
,
// 56: adder-subtractor
WLC_OBJ_ARI_ADDSUB
,
// 56: adder-subtractor
WLC_OBJ_SEL
,
// 57: positionally encoded selector
WLC_OBJ_SEL
,
// 57: positionally encoded selector
WLC_OBJ_DEC
,
// 58: decoder
WLC_OBJ_DEC
,
// 58: decoder
WLC_OBJ_LUT
,
// 59: lookup table
WLC_OBJ_NUMBER
// 59: unused
WLC_OBJ_NUMBER
// 59: unused
}
Wlc_ObjType_t
;
}
Wlc_ObjType_t
;
// when adding new types, remember to update table Wlc_Names in "wlcNtk.c"
// when adding new types, remember to update table Wlc_Names in "wlcNtk.c"
...
...
src/base/wlc/wlcBlast.c
View file @
362b2d9d
...
@@ -2055,7 +2055,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
...
@@ -2055,7 +2055,7 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn )
}
}
else
else
{
{
pNew
=
Gia_ManDupZeroUndc
(
pTemp
=
pNew
,
p
->
pInits
,
pPar
->
fSaveFfNames
?
1
+
Gia_ManRegNum
(
pNew
)
:
0
,
pPar
->
fGiaSimple
,
0
);
pNew
=
Gia_ManDupZeroUndc
(
pTemp
=
pNew
,
p
->
pInits
,
pPar
->
fSaveFfNames
?
1
+
Gia_ManRegNum
(
pNew
)
:
0
,
pPar
->
fGiaSimple
,
pPar
->
fVerbose
);
Gia_ManDupRemapLiterals
(
vBits
,
pTemp
);
Gia_ManDupRemapLiterals
(
vBits
,
pTemp
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
}
}
...
...
src/base/wlc/wlcNdr.c
View file @
362b2d9d
...
@@ -100,7 +100,7 @@ int Ndr_TypeNdr2Wlc( int Type )
...
@@ -100,7 +100,7 @@ int Ndr_TypeNdr2Wlc( int Type )
if
(
Type
==
ABC_OPER_DFFRSE
)
return
WLC_OBJ_FF
;
// 05: flop
if
(
Type
==
ABC_OPER_DFFRSE
)
return
WLC_OBJ_FF
;
// 05: flop
if
(
Type
==
ABC_OPER_RAMR
)
return
WLC_OBJ_READ
;
// 54: read port
if
(
Type
==
ABC_OPER_RAMR
)
return
WLC_OBJ_READ
;
// 54: read port
if
(
Type
==
ABC_OPER_RAMW
)
return
WLC_OBJ_WRITE
;
// 55: write port
if
(
Type
==
ABC_OPER_RAMW
)
return
WLC_OBJ_WRITE
;
// 55: write port
if
(
Type
==
ABC_OPER_LUT
)
return
WLC_OBJ_
TABLE
;
// 55
: LUT
if
(
Type
==
ABC_OPER_LUT
)
return
WLC_OBJ_
LUT
;
// 59
: LUT
return
-
1
;
return
-
1
;
}
}
int
Ndr_TypeWlc2Ndr
(
int
Type
)
int
Ndr_TypeWlc2Ndr
(
int
Type
)
...
@@ -160,7 +160,7 @@ int Ndr_TypeWlc2Ndr( int Type )
...
@@ -160,7 +160,7 @@ int Ndr_TypeWlc2Ndr( int Type )
if
(
Type
==
WLC_OBJ_FF
)
return
ABC_OPER_DFFRSE
;
// 05: flop
if
(
Type
==
WLC_OBJ_FF
)
return
ABC_OPER_DFFRSE
;
// 05: flop
if
(
Type
==
WLC_OBJ_READ
)
return
ABC_OPER_RAMR
;
// 54: read port
if
(
Type
==
WLC_OBJ_READ
)
return
ABC_OPER_RAMR
;
// 54: read port
if
(
Type
==
WLC_OBJ_WRITE
)
return
ABC_OPER_RAMW
;
// 55: write port
if
(
Type
==
WLC_OBJ_WRITE
)
return
ABC_OPER_RAMW
;
// 55: write port
if
(
Type
==
WLC_OBJ_
TABLE
)
return
ABC_OPER_LUT
;
// 55
: LUT
if
(
Type
==
WLC_OBJ_
LUT
)
return
ABC_OPER_LUT
;
// 59
: LUT
return
-
1
;
return
-
1
;
}
}
...
...
src/base/wlc/wlcWriteVer.c
View file @
362b2d9d
...
@@ -203,6 +203,15 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
...
@@ -203,6 +203,15 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf
(
pFile
,
" s%d_Index(%s, "
,
i
,
Wlc_ObjName
(
p
,
Wlc_ObjFaninId0
(
pObj
))
);
fprintf
(
pFile
,
" s%d_Index(%s, "
,
i
,
Wlc_ObjName
(
p
,
Wlc_ObjFaninId0
(
pObj
))
);
fprintf
(
pFile
,
"%s)"
,
Wlc_ObjName
(
p
,
i
)
);
fprintf
(
pFile
,
"%s)"
,
Wlc_ObjName
(
p
,
i
)
);
}
}
else
if
(
pObj
->
Type
==
WLC_OBJ_LUT
)
{
// wire [3:0] s4972; LUT lut4972_Index(s4971, s4972);
fprintf
(
pFile
,
"%s ; LUT"
,
Wlc_ObjName
(
p
,
i
)
);
fprintf
(
pFile
,
" lut%d (%s, "
,
i
,
Wlc_ObjName
(
p
,
Wlc_ObjFaninId0
(
pObj
))
);
for
(
k
=
1
;
k
<
Wlc_ObjFaninNum
(
pObj
);
k
++
)
fprintf
(
pFile
,
"%s, "
,
Wlc_ObjName
(
p
,
Wlc_ObjFaninId
(
pObj
,
k
))
);
fprintf
(
pFile
,
"%s)"
,
Wlc_ObjName
(
p
,
i
)
);
}
else
if
(
pObj
->
Type
==
WLC_OBJ_CONST
)
else
if
(
pObj
->
Type
==
WLC_OBJ_CONST
)
{
{
fprintf
(
pFile
,
"%-16s = %d
\'
%sh"
,
Wlc_ObjName
(
p
,
i
),
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
""
);
fprintf
(
pFile
,
"%-16s = %d
\'
%sh"
,
Wlc_ObjName
(
p
,
i
),
Wlc_ObjRange
(
pObj
),
Wlc_ObjIsSigned
(
pObj
)
?
"s"
:
""
);
...
...
src/base/wln/wlnRetime.c
View file @
362b2d9d
...
@@ -503,12 +503,17 @@ void Wln_NtkRetimeCreateDelayInfo( Wln_Ntk_t * pNtk )
...
@@ -503,12 +503,17 @@ void Wln_NtkRetimeCreateDelayInfo( Wln_Ntk_t * pNtk )
printf
(
"The design has no delay information.
\n
"
);
printf
(
"The design has no delay information.
\n
"
);
Wln_NtkCleanInstId
(
pNtk
);
Wln_NtkCleanInstId
(
pNtk
);
Wln_NtkForEachObj
(
pNtk
,
iObj
)
Wln_NtkForEachObj
(
pNtk
,
iObj
)
if
(
Wln_ObjIsFf
(
pNtk
,
iObj
)
)
{
if
(
Wln_ObjIsFf
(
pNtk
,
iObj
)
||
Wln_ObjType
(
pNtk
,
iObj
)
==
ABC_OPER_SLICE
||
Wln_ObjType
(
pNtk
,
iObj
)
==
ABC_OPER_CONCAT
)
Wln_ObjSetInstId
(
pNtk
,
iObj
,
1
);
Wln_ObjSetInstId
(
pNtk
,
iObj
,
1
);
else
if
(
!
Wln_ObjIsCio
(
pNtk
,
iObj
)
&&
Wln_ObjFaninNum
(
pNtk
,
iObj
)
>
0
)
else
if
(
!
Wln_ObjIsCio
(
pNtk
,
iObj
)
&&
Wln_ObjFaninNum
(
pNtk
,
iObj
)
>
0
)
Wln_ObjSetInstId
(
pNtk
,
iObj
,
10
);
Wln_ObjSetInstId
(
pNtk
,
iObj
,
10
);
}
Wln_NtkForEachCo
(
pNtk
,
iObj
,
i
)
Wln_NtkForEachCo
(
pNtk
,
iObj
,
i
)
Wln_ObjSetInstId
(
pNtk
,
Wln_ObjFanin0
(
pNtk
,
iObj
),
1
);
{
if
(
Wln_ObjType
(
pNtk
,
Wln_ObjFanin0
(
pNtk
,
iObj
))
!=
ABC_OPER_LUT
)
Wln_ObjSetInstId
(
pNtk
,
Wln_ObjFanin0
(
pNtk
,
iObj
),
1
);
}
printf
(
"Assuming user-specified delays for internal nodes.
\n
"
);
printf
(
"Assuming user-specified delays for internal nodes.
\n
"
);
}
}
}
}
...
...
src/base/wln/wlnWriteVer.c
View file @
362b2d9d
...
@@ -184,6 +184,15 @@ void Wln_WriteVerInt( FILE * pFile, Wln_Ntk_t * p )
...
@@ -184,6 +184,15 @@ void Wln_WriteVerInt( FILE * pFile, Wln_Ntk_t * p )
fprintf
(
pFile
,
" s%d_Index(%s, "
,
iObj
,
Wln_ObjName
(
p
,
Wln_ObjFanin0
(
p
,
iObj
))
);
fprintf
(
pFile
,
" s%d_Index(%s, "
,
iObj
,
Wln_ObjName
(
p
,
Wln_ObjFanin0
(
p
,
iObj
))
);
fprintf
(
pFile
,
"%s)"
,
Wln_ObjName
(
p
,
iObj
)
);
fprintf
(
pFile
,
"%s)"
,
Wln_ObjName
(
p
,
iObj
)
);
}
}
else
if
(
Wln_ObjType
(
p
,
iObj
)
==
ABC_OPER_LUT
)
{
// wire [3:0] s4972; LUT lut4972_Index(s4971, s4972);
fprintf
(
pFile
,
"%s ; LUT"
,
Wln_ObjName
(
p
,
iObj
)
);
fprintf
(
pFile
,
" lut%d (%s, "
,
iObj
,
Wln_ObjName
(
p
,
Wln_ObjFanin0
(
p
,
iObj
))
);
for
(
k
=
1
;
k
<
Wln_ObjFaninNum
(
p
,
iObj
);
k
++
)
fprintf
(
pFile
,
"%s, "
,
Wln_ObjName
(
p
,
Wln_ObjFanin
(
p
,
iObj
,
k
))
);
fprintf
(
pFile
,
"%s)"
,
Wln_ObjName
(
p
,
iObj
)
);
}
else
if
(
Wln_ObjIsConst
(
p
,
iObj
)
)
else
if
(
Wln_ObjIsConst
(
p
,
iObj
)
)
fprintf
(
pFile
,
"%-16s = %s"
,
Wln_ObjName
(
p
,
iObj
),
Wln_ObjConstString
(
p
,
iObj
)
);
fprintf
(
pFile
,
"%-16s = %s"
,
Wln_ObjName
(
p
,
iObj
),
Wln_ObjConstString
(
p
,
iObj
)
);
else
if
(
Wln_ObjType
(
p
,
iObj
)
==
ABC_OPER_SHIFT_ROTR
||
Wln_ObjType
(
p
,
iObj
)
==
ABC_OPER_SHIFT_ROTL
)
else
if
(
Wln_ObjType
(
p
,
iObj
)
==
ABC_OPER_SHIFT_ROTR
||
Wln_ObjType
(
p
,
iObj
)
==
ABC_OPER_SHIFT_ROTL
)
...
...
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