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.
>
>
>
Also, perhaps if the sc_event_or_list and sc_event_and_list were
replaced with or re-implemented as some kind of container, presumably we
could add a system for figuring out which event triggered a process.
regards
Alan
-- Alan Fitch Senior Consultant Doulos – Developing Design Know-how VHDL * Verilog * SystemVerilog * SystemC * PSL * Perl * Tcl/Tk * Project Services Doulos Ltd. Church Hatch, 22 Marketing Place, Ringwood, Hampshire, BH24 1AW, UK Tel: + 44 (0)1425 471223 Email: alan.fitch@doulos.com Fax: +44 (0)1425 471573 http://www.doulos.com ------------------------------------------------------------------------ This message may contain personal views which are not the views of Doulos, unless specifically stated. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Mar 10 02:37:35 2010
This archive was generated by hypermail 2.1.8 : Wed Mar 10 2010 - 02:37:37 PST