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
18943f64
Commit
18943f64
authored
Oct 18, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip cells in Liberty files which have dont_use attribute.
parent
c5b48bbf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
3 deletions
+56
-3
src/map/amap/amapLiberty.c
+32
-0
src/map/scl/sclLiberty.c
+24
-3
No files found.
src/map/amap/amapLiberty.c
View file @
18943f64
...
...
@@ -209,6 +209,26 @@ int Amap_LibertyCellIsFlop( Amap_Tree_t * p, Amap_Item_t * pCell )
/**Function*************************************************************
Synopsis [Returns cell's function.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Amap_LibertyCellIsDontUse
(
Amap_Tree_t
*
p
,
Amap_Item_t
*
pCell
)
{
Amap_Item_t
*
pAttr
;
Amap_ItemForEachChild
(
p
,
pCell
,
pAttr
)
if
(
!
Amap_LibertyCompare
(
p
,
pAttr
->
Key
,
"dont_use"
)
)
return
1
;
return
0
;
}
/**Function*************************************************************
Synopsis [Returns pin's function.]
Description []
...
...
@@ -414,6 +434,12 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName, int fVerbose )
printf
(
"Amap_LibertyPrintGenlib() skipped sequential cell
\"
%s
\"
.
\n
"
,
Amap_LibertyGetString
(
p
,
pCell
->
Head
)
);
continue
;
}
if
(
Amap_LibertyCellIsDontUse
(
p
,
pCell
)
)
{
if
(
fVerbose
)
printf
(
"Amap_LibertyPrintGenlib() skipped cell
\"
%s
\"
due to dont_use attribute.
\n
"
,
Amap_LibertyGetString
(
p
,
pCell
->
Head
)
);
continue
;
}
Counter
=
Amap_LibertyCellCountOutputs
(
p
,
pCell
);
if
(
Counter
==
0
)
{
...
...
@@ -498,6 +524,12 @@ Vec_Str_t * Amap_LibertyPrintGenlibStr( Amap_Tree_t * p, int fVerbose )
printf
(
"Amap_LibertyPrintGenlib() skipped sequential cell
\"
%s
\"
.
\n
"
,
Amap_LibertyGetString
(
p
,
pCell
->
Head
)
);
continue
;
}
if
(
Amap_LibertyCellIsDontUse
(
p
,
pCell
)
)
{
if
(
fVerbose
)
printf
(
"Amap_LibertyPrintGenlib() skipped cell
\"
%s
\"
due to dont_use attribute.
\n
"
,
Amap_LibertyGetString
(
p
,
pCell
->
Head
)
);
continue
;
}
Counter
=
Amap_LibertyCellCountOutputs
(
p
,
pCell
);
if
(
Counter
==
0
)
{
...
...
src/map/scl/sclLiberty.c
View file @
18943f64
...
...
@@ -629,6 +629,14 @@ int Scl_LibertyReadCellIsFlop( Scl_Tree_t * p, Scl_Item_t * pCell )
return
1
;
return
0
;
}
int
Scl_LibertyReadCellIsDontUse
(
Scl_Tree_t
*
p
,
Scl_Item_t
*
pCell
)
{
Scl_Item_t
*
pAttr
;
Scl_ItemForEachChild
(
p
,
pCell
,
pAttr
)
if
(
!
Scl_LibertyCompare
(
p
,
pAttr
->
Key
,
"dont_use"
)
)
return
1
;
return
0
;
}
char
*
Scl_LibertyReadCellArea
(
Scl_Tree_t
*
p
,
Scl_Item_t
*
pCell
)
{
Scl_Item_t
*
pArea
;
...
...
@@ -704,6 +712,11 @@ Vec_Str_t * Scl_LibertyReadGenlibStr( Scl_Tree_t * p, int fVerbose )
if
(
fVerbose
)
printf
(
"Scl_LibertyReadGenlib() skipped sequential cell
\"
%s
\"
.
\n
"
,
Scl_LibertyReadString
(
p
,
pCell
->
Head
)
);
continue
;
}
if
(
Scl_LibertyReadCellIsDontUse
(
p
,
pCell
)
)
{
if
(
fVerbose
)
printf
(
"Scl_LibertyReadGenlib() skipped cell
\"
%s
\"
due to dont_use attribute.
\n
"
,
Scl_LibertyReadString
(
p
,
pCell
->
Head
)
);
continue
;
}
if
(
Scl_LibertyReadCellIsThreeState
(
p
,
pCell
)
)
{
if
(
fVerbose
)
printf
(
"Scl_LibertyReadGenlib() skipped three-state cell
\"
%s
\"
.
\n
"
,
Scl_LibertyReadString
(
p
,
pCell
->
Head
)
);
...
...
@@ -1417,7 +1430,7 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
Vec_Wrd_t
*
vTruth
;
char
*
pFormula
,
*
pName
;
int
i
,
k
,
Counter
,
nOutputs
,
nCells
;
int
nSkipped
[
3
]
=
{
0
};
int
nSkipped
[
4
]
=
{
0
};
// read delay-table templates
vTemples
=
Scl_LibertyReadTemplates
(
p
);
...
...
@@ -1451,6 +1464,12 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
nSkipped
[
0
]
++
;
continue
;
}
if
(
Scl_LibertyReadCellIsDontUse
(
p
,
pCell
)
)
{
if
(
fVeryVerbose
)
printf
(
"Scl_LibertyReadGenlib() skipped cell
\"
%s
\"
due to dont_use attribute.
\n
"
,
Scl_LibertyReadString
(
p
,
pCell
->
Head
)
);
nSkipped
[
3
]
++
;
continue
;
}
if
(
Scl_LibertyReadCellIsThreeState
(
p
,
pCell
)
)
{
if
(
fVeryVerbose
)
printf
(
"Scl_LibertyReadGenlib() skipped three-state cell
\"
%s
\"
.
\n
"
,
Scl_LibertyReadString
(
p
,
pCell
->
Head
)
);
...
...
@@ -1473,6 +1492,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
{
if
(
Scl_LibertyReadCellIsFlop
(
p
,
pCell
)
)
continue
;
if
(
Scl_LibertyReadCellIsDontUse
(
p
,
pCell
)
)
continue
;
if
(
Scl_LibertyReadCellIsThreeState
(
p
,
pCell
)
)
continue
;
if
(
(
Counter
=
Scl_LibertyReadCellOutputNum
(
p
,
pCell
))
==
0
)
...
...
@@ -1640,8 +1661,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
{
printf
(
"Library
\"
%s
\"
from
\"
%s
\"
has %d cells "
,
Scl_LibertyReadString
(
p
,
Scl_LibertyRoot
(
p
)
->
Head
),
p
->
pFileName
,
nCells
);
printf
(
"(%d skipped: %d seq; %d tri-state; %d no func). "
,
nSkipped
[
0
]
+
nSkipped
[
1
]
+
nSkipped
[
2
],
nSkipped
[
0
],
nSkipped
[
1
],
nSkipped
[
2
]
);
printf
(
"(%d skipped: %d seq; %d tri-state; %d no func
; %d dont_use
). "
,
nSkipped
[
0
]
+
nSkipped
[
1
]
+
nSkipped
[
2
],
nSkipped
[
0
],
nSkipped
[
1
],
nSkipped
[
2
]
,
nSkipped
[
3
]
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
p
->
clkStart
);
}
return
vOut
;
...
...
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