在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 5295|回复: 4

[求助] 求大神相救,感激不尽

[复制链接]
发表于 2014-11-23 21:26:26 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
书上设计了一个十六进制的计数器,两个project分别运行都没错,但是连在一起的时候就出现错误了,代码如下:
library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_arith.all;use ieee.std_logic_unsigned.all; entity lizi1 isport(clk:in std_logic;rst:in std_logic;en:in std_logic;qut std_logic_vector(3 downto 0));end;architecture one of lizi1 issignal q1:std_logic_vector(3 downto 0);beginprocess(clk,en,rst)beginif en='1'thenif rst='1'then q1<="0000";elsif clk'event and clk='1'thenq1<=q1+1;end if;end if;end process;q<=q1;end;

library ieee;use ieee.std_logic_1164.all;entity bcd2 isport(i: in std_logic_vector(3 downto 0);yut  std_logic_vector(7 downto 0));end;architecture one of bcd2 isbeginprocess(i)begincase i iswhen"0000"=>y<="11111100";when"0001"=>y<="01100000";when"0010"=>y<="11011010";when"0011"=>y<="11110010";when"0100"=>y<="01100110";when"0101"=>y<="10110110";when"0110"=>y<="10111110";when"0111"=>y<="11100000";when"1000"=>y<="11111110";when"1001"=>y<="11101110";when"1010"=>y<="00111110";when"1011"=>y<="10011100";when"1100"=>y<="01111010";when"1101"=>y<="10011110";when"1110"=>y<="10001110";when"1111"=>y<="11111111";end case;end process;end;
错误如下:Error: Incorrect connector style at port "y[7..0]" for symbol "inst" of type bcd2Error: Can't elaborate top-level user hierarchyError: Quartus II Analysis & Synthesis was unsuccessful. 2 errors, 0 warnings        Error: Peak virtual memory: 283 megabytes        Error: Processing ended: Sun Nov 23 21:32:01 2014        Error: Elapsed time: 00:00:02        Error: Total CPU time (on all processors): 00:00:01Error: Quartus II Full Compilation was unsuccessful. 4 errors, 0 warnings求大神告知我哪里错了,我改,我改还不行么,
QQ截图20141123213154.png
 楼主| 发表于 2014-11-23 21:58:57 | 显示全部楼层
额,代码怎么会这样子,怎么没分段
 楼主| 发表于 2014-11-23 22:06:21 | 显示全部楼层
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity lizi is
port(clk:in std_logic;
rst:in std_logic;
en:in std_logic;
qut std_logic_vector(3 downto 0));
end;
architecture one of lizi is
signal q1:std_logic_vector(3 downto 0);
begin
process(clk,en,rst)
begin
if en='1'then
if rst='1'then q1<="0000";
elsif clk'event and clk='1'then
q1<=q1+1;
end if;
end if;
end process;
q<=q1;
end;




library ieee;
use ieee.std_logic_1164.all;
entity bcx is
port(i: in std_logic_vector(3 downto 0);
yut  std_logic_vector(7 downto 0));
end;
architecture one of bcx is
begin
process(i)
begin
case i is
when"0000"=>y<="11111100";
when"0001"=>y<="01100000";
when"0010"=>y<="11011010";
when"0011"=>y<="11110010";
when"0100"=>y<="01100110";
when"0101"=>y<="10110110";
when"0110"=>y<="10111110";
when"0111"=>y<="11100000";
when"1000"=>y<="11111110";
when"1001"=>y<="11101110";
when"1010"=>y<="00111110";
when"1011"=>y<="10011100";
when"1100"=>y<="01111010";
when"1101"=>y<="10011110";
when"1110"=>y<="10001110";
when"1111"=>y<="11111111";
end case;
end process;
end;
 楼主| 发表于 2014-11-23 22:06:48 | 显示全部楼层
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity lizi is
port(clk:in std_logic;
rst:in std_logic;
en:in std_logic;
qut std_logic_vector(3 downto 0));
end;
architecture one of lizi is
signal q1:std_logic_vector(3 downto 0);
begin
process(clk,en,rst)
begin
if en='1'then
if rst='1'then q1<="0000";
elsif clk'event and clk='1'then
q1<=q1+1;
end if;
end if;
end process;
q<=q1;
end;




library ieee;
use ieee.std_logic_1164.all;
entity bcx is
port(i: in std_logic_vector(3 downto 0);
yut  std_logic_vector(7 downto 0));
end;
architecture one of bcx is
begin
process(i)
begin
case i is
when"0000"=>y<="11111100";
when"0001"=>y<="01100000";
when"0010"=>y<="11011010";
when"0011"=>y<="11110010";
when"0100"=>y<="01100110";
when"0101"=>y<="10110110";
when"0110"=>y<="10111110";
when"0111"=>y<="11100000";
when"1000"=>y<="11111110";
when"1001"=>y<="11101110";
when"1010"=>y<="00111110";
when"1011"=>y<="10011100";
when"1100"=>y<="01111010";
when"1101"=>y<="10011110";
when"1110"=>y<="10001110";
when"1111"=>y<="11111111";
end case;
end process;
end;
发表于 2014-11-24 10:43:54 | 显示全部楼层
这不是模块的问题,是你顶层例化的问题。
你检查一下顶层例化和IO管脚。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条


小黑屋| 手机版| 关于我们| 联系我们| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-12-30 01:39 , Processed in 0.022759 second(s), 11 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表