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
2c8c0d87
Commit
2c8c0d87
authored
Jan 31, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler warnings.
parent
77dbe2b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
66 deletions
+66
-66
src/base/cba/cbaCom.c
+1
-1
src/base/cba/cbaPrs.h
+0
-64
src/base/cba/cbaPrsTrans.c
+64
-0
src/base/cba/cbaPtr.c
+1
-1
No files found.
src/base/cba/cbaCom.c
View file @
2c8c0d87
...
@@ -616,7 +616,7 @@ int Cba_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -616,7 +616,7 @@ int Cba_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
extern
void
Prs_ManReadBlifTest
();
extern
void
Prs_ManReadBlifTest
();
extern
void
Prs_ManReadVerilogTest
();
extern
void
Prs_ManReadVerilogTest
();
Cba_Man_t
*
p
=
Cba_AbcGetMan
(
pAbc
);
//
Cba_Man_t * p = Cba_AbcGetMan(pAbc);
int
c
,
fVerbose
=
0
;
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
...
...
src/base/cba/cbaPrs.h
View file @
2c8c0d87
...
@@ -328,70 +328,6 @@ static inline int Prs_ManMemory( Vec_Ptr_t * vPrs )
...
@@ -328,70 +328,6 @@ static inline int Prs_ManMemory( Vec_Ptr_t * vPrs )
}
}
/**Function*************************************************************
Synopsis [Count range size.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
int
Prs_ManRangeSizeName
(
Prs_Ntk_t
*
p
,
int
Name
)
{
return
1
;
}
static
inline
int
Prs_ManRangeSizeRange
(
Prs_Ntk_t
*
p
,
int
Range
)
{
char
*
pStr
;
int
Left
,
Right
;
if
(
Range
==
0
)
return
1
;
pStr
=
Prs_NtkStr
(
p
,
Range
);
assert
(
pStr
[
0
]
==
'['
);
Left
=
Right
=
atoi
(
pStr
+
1
);
pStr
=
strstr
(
pStr
,
"="
);
if
(
pStr
)
Right
=
atoi
(
pStr
+
1
);
return
1
+
(
Left
>
Right
?
Left
-
Right
:
Right
-
Left
);
}
static
inline
int
Prs_ManRangeSizeConst
(
Prs_Ntk_t
*
p
,
int
Const
)
{
return
atoi
(
Prs_NtkStr
(
p
,
Const
)
);
}
static
inline
int
Prs_ManRangeSizeConcat
(
Prs_Ntk_t
*
p
,
int
Con
)
{
extern
int
Prs_ManRangeSizeArray
(
Prs_Ntk_t
*
p
,
Vec_Int_t
*
vSlices
,
int
Start
,
int
Stop
);
Vec_Int_t
*
vSigs
=
Prs_CatSignals
(
p
,
Con
);
return
Prs_ManRangeSizeArray
(
p
,
vSigs
,
0
,
Vec_IntSize
(
vSigs
)
);
}
static
inline
int
Prs_ManRangeSizeSignal
(
Prs_Ntk_t
*
p
,
int
Sig
)
{
int
Value
=
Abc_Lit2Var2
(
Sig
);
Prs_ManType_t
Type
=
Abc_Lit2Att2
(
Sig
);
if
(
Type
==
CBA_PRS_NAME
)
return
Prs_ManRangeSizeName
(
p
,
Value
);
if
(
Type
==
CBA_PRS_SLICE
)
return
Prs_ManRangeSizeRange
(
p
,
Prs_SliceRange
(
p
,
Value
)
);
if
(
Type
==
CBA_PRS_CONST
)
return
Prs_ManRangeSizeConst
(
p
,
Value
);
if
(
Type
==
CBA_PRS_CONCAT
)
return
Prs_ManRangeSizeConcat
(
p
,
Value
);
assert
(
0
);
return
0
;
}
static
inline
int
Prs_ManRangeSizeArray
(
Prs_Ntk_t
*
p
,
Vec_Int_t
*
vSlices
,
int
Start
,
int
Stop
)
{
int
i
,
Sig
,
Count
=
0
;
assert
(
Vec_IntSize
(
vSlices
)
>
0
);
Vec_IntForEachEntryStartStop
(
vSlices
,
Sig
,
i
,
Start
,
Stop
)
Count
+=
Prs_ManRangeSizeSignal
(
p
,
Sig
);
return
Count
;
}
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// ITERATORS ///
/// ITERATORS ///
...
...
src/base/cba/cbaPrsTrans.c
View file @
2c8c0d87
...
@@ -33,6 +33,70 @@ ABC_NAMESPACE_IMPL_START
...
@@ -33,6 +33,70 @@ ABC_NAMESPACE_IMPL_START
/**Function*************************************************************
/**Function*************************************************************
Synopsis [Count range size.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
int
Prs_ManRangeSizeName
(
Prs_Ntk_t
*
p
,
int
Name
)
{
return
1
;
}
static
inline
int
Prs_ManRangeSizeRange
(
Prs_Ntk_t
*
p
,
int
Range
)
{
char
*
pStr
;
int
Left
,
Right
;
if
(
Range
==
0
)
return
1
;
pStr
=
Prs_NtkStr
(
p
,
Range
);
assert
(
pStr
[
0
]
==
'['
);
Left
=
Right
=
atoi
(
pStr
+
1
);
pStr
=
strstr
(
pStr
,
"="
);
if
(
pStr
)
Right
=
atoi
(
pStr
+
1
);
return
1
+
(
Left
>
Right
?
Left
-
Right
:
Right
-
Left
);
}
static
inline
int
Prs_ManRangeSizeConst
(
Prs_Ntk_t
*
p
,
int
Const
)
{
return
atoi
(
Prs_NtkStr
(
p
,
Const
)
);
}
static
inline
int
Prs_ManRangeSizeConcat
(
Prs_Ntk_t
*
p
,
int
Con
)
{
extern
int
Prs_ManRangeSizeArray
(
Prs_Ntk_t
*
p
,
Vec_Int_t
*
vSlices
,
int
Start
,
int
Stop
);
Vec_Int_t
*
vSigs
=
Prs_CatSignals
(
p
,
Con
);
return
Prs_ManRangeSizeArray
(
p
,
vSigs
,
0
,
Vec_IntSize
(
vSigs
)
);
}
static
inline
int
Prs_ManRangeSizeSignal
(
Prs_Ntk_t
*
p
,
int
Sig
)
{
int
Value
=
Abc_Lit2Var2
(
Sig
);
Prs_ManType_t
Type
=
Abc_Lit2Att2
(
Sig
);
if
(
Type
==
CBA_PRS_NAME
)
return
Prs_ManRangeSizeName
(
p
,
Value
);
if
(
Type
==
CBA_PRS_SLICE
)
return
Prs_ManRangeSizeRange
(
p
,
Prs_SliceRange
(
p
,
Value
)
);
if
(
Type
==
CBA_PRS_CONST
)
return
Prs_ManRangeSizeConst
(
p
,
Value
);
if
(
Type
==
CBA_PRS_CONCAT
)
return
Prs_ManRangeSizeConcat
(
p
,
Value
);
assert
(
0
);
return
0
;
}
int
Prs_ManRangeSizeArray
(
Prs_Ntk_t
*
p
,
Vec_Int_t
*
vSlices
,
int
Start
,
int
Stop
)
{
int
i
,
Sig
,
Count
=
0
;
assert
(
Vec_IntSize
(
vSlices
)
>
0
);
Vec_IntForEachEntryStartStop
(
vSlices
,
Sig
,
i
,
Start
,
Stop
)
Count
+=
Prs_ManRangeSizeSignal
(
p
,
Sig
);
return
Count
;
}
/**Function*************************************************************
Synopsis []
Synopsis []
Description []
Description []
...
...
src/base/cba/cbaPtr.c
View file @
2c8c0d87
...
@@ -222,7 +222,7 @@ void Cba_ManCollectGateNameOne( Mio_Library_t * pLib, Ptr_ObjType_t Type, word T
...
@@ -222,7 +222,7 @@ void Cba_ManCollectGateNameOne( Mio_Library_t * pLib, Ptr_ObjType_t Type, word T
}
}
Vec_Ptr_t
*
Cba_ManCollectGateNamesByTruth
(
Mio_Library_t
*
pLib
)
Vec_Ptr_t
*
Cba_ManCollectGateNamesByTruth
(
Mio_Library_t
*
pLib
)
{
{
static
word
uTruth
,
uTruth
s6
[
3
]
=
{
static
word
uTruths6
[
3
]
=
{
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
ABC_CONST
(
0xF0F0F0F0F0F0F0F0
),
...
...
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