Re: [sv-bc] Built-in types are not packed arrays

From: Paul Graham <pgraham@cadence.com>
Date: Fri Sep 24 2004 - 11:39:50 PDT

> Erratum 51 http://www.eda.org/svdb/bug_view_page.php?bug_id=51
> asks whether built-in integer types are a form of packed array.
>
> In my opinion, they are not. For example, if J were declared
> as int, then I think
>
> $dimensions(J)
>
> should yield 0, and $left(J) should yield an error.

Why should there be any difference between:

    int J;

and

    typedef bit signed [31:0] myint;
    myint J;

Imagine a module with a parameter type:

    module m #(parameter type t = int) ...

Within the module you might want to query $left(t), etc.
Do you really want the module to behave differently depending on
whether int or myint is passed as the type parameter?

Paul
Received on Fri Sep 24 11:39:54 2004

This archive was generated by hypermail 2.1.8 : Fri Sep 24 2004 - 11:39:57 PDT