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
3de5d18c
Commit
3de5d18c
authored
Apr 14, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding APIs to retrieve NOR/OR gates from the library.
parent
96c622b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
src/map/mio/mio.h
+2
-0
src/map/mio/mioApi.c
+2
-0
src/map/mio/mioInt.h
+2
-0
src/map/mio/mioRead.c
+9
-4
No files found.
src/map/mio/mio.h
View file @
3de5d18c
...
...
@@ -103,6 +103,8 @@ extern Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib );
extern
Mio_Gate_t
*
Mio_LibraryReadConst1
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadNand2
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadAnd2
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadNor2
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadOr2
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadBuf
(
Mio_Library_t
*
pLib
);
extern
Mio_Gate_t
*
Mio_LibraryReadInv
(
Mio_Library_t
*
pLib
);
extern
float
Mio_LibraryReadDelayInvRise
(
Mio_Library_t
*
pLib
);
...
...
src/map/mio/mioApi.c
View file @
3de5d18c
...
...
@@ -50,6 +50,8 @@ Mio_Gate_t * Mio_LibraryReadConst0 ( Mio_Library_t * pLib ) { retur
Mio_Gate_t
*
Mio_LibraryReadConst1
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGate1
;
}
Mio_Gate_t
*
Mio_LibraryReadNand2
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateNand2
;
}
Mio_Gate_t
*
Mio_LibraryReadAnd2
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateAnd2
;
}
Mio_Gate_t
*
Mio_LibraryReadNor2
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateNor2
;
}
Mio_Gate_t
*
Mio_LibraryReadOr2
(
Mio_Library_t
*
pLib
)
{
return
pLib
->
pGateOr2
;
}
float
Mio_LibraryReadDelayInvRise
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateInv
?
pLib
->
pGateInv
->
pPins
->
dDelayBlockRise
:
0
.
0
);
}
float
Mio_LibraryReadDelayInvFall
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateInv
?
pLib
->
pGateInv
->
pPins
->
dDelayBlockFall
:
0
.
0
);
}
float
Mio_LibraryReadDelayInvMax
(
Mio_Library_t
*
pLib
)
{
return
(
float
)(
pLib
->
pGateInv
?
pLib
->
pGateInv
->
pPins
->
dDelayBlockMax
:
0
.
0
);
}
...
...
src/map/mio/mioInt.h
View file @
3de5d18c
...
...
@@ -71,6 +71,8 @@ struct Mio_LibraryStruct_t_
Mio_Gate_t
*
pGateInv
;
// the inverter
Mio_Gate_t
*
pGateNand2
;
// the NAND2 gate
Mio_Gate_t
*
pGateAnd2
;
// the AND2 gate
Mio_Gate_t
*
pGateNor2
;
// the NOR2 gate
Mio_Gate_t
*
pGateOr2
;
// the OR2 gate
st__table
*
tName2Gate
;
// the mapping of gate names into their pointer
Mem_Flex_t
*
pMmFlex
;
// the memory manaqer for SOPs
Vec_Str_t
*
vCube
;
// temporary cube
...
...
src/map/mio/mioRead.c
View file @
3de5d18c
...
...
@@ -601,14 +601,16 @@ static inline Mio_Gate_t * Mio_GateCompare( Mio_Gate_t * pThis, Mio_Gate_t * pNe
void
Mio_LibraryDetectSpecialGates
(
Mio_Library_t
*
pLib
)
{
Mio_Gate_t
*
pGate
;
word
uFuncBuf
,
uFuncInv
,
uFuncNand2
,
uFuncAnd2
;
word
uFuncBuf
,
uFuncInv
,
uFuncNand2
,
uFuncAnd2
,
uFuncNor2
,
uFuncOr2
;
Mio_LibrarySortGates
(
pLib
);
uFuncBuf
=
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
);
uFuncAnd2
=
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
&
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
);
uFuncOr2
=
ABC_CONST
(
0xAAAAAAAAAAAAAAAA
)
|
ABC_CONST
(
0xCCCCCCCCCCCCCCCC
);
uFuncInv
=
~
uFuncBuf
;
uFuncNand2
=
~
uFuncAnd2
;
uFuncNor2
=
~
uFuncOr2
;
// get smallest-area buffer
Mio_LibraryForEachGate
(
pLib
,
pGate
)
...
...
@@ -630,12 +632,15 @@ void Mio_LibraryDetectSpecialGates( Mio_Library_t * pLib )
// get smallest-area NAND2/AND2 gates
Mio_LibraryForEachGate
(
pLib
,
pGate
)
{
pLib
->
pGateNand2
=
Mio_GateCompare
(
pLib
->
pGateNand2
,
pGate
,
uFuncNand2
);
Mio_LibraryForEachGate
(
pLib
,
pGate
)
pLib
->
pGateAnd2
=
Mio_GateCompare
(
pLib
->
pGateAnd2
,
pGate
,
uFuncAnd2
);
if
(
pLib
->
pGateAnd2
==
NULL
&&
pLib
->
pGateNand2
==
NULL
)
pLib
->
pGateNor2
=
Mio_GateCompare
(
pLib
->
pGateNor2
,
pGate
,
uFuncNor2
);
pLib
->
pGateOr2
=
Mio_GateCompare
(
pLib
->
pGateOr2
,
pGate
,
uFuncOr2
);
}
if
(
pLib
->
pGateAnd2
==
NULL
&&
pLib
->
pGateNand2
==
NULL
&&
pLib
->
pGateNor2
==
NULL
&&
pLib
->
pGateOr2
==
NULL
)
{
printf
(
"Warnings: genlib library reader cannot detect the AND2
or NAND
2 gate.
\n
"
);
printf
(
"Warnings: genlib library reader cannot detect the AND2
, NAND2, OR2, and NOR
2 gate.
\n
"
);
printf
(
"Some parts of the supergate-based technology mapper may not work correctly.
\n
"
);
}
}
...
...
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