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
65cd556b
Commit
65cd556b
authored
Jan 26, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Outputting initial state in Wlc_Ntk_t.
parent
24dbdbae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
28 deletions
+25
-28
src/base/wlc/wlcWriteVer.c
+25
-28
No files found.
src/base/wlc/wlcWriteVer.c
View file @
65cd556b
...
@@ -330,30 +330,6 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
...
@@ -330,30 +330,6 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
}
}
fprintf
(
pFile
,
" ;
\n
"
);
fprintf
(
pFile
,
" ;
\n
"
);
}
}
Wlc_NtkForEachCi
(
p
,
pObj
,
i
)
{
char
*
pName
=
Wlc_ObjName
(
p
,
Wlc_ObjId
(
p
,
pObj
));
assert
(
i
==
Wlc_ObjCiId
(
pObj
)
);
if
(
pObj
->
Type
==
WLC_OBJ_PI
)
continue
;
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
"CPL_FF"
);
if
(
Wlc_ObjRange
(
pObj
)
>
1
)
fprintf
(
pFile
,
"#%d%*s"
,
Wlc_ObjRange
(
pObj
),
4
-
Abc_Base10Log
(
Wlc_ObjRange
(
pObj
)
+
1
),
""
);
else
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
" reg%d ("
,
i
);
fprintf
(
pFile
,
" .q( %s ),"
,
pName
);
fprintf
(
pFile
,
" .qbar(),"
);
fprintf
(
pFile
,
" .d( %s ),"
,
Wlc_ObjName
(
p
,
Wlc_ObjId
(
p
,
Wlc_ObjFoToFi
(
p
,
pObj
)))
);
fprintf
(
pFile
,
" .clk( %s ),"
,
"1
\'
b0"
);
fprintf
(
pFile
,
" .arst( %s ),"
,
"1
\'
b0"
);
if
(
p
->
vInits
)
fprintf
(
pFile
,
" .arstval( %s_init )"
,
pName
);
else
fprintf
(
pFile
,
" .arstval( %s )"
,
"1
\'
b0"
);
fprintf
(
pFile
,
" ) ;
\n
"
);
}
iFanin
=
0
;
iFanin
=
0
;
assert
(
!
p
->
vInits
||
Wlc_NtkFfNum
(
p
)
==
Vec_IntSize
(
p
->
vInits
)
);
assert
(
!
p
->
vInits
||
Wlc_NtkFfNum
(
p
)
==
Vec_IntSize
(
p
->
vInits
)
);
if
(
p
->
vInits
)
if
(
p
->
vInits
)
...
@@ -378,11 +354,32 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
...
@@ -378,11 +354,32 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p )
}
}
fprintf
(
pFile
,
";
\n
"
);
fprintf
(
pFile
,
";
\n
"
);
iFanin
+=
Wlc_ObjRange
(
pObj
);
iFanin
+=
Wlc_ObjRange
(
pObj
);
//printf( "%d %d %s\n", iFanin, Wlc_ObjRange(pObj), Wlc_ObjName(p, Wlc_ObjId(p, pObj)) );
}
}
k
=
(
int
)
strlen
(
p
->
pInits
);
Wlc_NtkForEachCi
(
p
,
pObj
,
i
)
//assert( !p->vInits || iFanin == (int)strlen(p->pInits) );
{
char
*
pName
=
Wlc_ObjName
(
p
,
Wlc_ObjId
(
p
,
pObj
));
assert
(
i
==
Wlc_ObjCiId
(
pObj
)
);
if
(
pObj
->
Type
==
WLC_OBJ_PI
)
continue
;
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
"CPL_FF"
);
if
(
Wlc_ObjRange
(
pObj
)
>
1
)
fprintf
(
pFile
,
"#%d%*s"
,
Wlc_ObjRange
(
pObj
),
4
-
Abc_Base10Log
(
Wlc_ObjRange
(
pObj
)
+
1
),
""
);
else
fprintf
(
pFile
,
" "
);
fprintf
(
pFile
,
" reg%d ("
,
i
);
fprintf
(
pFile
,
" .q( %s ),"
,
pName
);
fprintf
(
pFile
,
" .qbar(),"
);
fprintf
(
pFile
,
" .d( %s ),"
,
Wlc_ObjName
(
p
,
Wlc_ObjId
(
p
,
Wlc_ObjFoToFi
(
p
,
pObj
)))
);
fprintf
(
pFile
,
" .clk( %s ),"
,
"1
\'
b0"
);
fprintf
(
pFile
,
" .arst( %s ),"
,
"1
\'
b0"
);
if
(
p
->
vInits
)
fprintf
(
pFile
,
" .arstval( %s_init )"
,
pName
);
else
fprintf
(
pFile
,
" .arstval( %s )"
,
"1
\'
b0"
);
fprintf
(
pFile
,
" ) ;
\n
"
);
}
assert
(
!
p
->
vInits
||
iFanin
==
(
int
)
strlen
(
p
->
pInits
)
);
fprintf
(
pFile
,
"endmodule
\n\n
"
);
fprintf
(
pFile
,
"endmodule
\n\n
"
);
}
}
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
)
void
Wlc_WriteVer
(
Wlc_Ntk_t
*
p
,
char
*
pFileName
)
...
...
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