"ALuPin" <
[email protected]> escribió en el mensaje
news:
[email protected] om...
> Hi,
>
> what is the difference between the following processes
> if I want to use the basic clock and the derived clock for my
> simulation with Modelsim?
>
what do you mean by "aligning signals"? what signals are you aligning?
if you have modelsim why dont you just simulate it to see if you get the
correct behaviour? which only you knows, as it cant be "extracted" from
these small pieces of code...
>
> process(clk)
> begin
> if clk='1' then
> clk2 <= not clk2;
> end if;
> end process;
> -- clk and clk2 are used for simulation
> ----------------------------------------------
>
i dont understand what exactly are you trying to do, but it seems like
you're "dividing" the frequency of clk, use a DFF then, a divider is a DFF
with it's "Qn" output conected to it's "D" input, the output of the divider
can be either Q or Qn
process(CLK, RSTn)
begin
if (RSTn = '0') then
Q <= '0';
elsif (rising_edge(CLK)) then
Q <= D;
end if;
end process;
D <= not Q; -- (which of course you could put in the elsif of
the process, by putting Q <= not Q; )
> process(clk)
> begin
> clk1 <= clk;
> if clk='1' then
> clk2 <= not clk2;
> end if;
> end process;
> -- clk1 and clk2 are used for simulation
>
> Thank you for your help.
>
> Best regards
the same as before, you just have
clk1 <= clk;
but again, you'd be better simulating stuff in modelsim to see what fits
your needs better