搜索
bottom↓
回复: 3

[请教] 二进制ASK解调电路故障

[复制链接]

出0入0汤圆

发表于 2010-6-2 20:45:42 | 显示全部楼层 |阅读模式
各位朋友,大家晚上好。这几天我被这段代码折腾死了。了解的朋友请帮忙看看。

编译没什么问题,可是综合之后出现了不少错误,仿真出来的结果也不对。

=======================================================================

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity deask2 is
port(clk,x:in std_logic;
         y:out std_logic);
end deask2;

architecture one of deask2 is
signal q:integer range 0 to 7;
signal xx:std_logic;
signal m:integer range 0 to 7;
begin

      process(clk,m)
      begin
       if clk'event and clk='1' then xx<=x;
          if q=7 then q<=0;
          else       
          q<=q+1;
          end if;
       end if;
      end process;

      process(m,xx,q)
      begin
        if q=7 then m<=0;
        elsif q=6 then
           if m<=3 then y<='0';
           else y<='1';
           end if;
        elsif rising_edge(xx) then m<=m+1;
        end if;
      end process;               
       
end one;

附件是工程文件,其中x是ASK信号。

点击此处下载 ourdev_559092.rar(文件大小:276K) (原文件名:deask2.rar)

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

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

出0入0汤圆

 楼主| 发表于 2010-6-3 22:43:15 | 显示全部楼层
我把几个错误信息拎出来,看看有没人晓得是怎么回事?

Warning: Timing Analysis is analyzing one or more combinational loops as latches
        Warning: Node "y$latch" is a latch

Warning: Found 5 node(s) in clock paths which may be acting as ripple and/or gated clocks -- node(s) analyzed as buffer(s) resulting in clock skew
        Info: Detected ripple clock "q[1]" as buffer
        Info: Detected ripple clock "q[0]" as buffer
        Info: Detected ripple clock "q[2]" as buffer
        Info: Detected gated clock "Equal1~0" as buffer
        Info: Detected ripple clock "xx" as buffer

Warning: Circuit may not operate. Detected 9 non-operational path(s) clocked by clock "clk" with clock skew larger than data delay. See Compilation Report for details.

出0入0汤圆

 楼主| 发表于 2010-6-11 13:10:54 | 显示全部楼层
前面帖的代码在网络上很常见,其他人在综合的时候不知道有没出现这个问题。我修改了下程序结构就OK了。折腾了俩礼拜,不过还是有所收获。

===============================================================================

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;

entity deask2 is
port(clk,x:in std_logic;
         y:out std_logic);
end deask2;

architecture one of deask2 is
signal q:integer range 0 to 11;
signal xx:std_logic;
signal m:integer range 0 to 8;
begin
       
         xx<=x;

         process(clk,q)
         begin
         if clk'event and clk='1'  then
            if q=11 then q<=0;
            else q<=q+1;
            end if;
         end if;
         end process;

         process(clk,xx,q,m)
         begin
         if clk'event and clk='1' then
           if q=10 then
             if m<=7 then y<='0';
             else
                y<='1';
             end if;
           end if;
         end if;
         end process;

         process(xx,m,q)
         begin
         if q=11 then m<=0;
         elsif xx'event and xx='1' then m<=m+1;
         end if;
         end process;
end one;

码片长设为12个时钟周期。

出0入0汤圆

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

本版积分规则

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

GMT+8, 2024-7-24 17:30

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

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