From: Clifford E. Cummings (cliffc@europa.com)
Date: Fri May 02 1997 - 09:02:00 PDT
Subject: BTF - B15 - Built-in sizeof(x) function
Behavioral Task Force - Enhancement Request
Assigned Enhancement Request Number: B15
Enhancement Name (Description): Built-in sizeof(x) function
Date Submitted: 970319
Requestor: adamk@cyrix.com (Adam Krolnik)
Status: RO
Is enhancement intended to be synthesizable?:
<p>7. Size of registers.
It would be nice to access the size of the registers without having to
define a macro, or a symbol to hold the value. If the width of constants can
be based on the lhs then this becomes less of a need and more of a
nice-to-have. E.g. instead of
`define SIZE_A 32
reg [SIZE_A-1:0] a;
if (a == `SIZE_A h 123)
From: mac@silicon-sorcery.com
Date: Wed, 19 Mar 97 14:22:50 PST
Another justification would be:
for (i = 0; i < sizeof(a); i = i + 1) begin
if (a[i]) $display($stime,,"a[%d] is set",i);
end
I could support adding this to the language.
//********************************************************************//
// Cliff Cummings E-mail: cliffc@europa.com //
// Sunburst Design Phone: 503-579-6362 / FAX: 503-579-7631 //
// 15870 SW Breccia Dr., Beaverton, OR 97007 //
// //
// Verilog & Synthesis Training / On-Site Training //
// Verilog, VHDL, Synopsys, LMG, FPGA, Consulting and Contracting //
//********************************************************************//
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:40 PDT
and
sponsored by Boyd Technology, Inc.