All,
A long time frustration with writing SystemC is the fact that sc_event_and_list and sc_event_or_list cannot be instantiated as objects since their constructors are private. The way it seems to be intended to work is that event "and" and "or" lists are to be static in nature (at the call site), and not able to be created in any more dynamic manner. This is an unfortunate shortcoming. In fact, there is an idiom frequently used in SystemC models that partially work around that by returning a reference to an sc_event_or_list (or sc_event_and_list) that is a local (stack allocated) variable in a function - which, even though it works, seems to be a dubious programming practice.
I think the language would greatly benefit from allowing the user to create containers of events that are treated as or-lists and and-lists, build them dynamically as they see fit, and pass the container to wait(), and any other function that takes events. This would greatly improve the expressiveness of SystemC and will make it much easier to model cases where the number of events aren't known at elaboration time, and/or may change during simulation.
Best regards,
Tor Jeremiassen
--- Tor Jeremiassen, Ph.D. Simulation and Modeling CTO SDO Foundational Tools Texas Instruments Ph: 281 274 3483 P.O. Box 1443, MS 730 Fax: 281 274 2703 Houston, TX 77251-1443 Email: tor@ti.com<mailto:tor@ti.com> -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Mar 2 14:01:05 2010
This archive was generated by hypermail 2.1.8 : Tue Mar 02 2010 - 14:01:06 PST