|
EDA365欢迎您登录!
您需要 登录 才可以下载或查看,没有帐号?注册
x
architecture behv of cnt is
6 a9 b0 w" J9 d, g% j, ^" E: `' rsignal temp: std_logic_vector(19 downto 0); ) l# p: f1 m# C& |
begin 3 T9 Q8 j6 }! L3 F- S
process(clk) ) l5 K5 s9 ~; U4 d$ H
begin ; X2 z% {- v/ R
if clk'event and clk ='1' then
) I1 B3 w9 a7 w1 X( I if temp="11110100001000111111" then % V' \# P) L, `- C6 T
temp<="00000000000000000000"; : @8 y# c( T' D! B' @! l& k1 q S3 b
else
6 O2 v4 T- ^7 w* s6 W temp<=temp+1;
. E6 [2 Q8 a5 ?2 f7 A" A end if;
# O! J9 M, X& M5 J) E- I7 p end if;
6 t# @/ C( e6 y* t8 @end process;
6 c7 E. G9 i/ i' t. O; p. S' nfreq1<=temp(19); % E2 U* j2 ]4 C; w4 x7 U" M
freq488<=temp(10);
# A' {% P: o6 }% c! Xfreq1953<=temp(8); 2 K! b* N% \- i7 t) t9 G# l
freq7812<=temp(6); 9 W4 o# U; a) y' Q
freq31250<=temp(4);
9 t, I6 S8 P, c( ]2 R. z& _freq125k<=temp(2);
# O/ y5 g( T8 ?/ S a, ufreq500k<=temp(0); + y# O$ N# f! A% X$ a" V
end behv;
' U6 b, l! e' t5 T+ W9 Q; o这是个多分频输出的分频器的VHDL
; R M3 }& w2 h, y& s% x问下这个 temp() 是什么意思 ()里的数什么意思 是选择位数吗?
! g# D8 X3 n7 X或者哪位帮我解释下原理 |
|