还有一种解决方法,就如同楼上所说的那样,不放在构造函数体内,放在end of elaboration()中~
Another possible solution to this issue is to write an end_of_elaboration() callback for the module containing the SC_METHOD, and within the callback register the method and the sensitivity, instead of within the ctor.
write an end_of_elaboration() callback for the module containing the SC_METHOD, and within the callback register the method and the sensitivity, instead of within the ctor: