walala wrote:
> Dear Ingmar,
>
> Thank you very much for your complete and informative explanation for
> such a newbie as me. I recommend this article to be assembled into
> VHDL FAQ... :=)
Thanks

.
It took me some time too to understand when and why a latch is
synthesized, why a register is put in and all these things. In online
ressources (as well as in many books) you often find the standard syntax
desription. Often examples (and often very easy ones) are given without
a connection to the synthesis result. Unless I write a testbench, this
is very important to me. I don't write the code just for fun.
But a lot of authors don't bother, so it's hard to get some answers to
important questions.
>
> I now understand that in a clocked section, the "else" branch can be
> safely ignored since it will be a register anyway... I also understand
> that special care should be taken when the "if" statement is outside
> the clocked section...
>
> I want to further ask:
>
> p0: PROCESS(rst, clk)
> BEGIN
> if rst = '1' then
> for I in 0 to 7 loop
> for J in 0 to 7 loop
> XX(I)(J)<=0;
> end loop;
> end loop;
> elsif (clk'event and clk = '1') then
> XX(POSY)(POSX)<=CONV_INTEGER(X);
> else
> ...
> end if;
> END PROCESS p0;
>
>
> I the above code, since the "else" part is outside the clocked
> section, but parallel to the asynchonous reset section, do I need to
> put something inside the "else" branch? Or, can I safely ignore the
> "else" branch?
I'm sure you have this from a book. No, you don't need to put something
in it. As you said, it is not clocked.
if rst = '1' then
for I in 0 to 7 loop
for J in 0 to 7 loop
XX(I)(J)<=0;
end loop;
end loop;
This means only, that the rst signal is connected to the registers that
form your matrix.
If you would put something in the else branch I think logic would be
generated. But I'm not 100 percent sure about this.
Could anyone confirm this?
> -Walala
>
Could you please use your real name for further posts.
In usenet it's common to post with real name. Some people ignore threads
without real names and so you get fewer answers.
Regards,
Ingmar Seifert