Matlab 系统生成器:黑匣子错误
Matlab System generator: error with black box
我在 Matlab 中使用 Xilinx 系统生成器模块。
我只使用一个带有入口和出口的黑盒子。
黑匣子的代码非常简单,可以与 ISE 设计套件一起正常工作
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.ALL;
entity test44_vhdl is
Port ( row : in std_logic_vector (1 downto 0);
slice : out std_logic_vector (3 downto 0));
end test44_vhdl;
architecture Behavioral of test44_vhdl is
type oneD is array (1 to 3) of integer range 0 to 15;
constant table: oneD := (3, 9, 13);
begin
slice <= std_logic_vector(to_unsigned(table(to_integer(unsigned(row))), slice'length));
end Behavioral;
但不幸的是,它不适用于 matlab 系统生成器。
我收到以下错误消息
Exception: ISE Simulator Simulation failed during initialization.
谁能帮我看看这段代码有什么问题,我应该做些什么才能使模型正常工作
我检查了几次这个问题后,我发现错误是,当输入为“00”时,table数组没有赋值
因此,我应该做的唯一更改是在 0
处向数组添加一个值
type oneD is array (0 to 3) of integer range 0 to 15;
constant table: oneD := (3, 9, 13, 6);
现在模型可以正常工作了。
我在 Matlab 中使用 Xilinx 系统生成器模块。
我只使用一个带有入口和出口的黑盒子。
黑匣子的代码非常简单,可以与 ISE 设计套件一起正常工作
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.ALL;
entity test44_vhdl is
Port ( row : in std_logic_vector (1 downto 0);
slice : out std_logic_vector (3 downto 0));
end test44_vhdl;
architecture Behavioral of test44_vhdl is
type oneD is array (1 to 3) of integer range 0 to 15;
constant table: oneD := (3, 9, 13);
begin
slice <= std_logic_vector(to_unsigned(table(to_integer(unsigned(row))), slice'length));
end Behavioral;
但不幸的是,它不适用于 matlab 系统生成器。
我收到以下错误消息
Exception: ISE Simulator Simulation failed during initialization.
谁能帮我看看这段代码有什么问题,我应该做些什么才能使模型正常工作
我检查了几次这个问题后,我发现错误是,当输入为“00”时,table数组没有赋值
因此,我应该做的唯一更改是在 0
处向数组添加一个值type oneD is array (0 to 3) of integer range 0 to 15;
constant table: oneD := (3, 9, 13, 6);
现在模型可以正常工作了。