RE: [sv-champions] comments on 1728

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Thu Jul 24 2008 - 22:05:31 PDT
Dmitry, how about this?

 

   let mult(x,y) = ($bits(x)+$bits(y))'(x*y);

 

n  Brad

 

-----Original Message-----
From: Korchemny, Dmitry [mailto:dmitry.korchemny@intel.com] 
Sent: Friday, July 25, 2008 12:25 PM
To: Brad Pierce; sv-champions@eda.org
Subject: RE: [sv-champions] comments on 1728

 

Hi Brad,

 

Could you be more specific with these examples? 

 

Something like

 

let test(a) = $left(a) == $right(a);

?

 

I am concerned to include new examples at the last minute since errors

may be introduced.

 

Thinks,

Dmitry

 

-----Original Message-----

From: owner-sv-champions@server.eda.org

[mailto:owner-sv-champions@server.eda.org] On Behalf Of Brad Pierce

Sent: Thursday, July 24, 2008 5:41 PM

To: sv-champions@server.eda.org

Subject: RE: [sv-champions] comments on 1728

 

It seems likely to me that in practice a let-body would need to apply

$left(), $right(), and so on, to the actuals.  It would be helpful to

users if there were an example of this.

 

-- Brad

 

-----Original Message-----

From: owner-sv-champions@eda.org [mailto:owner-sv-champions@eda.org] On

Behalf Of John Havlicek

Sent: Thursday, July 24, 2008 10:21 PM

To: sv-champions@eda.org

Subject: [sv-champions] comments on 1728

 

My comments on 1728 are below.

 

J.H.

 

* On p. 4:

  

        let at_least_two(sig, rst = 1'b0) = rst || ($countones(sig) >=

2);

        logic [15:0] sig1;

        logic [3:0] sig2;

     

        always_comb begin

           q1: assert (at_least_two(sig1));

           q2: assert (at_least_two(~sig2));

        end

     

     In this case the let instantiation cannot be replaced by a function

     call since formal arguments of a function need to have a specific

     type.

  

  Is it true that calls to a (single) function cannot replace the calls

  shown to this let?  Suppose that the function took logic[15:0] on the

  sig formal.  Do the rules of passing ~sig2 to sig extend ~sig2 by 0 or

  by its high order bit?  Even if ~sig2 were extended by its high order

  bit, the actual could be changed to {12'b0,~sig2}.

  

  I don't think that it is important to try to demonstrate the

superiority

  of let in the LRM.  If it is to be done, then the wording should be

more

  precise and the argument given more carefully.  For a given model, it

  might be possible to examine all the calls to a let and determine a

way

  to uniformize a function to handle them all.  By using mechanisms to

  examine bitwidths and types, there might be clever ways to do this.

 

  My opinion is that there is no need to put this kind of apology for

  let in the LRM.

 

* On p. 4:

  

     Otherwise, the self-determined result type of the actual argument

shall

     be cast compatible (see 6.22.4) with the type of the formal

     argument. The actual argument shall be cast to the type of the

formal

     argument before being substituted for a reference to the formal

argument

     in the rewriting algorithm (see F.5.2).

  

  This text appears in other places in discussing sequence and property

  arguments.

  

  I recall that Gord raised some concern about misinterpreting this to

  mean that the actual is first reduced to self-determined result type 

  and that is then cast to the type of the formal.  

  

  This is not what the text actually says, but if SV-SC changed the text

 

  in the other places, then this instance should be aligned.

 

 

-- 

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.

 

 

-- 

This message has been scanned for viruses and

dangerous content by MailScanner, and is

believed to be clean.

 

 

---------------------------------------------------------------------

Intel Israel (74) Limited

 

This e-mail and any attachments may contain confidential material for

the sole use of the intended recipient(s). Any review or distribution

by others is strictly prohibited. If you are not the intended

recipient, please contact the sender and delete all copies.

 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Thu Jul 24 22:07:13 2008

This archive was generated by hypermail 2.1.8 : Thu Jul 24 2008 - 22:07:14 PDT