From: Steven Sharp (sharp@cadence.com)
Date: Fri Sep 22 2000 - 17:55:23 PDT
> To support the natural interpretation, i must not be a shared variable
> if i is declared integer. But if i is declared reg, there is a problem,
> since given the scoping rules, i is a shared register, making it a
> shared variable, making it possible for the loops to interact.
>
> I make the distinction between reg and integer, because (1364-1995)
>
> A register is an abstraction of a data storage element. (p. 3-2)
>
> An integer is a general purpose register used for manipulating
> quantities that are not regarded as hardware
> registers. (p. 3-12)
>
> but this may be splitting hairs that don't really exist (yet).
If you are going to make two different references to the same declaration
of i be references to different variables, where do you stop? How do you
even know that the two different references in "i=i+1" refer to the same
variable? Integer variables would be useless.
Two references to the same variable declaration in a given scope refer to
the same variable. That is how it works. Thus the two loops are using the
same variable. If you put a #0 or #1 in the loops, they would certainly
interfere with each other. The standard would require that they do so.
As long as the standard allows arbitrary interleaving, they are allowed
to interfere with each other without the delays. Under the standard,
deterministic behavior requires either using different variables or putting
the loops in the same sequential block to ensure sequential execution.
As far as distinctions between regs and integers, that is just a matter of
documentation of the intended use (and integers were the only signed types
available in the 1995 standard, if you needed that). With the addition of
signed reg types, an integer is now just a signed reg of at least 32 bits,
with the implied intent that it is not a hardware entity.
This archive was generated by hypermail 2.1.4
: Mon Jul 08 2002 - 12:54:14 PDT
and
sponsored by Boyd Technology, Inc.