Thursday, January 08, 2009     Register | Login | Search | Contact Us
     

Many of you already received communications about the move of the Cadence user community into cadence.com. And many of you have already joined, with over 4000 registrations in the first two weeks.

The new Cadence Community enhances the ability of Cadence users to connect and collaborate. In addition to moving the community into cadence.com -- enabling single sign-on for community, Sourcelink and Cadence events -- the new site is organized around nine technology segments, giving you easy access to product information, training, forums and blogs. Some of the new features include:
  • Ability to respond to posts via e-mail
  • Technology-specific blogs
  • Latest Web 2.0 social networking capabilities
  • Public profile options
  • Private messaging
  • Friends lists
Visit the new Cadence Community today at www.cadence.com/community and join the discussions!

Registration note: Due to the scope of the enhancements and the new SSO registration system, we were not able to migrate existing cdnusers.org member accounts. So new registrations are required, but this enables a broader set of functionality we think you'll enjoy.

Forum note: Under the guidance of forum moderators, we have taken the 20+ cdnusers.org forums and consolidated them into 11 forums on the new site. Posts have been brought over so you can leverage that posting history. CDNusers forums will be set to read only starting 7/30, and cdnusers.org will be redirected to the new community on 8/4.

Best regards,
Mike and Tom

Michael A. Catrambone - Steering Committee Chairman
Distinguished Engineer
PCB/Mechanical
UTStarcom, Inc.

Tom Diederich
Cadence Community Manager
Home
Forums
Subject: No run time error for out of boundry access to array
Posting to forums is available to community members only.
Login or Register
Rate this topic:
   
Author Messages
avidan_e
Posts: 16
Online: User is Offline
12/27/2007 9:02 AM  
Hi, The following code: module x; bitΏ:0] y[] initial begin y = newΐ] yΎ] = 2; yΏ] = 3; for (int i=0; i<= y.size(); i++) $display(y[i]); end endmodule // x doesn't give a run time error when I'm accessing yΐ]. Instead it gives the following print out: 2 3 0 I believe this is a bug. best, Avidan
TAM
Posts: 56
Online: User is Offline
12/27/2007 10:45 AM  
In standard Verilog, out-of-bounds array access is permitted by the HDL language. The value returned is simply 'bx or the unknown value. This is the way that hardware would work, you can index with an invalid address and the hardware will return something, you just don't know what it will be.

Since you are using an array of 'bit', you won't see an unknown value returned since 'bit' is only 2-state. So instead you see 'b0 as the return value.

Here's what the SV LRM says in section 5.3.

If an index expression is out of the address bounds or if any bit in the address is X or Z, then the index shall
be invalid. The result of reading from an array with an invalid index shall return the default uninitialized
value for the array element type.
avidan_e
Posts: 16
Online: User is Offline
12/27/2007 1:42 PM  
Hmmm... Thanks, Avidan
Posting to forums is available to community members only.
Login or Register

Forums > Functional Verification > SystemVerilog > No run time error for out of boundry access to array


ActiveForums 3.6
     
Copyright 2006 Cadence Design Systems, Inc.