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
6d1fc80f
Commit
6d1fc80f
authored
Aug 29, 2018
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expriments with functions.
parent
7b2ef943
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
src/opt/dau/dauNpn.c
+15
-9
No files found.
src/opt/dau/dauNpn.c
View file @
6d1fc80f
...
@@ -28,7 +28,7 @@ ABC_NAMESPACE_IMPL_START
...
@@ -28,7 +28,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#define USE4VARS 1
//
#define USE4VARS 1
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
/// FUNCTION DEFINITIONS ///
...
@@ -144,8 +144,14 @@ unsigned * Dau_ReadFile( char * pFileName, int nSizeW )
...
@@ -144,8 +144,14 @@ unsigned * Dau_ReadFile( char * pFileName, int nSizeW )
abctime
clk
=
Abc_Clock
();
abctime
clk
=
Abc_Clock
();
FILE
*
pFile
=
fopen
(
pFileName
,
"rb"
);
FILE
*
pFile
=
fopen
(
pFileName
,
"rb"
);
unsigned
*
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
unsigned
*
p
=
(
unsigned
*
)
ABC_CALLOC
(
word
,
nSizeW
);
int
RetValue
=
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
);
int
RetValue
=
pFile
?
fread
(
p
,
sizeof
(
word
),
nSizeW
,
pFile
)
:
0
;
fclose
(
pFile
);
if
(
pFile
)
{
printf
(
"Finished reading file
\"
%s
\"
.
\n
"
,
pFileName
);
fclose
(
pFile
);
}
else
printf
(
"Cannot open input file
\"
%s
\"
.
\n
"
,
pFileName
);
Abc_PrintTime
(
1
,
"File reading"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"File reading"
,
Abc_Clock
()
-
clk
);
return
p
;
return
p
;
}
}
...
@@ -192,7 +198,7 @@ void Dau_NetworkEnum()
...
@@ -192,7 +198,7 @@ void Dau_NetworkEnum()
pTable
[
Inv
]
|=
(
1
<<
31
);
pTable
[
Inv
]
|=
(
1
<<
31
);
Vec_IntPushTwo
(
Vec_WecEntry
(
vNpns
,
0
),
0
,
Inv
);
Vec_IntPushTwo
(
Vec_WecEntry
(
vNpns
,
0
),
0
,
Inv
);
Vec_IntPushTwo
(
Vec_WecEntry
(
vNpns_
,
0
),
0
,
Inv
);
Vec_IntPushTwo
(
Vec_WecEntry
(
vNpns_
,
0
),
0
,
Inv
);
printf
(
"Nodes = %2d. New = %
4d. Total = %6d. New = %4
d. Total = %6d. "
,
printf
(
"Nodes = %2d. New = %
6d. Total = %6d. New = %6
d. Total = %6d. "
,
0
,
Vec_IntSize
(
Vec_WecEntry
(
vNpns
,
0
)),
Vec_WecSizeSize
(
vNpns
),
0
,
Vec_IntSize
(
Vec_WecEntry
(
vNpns
,
0
)),
Vec_WecSizeSize
(
vNpns
),
Vec_IntSize
(
Vec_WecEntry
(
vNpns_
,
0
)),
Vec_WecSizeSize
(
vNpns_
)
);
Vec_IntSize
(
Vec_WecEntry
(
vNpns_
,
0
)),
Vec_WecSizeSize
(
vNpns_
)
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
...
@@ -351,17 +357,17 @@ void Dau_NetworkEnum()
...
@@ -351,17 +357,17 @@ void Dau_NetworkEnum()
printf
(
"Found function %d
\n
"
,
Res
);
printf
(
"Found function %d
\n
"
,
Res
);
}
}
}
}
printf
(
"Nodes = %2d. New = %
4d. Total = %6d. New = %4
d. Total = %6d. "
,
printf
(
"Nodes = %2d. New = %
6d. Total = %6d. New = %6
d. Total = %6d. "
,
n
,
Vec_IntSize
(
vFuncsN
),
Vec_WecSizeSize
(
vNpns
),
Vec_IntSize
(
vFuncsN_
),
Vec_WecSizeSize
(
vNpns_
)
);
n
,
Vec_IntSize
(
vFuncsN
),
Vec_WecSizeSize
(
vNpns
),
Vec_IntSize
(
vFuncsN_
),
Vec_WecSizeSize
(
vNpns_
)
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
Abc_Clock
()
-
clk
);
fflush
(
stdout
);
fflush
(
stdout
);
if
(
Vec_IntSize
(
vFuncsN
)
==
0
)
if
(
Vec_IntSize
(
vFuncsN
)
==
0
)
break
;
break
;
}
}
printf
(
"Functions with 7 nodes:
\n
"
);
//
printf( "Functions with 7 nodes:\n" );
Vec_IntForEachEntry
(
Vec_WecEntry
(
vNpns_
,
7
),
Entry
,
i
)
//
Vec_IntForEachEntry( Vec_WecEntry(vNpns_,7), Entry, i )
printf
(
"%04x "
,
Entry
);
//
printf( "%04x ", Entry );
printf
(
"
\n
"
);
//
printf( "\n" );
Vec_WecFree
(
vNpns
);
Vec_WecFree
(
vNpns
);
Vec_WecFree
(
vNpns_
);
Vec_WecFree
(
vNpns_
);
...
...
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