Reputation: 140
Playing with SystemVerilog, I'm trying to get the status of some processes that are forked. In order to do that, I create a variable where I can get state of a process. From part 9.7 of 1800-2012 SV-LRM:
process::state pstat;
But I get the following error with irun
:
xmvlog: *E,EXPIDN expecting an identifier [3.2][3.8][3.9(IEEE)].
Upvotes: 1
Views: 891
Reputation: 42738
state
is an enum type embedded in a class. The BNF does not allow you to use it directly, but some tools allow it. You should be able to do:
typedef process::state state_e;
state_e pstat;
// or
type(process::state) pstat;
Upvotes: 2
Reputation: 13987
state
is a method of the class process
. You can't create a variable of type process::state
- that makes no sense. There is an example in section 9.7 of IEEE 1800-2012, which shows how to use the process
class.
Upvotes: 2