2

我陷入了一个问题。
我喜欢这种类型的二进制代码。(实际上我有 10 行数据,但这里我只显示 3 行)。

1000011100101000001111

1110000111101010000111

1000000000011110000010

现在我想将每一行分配给输出 1、输出 2、输出 3(比方说)。

基本上,我正在从文本文件中读取这种类型的数据,并且我想将每一行分配给数组类型变量。

我们怎么能在 VHDL 中做到这一点。任何建议。谢谢。

4

2 回答 2

0
entity e is
port( output1 : out std_logic_vector(22 downto 0));
end entity

architecture rtl of e is
begin
  output1 <= "1000011100101000001111";
end architecture;

你是这个意思吗?

于 2012-10-25T08:03:15.763 回答
0

您需要的是 std_logic_textio 包或类似的东西。

http://www.vhdl.org/rassp/vhdl/models/standards/std_logic_textio.vhd

这里展示了一个很好的例子来说明如何做到这一点:

http://www.stefanvhdl.com/vhdl/html/file_read.html

于 2013-07-12T17:06:37.090 回答