网站首页
IC库存
IC展台
电子资讯
技术资料
PDF文档
我的博客
IC72论坛
ic72 logo
资料首页最新产品 技术参数 电路图 设计应用 解决方案 代理商查询 IC替换 IC厂商 电子辞典
关键字: 技术文章 PDF资料 IC价格 电路图 代理商查询 IC替换 IC厂商 电子辞典

双时钟计数器

如何设计一个双时钟的计数器,其中一个时钟是clk_up另一个是clk_down?

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
use ieee.std_logic_arith.all;
entity dou is
port ( clk1 : in std_logic;
clk2 : in std_logic;
q : out std_logic_vector(0 to 3)
);
end dou;
architecture rtl of dou is
signal q1,q2 : integer:=0;
begin
PROCESS(clk1)
begin
if clk1'event and clk1='1' then
q1<=q1+1;
end if;
end PROCESS;
PROCESS(clk2)
begin
if clk2'event and clk2='1' then
q2<=q2+1;
end if;
end PROCESS;
PROCESS(q1,q2)
begin
q<=conv_std_logic_vector(q1+q2,4);
end PROCESS;
end rtl;
==============================
Neither MaxPlus nor any other RTL synthesis tool that the Doctor is
familar with can cope with PROCESSes that are sensitive to more than one
clock, or more than one clock edge.

You must recast your model into multiple PROCESSes if you wish to
synthesize it.


-- demolbl

vvv
/ \ demolbl@263.net
@ ==
/\ \ "Pay no attention to that man behind the curtain!"


热门搜索:PDU12IEC RS1215-20 TLM626NS 01T5001JF UL603CB-6 2858043 8300SB2-LF 01B1001JF LCR2400 N060-002 SBB1602-1 BQ25895MRTWR PS-415-HG TLM609GF 2320351 6SPDX TRAVELER3USB 2856087 LED12-C2 2856032 RBC62-1U BT05-F250H-03 2839224 TLP606B 02T0500JF
COPYRIGHT:(1998-2010) IC72 达普IC芯片交易网
客户服务:service@IC72.com 库存上载:IC72@IC72.com
(北京)联系方式: 在线QQ咨询:点击这里给我发消息 联系电话:010-82614113 传真:010-82614123
京ICP备06008810号-21 京公网安备 11010802032910 号 企业资质