|
這是我從網路上找到的鬧鐘程式
( m& O) u- N( G8 [$ O9 Z$ a但Compiler一直不會過
! W& [$ ?4 h5 e' j會出現Process clocking is too complex的錯誤6 |3 _7 B* u5 q6 z
請問是為什麼呢?? 謝謝
8 Y! X( y' Y8 z m/ C
8 e3 ~& |/ [( V/ C- gLIBRARY ieee;
7 o( B, z/ r5 GUSE ieee.std_logic_1164.all;
1 E2 F# z, \4 D( l
$ l) F. T) N& @- }2 R. s# \0 v9 D; h. u( \: m# T" K
entity scalarmtime is ) x8 ]; ^# u! f8 V3 U6 Y5 N$ u8 t
port(set_alarm,set_sc,set_min,set_hour : in std_logic;
' X9 z# C6 J5 [7 T sc_data : out integer range 0 to 59;
' M! [! A' q" M6 w& J ); + w- A5 f9 T7 ~
end scalarmtime; & \$ w7 f" U+ R' s/ u6 d8 u5 r& ~
8 E* |0 `% `( q3 c0 c3 i- Q$ ~
& `/ S, M( D t. narchitecture one of scalarmtime is 9 C. s- _/ Z7 s) V, U" V- P5 S
begin 7 K/ f2 H* h+ o# U
process(set_sc) . |* e+ A/ K9 U( g; W: A+ h
variable set_sc_data :integer range 0 to 59; # G" y# e( w) X+ B _5 Y8 L4 \/ D
begin
c A- D0 s1 z8 V; e if(set_alarm = '1') then 2 K {) @ L5 E
if(set_sc'event and set_sc='1') then
5 d. M2 t# u2 k if(set_sc_data = 59)then
# Y& r- d! g: N& r set_sc_data:= 0; $ K; v# `4 J9 K8 n$ i5 X7 S0 ^. _
else % Z G2 p$ H% {; U/ W" |( f
set_sc_data := set_sc_data + 1;
! K0 k0 U5 s {. |! w; C; h end if; $ F9 l- x) x+ b" z$ M
end if; U" i1 l; U6 L1 s, ]( u8 K
end if; 8 Q9 T7 o! l/ @+ W, I
sc_data <= set_sc_data; " E& r( H) ?& w
end process;
% m0 J. [+ I9 H4 yend one; |
|