打印

半整数分频的VHDL程序

[复制链接]
1232|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
jie4567|  楼主 | 2010-8-20 10:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
半整数分频的VHDL程序
想出了一个半整数分频的VHDL语言描述
其实很多问题只要你耐心,也是比较容易的
写出来与大家共享,共同讨论,半整数分频当然还有其他的方法
我认为这种看起来蛮简单的
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity abc is
port(clk:in std_logic;
     dout:out std_logic);
end abc;
architecture x of abc is
signal p,q:std_logic_vector(2 downto 0);
begin
process(clk)
begin
if (clk'event and clk='1') then
if p="100" then p<="000";else p<=p+1;
end if;end if;end process;
process(clk)
begin
if (clk'event and clk='0') then
if q="100" then q<="000";else q<=q+1;
end if;end if;end process;
dout<='1' when p="000" or q="010" else '0';end x;
在MAXPLUS2里编译通过
仿真图也是正确的
这个是2.5分频,如果是其他半整数分频修改参数即可



相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

71

帖子

1

粉丝