RE: reset method

From: Bishnupriya Bhattacharya <bpriya@cadence.com>
Date: Thu Jul 22 2010 - 10:05:00 PDT

John,

Let me understand your objective better. You want that while a process is being killed/reset, there be some way of telling which is happening? For example, if the process itself catches sc_kill_exception, and wants to do one kind of cleanup or another based on whether it is getting killed or reset. Is that the objective?

Thanks,
-Bishnupriya

________________________________
From: john.aynsley@doulos.com [mailto:john.aynsley@doulos.com]
Sent: Thursday, July 22, 2010 9:14 PM
To: David C Black; Bishnupriya Bhattacharya; systemc-p1666-technical@eda.org
Subject: Re: reset method

Bishnupriya,

It's nice to be able to catch and handle kills and resets, but I don't think it's important enough to justify anything but the simplest mechanism. I would have thought that most of the time kills and resets could be handled in the same way.

I was musing on some other way of telling whether the process had been killed or reset, and method terminated() came to mind, but presumably a killed process would not get terminated until the exception was caught by the kernel, so that's no good.

I am arguing semantics here, but if we have a common exception, that exception does not necessarily terminate the process, because it is being used for both reset() and kill(): reset() does not leave the process terminated. So having class sc_kill_exception: public sc_reset_exception makes more sense to me, with the sc_reset_exception actually doing the work of unwinding the stack. Does that work?

John A

From: David C Black <dcblack@xtreme-eda.com>
To: systemc-p1666-technical@eda.org
Date: 21/07/2010 21:16
Subject: Re: reset method
Sent by: owner-systemc-p1666-technical@eda.org

________________________________

If you're going to throw an exception anyhow, then I would prefer the sc_reset_exception solution over adding another member method.

------------------------------------------------------
David C Black, XtremeEDA ESL Practice Leader
http://www.Xtreme-EDA.com<http://www.xtreme-eda.com/>
(Consulting, Services & Training for all your ESL, verification and DFT needs)
Voice: 512.850.4322 Skype:dcblack FAX: 888.467.4609

On Jul 21, 2010, at 2:49 PM, Bishnupriya Bhattacharya wrote:

John,

Yes reset() throws an sc_kill_exception.

It is a good idea to distinguish reset from kill by using the exception. I suggest a member method in the sc_kill_exception class - "bool reset()" - or perhaps have sc_reet_exception that derives from sc_kill_exception?

WDYT?

Thanks,
-Bishnupriya

--
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 Thu Jul 22 10:05:26 2010

This archive was generated by hypermail 2.1.8 : Thu Jul 22 2010 - 10:05:26 PDT