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
dff6e2ab
Commit
dff6e2ab
authored
Apr 10, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Procedure to dump ZDD representing a set of cubes into a PLA file.
parent
b6b9d284
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
src/misc/extra/extraBdd.h
+1
-0
src/misc/extra/extraBddMisc.c
+39
-0
No files found.
src/misc/extra/extraBdd.h
View file @
dff6e2ab
...
...
@@ -196,6 +196,7 @@ extern DdNode * extraBddChangePolarity( DdManager * dd, DdNode * bFunc, DdNo
extern
int
Extra_bddVarIsInCube
(
DdNode
*
bCube
,
int
iVar
);
extern
DdNode
*
Extra_bddAndPermute
(
DdManager
*
ddF
,
DdNode
*
bF
,
DdManager
*
ddG
,
DdNode
*
bG
,
int
*
pPermute
);
extern
int
Extra_bddCountCubes
(
DdManager
*
dd
,
DdNode
**
pFuncs
,
int
nFuncs
,
int
fMode
,
int
nLimit
,
int
*
pGuide
);
extern
void
Extra_zddDumpPla
(
DdManager
*
dd
,
DdNode
*
zCover
,
int
nVars
,
char
*
pFileName
);
#ifndef ABC_PRB
#define ABC_PRB(dd,f) printf("%s = ", #f); Extra_bddPrint(dd,f); printf("\n")
...
...
src/misc/extra/extraBddMisc.c
View file @
dff6e2ab
...
...
@@ -2293,6 +2293,45 @@ printf( "|F| =%6d |G| =%6d |H| =%6d |F|*|G| =%9d ",
Cudd_AutodynEnable
(
ddF
,
CUDD_REORDER_SYMM_SIFT
);
}
/**Function*************************************************************
Synopsis [Writes ZDD into a PLA file.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Extra_zddDumpPla
(
DdManager
*
dd
,
DdNode
*
F
,
int
nVars
,
char
*
pFileName
)
{
DdGen
*
gen
;
char
*
pCube
;
int
*
pPath
,
i
;
FILE
*
pFile
=
fopen
(
pFileName
,
"wb"
);
if
(
pFile
==
NULL
)
{
printf
(
"Cannot open file
\"
%s
\"
for writing.
\n
"
,
pFileName
);
return
;
}
fprintf
(
pFile
,
"# PLA file dumped by Extra_zddDumpPla() in ABC
\n
"
);
fprintf
(
pFile
,
".i %d
\n
"
,
nVars
);
fprintf
(
pFile
,
".o 1
\n
"
);
pCube
=
ABC_CALLOC
(
char
,
dd
->
sizeZ
);
Cudd_zddForeachPath
(
dd
,
F
,
gen
,
pPath
)
{
for
(
i
=
0
;
i
<
nVars
;
i
++
)
pCube
[
i
]
=
'-'
;
for
(
i
=
0
;
i
<
nVars
;
i
++
)
if
(
pPath
[
2
*
i
]
==
1
||
pPath
[
2
*
i
+
1
]
==
1
)
pCube
[
i
]
=
'0'
+
(
pPath
[
2
*
i
]
==
1
);
fprintf
(
pFile
,
"%s 1
\n
"
,
pCube
);
}
fprintf
(
pFile
,
".e
\n\n
"
);
fclose
(
pFile
);
ABC_FREE
(
pCube
);
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
...
...
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