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
267f6116
Commit
267f6116
authored
Jul 20, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes to enable smarter simulation.
parent
ee261ef3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
78 additions
and
0 deletions
+78
-0
abclib.dsp
+4
-0
src/aig/ssw/module.make
+1
-0
src/aig/ssw/ssw.h
+3
-0
src/aig/ssw/sswRarity.c
+0
-0
src/aig/ssw/sswSim.c
+70
-0
No files found.
abclib.dsp
View file @
267f6116
...
...
@@ -3779,6 +3779,10 @@ SOURCE=.\src\aig\ssw\sswPart.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\ssw\sswRarity.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\ssw\sswSat.c
# End Source File
# Begin Source File
...
...
src/aig/ssw/module.make
View file @
267f6116
...
...
@@ -11,6 +11,7 @@ SRC += src/aig/ssw/sswAig.c \
src/aig/ssw/sswMan.c
\
src/aig/ssw/sswPart.c
\
src/aig/ssw/sswPairs.c
\
src/aig/ssw/sswRarity.c
\
src/aig/ssw/sswSat.c
\
src/aig/ssw/sswSemi.c
\
src/aig/ssw/sswSim.c
\
...
...
src/aig/ssw/ssw.h
View file @
267f6116
...
...
@@ -124,6 +124,9 @@ extern int Ssw_SmlNumFrames( Ssw_Sml_t * p );
extern
int
Ssw_SmlNumWordsTotal
(
Ssw_Sml_t
*
p
);
extern
unsigned
*
Ssw_SmlSimInfo
(
Ssw_Sml_t
*
p
,
Aig_Obj_t
*
pObj
);
extern
int
Ssw_SmlObjsAreEqualWord
(
Ssw_Sml_t
*
p
,
Aig_Obj_t
*
pObj0
,
Aig_Obj_t
*
pObj1
);
extern
void
Ssw_SmlInitializeSpecial
(
Ssw_Sml_t
*
p
,
Vec_Int_t
*
vInit
);
extern
Vec_Ptr_t
*
Ssw_SmlSimDataPointers
(
Ssw_Sml_t
*
p
);
ABC_NAMESPACE_HEADER_END
...
...
src/aig/ssw/sswRarity.c
0 → 100644
View file @
267f6116
This diff is collapsed.
Click to expand it.
src/aig/ssw/sswSim.c
View file @
267f6116
...
...
@@ -579,6 +579,27 @@ void Ssw_SmlObjAssignConst( Ssw_Sml_t * p, Aig_Obj_t * pObj, int fConst1, int iF
SeeAlso []
***********************************************************************/
void
Ssw_SmlObjAssignConstWord
(
Ssw_Sml_t
*
p
,
Aig_Obj_t
*
pObj
,
int
fConst1
,
int
iFrame
,
int
iWord
)
{
unsigned
*
pSims
;
assert
(
iFrame
<
p
->
nFrames
);
assert
(
iWord
<
p
->
nWordsFrame
);
assert
(
Aig_ObjIsPi
(
pObj
)
);
pSims
=
Ssw_ObjSim
(
p
,
pObj
->
Id
)
+
p
->
nWordsFrame
*
iFrame
;
pSims
[
iWord
]
=
fConst1
?
~
(
unsigned
)
0
:
0
;
}
/**Function*************************************************************
Synopsis [Assigns constant patterns to the PI node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Ssw_SmlObjSetWord
(
Ssw_Sml_t
*
p
,
Aig_Obj_t
*
pObj
,
unsigned
Word
,
int
iWord
,
int
iFrame
)
{
unsigned
*
pSims
;
...
...
@@ -904,6 +925,33 @@ void Ssw_SmlInitialize( Ssw_Sml_t * p, int fInit )
SeeAlso []
***********************************************************************/
void
Ssw_SmlInitializeSpecial
(
Ssw_Sml_t
*
p
,
Vec_Int_t
*
vInit
)
{
Aig_Obj_t
*
pObj
;
int
Entry
,
i
,
k
,
nRegs
;
nRegs
=
Aig_ManRegNum
(
p
->
pAig
);
assert
(
nRegs
>
0
);
assert
(
nRegs
<=
Aig_ManPiNum
(
p
->
pAig
)
);
assert
(
Vec_IntSize
(
vInit
)
==
nRegs
*
p
->
nFrames
);
// assign random info for primary inputs
Saig_ManForEachPi
(
p
->
pAig
,
pObj
,
i
)
Ssw_SmlAssignRandom
(
p
,
pObj
);
// assign the initial state for the latches
Vec_IntForEachEntry
(
vInit
,
Entry
,
i
)
Ssw_SmlObjAssignConstWord
(
p
,
Saig_ManLo
(
p
->
pAig
,
i
%
nRegs
),
Entry
,
0
,
i
/
nRegs
);
}
/**Function*************************************************************
Synopsis [Assings random simulation info for the PIs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Ssw_SmlReinitialize
(
Ssw_Sml_t
*
p
)
{
Aig_Obj_t
*
pObj
,
*
pObjLi
,
*
pObjLo
;
...
...
@@ -1123,6 +1171,28 @@ void Ssw_SmlClean( Ssw_Sml_t * p )
/**Function*************************************************************
Synopsis [Get simulation data.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Ptr_t
*
Ssw_SmlSimDataPointers
(
Ssw_Sml_t
*
p
)
{
Vec_Ptr_t
*
vSimInfo
;
Aig_Obj_t
*
pObj
;
int
i
;
vSimInfo
=
Vec_PtrStart
(
Aig_ManObjNumMax
(
p
->
pAig
)
);
Aig_ManForEachObj
(
p
->
pAig
,
pObj
,
i
)
Vec_PtrWriteEntry
(
vSimInfo
,
i
,
Ssw_ObjSim
(
p
,
i
)
);
return
vSimInfo
;
}
/**Function*************************************************************
Synopsis [Deallocates simulation manager.]
Description []
...
...
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