在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 2769|回复: 4

偶数时钟分频 VHDL 占空比 50%

[复制链接]
发表于 2007-6-5 06:52:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
-- Divided by 4, duty 50%
library ieee;
use ieee.std_logic_1164.ALL;
use ieee.numeric_std.ALL;

entity clk_div_4 is
   port ( clk_in     : in    std_logic;
          div_4 : out   std_logic);
end clk_div_4;
architecture BEHAVIORAL of clk_div_4 is
signal cnt : integer := 0;
signal div_temp : std_logic := '0';
begin
process (clk_in) begin
if (clk_in'event and clk_in = '1') then
  if cnt >= 1 then
   div_temp <= not(div_temp);
   cnt <= 0;
  else
   div_temp <= div_temp;
   cnt <= cnt + 1;
  end if;
  div_4 <= div_temp;
end if;
end process;
end BEHAVIORAL;

1。以上程序有没有问题?
2。如果你认为有问题,说明你的理由,并说明你想如何改正。
3。你能用 FPGA 硬件板验证它吗?

我是用 xilinx ChipScope 9.1 来验证
,Altium LiveDesign Evaluation Board。

[ 本帖最后由 jitongw 于 2007-6-5 07:01 编辑 ]

clk_div_4.rar

403 Bytes, 下载次数: 12 , 下载积分: 资产 -2 信元, 下载支出 2 信元

发表于 2007-6-5 14:37:22 | 显示全部楼层
不能够4分频
 楼主| 发表于 2007-6-5 21:59:46 | 显示全部楼层
为什么????



原帖由 yoyo1234 于 2007-6-5 14:37 发表
不能够4分频

发表于 2007-8-29 15:16:03 | 显示全部楼层
研究研究先。
发表于 2007-8-29 22:31:04 | 显示全部楼层
谢谢楼主!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

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

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-4-28 05:17 , Processed in 0.025553 second(s), 9 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表