Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
caesr-pub
systemc-clang
Commits
b0fcd790
Commit
b0fcd790
authored
Jun 07, 2019
by
rmrf
Browse files
Add a test for templated waits
parent
caa60efb
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/sanity_tests/template-wait-args-simple.cpp
0 → 100644
View file @
b0fcd790
#include
"systemc.h"
//sc_event e1;
template
<
unsigned
D1
,
unsigned
D2
>
SC_MODULE
(
producer
){
int
global
;
sc_out
<
int
>
out
;
void
f1
()
{
int
i
,
j
;
while
(
true
)
{
wait
(
2
,
SC_NS
);
wait
(
D1
,
SC_NS
);
}
}
SC_CTOR
(
producer
)
{
SC_THREAD
(
f1
);
}
};
SC_MODULE
(
consumer
)
{
sc_in
<
int
>
in
;
void
f2
()
{
int
x
;
while
(
true
)
{
}
}
SC_CTOR
(
consumer
)
{
SC_THREAD
(
f2
);
}
};
int
sc_main
(
int
argc
,
char
*
argv
[])
{
sc_signal
<
int
>
s1
;
producer
<
222
,
333
>
p1
(
"producer"
);
// producer p1("producer");
// consumer c1("consumer");
p1
.
out
(
s1
);
// c1.in(s1);
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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