Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/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
从数组的所有元素中减去:VHDL_Vhdl - Fatal编程技术网

从数组的所有元素中减去:VHDL

从数组的所有元素中减去:VHDL,vhdl,Vhdl,我收到一份数据。用于存储我已声明的数组: type fifo_array is array(0 to 66) of std_logic_vector(7 downto 0); signal ins_fifo_array: fifo_array := (others => (others => '0')); 在这个过程中,它会被不同的字(字节)填充。我想从这个数组的所有元素中减去x30(十六进制)的偏移量,并将其分配给另一个数组进行进一步处理。很明显,它是这样初始化的: type f

我收到一份数据。用于存储我已声明的数组:

type fifo_array is array(0 to 66) of std_logic_vector(7 downto 0);
signal ins_fifo_array: fifo_array := (others => (others => '0'));
在这个过程中,它会被不同的字(字节)填充。我想从这个数组的所有元素中减去x30(十六进制)的偏移量,并将其分配给另一个数组进行进一步处理。很明显,它是这样初始化的:

type fifo_second_array is array(0 to 66) of std_logic_vector(7 downto 0);
signal ins_fifo_second_array: fifo_second_array := (ins_fifo_array - x"30"); 
不工作。还有另一种解决方案,如:

type fifo_second_array is array(0 to 66) of std_logic_vector(7 downto 0);
signal ins_fifo_second_array: fifo_second_array := (ins_fifo_array(0) - x"30",....);
这也不起作用。请建议。

过程(ins\U fifo\U阵列)
process(ins_fifo_array)
  variable I     : natural;
  constant C_x30 : unsigned := x"30";
begin 

  for I in 0 to 66 loop
    ins_fifo_second_array(I) <= std_logic_vector(unsigned(ins_fifo_array(I)) - C_x30);
  end loop;

end process;
变量一:自然变量; 常数C_x30:无符号:=x“30”; 开始 对于0到66循环中的I
ins_fifo_第二个_阵列(I)请提供一个。您的代码没有为我们提供足够的帮助信息。请提供完整的代码示例,并可能告诉我们其不起作用的原因(可能是错误代码等)。
fifo_数组
fifo_second_数组
具有相同的类型定义。您可以使用相同类型的
fifo\u数组
。您在循环中错过了数组索引
I