RE: [sv-bc] Assigning type parameter via conditional operator

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Thu Jul 29 2010 - 05:30:51 PDT

Hi,

The language does not allow it.
The conditional operator is defined on expressions, not on data types.

Regards,
Shalom

From: owner-sv-bc@eda.org [mailto:owner-sv-bc@eda.org] On Behalf Of Abhishek Jain
Sent: Thursday, July 29, 2010 3:18 PM
To: sv-bc@eda.org
Subject: [sv-bc] Assigning type parameter via conditional operator

Hi,

Why I am not able to assign (or why language does not allow) a parameter type value based on conditional expression . For example in the below mentioned code assignment of TT_FAIL has syntax error.
       module A;
       parameter int WIDTH = 10;
       parameter int WIDTH_MAX = WIDTH == 10 ? 10:5;
       parameter type TT = int;
       parameter type TT_FAIL = WIDTH == 10 ? int:logic;
       endmodule

Thanks,
Abhishek

--
This message has been scanned for viruses and
dangerous content by MailScanner<http://www.mailscanner.info/>, 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 29 05:32:44 2010

This archive was generated by hypermail 2.1.8 : Thu Jul 29 2010 - 05:35:21 PDT