On 7/11/2011 12:07 PM, Martin Thompson wrote:
[...]
> process is
> begin
> -- do_reset things here
> wait until reset = '0'; -- wait until reset goes away
> main : loop
> wait until rising_edge(clk) or falling_edge(reset); exit main when reset = '1';
> -- do one set of things
> wait until rising_edge(clk) or falling_edge(reset); exit main when reset = '1';
> -- do another set of things
> -- etc.. repeat long wait until line as many times as necessary
> end loop;
> end process;
>
Isn't the "exit main when reset = '1'" a synchronous reset? The way I
read is the following:
- wait until rising_edge(clk) and then
- if reset = '1' exit the main loop.
Am I wrong (*)?
> Also on "inferred state machines":
>
> http://parallelpoints.com/node/69
>
very interesting approach. And I do share the same view when you say:
> it saves you having to think of names for your states
since IMHO what is more critical is the condition under which an FSM
moves from one state to the other, rather than the state itself.
The suggestion to move at a higher level of description and leave the
synthesizer infer whatever is needed to perform the functionality
described is the right way of exploiting the language. Too many times we
loose ourselves amongst gates and flops forgetting the big picture.
Two comments though:
- giving the impression that "less code is usually good" is a
misconception (as Nemo's father would say about clownfish). Being on the
defense line "the smaller the better" usually drives designers to write
unreadable and therefore unmaintainable code.
- comparing vhdl with C# in terms of lines of code is risky. Hardware
acceleration is nothing related to the lines of code and its main goal
is to search for tasks in the sequential (and/or multi-threaded)
computing that can be performed in parallel by an external device (or
additional dedicated CPU) in the hope of being more efficient (number of
computations/cycle). Nothing related to lines of code.
> (apologies to Chrome users, the code wraps rather than providing scroll-bars
> like in Firefox. I haven't figured out why yet)
>
Didn't work for me as well, but found the following:
http://code.google.com/p/chromium/is...etail?id=10533
even though they claim they fixed this problem...
(*) my apologies I cannot try it out myself...reinstalling my pc!