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
92023a29
Commit
92023a29
authored
Aug 05, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some warnings.
parent
c42aeb81
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/base/abci/abcExact.c
+10
-9
No files found.
src/base/abci/abcExact.c
View file @
92023a29
...
@@ -416,6 +416,7 @@ static void Ses_StoreRead( Ses_Store_t * pStore, const char * pFilename )
...
@@ -416,6 +416,7 @@ static void Ses_StoreRead( Ses_Store_t * pStore, const char * pFilename )
char
pHeader
[
3
];
char
pHeader
[
3
];
char
*
pNetwork
;
char
*
pNetwork
;
FILE
*
pFile
;
FILE
*
pFile
;
int
value
;
pFile
=
fopen
(
pFilename
,
"rb"
);
pFile
=
fopen
(
pFilename
,
"rb"
);
if
(
pFile
==
NULL
)
if
(
pFile
==
NULL
)
...
@@ -424,21 +425,21 @@ static void Ses_StoreRead( Ses_Store_t * pStore, const char * pFilename )
...
@@ -424,21 +425,21 @@ static void Ses_StoreRead( Ses_Store_t * pStore, const char * pFilename )
return
;
return
;
}
}
fread
(
&
nEntries
,
sizeof
(
int
),
1
,
pFile
);
value
=
fread
(
&
nEntries
,
sizeof
(
int
),
1
,
pFile
);
for
(
i
=
0
;
i
<
nEntries
;
++
i
)
for
(
i
=
0
;
i
<
nEntries
;
++
i
)
{
{
fread
(
pTruth
,
sizeof
(
word
),
4
,
pFile
);
value
=
fread
(
pTruth
,
sizeof
(
word
),
4
,
pFile
);
fread
(
&
nVars
,
sizeof
(
int
),
1
,
pFile
);
value
=
fread
(
&
nVars
,
sizeof
(
int
),
1
,
pFile
);
fread
(
pArrTimeProfile
,
sizeof
(
int
),
8
,
pFile
);
value
=
fread
(
pArrTimeProfile
,
sizeof
(
int
),
8
,
pFile
);
fread
(
pHeader
,
sizeof
(
char
),
3
,
pFile
);
value
=
fread
(
pHeader
,
sizeof
(
char
),
3
,
pFile
);
pNetwork
=
ABC_CALLOC
(
char
,
3
+
4
*
pHeader
[
ABC_EXACT_SOL_NGATES
]
+
2
+
pHeader
[
ABC_EXACT_SOL_NVARS
]
);
pNetwork
=
ABC_CALLOC
(
char
,
3
+
4
*
pHeader
[
ABC_EXACT_SOL_NGATES
]
+
2
+
pHeader
[
ABC_EXACT_SOL_NVARS
]
);
pNetwork
[
0
]
=
pHeader
[
0
];
pNetwork
[
0
]
=
pHeader
[
0
];
pNetwork
[
1
]
=
pHeader
[
1
];
pNetwork
[
1
]
=
pHeader
[
1
];
pNetwork
[
2
]
=
pHeader
[
2
];
pNetwork
[
2
]
=
pHeader
[
2
];
fread
(
pNetwork
+
3
,
sizeof
(
char
),
4
*
pHeader
[
ABC_EXACT_SOL_NGATES
]
+
2
+
pHeader
[
ABC_EXACT_SOL_NVARS
],
pFile
);
value
=
fread
(
pNetwork
+
3
,
sizeof
(
char
),
4
*
pHeader
[
ABC_EXACT_SOL_NGATES
]
+
2
+
pHeader
[
ABC_EXACT_SOL_NVARS
],
pFile
);
Ses_StoreAddEntry
(
pStore
,
pTruth
,
nVars
,
pArrTimeProfile
,
pNetwork
);
Ses_StoreAddEntry
(
pStore
,
pTruth
,
nVars
,
pArrTimeProfile
,
pNetwork
);
}
}
...
@@ -901,7 +902,7 @@ static char * Ses_ManExtractSolution( Ses_Man_t * pSes )
...
@@ -901,7 +902,7 @@ static char * Ses_ManExtractSolution( Ses_Man_t * pSes )
{
{
int
nSol
,
h
,
i
,
j
,
k
,
l
,
aj
,
ak
,
d
,
nOp
;
int
nSol
,
h
,
i
,
j
,
k
,
l
,
aj
,
ak
,
d
,
nOp
;
char
*
pSol
,
*
p
;
char
*
pSol
,
*
p
;
int
*
pPerm
;
/* will be a 2d array [i][l] where is is gate id and l is PI id */
int
*
pPerm
=
NULL
;
/* will be a 2d array [i][l] where is is gate id and l is PI id */
/* compute length of solution, for now all gates have 2 inputs */
/* compute length of solution, for now all gates have 2 inputs */
nSol
=
3
+
pSes
->
nGates
*
4
+
pSes
->
nSpecFunc
*
(
2
+
pSes
->
nSpecVars
);
nSol
=
3
+
pSes
->
nGates
*
4
+
pSes
->
nSpecFunc
*
(
2
+
pSes
->
nSpecVars
);
...
@@ -1654,8 +1655,8 @@ void Abc_ExactStoreTest( int fVerbose )
...
@@ -1654,8 +1655,8 @@ void Abc_ExactStoreTest( int fVerbose )
Abc_Ntk_t
*
pNtk
;
Abc_Ntk_t
*
pNtk
;
Abc_Obj_t
*
pFanins
[
4
];
Abc_Obj_t
*
pFanins
[
4
];
Vec_Ptr_t
*
vNames
;
Vec_Ptr_t
*
vNames
;
char
pPerm
[
4
];
//
char pPerm[4];
int
Cost
;
//
int Cost;
pNtk
=
Abc_NtkAlloc
(
ABC_NTK_LOGIC
,
ABC_FUNC_SOP
,
1
);
pNtk
=
Abc_NtkAlloc
(
ABC_NTK_LOGIC
,
ABC_FUNC_SOP
,
1
);
pNtk
->
pName
=
Extra_UtilStrsav
(
"exact"
);
pNtk
->
pName
=
Extra_UtilStrsav
(
"exact"
);
...
...
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