Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
3995c5f0
Commit
3995c5f0
authored
Jun 17, 2020
by
Antoine Kaufmann
Browse files
corundum/corundum_bm: print current time on SIGUSR1
parent
3c389a1f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
corundum/corundum_verilator.cpp
corundum/corundum_verilator.cpp
+6
-0
corundum_bm/corundum_bm.cc
corundum_bm/corundum_bm.cc
+7
-2
No files found.
corundum/corundum_verilator.cpp
View file @
3995c5f0
...
@@ -41,6 +41,11 @@ static void sigint_handler(int dummy)
...
@@ -41,6 +41,11 @@ static void sigint_handler(int dummy)
exiting
=
1
;
exiting
=
1
;
}
}
static
void
sigusr1_handler
(
int
dummy
)
{
fprintf
(
stderr
,
"main_time = %lu
\n
"
,
main_time
);
}
double
sc_time_stamp
()
double
sc_time_stamp
()
{
{
return
main_time
;
return
main_time
;
...
@@ -918,6 +923,7 @@ int main(int argc, char *argv[])
...
@@ -918,6 +923,7 @@ int main(int argc, char *argv[])
" sync_eth="
<<
nsparams
.
sync_eth
<<
std
::
endl
;
" sync_eth="
<<
nsparams
.
sync_eth
<<
std
::
endl
;
signal
(
SIGINT
,
sigint_handler
);
signal
(
SIGINT
,
sigint_handler
);
signal
(
SIGUSR1
,
sigusr1_handler
);
Vinterface
*
top
=
new
Vinterface
;
Vinterface
*
top
=
new
Vinterface
;
...
...
corundum_bm/corundum_bm.cc
View file @
3995c5f0
...
@@ -755,12 +755,16 @@ using namespace corundum;
...
@@ -755,12 +755,16 @@ using namespace corundum;
static
volatile
int
exiting
=
0
;
static
volatile
int
exiting
=
0
;
static
void
static
void
sigint_handler
(
int
dummy
)
sigint_handler
(
int
dummy
)
{
{
exiting
=
1
;
exiting
=
1
;
}
}
static
void
sigusr1_handler
(
int
dummy
)
{
fprintf
(
stderr
,
"main_time = %lu
\n
"
,
main_time
);
}
static
volatile
union
cosim_pcie_proto_d2h
*
static
volatile
union
cosim_pcie_proto_d2h
*
d2h_alloc
(
void
)
d2h_alloc
(
void
)
{
{
...
@@ -978,6 +982,7 @@ int main(int argc, char *argv[])
...
@@ -978,6 +982,7 @@ int main(int argc, char *argv[])
signal
(
SIGINT
,
sigint_handler
);
signal
(
SIGINT
,
sigint_handler
);
signal
(
SIGUSR1
,
sigusr1_handler
);
struct
cosim_pcie_proto_dev_intro
di
;
struct
cosim_pcie_proto_dev_intro
di
;
memset
(
&
di
,
0
,
sizeof
(
di
));
memset
(
&
di
,
0
,
sizeof
(
di
));
...
...
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