[sv-bc] RE: [sv-ec] [system-verilog] synthesis query for default value of bit type

From: Bresticker, Shalom <shalom.bresticker_at_.....>
Date: Sun Jan 25 2009 - 01:47:17 PST
In Verilog, a variable declaration assignment had to be a constant expression. I don't think the problem would exist with that restriction. There were reasons for relaxing the restriction, but the problem is due to a combination of factors, that is both the lack of order and allowing non-constant expressions.

Shalom

________________________________
From: owner-sv-bc@server.eda.org [mailto:owner-sv-bc@server.eda.org] On Behalf Of Rich, Dave
Sent: Friday, January 23, 2009 7:14 PM
To: Prakash Barnwal; sv-bc@server.eda.org
Subject: [sv-bc] RE: [sv-ec] [system-verilog] synthesis query for default value of bit type

Moving this to the sv-bc, as this is the committee that handles design issues.

This is commonly known as the "static initialization order fiasco" in C/C++. See http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12. You cannot depend on the initialization order of static variables; they are not part of the procedural code. Some day, I would like to see an order defined within a local scope.

As far as considering the initial values of static variable for synthesis, that should be a tool/user decision. Some simulation tools have the ability to randomize the initial values, so effectively you could treat them as unknown.

Dave Rich
---------------------------------------------------------------------
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 Sun Jan 25 01:54:25 2009

This archive was generated by hypermail 2.1.8 : Sun Jan 25 2009 - 01:56:47 PST