VHDL 2008宽度不匹配

问题描述

当我使用使用VHDL的3维数组时,遇到宽度不匹配的问题。 错误是:

[Synth 8-549] port width mismatch for port 'KERNEL_OUT[0]': port width = 16,actual width = 32 ["C:/project_2/src/top.vhd":29]


我们可以看到第30行实际上是32位,并且该组件具有不受限制的端口。因此,它使用先前实例化的组件中的值来代替所连接端口的长度。

我已经做了一个很小的设计。我正在使用Vivado 2018.2,这很有可能是工具问题。但是,如果有人可以告诉我我做错了什么,那将非常有帮助。

top.vhd


library ieee;
use ieee.std_logic_1164.all;

use work.style_pack.all;

-------------------------------------------------------------------------------
-- Entity
-------------------------------------------------------------------------------
entity top is
  port(
    dummy : in std_logic
    );

end entity top;

architecture arch_top of top is
  signal KernelInt1 : StdVectorArrayTp(0 to 4)(15 downto 0);
  signal KernelInt2 : StdVectorArrayTp(0 to 4)(31 downto 0);
begin
  --
  INST_pixel_to_matrix_1 : entity work.pixel_to_matrix
    port map (
      KERNEL_OUT => KernelInt1
      );
  --
  INST_pixel_to_matrix_2 : entity work.pixel_to_matrix
    port map (
      KERNEL_OUT => KernelInt2
      );
end architecture arch_top;

pixel_to_matrix.vhd

library ieee;
use ieee.std_logic_1164.all;

 
-----------------------
-- ENTITY DEFINITION --
-----------------------
entity pixel_to_matrix is
  port (
    KERNEL_OUT : out StdVectorArrayTp
    );
end pixel_to_matrix;


architecture arch_pixel_to_matrix of pixel_to_matrix is
begin

end architecture arch_pixel_to_matrix;

style_pack.vhd


library IEEE;
use IEEE.std_logic_1164.all;


package style_pack is

  type StdVectorArrayTp is array (integer range <>) of std_logic_vector;

end style_pack;

package body style_pack is


end style_pack;

我在https://forums.xilinx.com/t5/Synthesis/VHDL-2008-width-mismatch-on-multiple-instantiations/td-p/1164467上发布了相同的问题

我在其中通过Vivado项目https://forums.xilinx.com/xlnx/attachments/xlnx/SYNTHBD/36597/2/project_1.zip

上传了代码

编辑:

具有3D数组StdVectorArrayTp https://forums.xilinx.com/xlnx/attachments/xlnx/SYNTHBD/36602/1/project_2.zip

的项目

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...