RE: Empty events lists

From: Bishnupriya Bhattacharya <bpriya@cadence.com>
Date: Tue Nov 02 2010 - 09:44:17 PDT

John,

I was coming from the point of view that wait(delay, empty_list) when degenerated to wait(delay) does not have any "undesirable" side effects as opposed to wait(empty_list) when interpreted as wait(static_sensitivity).

But if you come from the point of view that the user likely did a mistake in either case, and would like to know about it, it makes sense to flag both as error. I'm fine with both being errors.

Thanks,
-Bishnupriya

________________________________
From: owner-systemc-p1666-technical@eda.org [mailto:owner-systemc-p1666-technical@eda.org] On Behalf Of john.aynsley@doulos.com
Sent: Tuesday, November 02, 2010 10:01 PM
To: p.goel@acm.org
Cc: david.long@doulos.com; owner-systemc-p1666-technical@eda.org; Philipp A Hartmann; P1666 Technical WG
Subject: Re: Empty events lists

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<http://www.mailscanner.info/>, and is
believed to be clean.
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Nov 2 09:44:54 2010

This archive was generated by hypermail 2.1.8 : Tue Nov 02 2010 - 09:44:56 PDT