Shared Variables in Sensitivity List 
Author Message
 Shared Variables in Sensitivity List

Hi,
   The Subject may sound silly for VHDL experts, but please let me explain
what I am trying
to implement. I would really appreciate any healthy discussions on this
topic.

  In a TESTBENCH (Please note, I am not planing to Synthesize this ) I
define a shared
variable which is basically a flag saying that the user wants to enter a
specific mode (This
flag is altered externally via a command file - so I don't need to
re-compile, re-elaborate  etc.
 Just change the command file and hit "RUN"). I do a "read" in one process
and use this value
 in another process - so I am safe with Shared Variables. But the problem is
I want this
 shared variable to be triggering a process - in short:

  process (shared_variable)

But as it is defined, an element appearing on the sensitivity list should be
a static signal!

    Doesn't it cut short of the possibilities with Shared Variables?

Thanks in advance,

Regards,
Srini



Fri, 17 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List



Quote:
>     Doesn't it cut short of the possibilities with Shared Variables?

But, that is the primary difference between a variable and a signal. Looks
like what you need is a signal instead of a shared variable. The reason
you cannot use a variable in sens. list is because unlike a signal, a
variable
is very light weight and does not maintain all the extra baggage/features
that
comes with a signal (such as 'event, 'active, 'last_value, etc.). Since a
variable
(shared or not) does not have events, it does not make sense that it
be allowed in a sensitivity list. BTW, a variable is more than likely an
order of magnitude faster and smaller to maintain in most simulators
compared
to a signal of the same type.

Having said that, if your variable contains a large amount of data (such as
a memory), it is sometimes inefficient to use a signal. To combat, this you
can have a boolean signal that you can maintain along with the variable
and toggle this signal whenever you update the variable. Then, use this
signal in the sensitivity list to trigger the process that wishes to read
the variable.



Fri, 17 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
Hi,



Quote:

> But, that is the primary difference between a variable and a signal. Looks
> like what you need is a signal instead of a shared variable.

    I figured that out, but I was just curious to know what is really
preventing a shared
 variable from being in the sensitivity list. Of-course you have answered it
very precisely
 in the following lines. Thanks you very much for sharing!

 The reason

Quote:
> you cannot use a variable in sens. list is because unlike a signal, a
> variable
> is very light weight and does not maintain all the extra baggage/features
> that
> comes with a signal (such as 'event, 'active, 'last_value, etc.). Since a
> variable
> (shared or not) does not have events, it does not make sense that it
> be allowed in a sensitivity list.

    Now I understand, Thanks again.

BTW, a variable is more than likely an

Quote:
> order of magnitude faster and smaller to maintain in most simulators
> compared
> to a signal of the same type.

> Having said that, if your variable contains a large amount of data (such
as
> a memory), it is sometimes inefficient to use a signal. To combat, this
you
> can have a boolean signal that you can maintain along with the variable
> and toggle this signal whenever you update the variable. Then, use this
> signal in the sensitivity list to trigger the process that wishes to read
> the variable.

    This is exactly what I have implemented already.

Regards,
Srinivasan



Sat, 18 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
On Mon, 29 Nov 1999 18:54:36 -0800, Haneef D. Mohammed


Quote:


>>     Doesn't it cut short of the possibilities with Shared Variables?

> But, that is the primary difference between a variable and a
> signal. Looks like what you need is a signal instead of a shared
> variable. The reason you cannot use a variable in sens. list is
> because unlike a signal, a variable is very light weight and does
> not maintain all the extra baggage/features that comes with a signal
> (such as 'event, 'active, 'last_value, etc.). Since a variable
> ...

Actually, the real reason is that a signal can change value at most
once per delta, so the notion of an event is well defined.  Variables
can change any number of times per delta, so the notion of event is
not well defined.

Paul

--

Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product Mgr



Sat, 18 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
Hi Paul,
        Thanks for more insight.

Srinivasan

Quote:

> On Mon, 29 Nov 1999 18:54:36 -0800, Haneef D. Mohammed




> >>     Doesn't it cut short of the possibilities with Shared Variables?

> > But, that is the primary difference between a variable and a
> > signal. Looks like what you need is a signal instead of a shared
> > variable. The reason you cannot use a variable in sens. list is
> > because unlike a signal, a variable is very light weight and does
> > not maintain all the extra baggage/features that comes with a signal
> > (such as 'event, 'active, 'last_value, etc.). Since a variable
> > ...

> Actually, the real reason is that a signal can change value at most
> once per delta, so the notion of an event is well defined.  Variables
> can change any number of times per delta, so the notion of event is
> not well defined.

> Paul

> --

> Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
> P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
> Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product

Mgr


Sun, 19 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
Paul-
I noticed that you mentioned signals and deltas.  I'm fairly new to
VHDL and I was wondering if you could explain the concept of deltas?
How do you trigger a delta?  And how can you predict the behavior of a
process with the concept of deltas?  Any information would be greatly
appreciated.
Thanks,
Scott


Quote:
>On Mon, 29 Nov 1999 18:54:36 -0800, Haneef D. Mohammed




>>>     Doesn't it cut short of the possibilities with Shared Variables?

>> But, that is the primary difference between a variable and a
>> signal. Looks like what you need is a signal instead of a shared
>> variable. The reason you cannot use a variable in sens. list is
>> because unlike a signal, a variable is very light weight and does
>> not maintain all the extra baggage/features that comes with a signal
>> (such as 'event, 'active, 'last_value, etc.). Since a variable
>> ...

>Actually, the real reason is that a signal can change value at most
>once per delta, so the notion of an event is well defined.  Variables
>can change any number of times per delta, so the notion of event is
>not well defined.

>Paul

>--

>Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
>P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
>Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product Mgr



Sun, 19 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
On Wed, 01 Dec 1999 13:54:46 GMT, Scott Tanaka


Quote:
> I noticed that you mentioned signals and deltas.  I'm fairly new to
> VHDL and I was wondering if you could explain the concept of deltas?
> How do you trigger a delta?  And how can you predict the behavior of
> a process with the concept of deltas?  Any information would be
> greatly appreciated.

A full treatment is beyond the scope of a news article, but the
essence is possible to convey.  For a fuller treatment, I suggest one
of the many books on VHDL.  Some are listed in the FAQ, located at
http://vhdl.org/comp.lang.vhdl.  Ashenden's book, in particular, I
find to be a good source.

Time, in VHDL, is not linear.  What we normally think of as time is
represented, in VHDL, as a set of discrete points.  The smallest
possible interval between time points is 1 fs (10**-15 second), but a
larger interval can be selected, if desired.

Embedded within each discrete point in time, though, are an indefinite
number of smaller time steps.  VHDL refers to these smaller time steps
as deltas.  They have the characteristic that they allow for
sequential behavior without the passage of (measured) time.

Several other points.  Signals cannot be updated with zero delay, but
only with a minimum of delta delay.  Thus, the following signal
assignment statement:

        O <= I after 0 ps;

Implements not a zero-delayed buffer, but a delta-delayed buffer.
That is, if the signal I changes value at 10 ns, O does not change at
10 ns, but at 10 ns + 1 delta.

Th concept of delta delay is very important, for there is no way to
physically realize zero-delay logic; moreover, much logic (starting
with something as simple as an R-S latch) would not work if
implemented in true, zero-delay logic.

Moreover, avoidance of zero delays removes a whole host of problems
from management by the user.  If you've ever used Verilog, you'll know
that there is a rich lore revolving around the avoidance of
"simulation artifacts," most dealing with avoiding zero-delayed
feedback loops.  Such problems are simply not present in VHDL models,
due to its model of time and the fact that signals never
instantaneously update.

Hope this helps,

Paul

--

Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product Mgr



Sun, 19 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List

Quote:

> Several other points.  Signals cannot be updated with zero delay, but
> only with a minimum of delta delay.  Thus, the following signal
> assignment statement:

>    O <= I after 0 ps;

> Implements not a zero-delayed buffer, but a delta-delayed buffer.
> That is, if the signal I changes value at 10 ns, O does not change at
> 10 ns, but at 10 ns + 1 delta.

If on the same delta (say 10 ns + 1 delta), two signal assignments with delta
delays are executed:

        O1 <= I1 after 0 ps;

and

        O2 <= I2 after 0 ps;

Do the resulting signal changes happen on the same delta (10 ns + 2 delta)?

Thanks!
Eric



Sun, 26 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
On 08 Dec 1999 17:08:02 -0800, Eric Smith


("Brouhaha?!? Ha ha ha!"  Identify that, if you can! :-)

Quote:

>> Several other points.  Signals cannot be updated with zero delay, but
>> only with a minimum of delta delay.  Thus, the following signal
>> assignment statement:

>>        O <= I after 0 ps;

>> Implements not a zero-delayed buffer, but a delta-delayed buffer.
>> That is, if the signal I changes value at 10 ns, O does not change at
>> 10 ns, but at 10 ns + 1 delta.
> If on the same delta (say 10 ns + 1 delta), two signal assignments
> with delta delays are executed:
>    O1 <= I1 after 0 ps;
> and
>    O2 <= I2 after 0 ps;
> Do the resulting signal changes happen on the same delta (10 ns + 2
> delta)?

Yep.  Causality without the passage of (modeled) time is the word!

Paul

--

Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product Mgr



Sun, 26 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List

Quote:
> ("Brouhaha?!? Ha ha ha!"  Identify that, if you can! :-)

"Wait!  Don't you want your doorknocker?"

Not to be confused with "Timmy!  This is Science, not a brouhaha!"

Quote:
>> Do the resulting signal changes happen on the same delta (10 ns + 2
>> delta)?

> Yep.  Causality without the passage of (modeled) time is the word!

Thanks!  One of these day's I'll have to buy a copy of 1076.


Mon, 27 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List
On 09 Dec 1999 19:40:09 -0800, Eric Smith


Quote:

>> ("Brouhaha?!? Ha ha ha!"  Identify that, if you can! :-)

> "Wait!  Don't you want your doorknocker?"

Very good!  I'd send you a pizza, but they don't deliver to your
sector after dark.

Quote:
>>> Do the resulting signal changes happen on the same delta (10 ns + 2
>>> delta)?

>> Yep.  Causality without the passage of (modeled) time is the word!

> Thanks!  One of these day's I'll have to buy a copy of 1076.

Now, don't get carried away!

P

--

Cadence Design Systems | www.orcad.com   | spread fear, uncertainty and
P.O. Box 71767         | 919-479-1670[v] | doubt in the users' minds."
Durham, NC  27722-1767 | 919-479-1671[f] |  --Don Jones, MS's Y2K Product Mgr



Tue, 28 May 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List


Quote:
> Variables only have scope within a process.  Variables are defined inside
a
> process and so can't be an input to the process!

The original thread was about shared variables (VHDL93)
which are defined outside a process....

Regards,
Haneef
www.symphonyeda.com



Mon, 03 Jun 2002 03:00:00 GMT  
 Shared Variables in Sensitivity List

Variables only have scope within a process.  Variables are defined inside a
process and so can't be an input to the process!

Colin

Quote:



> >     Doesn't it cut short of the possibilities with Shared Variables?

> But, that is the primary difference between a variable and a signal. Looks
> like what you need is a signal instead of a shared variable. The reason
> you cannot use a variable in sens. list is because unlike a signal, a
> variable
> is very light weight and does not maintain all the extra baggage/features
> that
> comes with a signal (such as 'event, 'active, 'last_value, etc.). Since a
> variable
> (shared or not) does not have events, it does not make sense that it
> be allowed in a sensitivity list. BTW, a variable is more than likely an
> order of magnitude faster and smaller to maintain in most simulators
> compared
> to a signal of the same type.

> Having said that, if your variable contains a large amount of data (such as
> a memory), it is sometimes inefficient to use a signal. To combat, this you
> can have a boolean signal that you can maintain along with the variable
> and toggle this signal whenever you update the variable. Then, use this
> signal in the sensitivity list to trigger the process that wishes to read
> the variable.

  creid.vcf
< 1K Download


Tue, 04 Jun 2002 03:00:00 GMT  
 
 [ 16 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Shared Variable Requirements The Shared Variable Working Group of the IEEE DASC is developing a

2. Sensitivity lists (activation lists)

3. Pragma SHARED, tasks and shared variables

4. Case sensitivity variable controversy

5. Tcl 8.0.4 environment variable case sensitivity (Win)

6. Detecting missing signals in sensitivity lists

7. sensitivity list for clocked flops with async reset

8. Incomplete sensitivity lists

9. Sensitivity lists in latches

10. process sensitivity list

11. process sensitivity list question

12. simulation/synthesis implications of having only CLK in sensitivity list

 

 
Powered by phpBB® Forum Software