如何解决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;
我在其中通过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 举报,一经查实,本站将立刻删除。