|
這是我從網路上找到的鬧鐘程式% ]$ t3 X1 G0 P6 c
但Compiler一直不會過
4 Q7 |2 d! ~% P+ f/ }會出現Process clocking is too complex的錯誤# K4 q- Z9 k" V' g, p
請問是為什麼呢?? 謝謝
: q* z# d; k% T( b. v, z7 C+ d6 l: K# a
LIBRARY ieee;2 N9 e) \2 w3 I& k, J
USE ieee.std_logic_1164.all;. m* [9 C( h0 {$ q+ q9 y
6 j" u( s0 w4 {: a% \7 y) U
* `0 Z" J% e; ?+ ?' f. V4 J7 q
entity scalarmtime is
- P( G- I, x9 q: L5 aport(set_alarm,set_sc,set_min,set_hour : in std_logic;
7 a: {. ?! p) F# V4 [8 s sc_data : out integer range 0 to 59;
' H5 \; O6 r9 n& B! C ); 5 H: J: t$ T" I
end scalarmtime;
5 j" M( h; i6 C" Z( d9 l4 [- V0 {1 j2 x8 A
8 ]( N/ H9 k/ Q( E- o+ `, a; S: R
architecture one of scalarmtime is
+ j5 ?: G" \/ F$ W E' qbegin & O0 B7 o9 ?8 @
process(set_sc)
, p' s$ a" B( K& J9 b0 O variable set_sc_data :integer range 0 to 59; . B. |+ J2 w+ O1 t; F' |
begin ; V0 N$ `) o: A. {
if(set_alarm = '1') then
; f2 U$ m9 `3 }3 v if(set_sc'event and set_sc='1') then
, ]4 P0 c0 m( b- J( A2 k% E if(set_sc_data = 59)then
- l/ T, A2 L# V0 P. W. ?. i9 Y set_sc_data:= 0;
7 H. z; G9 t. | else . S6 @* ^* F. j- R2 _. t% g# g
set_sc_data := set_sc_data + 1; 7 d7 j& C, Y3 R( d
end if;
; S4 O2 [, y2 y5 T* `% W6 [6 P end if; 0 y6 |) e+ j8 L" U
end if;
' ^6 P3 v5 Y/ G# f4 Q. x sc_data <= set_sc_data; - @* H/ Y0 _ L6 G0 M) N9 j
end process;
# x. g$ Y" ?1 H5 }* Qend one; |
|