小编Tho*_*asM的帖子

VHDL初始化std_logic_vector的通用数组

我想在 VHDL 中实现一个用于卷积内容的环形缓冲区并使其通用。我的问题是如何在不引入进一步信号或变量的情况下初始化内部数据。

通常我可以通过以下方式初始化 std_logic_vector

signal initialized_vector : std_logic_vector(15 downto 0) := (others => '0');
Run Code Online (Sandbox Code Playgroud)

但我不知道默认情况下如何在数组上执行此操作。

这是我的代码:

entity convolution_ringbuffer is
    generic (
        BitDepth_signal : integer := 24;
        BufferSize : integer := 10
        );
    port (
        data_in : in std_logic_vector(BitDepth_signal-1 downto 0);
        sclk : in std_logic;
        enable : in std_logic;
        data_out : out std_logic_vector(BitDepth_signal-1 downto 0)
        );
end convolution_ringbuffer;

architecture behavioral of convolution_ringbuffer is

    type internal_data is array(0 to BufferSize-1) of std_logic_vector(BitDepth_signal-1 downto 0);
    signal data_internal : internal_data;

begin

    process ( …
Run Code Online (Sandbox Code Playgroud)

arrays generics initialization vhdl

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

arrays ×1

generics ×1

initialization ×1

vhdl ×1