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
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
4 deletions
+29
-4
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
+6
-1
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 )
if
(
Type
==
ABC_OPER_CONST
)
return
"const"
;
if
(
Type
==
ABC_OPER_TABLE
)
return
"table"
;
if
(
Type
==
ABC_OPER_LUT
)
return
"lut"
;
if
(
Type
==
ABC_OPER_LAST
)
return
NULL
;
assert
(
0
);
return
NULL
;
...
...
src/base/wlc/wlc.h
View file @
362b2d9d
...
...
@@ -101,6 +101,7 @@ typedef enum {
WLC_OBJ_ARI_ADDSUB
,
// 56: adder-subtractor
WLC_OBJ_SEL
,
// 57: positionally encoded selector
WLC_OBJ_DEC
,
// 58: decoder
WLC_OBJ_LUT
,
// 59: lookup table
WLC_OBJ_NUMBER
// 59: unused
}
Wlc_ObjType_t
;
// 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 )
}
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_ManStop
(
pTemp
);
}
...
...
src/base/wlc/wlcNdr.c
View file @
362b2d9d
...
...
@@ -100,7 +100,7 @@ int Ndr_TypeNdr2Wlc( int Type )
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_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
;
}
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_READ
)
return
ABC_OPER_RAMR
;
// 54: read 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
;
}
...
...
src/base/wlc/wlcWriteVer.c
View file @
362b2d9d
...
...
@@ -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)"
,
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
)
{
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 )
printf
(
"The design has no delay information.
\n
"
);
Wln_NtkCleanInstId
(
pNtk
);
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
);
else
if
(
!
Wln_ObjIsCio
(
pNtk
,
iObj
)
&&
Wln_ObjFaninNum
(
pNtk
,
iObj
)
>
0
)
Wln_ObjSetInstId
(
pNtk
,
iObj
,
10
);
}
Wln_NtkForEachCo
(
pNtk
,
iObj
,
i
)
{
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
"
);
}
}
...
...
src/base/wln/wlnWriteVer.c
View file @
362b2d9d
...
...
@@ -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)"
,
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
)
)
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
)
...
...
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