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
e06c04a3
Commit
e06c04a3
authored
Jun 16, 2016
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to BENCH reader to read DFF with four inputs.
parent
0923d543
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletions
+24
-1
src/base/io/ioReadBench.c
+24
-1
No files found.
src/base/io/ioReadBench.c
View file @
e06c04a3
...
...
@@ -121,8 +121,30 @@ Abc_Ntk_t * Io_ReadBenchNetwork( Extra_FileReader_t * p )
pType
=
(
char
*
)
vTokens
->
pArray
[
1
];
if
(
strncmp
(
pType
,
"DFF"
,
3
)
==
0
)
// works for both DFF and DFFRSE
{
if
(
Vec_PtrSize
(
vTokens
)
==
6
)
{
// create primary input to represent flop output
char
pNetName
[
1000
];
char
*
pName
;
int
i
;
char
*
pFlopOut
=
(
char
*
)
vTokens
->
pArray
[
0
];
Abc_Obj_t
*
pNet
=
Abc_NtkFindOrCreateNet
(
pNtk
,
pFlopOut
);
Abc_Obj_t
*
pTerm
=
Abc_NtkCreatePi
(
pNtk
);
Abc_ObjAddFanin
(
pNet
,
pTerm
);
// create four primary outputs to represent flop inputs
Vec_PtrForEachEntryStart
(
char
*
,
vTokens
,
pName
,
i
,
2
)
{
sprintf
(
pNetName
,
"%s_%s"
,
pFlopOut
,
pName
);
pNet
=
Abc_NtkFindOrCreateNet
(
pNtk
,
pName
);
pTerm
=
Abc_NtkCreateNodeBuf
(
pNtk
,
pNet
);
pNet
=
Abc_NtkFindOrCreateNet
(
pNtk
,
pNetName
);
Abc_ObjAddFanin
(
pNet
,
pTerm
);
pTerm
=
Abc_NtkCreatePo
(
pNtk
);
Abc_ObjAddFanin
(
pTerm
,
pNet
);
}
}
else
{
pNode
=
Io_ReadCreateLatch
(
pNtk
,
(
char
*
)
vTokens
->
pArray
[
2
],
(
char
*
)
vTokens
->
pArray
[
0
]
);
// Abc_LatchSetInit0( pNode );
// Abc_LatchSetInit0( pNode );
if
(
pType
[
3
]
==
'0'
)
Abc_LatchSetInit0
(
pNode
);
else
if
(
pType
[
3
]
==
'1'
)
...
...
@@ -130,6 +152,7 @@ Abc_Ntk_t * Io_ReadBenchNetwork( Extra_FileReader_t * p )
else
Abc_LatchSetInitDc
(
pNode
);
}
}
else
if
(
strcmp
(
pType
,
"LUT"
)
==
0
)
{
fLutsPresent
=
1
;
...
...
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