Subject: RE: Proposal
From: Moser Eduard (FV/FLI) * (Eduard.Moser@de.bosch.com)
Date: Tue Dec 18 2001 - 02:08:39 PST
Hallo Yannick HERVE,
> 1/ For now I work on a model who needs memory in the analog "process".
> It is a Preisach approach aiming at modeling a hysteretic material.
> I use the hAMSter tool. With it, the procedural statement
> allows to keep
> values of variables between two evaluations. For my work it
> is very good
> (it is the only solution of my problem). By the way, the standard says
> that the declaration in the procedural will be reinitialized at each
> avaluation.
> I think It would be better to let variables in procedural to be static
> and to keep their values between two evaluations.
I am not clear if I got your proposal right. As I understand you, you would
like to keep the values of the variables within the procedural statement
like some "static variable" in C.
That would mean, the values would change many times between ASPs depending
on the selected analog solver.
The approach above is clearly against the intentions of the working group
since the behaviour of the model would depend strongly on the solving
algorithm.
The procedural simultaneous statement is only short hand for expressing the
same
using "non-procedural" statements (there were quite a lot of people within
the
language design team against this short-hand). The portability of models,
one of the major goals for using VHDL-AMS would be lost. (If some simulator
violates this rule, you should not write models depending on this bug.)
Assume some simulator rewrites the
system of simple simultaneous statements defined by the procedural statement
via simbolic manipulation to a very simple equation, the behaviour would be
totally different from a solver which would process many iterations for
the same equations.
To my knowledge, there is one workaround for the problem you describe (with
the
same disadvantages for portability already expressed above): you may use
global variables. Another "nice" way of dealing with what ever you like, is
to
apply a C-interface to access C "static variables". One problem you still
have
is the lacking information about the first evaluation of right after a ASP.
I would not might providing that information as a boolean function
("first_step()").
Again, if somebody uses it but not very carefully, the portability of the
model
is lost.
Regards,
Eduard Moser
--Robert Bosch GmbH FV/FLI, Postfach 10 60 50 D-70049 Stuttgart, Germany Tel: +49-711-811-6924 Fax: +49-711-811-7602
This archive was generated by hypermail 2b28 : Tue Dec 18 2001 - 02:26:59 PST