|
這是我從網路上找到的鬧鐘程式9 A8 p) ^) R6 f* X8 a7 P
但Compiler一直不會過+ [5 z9 @* m6 J: i0 y
會出現Process clocking is too complex的錯誤" E9 [2 l# H# r1 U5 E! D
請問是為什麼呢?? 謝謝
& w6 n/ y' J9 e
1 x% p( R; T3 Z4 YLIBRARY ieee;
c, y* O- `( C4 s6 O6 a. ]( IUSE ieee.std_logic_1164.all;4 Z4 C5 \( J+ `3 ?: z$ A/ c& S
: }; O% G: `% |
, d$ ~0 i) |' Uentity scalarmtime is * ~ W: t/ [7 ~2 L& l' I% L; C
port(set_alarm,set_sc,set_min,set_hour : in std_logic;
" K% L# U9 B) Y) `) U7 H sc_data : out integer range 0 to 59; 2 W% G4 A4 s; g/ g
); ( ~! A% r4 {% V* d
end scalarmtime; 8 e3 J$ [0 J7 q% d9 N
$ t$ a$ }. i9 c2 j
7 Q+ y1 R7 @9 z/ i7 c Q8 z+ Karchitecture one of scalarmtime is 9 I0 r7 D. F# A. k; b
begin ( ~1 ^8 s/ D3 A$ |, Q
process(set_sc) 4 }8 C3 d; v1 U' V
variable set_sc_data :integer range 0 to 59; 4 q$ s, n& B3 V! X/ c. W8 g$ P+ g
begin
5 E2 z. ~' B" n" A- T if(set_alarm = '1') then
/ d$ j/ ]% \* f" E0 {+ a! g6 k) @' F if(set_sc'event and set_sc='1') then 4 i$ j/ X, Z6 ?5 J# r. Q
if(set_sc_data = 59)then : a. G3 E9 y* s, D. C7 ^
set_sc_data:= 0;
9 o: Q; z8 b, B2 q! ?6 x else " x7 o. U7 g9 w/ K) U2 a3 s
set_sc_data := set_sc_data + 1;
v. s4 _* O/ v% }3 l+ u3 Y end if; . G8 U8 ]+ D5 l$ S6 ]
end if;
' m7 T* T4 i3 V) x- {7 `8 A end if; ( U, \" e2 ~$ e3 D- ~
sc_data <= set_sc_data; $ n5 W: ^2 S$ ~# f& g$ E* T' U) Y/ e0 y
end process; % l$ v, G [4 V |, Z: z0 p0 ^
end one; |
|