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
bf795e57
Commit
bf795e57
authored
Mar 13, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handling special case in 'fold' when the network is combinational.
parent
ec297394
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
src/aig/saig/saigConstr2.c
+15
-5
src/base/abci/abc.c
+9
-10
No files found.
src/aig/saig/saigConstr2.c
View file @
bf795e57
...
@@ -944,7 +944,6 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
...
@@ -944,7 +944,6 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
Aig_Man_t
*
pAigNew
;
Aig_Man_t
*
pAigNew
;
Aig_Obj_t
*
pMiter
,
*
pFlopOut
,
*
pFlopIn
,
*
pObj
;
Aig_Obj_t
*
pMiter
,
*
pFlopOut
,
*
pFlopIn
,
*
pObj
;
int
i
;
int
i
;
assert
(
Saig_ManRegNum
(
pAig
)
>
0
);
if
(
Aig_ManConstrNum
(
pAig
)
==
0
)
if
(
Aig_ManConstrNum
(
pAig
)
==
0
)
return
Aig_ManDupDfs
(
pAig
);
return
Aig_ManDupDfs
(
pAig
);
assert
(
Aig_ManConstrNum
(
pAig
)
<
Saig_ManPoNum
(
pAig
)
);
assert
(
Aig_ManConstrNum
(
pAig
)
<
Saig_ManPoNum
(
pAig
)
);
...
@@ -969,9 +968,15 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
...
@@ -969,9 +968,15 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
continue
;
continue
;
pMiter
=
Aig_Or
(
pAigNew
,
pMiter
,
Aig_NotCond
(
Aig_ObjChild0Copy
(
pObj
),
fCompl
)
);
pMiter
=
Aig_Or
(
pAigNew
,
pMiter
,
Aig_NotCond
(
Aig_ObjChild0Copy
(
pObj
),
fCompl
)
);
}
}
// create additional flop
// create additional flop
pFlopOut
=
Aig_ObjCreateCi
(
pAigNew
);
if
(
Saig_ManRegNum
(
pAig
)
>
0
)
pFlopIn
=
Aig_Or
(
pAigNew
,
pMiter
,
pFlopOut
);
{
pFlopOut
=
Aig_ObjCreateCi
(
pAigNew
);
pFlopIn
=
Aig_Or
(
pAigNew
,
pMiter
,
pFlopOut
);
}
else
pFlopIn
=
pMiter
;
// create primary output
// create primary output
Saig_ManForEachPo
(
pAig
,
pObj
,
i
)
Saig_ManForEachPo
(
pAig
,
pObj
,
i
)
...
@@ -985,10 +990,15 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
...
@@ -985,10 +990,15 @@ Aig_Man_t * Saig_ManDupFoldConstrsFunc( Aig_Man_t * pAig, int fCompl, int fVerbo
// transfer to register outputs
// transfer to register outputs
Saig_ManForEachLi
(
pAig
,
pObj
,
i
)
Saig_ManForEachLi
(
pAig
,
pObj
,
i
)
Aig_ObjCreateCo
(
pAigNew
,
Aig_ObjChild0Copy
(
pObj
)
);
Aig_ObjCreateCo
(
pAigNew
,
Aig_ObjChild0Copy
(
pObj
)
);
// create additional flop
// create additional flop
Aig_ObjCreateCo
(
pAigNew
,
pFlopIn
);
if
(
Saig_ManRegNum
(
pAig
)
>
0
)
{
Aig_ObjCreateCo
(
pAigNew
,
pFlopIn
);
Aig_ManSetRegNum
(
pAigNew
,
Aig_ManRegNum
(
pAig
)
+
1
);
}
Aig_ManSetRegNum
(
pAigNew
,
Aig_ManRegNum
(
pAig
)
+
1
);
// perform cleanup
Aig_ManCleanup
(
pAigNew
);
Aig_ManCleanup
(
pAigNew
);
Aig_ManSeqCleanup
(
pAigNew
);
Aig_ManSeqCleanup
(
pAigNew
);
return
pAigNew
;
return
pAigNew
;
...
...
src/base/abci/abc.c
View file @
bf795e57
...
@@ -21967,11 +21967,6 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -21967,11 +21967,6 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
return
1
;
}
}
if
(
Abc_NtkIsComb
(
pNtk
)
)
{
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
return
0
;
}
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
{
{
Abc_Print
(
-
1
,
"Currently only works for structurally hashed circuits.
\n
"
);
Abc_Print
(
-
1
,
"Currently only works for structurally hashed circuits.
\n
"
);
...
@@ -22007,6 +22002,8 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22007,6 +22002,8 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
// consider the case of manual constraint definition
// consider the case of manual constraint definition
if
(
nConstrs
>
0
)
if
(
nConstrs
>
0
)
{
{
if
(
Abc_NtkIsComb
(
pNtk
)
)
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
if
(
Abc_NtkConstrNum
(
pNtk
)
>
0
)
if
(
Abc_NtkConstrNum
(
pNtk
)
>
0
)
{
{
Abc_Print
(
-
1
,
"The network already has constraints.
\n
"
);
Abc_Print
(
-
1
,
"The network already has constraints.
\n
"
);
...
@@ -22021,6 +22018,11 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22021,6 +22018,11 @@ int Abc_CommandConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
pNtk
->
nConstrs
=
nConstrs
;
pNtk
->
nConstrs
=
nConstrs
;
return
0
;
return
0
;
}
}
if
(
Abc_NtkIsComb
(
pNtk
)
)
{
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
return
0
;
}
// detect constraints using functional/structural methods
// detect constraints using functional/structural methods
Abc_NtkDarConstr
(
pNtk
,
nFrames
,
nConfs
,
nProps
,
fStruct
,
fOldAlgo
,
fVerbose
);
Abc_NtkDarConstr
(
pNtk
,
nFrames
,
nConfs
,
nProps
,
fStruct
,
fOldAlgo
,
fVerbose
);
return
0
;
return
0
;
...
@@ -22217,11 +22219,6 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22217,11 +22219,6 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
Abc_Print
(
-
1
,
"Empty network.
\n
"
);
return
1
;
return
1
;
}
}
if
(
Abc_NtkIsComb
(
pNtk
)
)
{
Abc_Print
(
-
1
,
"The network is combinational.
\n
"
);
return
0
;
}
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
if
(
!
Abc_NtkIsStrash
(
pNtk
)
)
{
{
Abc_Print
(
-
1
,
"Currently only works for structurally hashed circuits.
\n
"
);
Abc_Print
(
-
1
,
"Currently only works for structurally hashed circuits.
\n
"
);
...
@@ -22232,6 +22229,8 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22232,6 +22229,8 @@ int Abc_CommandFold( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"The network has no constraints.
\n
"
);
Abc_Print
(
-
1
,
"The network has no constraints.
\n
"
);
return
0
;
return
0
;
}
}
if
(
Abc_NtkIsComb
(
pNtk
)
)
Abc_Print
(
0
,
"The network is combinational.
\n
"
);
// modify the current network
// modify the current network
pNtkRes
=
Abc_NtkDarFold
(
pNtk
,
fCompl
,
fVerbose
);
pNtkRes
=
Abc_NtkDarFold
(
pNtk
,
fCompl
,
fVerbose
);
if
(
pNtkRes
==
NULL
)
if
(
pNtkRes
==
NULL
)
...
...
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