Board logo

标题: [求助]初来乍到 问一个简单的问题呀 有关于 十进制加法器的 [打印本页]

作者: berylyl    时间: 2006-6-16 19:40     标题: [求助]初来乍到 问一个简单的问题呀 有关于 十进制加法器的

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity adder is
port(cin:in std_logic;
     a,b:in std_logic_vector(3 downto 0);
       sut std_logic_vector(3 downto 0);
      cout std_logic);
end adder;
architecture behav of adder is
signal temp:std_logic_vector(4 downto 0);
begin
   process(a,b,cin)
  begin
     temp<=('0'&a)+b+cin;
      if(temp(3 downto 0)>9 or (temp(4)='1')then
         s<=temp(3 downto 0)+6;
         co<='1';
   else
     s<=temp(3 downto 0);
     co<='0';
    end if;
  end process;
end behav;


unexpected end-of-file
-try using the Text Editor's Syntax Coloring command to find the missing
delimiter or keyword


作者: berylyl    时间: 2006-6-16 19:42

就是error:unexpected end-of-file-try using the Text Editor's Syntax Coloring command to find the missing delimiter or keyword
什么意思呀 报错 不董呀 谁帮着看看呀 好急呀


作者: anotherchen    时间: 2006-6-17 22:21

大哥
你这里 (temp(4)='1'多了一个括号




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0