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
f402293b
Commit
f402293b
authored
Feb 06, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integration of timing manager.
parent
930369f3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
0 deletions
+62
-0
src/aig/gia/giaAiger.c
+38
-0
src/aig/gia/giaDup.c
+6
-0
src/aig/gia/giaTim.c
+18
-0
No files found.
src/aig/gia/giaAiger.c
View file @
f402293b
...
...
@@ -629,8 +629,28 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
pPlacement
=
ABC_ALLOC
(
Gia_Plc_t
,
Gia_ManObjNum
(
pNew
)
);
memcpy
(
pPlacement
,
pCur
,
4
*
Gia_ManObjNum
(
pNew
)
);
pCur
+=
4
*
Gia_ManObjNum
(
pNew
);
assert
(
pCur
==
pCurTemp
);
pNew
->
pPlacement
=
pPlacement
;
if
(
fVerbose
)
printf
(
"Finished reading extension
\"
p
\"
.
\n
"
);
}
// read choices
else
if
(
*
pCur
==
'q'
)
{
int
i
,
nPairs
,
iRepr
,
iNode
;
assert
(
pNew
->
pSibls
==
NULL
);
pNew
->
pSibls
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
pNew
)
);
pCur
++
;
pCurTemp
=
pCur
+
Gia_AigerReadInt
(
pCur
)
+
4
;
pCur
+=
4
;
nPairs
=
Gia_AigerReadInt
(
pCur
);
pCur
+=
4
;
for
(
i
=
0
;
i
<
nPairs
;
i
++
)
{
iRepr
=
Gia_AigerReadInt
(
pCur
);
pCur
+=
4
;
iNode
=
Gia_AigerReadInt
(
pCur
);
pCur
+=
4
;
pNew
->
pSibls
[
iRepr
]
=
iNode
;
assert
(
iRepr
>
iNode
);
}
assert
(
pCur
==
pCurTemp
);
if
(
fVerbose
)
printf
(
"Finished reading extension
\"
q
\"
.
\n
"
);
}
// read switching activity
else
if
(
*
pCur
==
's'
)
{
...
...
@@ -1170,6 +1190,24 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
Gia_FileWriteBufferSize
(
pFile
,
4
*
Gia_ManObjNum
(
p
)
);
fwrite
(
p
->
pPlacement
,
1
,
4
*
Gia_ManObjNum
(
p
),
pFile
);
}
// write choices
if
(
p
->
pSibls
)
{
int
i
,
nPairs
=
0
;
fprintf
(
pFile
,
"q"
);
for
(
i
=
0
;
i
<
Gia_ManObjNum
(
p
);
i
++
)
nPairs
+=
(
Gia_ObjSibl
(
p
,
i
)
>
0
);
Gia_FileWriteBufferSize
(
pFile
,
4
*
(
nPairs
*
2
+
1
)
);
Gia_FileWriteBufferSize
(
pFile
,
nPairs
);
for
(
i
=
0
;
i
<
Gia_ManObjNum
(
p
);
i
++
)
if
(
Gia_ObjSibl
(
p
,
i
)
)
{
assert
(
i
>
Gia_ObjSibl
(
p
,
i
)
);
Gia_FileWriteBufferSize
(
pFile
,
i
);
Gia_FileWriteBufferSize
(
pFile
,
Gia_ObjSibl
(
p
,
i
)
);
}
if
(
fVerbose
)
printf
(
"Finished writing extension
\"
q
\"
.
\n
"
);
}
// write switching activity
if
(
p
->
pSwitching
)
{
...
...
src/aig/gia/giaDup.c
View file @
f402293b
...
...
@@ -412,11 +412,17 @@ Gia_Man_t * Gia_ManDup( Gia_Man_t * p )
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
if
(
p
->
pSibls
)
pNew
->
pSibls
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManForEachObj1
(
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
pObj
->
Value
=
Gia_ManAppendAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
pNew
->
pSibls
[
Abc_Lit2Var
(
pObj
->
Value
)]
=
Abc_Lit2Var
(
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
))
->
Value
);
}
else
if
(
Gia_ObjIsCi
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
else
if
(
Gia_ObjIsCo
(
pObj
)
)
...
...
src/aig/gia/giaTim.c
View file @
f402293b
...
...
@@ -91,6 +91,8 @@ Gia_Man_t * Gia_ManDupUnnomalize( Gia_Man_t * p )
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
if
(
p
->
pSibls
)
pNew
->
pSibls
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
// copy primary inputs
for
(
k
=
0
;
k
<
Tim_ManPiNum
(
pTime
);
k
++
)
Gia_ManPi
(
p
,
k
)
->
Value
=
Gia_ManAppendCi
(
pNew
);
...
...
@@ -175,6 +177,8 @@ void Gia_ManDupFindOrderWithHie_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t
return
;
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
assert
(
Gia_ObjIsAnd
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
Gia_ManDupFindOrderWithHie_rec
(
p
,
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
)),
vNodes
);
Gia_ManDupFindOrderWithHie_rec
(
p
,
Gia_ObjFanin0
(
pObj
),
vNodes
);
Gia_ManDupFindOrderWithHie_rec
(
p
,
Gia_ObjFanin1
(
pObj
),
vNodes
);
Vec_IntPush
(
vNodes
,
Gia_ObjId
(
p
,
pObj
)
);
...
...
@@ -276,11 +280,17 @@ Gia_Man_t * Gia_ManDupWithHierarchy( Gia_Man_t * p, Vec_Int_t ** pvNodes )
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
if
(
p
->
pSibls
)
pNew
->
pSibls
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
vNodes
=
Gia_ManDupFindOrderWithHie
(
p
);
Gia_ManForEachObjVec
(
vNodes
,
p
,
pObj
,
i
)
{
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
pObj
->
Value
=
Gia_ManAppendAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
pNew
->
pSibls
[
Abc_Lit2Var
(
pObj
->
Value
)]
=
Abc_Lit2Var
(
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
))
->
Value
);
}
else
if
(
Gia_ObjIsCi
(
pObj
)
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
else
if
(
Gia_ObjIsCo
(
pObj
)
)
...
...
@@ -315,10 +325,14 @@ void Gia_ManDupWithBoxes_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Man_t * pNew
return
;
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
assert
(
Gia_ObjIsAnd
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
Gia_ManDupWithBoxes_rec
(
p
,
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
)),
pNew
);
Gia_ManDupWithBoxes_rec
(
p
,
Gia_ObjFanin0
(
pObj
),
pNew
);
Gia_ManDupWithBoxes_rec
(
p
,
Gia_ObjFanin1
(
pObj
),
pNew
);
// assert( !~pObj->Value );
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
pNew
->
pSibls
[
Abc_Lit2Var
(
pObj
->
Value
)]
=
Abc_Lit2Var
(
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
))
->
Value
);
}
Gia_Man_t
*
Gia_ManDupWithBoxes
(
Gia_Man_t
*
p
,
Gia_Man_t
*
pBoxes
)
{
...
...
@@ -331,6 +345,8 @@ Gia_Man_t * Gia_ManDupWithBoxes( Gia_Man_t * p, Gia_Man_t * pBoxes )
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
if
(
p
->
pSibls
)
pNew
->
pSibls
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
p
)
);
Gia_ManHashAlloc
(
pNew
);
// copy const and real PIs
Gia_ManFillValue
(
p
);
...
...
@@ -414,6 +430,8 @@ void Gia_ManLevelWithBoxes_rec( Gia_Man_t * p, Gia_Obj_t * pObj )
return
;
Gia_ObjSetTravIdCurrent
(
p
,
pObj
);
assert
(
Gia_ObjIsAnd
(
pObj
)
);
if
(
Gia_ObjSibl
(
p
,
Gia_ObjId
(
p
,
pObj
))
)
Gia_ManLevelWithBoxes_rec
(
p
,
Gia_ObjSiblObj
(
p
,
Gia_ObjId
(
p
,
pObj
))
);
Gia_ManLevelWithBoxes_rec
(
p
,
Gia_ObjFanin0
(
pObj
)
);
Gia_ManLevelWithBoxes_rec
(
p
,
Gia_ObjFanin1
(
pObj
)
);
Gia_ObjSetAndLevel
(
p
,
pObj
);
...
...
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