Eilert,
first of all thank you for your quick and very detailed answer, you
helped me a lot!
this is the synthesis part of the original standard.
It refers to the 2002 release of the full VHDL standard (see top of
page iii, which is page 4 in the pdf)
That also explains, why it is two years "late" compared to the full
standard.
Tool vendors normally only refer to the original standard, not the
derived substandards.
So you probably won't find a tool that explicitly supports some 2004
release.
I guess you're right

- at least the big vendors hardly ever mention
the 1076.6 standard (no matter which revision). for simulation, that
is completely fine, but I do wonder why they do not claim at least
1076.6-1999 conformance for their synthesis tools.
Anyway, my question was more about what is working in practice - so
what user's experiences are in the real world when they try to model
hardware the way the 2004 revision describes it - e.g. does design
compiler handle multiple wait statements in one process? sync
assignments controlled by "complicated boolean expressions"?
About the example:
the violated rule (a) is mentioned.
To become a valid synthesizable description I think the "else" should
be replaced by
"elsif rising_edge(clk) then".
I was kinda wondering why they keep repeating parts of the conditional
expressions in the other examples

that explains a lot - however, I
have no clue why they're specifying this the way they do - maybe I'm
viewing this from a completely wrong perspective, but it seems very
complicated and unelegant to me...
See:
<sync_assignment>. An assignment to a signal or variable that is
controlled explicitly by <clock_edge> in
all execution paths.
...
Edge-sensitive storage shall be modeled for a signal or variable
assigned inside a process with sensitivity list
when all of the following apply:
a) The signal or variable has a <sync_assignment>.
b) There is no execution path in which the value update from a
<sync_assignment> overrides the value
update from an <async_assignment> unless the <async_assignment> is an
assignment to itself.
c) It is possible to statically enumerate all execution paths to the
signal or variable assignments.
d) The process sensitivity list includes the clock and any signal
controlling an <async_assignment>.
e) The <clock_edge> is present in the conditions only, and the
<clock_edge> always expresses the
same edge of the same clock signal.
f) For a variable, the value written by a given clock edge is read
during a subsequent clock edge.
Rule a is violated by the example because the first if may be
triggered by a rising edge of the clock signal only,
but the assignment Q<=D is just depending on the state of reset.
obviously I am reading the rules wrong in here - I thought rule a) is
met since there is a sync assignment (Q <= D since the two if-
statements around it result in if rising_edge(clk)) - there is, of
course, also an async assignment (Q<='0') but rule a) doesn't specify
that there have to be _only_ sync assignments.
On first reading I stepped into the same trap as you did.
The problem is that event triggereing (rising_edge) and state logic
can not be mixed up the way you did.
let me reanalyse the code:
first if: entered on rising clock edge or active reset. (This allows
the tool to proceed reading the code, nothing more, nothing less)
second if: Deciding which of two asynchronous assignments has to be
mate relating to the state of reset. (Tool doesn't know why it is
reading this.)
I really do not understand when and why the tool is supposed to forget
about outer if-conditions - is that specified anywhere in the
standard?
But you're right, the algorithm I am thinking about does collect if-
conditions, ands them together (or and-nots them together in case of
else-branches) and then analyses them when it reaches an assignment.
so in this case i'd end up with
(rising_edge(clk) or reset='1') and not (reset='1')
which I could then simplify into rising_edge(clk)
---
If the tool would remember why it has entered the second if, there may
be the chance that on active reset you also have a rising clock edge.
This would cause a flipflop to be synthesized.
But at anoter time when Reset is active but there's no rising clock
edge, for the same if, just some asynchronous assignment has to be
done, and no Flip Flop will be synthesized.
This is a contradiction the synthesis tool can't resolve.
ok - the part I obviously do not understand is the one where
conditions from outer if-statements get dropped. With the approach I
have in mind this would cleanly synthesize as a flipflop that has an
asynchroneous reset-input, I think.
The mistake you made is that you can not overrule the rising clock
edge with logical optimization of the clock signal. It has to be
treated different.
For this one example your method may work, but when things become more
complicated (e.g. with clockenables and/or mixing of asynchronous and
synchronous reset/presets) it will fail.
can you five an example where my approach would fail? I must confess,
I have only sketched it so far and will need to write it down in a
formal way (I am writing a paper right now

) - my idea was
basically to collect conditions, basically I have an expression engine
which can handle logic equations, arithmetic expressions and you can
also have clock edge specifications in there, all mixed together and
it will apply standard optimizations to those expressions. whenever I
reach an assignment, I look at the current condition I have collected,
optimize it down and check, whether it still contains a clock edge or
not. if it does contain a clock edge, i will use that clock for a
flipflop (which can have additional async inputs, if needed to
synthesize other assignments) clk input, will tell the expression
engine to tread that part of the expression as don't care and optimize
it further down, which i will then use to synthesize synced enable and
data inputs for the flipflop.
I do wonder how much of the standard I cover, where I am not compliant
- I am definitely not "bug-compatible" with my approach since
obviously I can handle designs which I shouldn't be able to handle.
Actually, I could easily live with that - but I am worried about
examples that I should be able according to the standard which my
approach fails to handle.
BTW: in the meantime I have read on. I was very surprised about
6.1.3.3 where they allow multiple clock signals for assignments to the
same signal - I wonder what that would result in when synthesized -
would I need flip flops that have several separate clock inputs in my
target library to support that?
in chapter 6.1.3.4 they model implicit FSMs using multiple wait-
statements in a single process - which I could imagine is pretty
useful (I was always wondering why VHDL doesn't have a syntax for
FSMs) but then again I have trouble really understanding their rules.
What gives me most headaches is the way they use loops and next
statements: from the examples I gather that they
- have at most one outer infinite loop and next-statements immediately
following the wait statements to model the async reset state. the
rules they state are pretty elaborate about the conditions used in the
wait statements having to be the same throughout the process - not
pretty, but makes sense. but i don't see them specify anywhere that
the next statement has to follow the wait statement immediately, nor,
that one can have at most one such infinite loop - so I wonder what
would happen if the user breaks these rules? has next statements in
arbitrary locations or nests infinite loops, possibly mixed with if-
and for-loops, has multiple labels in there, uses next-statements to
jump to any of them? is all that forbidden or is the tool supposed to
handle all that in some way?
- maybe a simpler question: is there a rules which dictates that if
one wants to have wait statements in for-loops, it has to be the first
statement in the loop body? that assumption certainly holds for the
examples they give, yet i cannot find a rule about that
what I am aiming for maybe has become clear already: I'd like to
extend my approach to handle FSM specifications as well - I would
basically treat the examples before 6.1.3.4 as mealy automata that
have at most one state (plus additional async logic) and would like to
extend my approach smoothly to FSM descriptions which then generate
automata with multiple states (basically one per wait-statement).
thanks again for your help, sorry for my far too long post and best
regards,
guenter