Re: New draft LRM and progress

From: Alan Fitch <alan.fitch@doulos.com>
Date: Wed Nov 24 2010 - 01:38:12 PST

On 23/11/2010 19:10, Philipp A. Hartmann wrote:
> Alan,
>
> comments on some of your comments below.
>
> On 23/11/10 17:47, Alan Fitch wrote:
>
<snip>

>> 6.6.4
>> p66
>>
>> In the description of void swap(sc_process_handle&) it says that either
>> handle may be invalid. If *both* were invalid, would it still be true
>> that H1<H2 would swap to H2< H1 ? Or is it just invisible since H1< H2
>> and H2< H1 would both return false anyway?
>
> Yes, the ordering needs to be swapped as well, even for invalid handles.
> Note, that invalid handles not necessarily return false for both H1<H2
> and H2<H1, depending on potentially still associated process objects.
>

Yes you're right of course - I was mixing up "empty" and "invalid".

>> Also later on (6.6.6) it says that a call to the process control member
>> functions on an invalid handle shall generate a warning - should that
>> also happen on a call to swap()?
>
> I think, no. Swap should similar to copying or assignment in that
> regard. These operations are all supposed to work for all possible
> handle values.
>
That makes sense to me.

>> 7.13
>> I don't think Philipp mentioned this in his review - sc_signal_resolved,
>> does that need an implementation of get_writer_policy?
>>
>> Similarly for sc_signal_rv 7.17.2
>
> Since these two functions support many writers, calling
> get_writer_policy should return SC_MANY_WRITERS.
>
> I just saw, that the current wording changes the base class to
> sc_signal< sc_logic/lv<W>, SC_MANY_WRITERS>, the correct values is
> returned from the base class implementation.
>
Yes I noticed that - but without having an overridden definition of
get_writer_policy, I thought I'd better flag it up. The only definition
of get_writer_policy in the current draft standard is the one in
sc_signal_write_if which returns SC_ONE_WRITER (*not* WRITER_POLICY).

regards

Alan

> I'm not sure, if we should stick with the inconsistency to inherit
> from sc_signal< sc_logic/lv> as before -- thus inheriting SC_ONE_WRITER
> -- and add explicit new implementations for get_writer_policy returning
> SC_MANY_WRITERS. Opinions?

-- 
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 Nov 24 01:38:48 2010

This archive was generated by hypermail 2.1.8 : Wed Nov 24 2010 - 01:38:57 PST