Re: [sv-bc] why is it ILLEGAL ?

From: Steven Sharp <sharp_at_.....>
Date: Wed Jan 04 2006 - 16:05:47 PST
Nasim,

You are assuming that just because the user declared the same identifier
twice with the same type, that they intended this to be a single object.
This may not be true, in which case you would be allowing the user to
make a serious mistake.

Consider the realistic case of a module that is too large to easily
keep track of all the identifiers declared in it.  You may need to go
back and modify it later, adding a new net in the process.  If you
happen to use the same name as another net that you already declared,
and the compiler doesn't stop you, then you have accidentally shorted
this new net to the old one.  You could spend a lot of hours debugging
to figure out why your design isn't working the way you wanted.

Allowing redundant declarations of the same object does not provide you
any extra functionality, and causes you harm if you actually intended
to declare separate objects.

Steven Sharp
sharp@cadence.com
Received on Wed Jan 4 16:06:05 2006

This archive was generated by hypermail 2.1.8 : Wed Jan 04 2006 - 16:07:22 PST