Hallo Community,
in meinem Projekt mit Spartan 3 und AVR werden 2 Clocks verwendet:
50MHz Oszillator hängt am GCK Pin
Zweite Clock ist SCK (verwende SPI) von AVR hängt am normalen i/o Pin
(kein GCK). Bis jetzt habe ich so gemacht, das die Flanke von SCK in so
einem Process erkannt wird:
1 | process (SCK50MHZ)
|
2 | begin
|
3 | if rising_edge(CLK50MHZ)
|
4 | LAST_SCK <= SCK;
|
5 | SCK_RIGING_EDGE <= '0';
|
6 | if LAST_SCK = '0' and SCK = '1' then
|
7 | SCK_RISING_EDGE <= '1';
|
8 | end if;
|
9 | end if;
|
10 | end process;
|
Gibt es irgentwelche Nachteile wenn ich SCK als Clock direkt abfragen
werde:
1 | process (SCK)
|
2 | begin
|
3 | if rising_edge(SCK)
|
4 | ...
|
5 | ...
|
6 | ...
|
7 | end if;
|
8 | end process;
|
MfG aus Westerwald