RE: [sv-bc] Type of a concat expression

From: Bresticker, Shalom <shalom.bresticker@intel.com>
Date: Fri Jun 18 2010 - 04:01:18 PDT

It's very useful, as in the following where the types of a and b are parameterized:

var type({a,b}) c = {a,b} ;

Note also the following. Consider the expression

expr1 & expr2

As part of our coding guidelines and code checks, we require that the self-determined types of expr1 and expr2 be the same. Otherwise, it is with high probability a coding mistake. This is despite the fact that when the expression is evaluated, the shorter of expr1 and expr2 will be size-extended to the size of the longer.

Shalom

> In verilog, and in the scheduled design constructs of SystemVerilog,
> the "type" of an expression is useless, because
> the way an expression is used determines the meaning of
> the expression. It is possible, but very rare, for
> a verilog expression to have a self-determined "type".
> Signed vs. unsigned relational expressions come to mind.
---------------------------------------------------------------------
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 Fri Jun 18 04:01:55 2010

This archive was generated by hypermail 2.1.8 : Fri Jun 18 2010 - 04:04:41 PDT