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
5453820c
Commit
5453820c
authored
Jan 06, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch &miter -x for XORs outputs of two word-level POs.
parent
3240abdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
2 deletions
+57
-2
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaDup.c
+31
-0
src/base/abci/abc.c
+25
-2
No files found.
src/aig/gia/gia.h
View file @
5453820c
...
...
@@ -1163,6 +1163,7 @@ extern Gia_Man_t * Gia_ManDupAndOr( Gia_Man_t * p, int nOuts, int fUseOr
extern
Gia_Man_t
*
Gia_ManDupZeroUndc
(
Gia_Man_t
*
p
,
char
*
pInit
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManMiter2
(
Gia_Man_t
*
p
,
char
*
pInit
,
int
fVerbose
);
extern
Gia_Man_t
*
Gia_ManTransformMiter
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManTransformMiter2
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManTransformToDual
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManChoiceMiter
(
Vec_Ptr_t
*
vGias
);
extern
Gia_Man_t
*
Gia_ManDupWithConstraints
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vPoTypes
);
...
...
src/aig/gia/giaDup.c
View file @
5453820c
...
...
@@ -2458,6 +2458,37 @@ Gia_Man_t * Gia_ManTransformMiter( Gia_Man_t * p )
Gia_ManStop
(
pTemp
);
return
pNew
;
}
Gia_Man_t
*
Gia_ManTransformMiter2
(
Gia_Man_t
*
p
)
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
,
*
pObj2
;
int
i
,
iLit
,
nPart
=
Gia_ManPoNum
(
p
)
/
2
;
assert
(
(
Gia_ManPoNum
(
p
)
&
1
)
==
0
);
pNew
=
Gia_ManStart
(
Gia_ManObjNum
(
p
)
);
pNew
->
pName
=
Abc_UtilStrsav
(
p
->
pName
);
pNew
->
pSpec
=
Abc_UtilStrsav
(
p
->
pSpec
);
Gia_ManConst0
(
p
)
->
Value
=
0
;
Gia_ManHashAlloc
(
pNew
);
Gia_ManForEachCi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCi
(
pNew
);
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManHashAnd
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin1Copy
(
pObj
)
);
Gia_ManForEachPo
(
p
,
pObj
,
i
)
{
if
(
i
==
nPart
)
break
;
pObj2
=
Gia_ManPo
(
p
,
nPart
+
i
);
iLit
=
Gia_ManHashXor
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
),
Gia_ObjFanin0Copy
(
pObj2
)
);
Gia_ManAppendCo
(
pNew
,
iLit
);
}
Gia_ManForEachRi
(
p
,
pObj
,
i
)
pObj
->
Value
=
Gia_ManAppendCo
(
pNew
,
Gia_ObjFanin0Copy
(
pObj
)
);
Gia_ManHashStop
(
pNew
);
Gia_ManSetRegNum
(
pNew
,
Gia_ManRegNum
(
p
)
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
return
pNew
;
}
Gia_Man_t
*
Gia_ManTransformToDual
(
Gia_Man_t
*
p
)
{
Gia_Man_t
*
pNew
;
...
...
src/base/abci/abc.c
View file @
5453820c
...
...
@@ -30199,9 +30199,10 @@ int Abc_CommandAbc9Miter( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fDualOut
=
0
;
int
fSeq
=
0
;
int
fTrans
=
0
;
int
fTransX
=
0
;
int
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Idstvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Idst
x
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -30225,6 +30226,9 @@ int Abc_CommandAbc9Miter( Abc_Frame_t * pAbc, int argc, char ** argv )
case
't'
:
fTrans
^=
1
;
break
;
case
'x'
:
fTransX
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -30251,6 +30255,24 @@ int Abc_CommandAbc9Miter( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The miter (current AIG) is transformed by XORing POs pair-wise.
\n
"
);
return
0
;
}
if
(
fTransX
)
{
if
(
(
Gia_ManPoNum
(
pAbc
->
pGia
)
&
1
)
==
1
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Miter(): The number of outputs should be even.
\n
"
);
return
0
;
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Miter(): There is no AIG.
\n
"
);
return
1
;
}
pAux
=
Gia_ManTransformMiter2
(
pAbc
->
pGia
);
Abc_FrameUpdateGia
(
pAbc
,
pAux
);
Abc_Print
(
1
,
"The miter (current AIG) is transformed by XORing POs of two word-level outputs.
\n
"
);
return
0
;
}
pArgvNew
=
argv
+
globalUtilOptind
;
nArgcNew
=
argc
-
globalUtilOptind
;
...
...
@@ -30288,12 +30310,13 @@ int Abc_CommandAbc9Miter( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &miter [-I num] [-dstvh] <file>
\n
"
);
Abc_Print
(
-
2
,
"usage: &miter [-I num] [-dst
x
vh] <file>
\n
"
);
Abc_Print
(
-
2
,
"
\t
creates miter of two designs (current AIG vs. <file>)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-I num : the number of last PIs to replicate [default = %d]
\n
"
,
nInsDup
);
Abc_Print
(
-
2
,
"
\t
-d : toggle creating dual-output miter [default = %s]
\n
"
,
fDualOut
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle creating sequential miter [default = %s]
\n
"
,
fSeq
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle XORing pair-wise POs of the miter [default = %s]
\n
"
,
fTrans
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-x : toggle XORing POs of two word-level outputs [default = %s]
\n
"
,
fTransX
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
<file> : AIGER file with the design to miter
\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