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
8a30b675
Commit
8a30b675
authored
Aug 09, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to Cba data-structure.
parent
6a4e94e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
src/base/cba/cba.h
+2
-1
src/base/cba/cbaReadVer.c
+1
-1
src/base/cba/cbaWriteVer.c
+4
-3
No files found.
src/base/cba/cba.h
View file @
8a30b675
...
...
@@ -367,6 +367,7 @@ static inline int Cba_FonLeft( Cba_Ntk_t * p, int f ) { r
static
inline
int
Cba_FonRight
(
Cba_Ntk_t
*
p
,
int
f
)
{
return
Cba_NtkRangeRight
(
p
,
Cba_FonRange
(
p
,
f
));
}
static
inline
int
Cba_FonRangeSize
(
Cba_Ntk_t
*
p
,
int
f
)
{
return
Cba_FonIsConst
(
f
)
?
Cba_FonConstRange
(
p
,
f
):
Cba_NtkRangeSize
(
p
,
Cba_FonRange
(
p
,
f
));
}
static
inline
void
Cba_FonSetRange
(
Cba_Ntk_t
*
p
,
int
f
,
int
x
)
{
assert
(
Cba_NtkHasFonRanges
(
p
));
Vec_IntSetEntry
(
&
p
->
vFonRange
,
f
,
x
);
}
static
inline
void
Cba_FonHashRange
(
Cba_Ntk_t
*
p
,
int
f
,
int
l
,
int
r
)
{
Cba_FonSetRange
(
p
,
f
,
Cba_NtkHashRange
(
p
,
l
,
r
)
);
}
static
inline
int
Cba_FonCopy
(
Cba_Ntk_t
*
p
,
int
f
)
{
return
Cba_FonIsReal
(
f
)
?
Vec_IntEntry
(
&
p
->
vFonCopy
,
f
)
:
f
;
}
static
inline
void
Cba_FonSetCopy
(
Cba_Ntk_t
*
p
,
int
f
,
int
x
)
{
assert
(
Cba_FonIsReal
(
f
));
assert
(
Cba_FonCopy
(
p
,
f
)
==
0
);
Vec_IntWriteEntry
(
&
p
->
vFonCopy
,
f
,
x
);
}
static
inline
int
Cba_FonName
(
Cba_Ntk_t
*
p
,
int
f
)
{
assert
(
Cba_NtkHasFonNames
(
p
));
assert
(
Cba_FonIsReal
(
f
));
return
Vec_IntGetEntry
(
&
p
->
vFonName
,
f
);
}
...
...
@@ -1050,7 +1051,7 @@ extern void Prs_ManWriteBlif( char * pFileName, Vec_Ptr_t * p );
extern
void
Cba_ManWriteBlif
(
char
*
pFileName
,
Cba_Man_t
*
p
);
/*=== cbaWriteVer.c ==========================================================*/
extern
void
Cba_ManCreatePrimMap
(
char
**
pMap
);
extern
char
*
Cba_ManGetSliceName
(
Cba_Ntk_t
*
p
,
int
iFon
,
int
Left
,
int
Right
);
extern
char
*
Cba_ManGetSliceName
(
Cba_Ntk_t
*
p
,
int
iFon
,
int
RangeId
);
extern
void
Prs_ManWriteVerilog
(
char
*
pFileName
,
Vec_Ptr_t
*
p
);
extern
void
Cba_ManWriteVerilog
(
char
*
pFileName
,
Cba_Man_t
*
p
,
int
fInlineConcat
);
...
...
src/base/cba/cbaReadVer.c
View file @
8a30b675
...
...
@@ -1013,7 +1013,7 @@ int Prs_CreateSlice( Cba_Ntk_t * p, int iFon, Prs_Ntk_t * pNtk, int Range )
int
iObj
,
iFonNew
,
NameId
;
assert
(
Cba_FonIsReal
(
iFon
)
);
// check existing slice
NameId
=
Cba_NtkNewStrId
(
p
,
Cba_ManGetSliceName
(
p
,
iFon
,
Cba_NtkRangeLeft
(
p
,
Range
),
Cba_NtkRangeRight
(
p
,
Range
)
)
);
NameId
=
Cba_NtkNewStrId
(
p
,
Cba_ManGetSliceName
(
p
,
iFon
,
Range
)
);
iFonNew
=
Cba_NtkGetMap
(
p
,
NameId
);
if
(
iFonNew
)
return
iFonNew
;
...
...
src/base/cba/cbaWriteVer.c
View file @
8a30b675
...
...
@@ -112,7 +112,7 @@ static void Prs_ManWriteVerilogBoxes( FILE * pFile, Prs_Ntk_t * p )
Prs_NtkForEachBox
(
p
,
vBox
,
i
)
{
Cba_ObjType_t
NtkId
=
Prs_BoxNtk
(
p
,
i
);
char
*
pNtkName
=
Prs_NtkStr
(
p
,
Prs_BoxName
(
p
,
i
));
//
char * pNtkName = Prs_NtkStr(p, Prs_BoxName(p, i));
if
(
NtkId
==
CBA_BOX_MUX
)
Prs_ManWriteVerilogMux
(
pFile
,
p
,
vBox
);
else
if
(
Prs_BoxIsNode
(
p
,
i
)
)
// node ------- check order of fanins
...
...
@@ -123,7 +123,6 @@ static void Prs_ManWriteVerilogBoxes( FILE * pFile, Prs_Ntk_t * p )
}
else
// box
{
//char * s = Prs_NtkStr(p, Vec_IntEntry(vBox, 0));
fprintf
(
pFile
,
" %s %s ("
,
Prs_NtkStr
(
p
,
NtkId
),
Prs_BoxName
(
p
,
i
)
?
Prs_NtkStr
(
p
,
Prs_BoxName
(
p
,
i
))
:
""
);
Prs_ManWriteVerilogArray2
(
pFile
,
p
,
vBox
);
fprintf
(
pFile
,
");
\n
"
);
...
...
@@ -311,8 +310,10 @@ char * Cba_FonGetName( Cba_Ntk_t * p, int i )
return
pName
;
return
Vec_StrPrintF
(
Abc_NamBuffer
(
Cba_NtkNam
(
p
)),
"
\\
%s "
,
pName
);
}
char
*
Cba_ManGetSliceName
(
Cba_Ntk_t
*
p
,
int
iFon
,
int
Left
,
int
Right
)
char
*
Cba_ManGetSliceName
(
Cba_Ntk_t
*
p
,
int
iFon
,
int
RangeId
)
{
int
Left
=
Cba_NtkRangeLeft
(
p
,
RangeId
);
int
Right
=
Cba_NtkRangeRight
(
p
,
RangeId
);
char
*
pName
=
Cba_FonNameStr
(
p
,
iFon
);
if
(
Cba_NameIsLegalInVerilog
(
pName
)
)
if
(
Left
==
Right
)
...
...
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