搜索
bottom↓
回复: 4

ERROR:Pack:198 - NCD was not produced. All logic was removed from design

[复制链接]

出0入0汤圆

发表于 2010-6-12 21:22:32 | 显示全部楼层 |阅读模式
开发板自带的是verilog程序,我学的是VHDL,写流水灯的程序,遇到问题,
程序和报错信息如下
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity led is
    Port ( mclk : in  STD_LOGIC;
           led : out  STD_LOGIC_VECTOR (7 downto 0));
end led;

architecture Behavioral of led is
    signal count:std_logic_vector(24 downto 0);
         signal clock:std_logic;
         signal state:std_logic_vector(3 downto 0);
begin
   
  --分频
        process(mclk)
        begin
          if mclk'event and mclk='1' then
            count<=count+1;
          end if;
        end process;
        --divclk<=count(24);
        clock<=count(24);
       
        --流水灯
        process(clock)
          begin
          if clock'event and clock='1' then
--           with state select
--                  led<=0000_0001 when 0000
--                       0000_0010 when 0001
--                                 0000_0010 when 0010
--                                 0000_0100 when 0100
--                                 0000_1000 when 0101
--                                 0000_1010 when 0110
--                                 0000_0010 when 0111
--                                 0000_0010 when 1000
    case state is
           when "0000" =>led<="00000001";
                when "0001" =>led<="00000010";
           when "0010" =>led<="00000100";
                when "0011" =>led<="00001000";
                when "0100" =>led<="00010000";
                when "0101" =>led<="00100000";
                when "0110" =>led<="10000000";
                when "0111" =>led<="10000000";
                when "1000" =>led<="01000000";
                when "1001" =>led<="00100000";
                when "1010" =>led<="00010000";
                when "1011" =>led<="00001000";
                when "1100" =>led<="00000100";
                when "1101" =>led<="00000010";
                when "1110" =>led<="00000001";
                when "1111" =>led<="11111111";
                when others=> led<="00000000";
                end case;
          end if;
          state<=state+1;
        end process;

end Behavioral;
ERROR:Pack:198 - NCD was not produced. All logic was removed from design.  This
   is usually due to having no input or output PAD connections in the design and
   no nets or symbols marked as 'SAVE'.  You can either add PADs or 'SAVE'
   attributes to the design, or run 'map -u' to disable logic trimming in the
   mapper.

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

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

出0入0汤圆

 楼主| 发表于 2010-6-12 21:23:15 | 显示全部楼层
请高手帮忙指点!
折腾了好久了

出0入0汤圆

发表于 2012-2-5 16:42:41 | 显示全部楼层
同样的错误求助,高手指点指点菜鸟~~~

出0入0汤圆

发表于 2012-2-6 08:37:47 | 显示全部楼层
看看有没有选择器件

出0入0汤圆

发表于 2012-2-14 12:14:30 | 显示全部楼层
修改了一下你的程序,编译仿真通过!
附上修改的程序



library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity le1 is
    Port ( mclk : in  STD_LOGIC;
           led : out  STD_LOGIC_VECTOR (7 downto 0));
end le1;

architecture Behavioral of le1 is
    signal count:std_logic_vector(24 downto 0);
signal clock:std_logic;
signal state:std_logic_vector(3 downto 0);
begin
   
  --分频
process(mclk)
begin
  if mclk'event and mclk='1' then
    count<=count+1;
  end if;
end process;
--divclk<=count(24);
clock<= count(24); ;

--流水灯
process(clock)
  begin
--  if clock'event and clock='1' then
--    with state select
--   led<=0000_0001 when 0000
--        0000_0010 when 0001
--  0000_0010 when 0010
--  0000_0100 when 0100
--  0000_1000 when 0101
--  0000_1010 when 0110
--  0000_0010 when 0111
--  0000_0010 when 1000
    case state is  
   when "0000" =>led<="00000001";
when "0001" =>led<="00000010";
   when "0010" =>led<="00000100";
when "0011" =>led<="00001000";
when "0100" =>led<="00010000";
when "0101" =>led<="00100000";
when "0110" =>led<="10000000";
when "0111" =>led<="10000000";
when "1000" =>led<="01000000";
when "1001" =>led<="00100000";
when "1010" =>led<="00010000";
when "1011" =>led<="00001000";
when "1100" =>led<="00000100";
when "1101" =>led<="00000010";
when "1110" =>led<="00000001";
when "1111" =>led<="11111111";
when others=> led<="00000000";
end case;
--  end if;
    if clock'event and clock='1' then
                state<=state+1;
        end if ;
end process;

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

本版积分规则

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

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

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

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