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;
};
First of all, you have to add a different
event
declaration for each event (this isn't C/C++). Also, anexpect
is a declarative construct. You have to declare it outside of the method: