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


热门搜索:PS480806 4SPDX PS3612RA TLM812SA 2866569 TLP825 01M1002SFC2 CC2544RHBR PDUMH15 2817958 02B5000JF SUPER6OMNI B 02M1001JF 2866666 LED12-C2 2320322 SBB1005-1 ADC128S102CIMTX SPS-615-HG BSV52R UL603CB-6 SBB1002-1 PS-615-HG 2866572 1301380020
COPYRIGHT:(1998-2010) IC72 达普IC芯片交易网
客户服务:service@IC72.com 库存上载:IC72@IC72.com
(北京)联系方式: 在线QQ咨询:点击这里给我发消息 联系电话:010-82614113 传真:010-82614123
京ICP备06008810号-21 京公网安备 11010802032910 号 企业资质