Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vector 标准逻辑向量移位寄存器_Vector_Vhdl_Shift Register - Fatal编程技术网

Vector 标准逻辑向量移位寄存器

Vector 标准逻辑向量移位寄存器,vector,vhdl,shift-register,Vector,Vhdl,Shift Register,我看到了同一个问题,并尝试按照示例进行操作,但在声明信号时遇到了错误。具体而言: #Error: COMP96_0015: Pipeline.vhd : (52, 44): ';' expected. 这是我的密码: library IEEE; use IEEE.STD_LOGIC_1164.all; entity Pipeline isgeneric ( VECTOR_WIDTH: natural := 128; VECTOR_DEPTH: natural := 7 );

我看到了同一个问题,并尝试按照示例进行操作,但在声明信号时遇到了错误。具体而言:

#Error: COMP96_0015: Pipeline.vhd : (52, 44): ';' expected.
这是我的密码:

library IEEE;
use IEEE.STD_LOGIC_1164.all;

entity Pipeline isgeneric (
    VECTOR_WIDTH: natural := 128;
    VECTOR_DEPTH: natural := 7
); port(
     ImVal : in STD_LOGIC_VECTOR(9 downto 0);
     RA : in STD_LOGIC_VECTOR(127 downto 0);
     RB : in STD_LOGIC_VECTOR(127 downto 0);
     RC : in STD_LOGIC_VECTOR(127 downto 0);
     OpCode : in STD_LOGIC_VECTOR(10 downto 0);
     RT : in STD_LOGIC_VECTOR(127 downto 0);
     Clk: in STD_LOGIC;
     Reset: in STD_LOGIC;
     OutVal : out STD_LOGIC_VECTOR(127 downto 0)
 );
end Pipeline;

architecture Behavioral of Pipeline is
    type shift_reg_type1 is array (natural range<>) of std_logic_vector(127 downto 0);
    type shift_reg_type2 is array (natural range<>) of std_logic_vector(10 downto 0);
    type shift_reg_type3 is array (natural range<>) of std_logic_vector(9 downto 0);
    signal shift_regA: shift_reg_type1(0 to 6)(127 downto 0);
    signal shift_regB: shift_reg_type1(0 to 6)(127 downto 0);
    signal shift_regC: shift_reg_type1(0 to 6)(127 downto 0);
    signal shift_regT: shift_reg_type1(0 to 6)(127 downto 0);
    signal OpCode_reg: shift_reg_type2(0 to 6)(10 downto 0);
    signal ImVal_reg: shift_reg_type3(0 to 6)(9 downto 0);

begin

end Behavioral;
IEEE库;
使用IEEE.STD_LOGIC_1164.all;
实体管道是通用的(
矢量_宽度:自然:=128;
矢量_深度:自然:=7
); 港口(
ImVal:标准逻辑向量(9到0);
RA:标准逻辑向量(127到0);
RB:标准逻辑向量(127到0);
RC:标准逻辑向量(127到0);
操作码:标准逻辑向量(10到0);
RT:STD_逻辑_向量(127向下至0);
Clk:标准逻辑中;
复位:在标准逻辑中;
OutVal:out标准逻辑向量(127向下至0)
);
末端管道;
管道的体系结构是
类型shift_reg_type1是标准逻辑向量(127向下到0)的数组(自然范围);
类型shift_reg_type2是标准逻辑向量(10到0)的数组(自然范围);
类型shift_reg_type3是标准逻辑向量(9到0)的数组(自然范围);
信号移位寄存器:移位寄存器类型1(0至6)(127向下至0);
信号移位寄存器:移位寄存器类型1(0至6)(127向下至0);
信号移位寄存器:移位寄存器类型1(0至6)(127向下至0);
信号移位寄存器:移位寄存器类型1(0至6)(127向下至0);
信号操作码_reg:shift_reg_type2(0到6)(10到0);
信号ImVal_reg:shift_reg_type3(0到6)(9下降到0);
开始
结束行为;

它在抱怨我的信号声明,但我不明白为什么。

正如错误消息所说,信号声明是错误的。此外,它需要一个分号,因为语句是完整的,但您的代码对每个信号有两个范围约束

signal shift_regA: shift_reg_type1(0 to 6);   
signal shift_regB: shift_reg_type1(0 to 6);  
signal shift_regC: shift_reg_type1(0 to 6);   
signal shift_regT: shift_reg_type1(0 to 6);   
signal OpCode_reg: shift_reg_type2(0 to 6);    
signal ImVal_reg: shift_reg_type3(0 to 6);

shift\u reg\u type1
已被约束为127..0。因此,无法在第二维度再次约束
shift_regA
。顺便说一句,没有第二维度,因为它是由一维元素组成的一维数组。

信号声明是错误的,正如错误消息所说。此外,它需要一个分号,因为语句是完整的,但您的代码对每个信号有两个范围约束

signal shift_regA: shift_reg_type1(0 to 6);   
signal shift_regB: shift_reg_type1(0 to 6);  
signal shift_regC: shift_reg_type1(0 to 6);   
signal shift_regT: shift_reg_type1(0 to 6);   
signal OpCode_reg: shift_reg_type2(0 to 6);    
signal ImVal_reg: shift_reg_type3(0 to 6);

shift\u reg\u type1
已被约束为127..0。因此,无法在第二维度再次约束
shift_regA
。顺便说一句,这里没有第二维度,因为它是由一维元素组成的一维数组。

我得到了这个假设,但我想100%确定,因为这个示例有两个约束条件。我已经有一段时间没有使用VHDL了,所以所有的东西都需要刷新了。lol。我已经达到了这个假设,但是我想100%确定,因为这个例子有两个约束。我已经有一段时间没有使用VHDL了,所以所有的东西都需要刷新。lol。第4行中还有一个语法错误;-)。这也不是一个简单的例子。第4行中还有一个语法错误;-)。这也不是一个简单的例子。