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
326e5da4
Commit
326e5da4
authored
Mar 16, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Plain Diff
Added new procedure and other small changes.
parents
290ea10c
1be6644c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
169 additions
and
7 deletions
+169
-7
abcexe.dsp
+4
-0
abclib.dsp
+27
-3
src/aig/kit/kit.h
+1
-0
src/aig/kit/kitDsd.c
+127
-0
src/base/abci/abc.c
+10
-4
No files found.
abcexe.dsp
View file @
326e5da4
...
...
@@ -87,6 +87,10 @@ LINK32=link.exe
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\src\aig\au\auCut.c
# End Source File
# Begin Source File
SOURCE=.\src\base\main\main.c
# End Source File
# End Group
...
...
abclib.dsp
View file @
326e5da4
...
...
@@ -4151,6 +4151,10 @@ SOURCE=.\src\aig\au\au.h
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auBridge.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auCore.c
# End Source File
# Begin Source File
...
...
@@ -4159,15 +4163,23 @@ SOURCE=.\src\aig\au\auCut.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auInt.h
SOURCE=.\src\aig\au\auCut.h
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auDec.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auDsd.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\au
Man
.c
SOURCE=.\src\aig\au\au
Fanout
.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\au
Mffc.c
SOURCE=.\src\aig\au\au
Int.h
# End Source File
# Begin Source File
...
...
@@ -4175,6 +4187,18 @@ SOURCE=.\src\aig\au\auNpn.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auNtk.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auNtk.h
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auSweep.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\au\auTable.c
# End Source File
# Begin Source File
...
...
src/aig/kit/kit.h
View file @
326e5da4
...
...
@@ -539,6 +539,7 @@ extern void Kit_DsdTruthPartialTwo( Kit_DsdMan_t * p, Kit_DsdNtk_t *
extern
void
Kit_DsdPrint
(
FILE
*
pFile
,
Kit_DsdNtk_t
*
pNtk
);
extern
void
Kit_DsdPrintExpanded
(
Kit_DsdNtk_t
*
pNtk
);
extern
void
Kit_DsdPrintFromTruth
(
unsigned
*
pTruth
,
int
nVars
);
extern
void
Kit_DsdWriteFromTruth
(
char
*
pBuffer
,
unsigned
*
pTruth
,
int
nVars
);
extern
Kit_DsdNtk_t
*
Kit_DsdDecompose
(
unsigned
*
pTruth
,
int
nVars
);
extern
Kit_DsdNtk_t
*
Kit_DsdDecomposeExpand
(
unsigned
*
pTruth
,
int
nVars
);
extern
Kit_DsdNtk_t
*
Kit_DsdDecomposeMux
(
unsigned
*
pTruth
,
int
nVars
,
int
nDecMux
);
...
...
src/aig/kit/kitDsd.c
View file @
326e5da4
...
...
@@ -199,6 +199,32 @@ void Kit_DsdPrintHex( FILE * pFile, unsigned * pTruth, int nFans )
/**Function*************************************************************
Synopsis [Prints the hex unsigned into a file.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
char
*
Kit_DsdWriteHex
(
char
*
pBuff
,
unsigned
*
pTruth
,
int
nFans
)
{
int
nDigits
,
Digit
,
k
;
nDigits
=
(
1
<<
nFans
)
/
4
;
for
(
k
=
nDigits
-
1
;
k
>=
0
;
k
--
)
{
Digit
=
((
pTruth
[
k
/
8
]
>>
((
k
%
8
)
*
4
))
&
15
);
if
(
Digit
<
10
)
*
pBuff
++
=
'0'
+
Digit
;
else
*
pBuff
++
=
'A'
+
Digit
-
10
;
}
return
pBuff
;
}
/**Function*************************************************************
Synopsis [Recursively print the DSD formula.]
Description []
...
...
@@ -276,6 +302,83 @@ void Kit_DsdPrint( FILE * pFile, Kit_DsdNtk_t * pNtk )
/**Function*************************************************************
Synopsis [Recursively print the DSD formula.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
char
*
Kit_DsdWrite_rec
(
char
*
pBuff
,
Kit_DsdNtk_t
*
pNtk
,
int
Id
)
{
Kit_DsdObj_t
*
pObj
;
unsigned
iLit
,
i
;
char
Symbol
;
pObj
=
Kit_DsdNtkObj
(
pNtk
,
Id
);
if
(
pObj
==
NULL
)
{
assert
(
Id
<
pNtk
->
nVars
);
*
pBuff
++
=
'a'
+
Id
;
return
pBuff
;
}
if
(
pObj
->
Type
==
KIT_DSD_CONST1
)
{
assert
(
pObj
->
nFans
==
0
);
sprintf
(
pBuff
,
"%s"
,
"Const1"
);
return
pBuff
+
strlen
(
"Const1"
);
}
if
(
pObj
->
Type
==
KIT_DSD_VAR
)
assert
(
pObj
->
nFans
==
1
);
if
(
pObj
->
Type
==
KIT_DSD_AND
)
Symbol
=
'*'
;
else
if
(
pObj
->
Type
==
KIT_DSD_XOR
)
Symbol
=
'+'
;
else
Symbol
=
','
;
if
(
pObj
->
Type
==
KIT_DSD_PRIME
)
pBuff
=
Kit_DsdWriteHex
(
pBuff
,
Kit_DsdObjTruth
(
pObj
),
pObj
->
nFans
);
*
pBuff
++
=
'('
;
Kit_DsdObjForEachFanin
(
pNtk
,
pObj
,
iLit
,
i
)
{
if
(
Kit_DsdLitIsCompl
(
iLit
)
)
*
pBuff
++
=
'!'
;
pBuff
=
Kit_DsdWrite_rec
(
pBuff
,
pNtk
,
Kit_DsdLit2Var
(
iLit
)
);
if
(
i
<
pObj
->
nFans
-
1
)
*
pBuff
++
=
Symbol
;
}
*
pBuff
++
=
')'
;
return
pBuff
;
}
/**Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Kit_DsdWrite
(
char
*
pBuff
,
Kit_DsdNtk_t
*
pNtk
)
{
if
(
Kit_DsdLitIsCompl
(
pNtk
->
Root
)
)
*
pBuff
++
=
'!'
;
pBuff
=
Kit_DsdWrite_rec
(
pBuff
,
pNtk
,
Kit_DsdLit2Var
(
pNtk
->
Root
)
);
*
pBuff
=
0
;
}
/**Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
...
...
@@ -319,6 +422,30 @@ void Kit_DsdPrintFromTruth( unsigned * pTruth, int nVars )
/**Function*************************************************************
Synopsis [Print the DSD formula.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Kit_DsdWriteFromTruth
(
char
*
pBuffer
,
unsigned
*
pTruth
,
int
nVars
)
{
Kit_DsdNtk_t
*
pTemp
,
*
pTemp2
;
// pTemp = Kit_DsdDecomposeMux( pTruth, nVars, 5 );
pTemp
=
Kit_DsdDecomposeMux
(
pTruth
,
nVars
,
8
);
// Kit_DsdPrintExpanded( pTemp );
pTemp2
=
Kit_DsdExpand
(
pTemp
);
Kit_DsdWrite
(
pBuffer
,
pTemp2
);
Kit_DsdVerify
(
pTemp2
,
pTruth
,
nVars
);
Kit_DsdNtkFree
(
pTemp2
);
Kit_DsdNtkFree
(
pTemp
);
}
/**Function*************************************************************
Synopsis [Derives the truth table of the DSD node.]
Description []
...
...
src/base/abci/abc.c
View file @
326e5da4
...
...
@@ -8669,7 +8669,7 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
// Abc_NtkDarTest( pNtk );
// Bbl_ManTest( pNtk );
/*
{
extern Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters );
extern void Aig_ManComputeDomsForCofactoring( Aig_Man_t * p );
...
...
@@ -8678,12 +8678,12 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
Aig_ManComputeDomsForCofactoring( pAig );
Aig_ManStop( pAig );
}
*/
/*
{
extern Abc_Ntk_t * Au_Man
DeriveFromAig
( Abc_Ntk_t * pAig );
pNtkRes = Au_Man
DeriveFromAig
( pNtk );
extern Abc_Ntk_t * Au_Man
TransformTest
( Abc_Ntk_t * pAig );
pNtkRes = Au_Man
TransformTest
( pNtk );
if ( pNtkRes == NULL )
{
Abc_Print( -1, "Command has failed.\n" );
...
...
@@ -8693,6 +8693,12 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes );
}
*/
/*
{
extern void Au_DsdVecTest( int nVars );
Au_DsdVecTest( 6 );
}
*/
// Abc_NtkCheckAbsorb( pNtk, 4 );
/*
...
...
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