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
d071e026
Commit
d071e026
authored
Dec 11, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated for memory abstraction.
parent
36585eff
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
src/base/wlc/wlcNdr.c
+12
-3
src/base/wlc/wlcNtk.c
+2
-2
src/base/wlc/wlcReadVer.c
+4
-4
No files found.
src/base/wlc/wlcNdr.c
View file @
d071e026
...
...
@@ -176,8 +176,8 @@ int Ndr_TypeWlc2Ndr( int Type )
***********************************************************************/
char
*
Ndr_ObjWriteConstant
(
unsigned
*
pBits
,
int
nBits
)
{
static
char
Buffer
[
1000
];
int
i
,
Len
;
assert
(
nBits
+
10
<
1000
);
static
char
Buffer
[
1000
0
];
int
i
,
Len
;
assert
(
nBits
+
10
<
1000
0
);
sprintf
(
Buffer
,
"%d
\'
b"
,
nBits
);
Len
=
strlen
(
Buffer
);
for
(
i
=
nBits
-
1
;
i
>=
0
;
i
--
)
...
...
@@ -205,7 +205,7 @@ void * Wlc_NtkToNdr( Wlc_Ntk_t * pNtk )
Wlc_NtkForEachObj
(
pNtk
,
pObj
,
iOutId
)
{
char
*
pFunction
=
NULL
;
if
(
Wlc_ObjIsPi
(
pObj
)
)
if
(
Wlc_ObjIsPi
(
pObj
)
||
pObj
->
Type
==
0
)
continue
;
Vec_IntClear
(
vFanins
);
Wlc_ObjForEachFanin
(
pObj
,
iFanin
,
k
)
...
...
@@ -214,8 +214,17 @@ void * Wlc_NtkToNdr( Wlc_Ntk_t * pNtk )
pFunction
=
Ndr_ObjWriteConstant
(
(
unsigned
*
)
Wlc_ObjFanins
(
pObj
),
Wlc_ObjRange
(
pObj
)
);
if
(
pObj
->
Type
==
WLC_OBJ_MUX
&&
Wlc_ObjRange
(
Wlc_ObjFanin0
(
pNtk
,
pObj
))
>
1
)
Type
=
ABC_OPER_SEL_NMUX
;
else
if
(
pObj
->
Type
==
WLC_OBJ_FO
)
{
Wlc_Obj_t
*
pFi
=
Wlc_ObjFo2Fi
(
pNtk
,
pObj
);
assert
(
Vec_IntSize
(
vFanins
)
==
0
);
Vec_IntPush
(
vFanins
,
Wlc_ObjId
(
pNtk
,
pFi
)
);
Vec_IntFillExtra
(
vFanins
,
7
,
0
);
Type
=
ABC_OPER_DFFRSE
;
}
else
Type
=
Ndr_TypeWlc2Ndr
(
pObj
->
Type
);
assert
(
Type
>
0
);
Ndr_AddObject
(
pDesign
,
ModId
,
Type
,
0
,
pObj
->
End
,
pObj
->
Beg
,
pObj
->
Signed
,
Vec_IntSize
(
vFanins
),
Vec_IntArray
(
vFanins
),
1
,
&
iOutId
,
pFunction
);
...
...
src/base/wlc/wlcNtk.c
View file @
d071e026
...
...
@@ -521,7 +521,7 @@ void Wlc_NtkPrintDistrib( Wlc_Ntk_t * p, int fTwoSides, int fVerbose )
else
{
assert
(
Wlc_ObjFaninNum
(
pObj
)
>=
2
);
Sign
=
Wlc_NtkPrintDistribMakeSign
(
Wlc_ObjSign
(
pObj
),
Wlc_Obj
Sign
(
Wlc_ObjFanin0
(
p
,
pObj
)),
Wlc_ObjSign
(
Wlc_ObjFanin1
(
p
,
pObj
))
);
Sign
=
Wlc_NtkPrintDistribMakeSign
(
Wlc_ObjSign
(
pObj
),
Wlc_Obj
FaninId
(
pObj
,
0
)
?
Wlc_ObjSign
(
Wlc_ObjFanin0
(
p
,
pObj
))
:
0
,
Wlc_ObjFaninId
(
pObj
,
1
)
?
Wlc_ObjSign
(
Wlc_ObjFanin1
(
p
,
pObj
))
:
0
);
}
// add to storage
Wlc_NtkPrintDistribAddOne
(
vTypes
,
vOccurs
,
pObj
->
Type
,
Sign
);
...
...
@@ -991,7 +991,7 @@ Wlc_Ntk_t * Wlc_NtkDupDfs( Wlc_Ntk_t * p, int fMarked, int fSeq )
pObjNew
->
fXConst
=
pObj
->
fXConst
;
}
Vec_IntFree
(
vFanins
);
if
(
fSeq
)
if
(
fSeq
&&
p
->
vInits
)
{
if
(
fMarked
)
{
...
...
src/base/wlc/wlcReadVer.c
View file @
d071e026
...
...
@@ -892,7 +892,7 @@ int Wlc_PrsReadDeclaration( Wlc_Prs_t * p, char * pStart )
}
while
(
1
)
{
char
*
pName
;
int
XValue
;
char
*
pName
;
int
XValue
,
TypeNew
;
// read name
pStart
=
Wlc_PrsFindName
(
pStart
,
&
pName
);
if
(
pStart
==
NULL
)
...
...
@@ -911,11 +911,11 @@ int Wlc_PrsReadDeclaration( Wlc_Prs_t * p, char * pStart )
continue
;
}
// check definition
Type
=
Wlc_PrsFindDefinition
(
p
,
pStart
,
p
->
vFanins
,
&
XValue
);
if
(
Type
)
Type
New
=
Wlc_PrsFindDefinition
(
p
,
pStart
,
p
->
vFanins
,
&
XValue
);
if
(
Type
New
)
{
Wlc_Obj_t
*
pObj
=
Wlc_NtkObj
(
p
->
pNtk
,
iObj
);
Wlc_ObjUpdateType
(
p
->
pNtk
,
pObj
,
Type
);
Wlc_ObjUpdateType
(
p
->
pNtk
,
pObj
,
Type
New
);
Wlc_ObjAddFanins
(
p
->
pNtk
,
pObj
,
p
->
vFanins
);
pObj
->
fXConst
=
XValue
;
}
...
...
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