( ESNUG 467 Item 5 ) -------------------------------------------- [07/26/07]
Subject: ( ESNUG 466 #2 ) Follow-ups to Stu & Don's 58 SV gotchas paper
> But, there is a gotcha when two or more procedural blocks write to the
> same variable. The effect is that the same piece of storage is shared
> by all the procedural block. Since these procedural blocks run
> concurrently, it is possible -- and likely -- that the code within the
> blocks will collide, and interfere with each other's functionality.
>
> - Stu Sutherland
> Sutherland HDL Tualatin, OR
From: [ Underdog ]
Hi John,
Please keep me anonymous.
In Section 2.8 of Stu & Don's paper, the following code as a gotcha:
always @(a or b) begin
for (i=0; i<15; i=i+1) // this process uses i
...
end
always @(c or d) begin
for (i=0; i<15; i=i+1) // this process also uses i
...
end
However this is not uncommon at all, and I have never seen this causes any
simulation or synthesis problems. Although in theory it is bad.
Can anyone give an example that this type of coding causes real problems?
- [ Underdog ]
---- ---- ---- ---- ---- ---- ----
From: Shalom Bresticker <shalom.bresticker=user domain=intel bot calm>
Hi, John,
Please note this correction, which I found and Stu and Don published in
their follow-up paper at SNUG San Jose 2007:
Published text:
Gotcha 2.12 Importing from multiple packages
How to avoid this Gotcha: The gotcha with wildcard package imports
occurs when there are some identifiers common to more than one
package. In this case, at most only one of the packages with
duplicate identifiers can be wildcard imported.
Correct text:
How to avoid this Gotcha: The gotcha with wildcard package imports
occurs when there are some identifiers common to more than one
package. To avoid this gotcha, explicitly import any duplicate
identifiers from the desired package. Wildcard imports of other
packages will not import identifiers that have been explicitly
declared or explicitly imported.
It's a completely different solution that your readers should be aware of.
- Shalom Bresticker
Intel Corp. Jerusalem, Israel
Index
Next->Item
|
|