Reputation: 1
The following gives error for event a, b declaration as "unrecognized struct member". Please help me understand.
unit true_match_op {
event a, b;
my_task() @sys.any is {
emit a;
wait [2]*cycle;
emit b;
wait [5]*cycle;
emit a;
expect @b => {@a ; ~[..]};
};
run() is also {
start my_task();
stop_run();
};
};
extend sys {
my_unit : true_match_op is instance;
};
Upvotes: 0
Views: 454
Reputation: 7573
First of all, you have to add a different event
declaration for each event (this isn't C/C++). Also, an expect
is a declarative construct. You have to declare it outside of the method:
unit true_match_op {
event a;
event b;
my_task() @sys.any is {
emit a;
wait [2]*cycle;
emit b;
wait [5]*cycle;
emit a;
};
expect @b => {@a ; ~[..]};
};
Upvotes: 3