RE: [sv-bc] Is packed dimension allowed for type variable?

From: Brad Pierce <Brad.Pierce_at_.....>
Date: Tue Oct 20 2009 - 23:53:12 PDT
Surya,

The usage seems logical, just as you can static cast with a type_reference, or build an assignment pattern expression with one. And something similar was done for packed arrays of enums

      http://www.eda.org/svdb/view.php?id=2448

On the other hand, consider

   http://www.eda.org/svdb/view.php?id=82

discussed in

  http://www.eda-stds.org/sv-bc/hm/9287.html

-- Brad

-----------

From: owner-sv-bc@eda.org [owner-sv-bc@eda.org] On Behalf Of Surya Pratik Saha [spsaha@cal.interrasystems.com]
Sent: Tuesday, October 20, 2009 10:51 PM
To: Rich, Dave
Cc: sv-bc@eda.org; Sourasis Das
Subject: Re: [sv-bc] Is packed dimension allowed for type variable?


Thanks Dave for your comments. I have filed Mantis 2907 for that.

Regards
Surya



-------- Original Message  --------
Subject: Re:[sv-bc] Is packed dimension allowed for type variable?
From: Rich, Dave <Dave_Rich@mentor.com>
To: Surya Pratik Saha <spsaha@cal.interrasystems.com>, sv-bc@eda.org <sv-bc@eda.org>
Cc: "Sourasis Das" <sourasis@cal.interrasystems.com>
Date: Wednesday, October 21, 2009 11:09:21 AM

Surya,

I think this may be just an oversight in the BNF.  Regardless, the
declaration in the second module top should be legal with the current
LRM.

Dave




  
-----Original Message-----
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org]
    
On
  
Behalf Of Surya Pratik Saha
Sent: Thursday, October 15, 2009 10:19 PM
To: sv-bc@eda.org
Cc: Sourasis Das
Subject: [sv-bc] Is packed dimension allowed for type variable?

Hi,
As per the BNF, packed dimension can not be present after
type_reference. So following e.g. is illegal:

module top;
    var type(logic) [2:0] x;
endmodule

But if we declared via a typedef like:
module top;
    typedef type(logic) mytype;
    mytype [2:0] x;
endmodule

Is it allowed? If yes, then is it not logical to allow packed
    
dimension
  
with direct type_reference when the type used in type_reference is
integer_vector_type.

--
Regards
Surya




--
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. 
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Oct 20 23:55:42 2009

This archive was generated by hypermail 2.1.8 : Tue Oct 20 2009 - 23:56:41 PDT