本文整理汇总了C++中sc_event::notify方法的典型用法代码示例。如果您正苦于以下问题:C++ sc_event::notify方法的具体用法?C++ sc_event::notify怎么用?C++ sc_event::notify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sc_event
的用法示例。
在下文中一共展示了sc_event::notify方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ctrl
void ctrl()
{
count = 1;
ph = sc_spawn(sc_bind(&Top::parent_proc, this));
wait(10, SC_NS);
count = 2;
ph.reset(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 3;
ev.notify();
wait(10, SC_NS);
count = 4;
ph.suspend(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 5;
ev.notify();
wait(10, SC_NS);
count = 6;
ph.resume(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 7;
ph.kill(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
}
示例2: control
void control()
{
wait(SC_ZERO_TIME);
count = 1;
ev.notify();
wait(10, SC_NS);
count = 2;
ev.notify();
t.disable();
wait(SC_ZERO_TIME);
count = 3;
ev.notify();
wait(SC_ZERO_TIME);
count = 4;
t.enable();
ev.notify();
wait(10, SC_NS);
count = 5;
t.disable();
t.reset();
wait(10, SC_NS);
count = 6;
t.reset();
wait(10, SC_NS);
sc_stop();
}
示例3: ctrl
void ctrl()
{
ts3.resume();
wait(10, SC_NS);
ts1.resume();
ev.notify();
wait(10, SC_NS);
ts2.resume();
tr2.sync_reset_off();
tr4.sync_reset_off();
wait(10, SC_NS);
td2.enable();
wait(10, SC_NS);
ev.notify();
wait(10, SC_NS);
ev.notify();
td2.disable();
wait(10, SC_NS);
td4.enable();
ts4.resume();
ev.notify();
}
示例4: schedule_events_while_paused
void schedule_events_while_paused()
{
sig4.write(4);
immed_event.notify();
delta_event.notify(SC_ZERO_TIME);
// Should be able to instantiate an sc_object while paused
mut = new sc_mutex("mut");
sem = new sc_semaphore("sem", 1);
}
示例5: f
void f()
{
while(true)
{
e2.notify(sc_time(1,sc_ns));
wait(e2);
e3.notify(sc_time(10,sc_ns));
wait(e3);
}
}
示例6: write
virtual void write(sc_uint<8> data)
{
if (data == 255)
eop.notify(0, SC_MS);
else
write_buf.write(data);
}
示例7: send_byte
void send_byte()
{
out_port->write(x);
send.notify(5, SC_NS);
wait();
// cout << "send " << x << '\n';
}
示例8: getmsg
void getmsg() {
if (m<max) {
wait(msg_event);
msg = (++m) * 11 + 5;
msg_event.notify();
}
}
示例9: topEntry
void topEntry() {
while(true) {
x = x*2;
if (x>5){
wait(1, SC_NS);
}
v++;
wait(1, SC_NS);
w++;
y = y + 1;
for (int i = 0; i<10; i++) {
x++;
if (x>3){
x = y-2;
wait(1, SC_NS);
}
}
x = x *2;
oev.notify(1, SC_NS);
wait(ev);
y = x-2;
f(x, y);
out_port.write(y);
wait(4, SC_NS);
}
}
示例10:
void f3() {
while(true) {
global = 4;
wait(15, SC_NS);
e1.notify();
}
}
示例11: ticker
void ticker()
{
for (;;)
{
wait(10, SC_NS);
ev.notify();
}
}
示例12: gen
void gen()
{
for (;;)
{
wait(10, SC_NS);
ev.notify();
}
}
示例13: before_end_of_elaboration
void before_end_of_elaboration()
{
cout << "sc_get_status() == " << hex << sc_get_status() << " before_end_of_elaboration in " << name() << endl;
sc_assert( sc_get_status() == SC_BEFORE_END_OF_ELABORATION );
sc_assert( sc_is_running() == false );
sig1.write(1);
timed_event.notify(1234, SC_NS);
sc_pause(); // Should be ignored
}
示例14: calling
void calling()
{
wait(SC_ZERO_TIME);
count = 1;
t1.suspend(SC_INCLUDE_DESCENDANTS);
ev.notify(5, SC_NS);
wait(10, SC_NS);
count = 2;
t1.resume(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 3;
t1.disable(SC_INCLUDE_DESCENDANTS);
ev.notify(5, SC_NS);
wait(10, SC_NS);
count = 4;
t1.enable(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 5;
ev.notify();
wait(10, SC_NS);
count = 6;
t1.sync_reset_on(SC_INCLUDE_DESCENDANTS);
wait(10, SC_NS);
count = 7;
ev.notify();
wait(10, SC_NS);
count = 8;
t1.sync_reset_off(SC_INCLUDE_DESCENDANTS);
wait(sc_time(110, SC_NS) - sc_time_stamp());
count = 10;
t4.reset(SC_INCLUDE_DESCENDANTS);
wait(sc_time(210, SC_NS) - sc_time_stamp());
t7.throw_it(ex, SC_INCLUDE_DESCENDANTS);
}
示例15: round_robin
int round_robin(const char *str, sc_event& receive, sc_event& send, int cnt)
{
while (--cnt >= 0)
{
wait(receive);
cout << "Round robin thread " << str <<
" at time " << sc_time_stamp() << endl;
wait(10, SC_NS);
send.notify();
}
return 0;
}