Re: Empty events lists

From: <john.aynsley@doulos.com>
Date: Tue Nov 02 2010 - 09:30:58 PDT

Puneet, Bishnupriya, All,

I too understand what Puneet is saying. But SystemC event lists are not lists in a functional programming sense, and the typical SystemC user is not a functional programmer. On the other hand, there are existing semantics and clear expectations attached to wait(), i.e. it means wait forever.

So, now we introduce explicit wait lists, allowing constructs such as wait(list) or wait(delay, list). If the list is empty, I think for SystemC users there are 3 obvious choices we could make

- wait(empty_list) => wait forever
- wait(empty_list) => error
- wait(empty_list) => warning and wait forever

Bisnupriya has proposed
- wait(empty_list) => error
- wait(delay, empty_list) => warning and wait(delay)

I am not entirely comfortable with having the first as an error and the second as a warning. It's not a show-stopper for me, but if we are not going to have wait(empty_list) wait forever, then I would prefer both forms to be an error. It seems more straightforward.

John A

-----puneet@coverify.com wrote: -----
To: "Philipp A. Hartmann" <philipp.hartmann@offis.de>
From: Puneet Goel
Sent by: puneet@coverify.com
Date: 11/02/2010 04:11AM
Cc: david.long@doulos.com, john.aynsley@doulos.com, owner-systemc-p1666-technical@eda.org, systemc-p1666-technical@eda.org
Subject: Re: Empty events lists

> It is like when you define an operation on a list, you start with a
> seed.

Like in case of summation on a list you start with the result seeded
to 0. In case of multiplication (factorial) you start with the result
seeded to 1. In case of ORing a list, we start with the result seeded
to false. And in case of ANding a list, we start with the result
seeded to true.

Similarly is we think about sc_event_and_list, we would seed the
result with an immediate event. And for sc_event_or_list, we should
seed the result with an event that never gets notified.

Regards
- Puneet
 

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Nov 2 09:31:37 2010

This archive was generated by hypermail 2.1.8 : Tue Nov 02 2010 - 09:31:39 PDT