Re: [sv-ec] RE: Manti 2701, 2514 - response to Tom Alsop's feedback

From: <jonathan.bromley_at_.....>
Date: Thu Apr 30 2009 - 01:38:52 PDT
Shalom,

> On 2701, I would like to include an example for the push_front() case.
> 
> int Q2[$:1]; // only [0:1] is allowed
> Q2 = {0,1};
> Q2.push_front(2);
> 
> I assume I should get
> Q2[0] = 2
> Q2[1] = 0
> And a warning because the operation attempts to write Q2[2]. 

Yes, that's exactly what I wanted to define.

> But I can see that someone might be unsure about the final state of the 
queue.

This is precisely why I tried to word it very generally, by
appealing to the unbounded queue behavior to define what happens 
to any in-range elements.

There's another way of looking at this.  You could say that 
the effect is AS IF (doesn't have to be implemented this way):
- any operation on a bounded queue shall proceed exactly as it 
  would for an unbounded queue, BUT THEN
- if the resulting queue value has any element that lies beyond
  the queue's upper bound, then all such out-of-bounds elements
  shall be discarded so that the resulting queue remains within 
  its bound, and a warning shall be issued.

Would that be clearer?  It would certainly remove the need to
describe any special cases.
-- 
Jonathan Bromley
Consultant

Doulos - Developing Design Know-how
VHDL * Verilog * SystemVerilog * SystemC * PSL * Perl * Tcl/Tk * Project 
Services

Doulos Ltd. Church Hatch, 22 Market Place, Ringwood, Hampshire, BH24 1AW, 
UK
Tel:  + 44 (0)1425 471223                       Email: 
jonathan.bromley@doulos.com 
Fax:  +44 (0)1425 471573                        http://www.doulos.com

--------------------------------------------------------------------------------
Doulos Ltd is registered in England and Wales with company no. 3723454
Its registered office is 4 Brackley Close, Bournemouth International 
Airport,
        Christchurch, BH23 6SE, UK. 

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 Thu Apr 30 01:40:26 2009

This archive was generated by hypermail 2.1.8 : Thu Apr 30 2009 - 01:43:17 PDT