View email archives for the history of this mailing list.
systemc-forum - Re: [help_forum] exception from systemc sensitivity list
- To: Sundeep Singh <singh.sundeep@xxxxxxxxx>
- From: Sureshkumar Vemuri <suresh@xxxxxxxxxx>
- Date: Thu, 30 Jun 2011 10:19:10 +0530
- Cc: systemc-forum@xxxxxxxxxxxxxxxxx, community_forum@xxxxxxxxxxxxxxxxx, help_forum@xxxxxxxxxxxxxxxxx
- Send Email to email@example.com:
- Send new message
- Reply to this message
The exception may be due to some other reason like the event or the A module instance pointed by A_ptr being deleted or pointing to garbage or something like that. Otherwise, what you have done is not wrong. I tried similar small program and it worked which is attached.
This may not be the recommended way to synchronize between modules A and B if that is the intent. Better way may be to have a signal connected between the two i.e. A sc_out port and B sc_in port, and A writing to out port generating event, and B's method sensitive to its in port. Suggestion may not be correct or too trivial as I do not know the context in which event is generated and who generates it.
Definitely, in your case, you need to have the A_ptr, pointer to A module, being maintained in B module, which can be done away with if you use signals and ports for inter-process communication.
On Thu, Jun 30, 2011 at 6:20 AM, Sundeep Singh <singh.sundeep@xxxxxxxxx>
I am getting a construction time error because I have made a module's method sensitive to an event from other module. Why is this incorrect?
sensitive << A_ptr->a_event; ///I get an exception here
I just don't understand why is the above incorrect. Any help is appreciated!
Kasura Technologies Pvt Ltd
Description: Text Data