搜索
bottom↓
回复: 3

仿真无错,综合出现问题

[复制链接]

出0入0汤圆

发表于 2011-7-23 11:58:33 | 显示全部楼层 |阅读模式
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity fenpin is
port(
clk_a:in std_logic;         --a脉冲
clk_b:in std_logic;         --a脉冲
cmd:in std_logic_vector(7 downto 0);  --拨码输入
clkout_a:out std_logic;      --a
clkout_b:out std_logic;     --拨码分频输出b
out_a : out  STD_LOGIC;     --
out_b : out  STD_LOGIC;     ---8分频输出b
k : out  STD_LOGIC          --方向输出
);
end fenpin;
architecture arch of fenpin is
signal clkt_a:std_logic:='0';
signal clkt_b:std_logic:='0';
signal        count_a :std_logic_vector(2 downto 0):="000";
signal        count_b :std_logic_vector(2 downto 0):="000";
signal kout:std_logic:='0';
signal kc:std_logic:='0';

begin
clkout_a<=clkt_a;
clkout_b<=clkt_b;
k<=kout;

process(clk_a,kc)
        begin
        if (kc='1') then count_a<="000";
          else
          if (clk_a'event and clk_a='1')
                then
                        if (count_a="111") then
                                 count_a<=(others=>'0');
                        else
                                 count_a<=count_a+1;
                                    if(count_a(2)='0') then
                                  out_a<='1';
                          else
                                  out_a<='0';
                          end if;
                        end if;
        end if;
    end if;
end process;

process(clk_b,kc)
        begin
        if (kc='1') then count_b<="000";
         else
          if (clk_b'event and clk_b='1')
                then
                        if (count_b="111") then
                                 count_b<=(others=>'0');
                        else
                                 count_b<=count_b+1;
                                    if(count_b(2)='0') then
                                  out_b<='1';
                          else
                                  out_b<='0';
                          end if;
                        end if;
        end if;
      end if;
end process;
-- b信号八分频
process(kout,clk_a)
begin
if(kout'event) then kc<='1';           -----------------------------------line 175
else if (clk_a='0') then kc<='0';
end if;
end if;
end process;

process(clk_a,clk_b)
        begin
                if (clk_a'event and clk_a='1') then
                        if clk_b='1' then
                                kout<='1';
                        else
                                kout<='0';
                        end if;
                end if;
end process;

-- ab信号相位判断



process(clk_a,cmd)
variable cnt_a:std_logic_vector(7 downto 0):="00000000";
begin
   if cmd=0 then
        clkt_a<=clk_a;
        cnt_a:="00000001";
        elsif rising_edge(clk_a) then
              if cnt_a="00000001" then
                   clkt_a<=not clkt_a;
                   cnt_a:=cmd;
              else
                  cnt_a:=cnt_a-1;
              end if;
    end if;
end process;
-- a拨码分频

process(clk_b,cmd)
variable cnt_b:std_logic_vector(7 downto 0):="00000000";
begin
    if cmd=0 then
        clkt_b<=clk_b;
        cnt_b:="00000001";
elsif rising_edge(clk_b) then
if cnt_b="00000001" then
clkt_b<=not clkt_b;
cnt_b:=cmd;
else
cnt_b:=cnt_b-1;
end if;
end if;
end process;
end arch;
-- b拨码分频



综合提示错误:
Analyzing Entity <fenpin> in library <work> (Architecture <arch>).
ERROR:Xst:797 - "E:/xilinx workfile/fenpin/fenpin.vhd" line 175: unsupported Clock statement.

高手帮我看下怎么回事?

阿莫论坛20周年了!感谢大家的支持与爱护!!

知道什么是神吗?其实神本来也是人,只不过神做了人做不到的事情 所以才成了神。 (头文字D, 杜汶泽)

出0入0汤圆

发表于 2011-7-23 12:36:42 | 显示全部楼层
看结果是第175行出问题了…………

可是……我发现你贴出来的代码压根就没有175行啊?

你能否把代码的行号标上,要不然别人还得一句一句分析啊?贴个完整的。

出0入0汤圆

发表于 2011-7-23 12:52:43 | 显示全部楼层
时钟双沿触发,不得行

出0入0汤圆

 楼主| 发表于 2011-7-23 13:30:45 | 显示全部楼层
回复【1楼】lanqilove 三木
看结果是第175行出问题了…………
可是……我发现你贴出来的代码压根就没有175行啊?
你能否把代码的行号标上,要不然别人还得一句一句分析啊?贴个完整的。
-----------------------------------------------------------------------

我标了啊  if(kout'event) then kc<='1';           -----------------------------------line 175
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片。注意:要连续压缩2次才能满足要求!!】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-7-24 13:29

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表