On 3/2/2010 11:00 PM, Jeremiassen, Tor wrote:
>
> 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.
>
I agree with Tor, this would indeed improve things in this area. I
already ran in situations where
the event list has to be "built" in function of other data (for instance
an array of bool) and that was
almost impossible without resorting to bad tricks.
Regards,
Jerome Cornet
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 3 01:27:19 2010
This archive was generated by hypermail 2.1.8 : Wed Mar 03 2010 - 01:27:23 PST