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
bab71101
Commit
bab71101
authored
Jul 29, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to Cba data-structure.
parent
7f7b7671
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
src/base/cba/cba.h
+0
-0
src/base/cba/cbaNtk.c
+5
-5
src/base/cba/cbaWriteVer.c
+0
-0
src/base/io/ioReadPla.c
+4
-4
No files found.
src/base/cba/cba.h
View file @
bab71101
This diff is collapsed.
Click to expand it.
src/base/cba/cbaNtk.c
View file @
bab71101
...
@@ -422,7 +422,7 @@ void Cba_NtkCollapse_rec( Cba_Ntk_t * pNew, Cba_Ntk_t * p, Vec_Int_t * vSigs, in
...
@@ -422,7 +422,7 @@ void Cba_NtkCollapse_rec( Cba_Ntk_t * pNew, Cba_Ntk_t * p, Vec_Int_t * vSigs, in
}
}
Cba_Man_t
*
Cba_ManCollapse
(
Cba_Man_t
*
p
,
int
TypeBuf
)
Cba_Man_t
*
Cba_ManCollapse
(
Cba_Man_t
*
p
,
int
TypeBuf
)
{
{
Cba_Man_t
*
pNew
=
Cba_ManAlloc
(
p
->
pSpec
,
1
,
Abc_NamRef
(
p
->
pStrs
),
Abc_NamStart
(
100
,
24
)
);
Cba_Man_t
*
pNew
=
Cba_ManAlloc
(
p
->
pSpec
,
1
,
Abc_NamRef
(
p
->
pStrs
),
Abc_Nam
Ref
(
p
->
pCons
),
Abc_Nam
Start
(
100
,
24
)
);
Cba_Ntk_t
*
pRoot
=
Cba_ManRoot
(
p
),
*
pRootNew
;
Cba_Ntk_t
*
pRoot
=
Cba_ManRoot
(
p
),
*
pRootNew
;
Vec_Int_t
*
vSigs
=
Vec_IntAlloc
(
1000
);
Vec_Int_t
*
vSigs
=
Vec_IntAlloc
(
1000
);
int
i
,
iObj
,
iObjNew
,
iFon
,
nObjs
=
0
,
nFins
=
0
,
nFons
=
0
;
int
i
,
iObj
,
iObjNew
,
iFon
,
nObjs
=
0
,
nFins
=
0
,
nFons
=
0
;
...
@@ -593,7 +593,7 @@ void Cba_ManExtractGroupInt( Cba_Ntk_t * pNew, Cba_Ntk_t * p, Vec_Int_t * vObjs,
...
@@ -593,7 +593,7 @@ void Cba_ManExtractGroupInt( Cba_Ntk_t * pNew, Cba_Ntk_t * p, Vec_Int_t * vObjs,
}
}
Cba_Man_t
*
Cba_ManExtractGroup
(
Cba_Man_t
*
p
,
Vec_Int_t
*
vObjs
)
Cba_Man_t
*
Cba_ManExtractGroup
(
Cba_Man_t
*
p
,
Vec_Int_t
*
vObjs
)
{
{
Cba_Man_t
*
pNew
=
Cba_ManAlloc
(
p
->
pSpec
,
1
,
Abc_NamRef
(
p
->
pStrs
),
Abc_NamStart
(
100
,
24
)
);
Cba_Man_t
*
pNew
=
Cba_ManAlloc
(
p
->
pSpec
,
1
,
Abc_NamRef
(
p
->
pStrs
),
Abc_Nam
Ref
(
p
->
pCons
),
Abc_Nam
Start
(
100
,
24
)
);
Cba_Ntk_t
*
pRoot
=
Cba_ManRoot
(
p
),
*
pRootNew
;
Cba_Ntk_t
*
pRoot
=
Cba_ManRoot
(
p
),
*
pRootNew
;
Vec_Int_t
*
vFonIns
=
Cba_NtkCollectInFons
(
pRoot
,
vObjs
);
Vec_Int_t
*
vFonIns
=
Cba_NtkCollectInFons
(
pRoot
,
vObjs
);
Vec_Int_t
*
vFonOuts
=
Cba_NtkCollectOutFons
(
pRoot
,
vObjs
);
Vec_Int_t
*
vFonOuts
=
Cba_NtkCollectOutFons
(
pRoot
,
vObjs
);
...
@@ -676,7 +676,7 @@ static inline int Cba_NtkInsertGiaObj( Cba_Ntk_t * p, Gia_Man_t * pGia, int iObj
...
@@ -676,7 +676,7 @@ static inline int Cba_NtkInsertGiaObj( Cba_Ntk_t * p, Gia_Man_t * pGia, int iObj
}
}
Cba_Man_t
*
Cba_ManDeriveFromGia
(
Gia_Man_t
*
pGia
)
Cba_Man_t
*
Cba_ManDeriveFromGia
(
Gia_Man_t
*
pGia
)
{
{
Cba_Man_t
*
p
=
Cba_ManAlloc
(
pGia
->
pSpec
,
1
,
NULL
,
NULL
);
Cba_Man_t
*
p
=
Cba_ManAlloc
(
pGia
->
pSpec
,
1
,
NULL
,
NULL
,
NULL
);
Cba_Ntk_t
*
pNtk
=
Cba_NtkAlloc
(
p
,
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
pGia
->
pName
,
NULL
),
Gia_ManCiNum
(
pGia
),
Gia_ManCoNum
(
pGia
),
1000
,
2000
,
2000
);
Cba_Ntk_t
*
pNtk
=
Cba_NtkAlloc
(
p
,
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
pGia
->
pName
,
NULL
),
Gia_ManCiNum
(
pGia
),
Gia_ManCoNum
(
pGia
),
1000
,
2000
,
2000
);
Vec_Int_t
*
vLit2Fon
=
Vec_IntStartFull
(
2
*
Gia_ManObjNum
(
pGia
)
);
Vec_Int_t
*
vLit2Fon
=
Vec_IntStartFull
(
2
*
Gia_ManObjNum
(
pGia
)
);
int
i
,
iObj
,
iObjNew
,
NameId
,
iLit0
,
iFon0
;
int
i
,
iObj
,
iObjNew
,
NameId
,
iLit0
,
iFon0
;
...
@@ -686,7 +686,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia )
...
@@ -686,7 +686,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia )
Cba_NtkCleanObjNames
(
pNtk
);
Cba_NtkCleanObjNames
(
pNtk
);
Gia_ManForEachCiId
(
pGia
,
iObj
,
i
)
Gia_ManForEachCiId
(
pGia
,
iObj
,
i
)
{
{
NameId
=
pGia
->
vNamesIn
?
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
Vec_PtrEntry
(
pGia
->
vNamesIn
,
i
),
NULL
)
:
Cba_ManNewStrId
(
p
,
"i"
,
i
,
NULL
);
NameId
=
pGia
->
vNamesIn
?
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
Vec_PtrEntry
(
pGia
->
vNamesIn
,
i
),
NULL
)
:
Cba_ManNewStrId
_
(
p
,
"i"
,
i
,
NULL
);
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_PI
,
0
,
1
);
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_PI
,
0
,
1
);
Cba_ObjSetName
(
pNtk
,
iObjNew
,
NameId
);
Cba_ObjSetName
(
pNtk
,
iObjNew
,
NameId
);
Vec_IntWriteEntry
(
vLit2Fon
,
Abc_Var2Lit
(
iObj
,
0
),
Cba_ObjFon0
(
pNtk
,
iObjNew
)
);
Vec_IntWriteEntry
(
vLit2Fon
,
Abc_Var2Lit
(
iObj
,
0
),
Cba_ObjFon0
(
pNtk
,
iObjNew
)
);
...
@@ -708,7 +708,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia )
...
@@ -708,7 +708,7 @@ Cba_Man_t * Cba_ManDeriveFromGia( Gia_Man_t * pGia )
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_BOX_BUF
,
1
,
1
);
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_BOX_BUF
,
1
,
1
);
Cba_ObjSetFinFon
(
pNtk
,
iObjNew
,
0
,
iFon0
);
Cba_ObjSetFinFon
(
pNtk
,
iObjNew
,
0
,
iFon0
);
iFon0
=
Cba_ObjFon0
(
pNtk
,
iObjNew
);
// non-const fon unique for this output
iFon0
=
Cba_ObjFon0
(
pNtk
,
iObjNew
);
// non-const fon unique for this output
NameId
=
pGia
->
vNamesOut
?
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
Vec_PtrEntry
(
pGia
->
vNamesOut
,
i
),
NULL
)
:
Cba_ManNewStrId
(
p
,
"o"
,
i
,
NULL
);
NameId
=
pGia
->
vNamesOut
?
Abc_NamStrFindOrAdd
(
p
->
pStrs
,
Vec_PtrEntry
(
pGia
->
vNamesOut
,
i
),
NULL
)
:
Cba_ManNewStrId
_
(
p
,
"o"
,
i
,
NULL
);
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_PO
,
1
,
0
);
iObjNew
=
Cba_ObjAlloc
(
pNtk
,
CBA_OBJ_PO
,
1
,
0
);
Cba_ObjSetName
(
pNtk
,
iObjNew
,
NameId
);
Cba_ObjSetName
(
pNtk
,
iObjNew
,
NameId
);
Cba_ObjSetFinFon
(
pNtk
,
iObjNew
,
0
,
iFon0
);
Cba_ObjSetFinFon
(
pNtk
,
iObjNew
,
0
,
iFon0
);
...
...
src/base/cba/cbaWriteVer.c
View file @
bab71101
This diff is collapsed.
Click to expand it.
src/base/io/ioReadPla.c
View file @
bab71101
...
@@ -498,17 +498,17 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth )
...
@@ -498,17 +498,17 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros, int fBoth )
}
}
pCubeIn
=
(
char
*
)
vTokens
->
pArray
[
0
];
pCubeIn
=
(
char
*
)
vTokens
->
pArray
[
0
];
pCubeOut
=
(
char
*
)
vTokens
->
pArray
[
1
];
pCubeOut
=
(
char
*
)
vTokens
->
pArray
[
1
];
if
(
strlen
(
pCubeIn
)
!=
(
unsigned
)
nInputs
)
if
(
(
int
)
strlen
(
pCubeIn
)
!=
nInputs
)
{
{
printf
(
"%s (line %d): Input cube length (%d) differs from the number of inputs (%d).
\n
"
,
printf
(
"%s (line %d): Input cube length (%d) differs from the number of inputs (%d).
\n
"
,
Extra_FileReaderGetFileName
(
p
),
iLine
,
strlen
(
pCubeIn
),
nInputs
);
Extra_FileReaderGetFileName
(
p
),
iLine
,
(
int
)
strlen
(
pCubeIn
),
nInputs
);
Abc_NtkDelete
(
pNtk
);
Abc_NtkDelete
(
pNtk
);
return
NULL
;
return
NULL
;
}
}
if
(
strlen
(
pCubeOut
)
!=
(
unsigned
)
nOutputs
)
if
(
(
int
)
strlen
(
pCubeOut
)
!=
nOutputs
)
{
{
printf
(
"%s (line %d): Output cube length (%d) differs from the number of outputs (%d).
\n
"
,
printf
(
"%s (line %d): Output cube length (%d) differs from the number of outputs (%d).
\n
"
,
Extra_FileReaderGetFileName
(
p
),
iLine
,
strlen
(
pCubeOut
),
nOutputs
);
Extra_FileReaderGetFileName
(
p
),
iLine
,
(
int
)
strlen
(
pCubeOut
),
nOutputs
);
Abc_NtkDelete
(
pNtk
);
Abc_NtkDelete
(
pNtk
);
Extra_ProgressBarStop
(
pProgress
);
Extra_ProgressBarStop
(
pProgress
);
ABC_FREE
(
ppSops
);
ABC_FREE
(
ppSops
);
...
...
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