VHDL语言错误
libraryieee;useieee.std_logic_1164.all;entityh_sub8isport(m1,m2,m3,m4,m5,m6,m7,m8:ins...
library ieee;
use ieee.std_logic_1164.all;
entity h_sub8 is
port ( m1,m2,m3,m4,m5,m6,m7,m8: in std_logic;
n1,n2,n3,n4,n5,n6,n7,n8: in std_logic;
h1,h2,h3,h4,h5,h6,h7,h8: out std_logic);
end;
architecture one of h_sub8 is
component h_sub
port (x1,y1,sub_in: in std_logic;
diffr,sub_out: out std_logic);
end component;
signal a,b,c,d,e,f,g: std_logic;
begin
u1: h_sub port map(x1=>m1,y1=>n1,diffr=>h1,sub_in<='0',sub_out=>a);
u2: h_sub port map(x1=>m2,y1=>n2,diffr=>h2,sub_in=>a,sub_out=>b);
u3: h_sub port map(x1=>m3,y1=>n3,diffr=>h3,sub_in=>b,sub_out=>c);
u4: h_sub port map(x1=>m4,y1=>n4,diffr=>h4,sub_in=>c,sub_out=>d);
u5: h_sub port map(x1=>m5,y1=>n5,diffr=>h5,sub_in=>d,sub_out=>e);
u6: h_sub port map(x1=>m6,y1=>n6,diffr=>h6,sub_in=>e,sub_out=>f);
u7: h_sub port map(x1=>m7,y1=>n7,diffr=>h7,sub_in=>f,sub_out=>g);
u8: h_sub port map(x1=>m8,y1=>n8,diffr=>h8,sub_in=>g,sub_out<='0');
end;
错误:Error (10437): VHDL Association List error at eda3-4-2.vhd(15): positional associations must be listed before named associations
求解答! 展开
use ieee.std_logic_1164.all;
entity h_sub8 is
port ( m1,m2,m3,m4,m5,m6,m7,m8: in std_logic;
n1,n2,n3,n4,n5,n6,n7,n8: in std_logic;
h1,h2,h3,h4,h5,h6,h7,h8: out std_logic);
end;
architecture one of h_sub8 is
component h_sub
port (x1,y1,sub_in: in std_logic;
diffr,sub_out: out std_logic);
end component;
signal a,b,c,d,e,f,g: std_logic;
begin
u1: h_sub port map(x1=>m1,y1=>n1,diffr=>h1,sub_in<='0',sub_out=>a);
u2: h_sub port map(x1=>m2,y1=>n2,diffr=>h2,sub_in=>a,sub_out=>b);
u3: h_sub port map(x1=>m3,y1=>n3,diffr=>h3,sub_in=>b,sub_out=>c);
u4: h_sub port map(x1=>m4,y1=>n4,diffr=>h4,sub_in=>c,sub_out=>d);
u5: h_sub port map(x1=>m5,y1=>n5,diffr=>h5,sub_in=>d,sub_out=>e);
u6: h_sub port map(x1=>m6,y1=>n6,diffr=>h6,sub_in=>e,sub_out=>f);
u7: h_sub port map(x1=>m7,y1=>n7,diffr=>h7,sub_in=>f,sub_out=>g);
u8: h_sub port map(x1=>m8,y1=>n8,diffr=>h8,sub_in=>g,sub_out<='0');
end;
错误:Error (10437): VHDL Association List error at eda3-4-2.vhd(15): positional associations must be listed before named associations
求解答! 展开
1个回答
展开全部
将u1: h_sub port map(x1=>m1,y1=>n1,diffr=>h1,sub_in<='0',sub_out=>a);改成
GND <= '0';
u1: h_sub port map(x1=>m1,y1=>n1,diffr=>h1,sub_in=>GND,sub_out=>a);
当然,需要在结构体的一开始增加一个信号声明,信号名称叫做GND。例如
signal a,b,c,d,e,f,g,GND: std_logic;
GND <= '0';
u1: h_sub port map(x1=>m1,y1=>n1,diffr=>h1,sub_in=>GND,sub_out=>a);
当然,需要在结构体的一开始增加一个信号声明,信号名称叫做GND。例如
signal a,b,c,d,e,f,g,GND: std_logic;
TableDI
2024-07-18 广告
2024-07-18 广告
VLOOKUP是Excel中用于垂直查找的函数,其基本用法包括四个参数:1. 查找值:即在数据表首列中需要搜索的值。2. 数据表:包含查找值的单元格区域或数组。3. 返回值所在列数:指定返回查询区域中第几列的值。4. 查找方式:选择精确匹配...
点击进入详情页
本回答由TableDI提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询