网站首页
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!"


热门搜索:PSF3612 ADC128S102CIMTX 2838228 2856087 2811271 4SPDX 2320319 PS3612RA 2986122 PDU1215 2856032 B30-8000-PCB PS120406 PS-615-HG 2762265 6SPDX B10-8000-PCB LC1800 2838733 PS-415-HGULTRA TLP74RB BSV17-16 01C1001JF 2839237 SBB2808-1
COPYRIGHT:(1998-2010) IC72 达普IC芯片交易网
客户服务:service@IC72.com 库存上载:IC72@IC72.com
(北京)联系方式: 在线QQ咨询:点击这里给我发消息 联系电话:010-82614113 传真:010-82614123
京ICP备06008810号-21 京公网安备 11010802032910 号 企业资质