请选择 进入手机版 | 继续访问电脑版

集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 3880|回复: 4

大家有谁能帮我设计个VHDL语言倍频。

[复制链接]
cel196 发表于 2010-5-27 09:13:16 | 显示全部楼层 |阅读模式
或者给我个原理图。因为我倍频大,所以我也不知道该咋弄了。毕设要用。用DCM的编程也行。
IPO 发表于 2010-5-27 09:27:27 | 显示全部楼层
library IEEE;

use IEEE.STD_LOGIC_1164.ALL;

use IEEE.STD_LOGIC_ARITH.ALL;

use IEEE.STD_LOGIC_UNSIGNED.ALL;


---- Uncomment the following library declaration if instantiating

---- any Xilinx primitives in this code.

--library UNISIM;

--use UNISIM.VComponents.all;


entity minutes is

Port ( rst3,selector2,ky_2j : in STD_LOGIC;

                  B10 : in std_logic;

                                C : out std_logic;

                        dat30 : out std_logic_vector(7 downto 0));

end minutes;

architecture Behavioral of minutes is

signal dat31,dat32 : std_logic_vector(7 downto 0):=(others =>'0');

begin


process(rst3,B10,ky_2j)

begin

case selector2 is

when '1' =>dat32<=dat31; if ky_2j'event and ky_2j='1' then

if dat31(7 downto 4)="0101" and dat31(3 downto 0)="1001"

then dat31(7 downto 0)<="00000000";

elsif dat31(3 downto 0)<"1001" then dat31(3 downto 0)<=dat31(3 downto 0)+1;

else dat31(3 downto 0)<="0000";

if dat31(7 downto 4)<"0101" then dat31(7 downto 4)<=dat31(7 downto 4)+1;

else dat31(7 downto 4)<="0000";

end if ;

end if ;

end if ;

dat30<=dat31;


when '0' =>dat31<=dat32; if(rst3 = '0') then dat32<=(others =>'0');

elsif B10'event and B10='1' then

if dat32(7 downto 4)="0101" and dat32(3 downto 0)="1001"

then C<='1'; dat32(7 downto 0)<="00000000";

else C<='0';

if dat32(3 downto 0)<"1001" then dat32(3 downto 0)<=dat32(3 downto 0)+1;

else dat32(3 downto 0)<="0000";

if dat32(7 downto 4)<"0101" then dat32(7 downto 4)<=dat32(7 downto 4)+1;

else dat32(7 downto 4)<="0000";

end if;

end if;

end if;

end if;

dat30<=dat32;

when others =>null;


end case;

end process;


end Behavioral;
 楼主| cel196 发表于 2010-5-27 12:33:56 | 显示全部楼层
回复 2# IPO


    先谢谢你,我在网站上找到过这个程序。但是仿真后显示不是倍频。能找到其他的吗?
Sunlife 发表于 2015-5-19 16:12:45 | 显示全部楼层
网站上找到过这个程序。但是仿真后显示不是倍频
zxopenljx 发表于 2020-11-14 23:03:26 | 显示全部楼层
大家有谁能帮我设计个VHDL语言倍频。
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|集成电路技术分享 ( 京ICP备20003123号-1 )

GMT+8, 2024-3-28 17:11 , Processed in 0.109600 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表