DanaL Posted July 1, 2019 Report Share Posted July 1, 2019 Hello, I'm experiencing a problem - I have my agent, which had the following function: virtual function event get_mon_event(); return monitor.mon_e; endfunction And my env, which runs on all of those agents (a couple of them, in an array): [As a part of a task] for (int i=0; i<some_number; ++i) begin fork automatic int var_i = i; begin // wait for the first event from any agent to generate this event @(p_agent[var_i].get_mon_event()); end join_none; end I'm getting this error: [SV-VFIEWC] Virtual function in event/wait control - Call to virtual function 'p_agent_base::get_mon_event' cannot be used in event or wait control. Can someone explain why this is happening and offer a solution please? Thanks! Dana Quote Link to comment Share on other sites More sharing options...
tudor.timi Posted July 1, 2019 Report Share Posted July 1, 2019 Seems like a tool limitation. Create a variable of type event and assign the result of the function call to it. Use this variable in the @(...) statement. Note: a better place for this type of question is /https://stackoverflow.com/. Use the system-verilog tag when posting a question. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.