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

From: Alsop, Thomas R <thomas.r.alsop_at_.....>
Date: Wed Apr 29 2009 - 18:21:07 PDT
Ahh, yes, of course.  I agree with you.  Hmmm, perhaps we need to reword that too to make it more clear that this is what you mean, because it was not obvious to me. But on your example:

  at time 5:
    attempted write to Q2[2]
    attempted write to Q2[3]
  at time 10:
    attempted write to Q2[2]
    attempted write to Q2[3]

The number of warnings issued should depend on how your do your write access.  You imply above that you are writing 4 distinct times as opposed to two.  

initial begin

   #5;
   Q2[2] = 1'b1;
   Q2[3] = 1'b1;  // I would expect two warnings here, one for each write
   #5;
   Q2[3:2] = {1'b0, 1'b0};  // I would expect only one warning.  Not sure on the syntax but you understand, right?

end

-Tom

-----Original Message-----
From: jonathan.bromley@doulos.com [mailto:jonathan.bromley@doulos.com] 
Sent: Wednesday, April 29, 2009 11:11 AM
To: Alsop, Thomas R
Cc: sv-ec@server.eda.org
Subject: RE: Manti 2701, 2514 - response to Tom Alsop's feedback

Tom,

> If there are 
> hundreds or thousands of violations then this gets ugly, but 
> generally speaking I think the majority of the cases will only see 
> one or a handful of violations.  IMHO, I always want to see _all_ 
> the violations at once so I can fix them without having to iterate. 

It's obvious that I didn't make my intent clear enough, sorry. 
If you have some statement that busts the bounds of a queue, 
for sure you want to know about it every time that statement
executes.  What I was trying to do was to ensure that there
was only one warning for each _execution_ of such a statement,
even if it writes many out-of-bounds elements - I don't want
a separate warning for each out-of-bounds element that's written.

For example:

  initial begin: out_of_bounds_test
    int Q2[$:1];
    repeat (2) #5 Q2 = {0,1,2,3};
  end

I would expect that code to give me two warnings,
one at time 5 and one at time 10.  I would *not* 
expect four warnings:
  at time 5:
    attempted write to Q2[2]
    attempted write to Q2[3]
  at time 10:
    attempted write to Q2[2]
    attempted write to Q2[3]

Maybe that's so obvious it's not even worth saying?

> How bout this rewording:
> 
> ?If a write operation to a bounded queue has elements both inside 
> and outside the bound of the queue, the elements writing inside the 
> bound shall succeed, while the elements outside the bound shall be 
> ignored and the implementation shall issue a warning.?

I like it.  Very nice.  Thanks!
-- 
Jonathan Bromley


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Wed Apr 29 18:22:08 2009

This archive was generated by hypermail 2.1.8 : Wed Apr 29 2009 - 18:23:47 PDT