【发布时间】:2015-11-29 19:14:51
【问题描述】:
参考这篇文章How to write to two output ports from inside architecture in VHDL?,我使用与其中一个答案中描述的相同概念制作了一个 VHDL 模块。 他的代码:
entity HIER is
port (
IN1 : in bit;
OUT1, OUT2 : out bit);
end hier;
architecture HIER_IMPL of HIER is
signal temp : bit;
component BUF1 is
port (a : in bit; o : out bit);
end component;
begin
BUF2 : BUF1 port map (a => IN1, o => temp);
OUT1 <= temp;
OUT2 <= temp;
end HIER_IMPL;
我使用相同的信号概念制作了一个 D 触发器来驱动输出端口 我的代码:
entity dfff is
Port ( D : in STD_LOGIC;
clk : in STD_LOGIC;
Q : out STD_LOGIC;
Qbar : out STD_LOGIC);
end dfff;
architecture Behavioral of dfff is
component nand_2 is
port(A:in std_logic;
B:in std_logic;
C:out std_logic);
end component;
component not_1 is
port(A:in std_logic;
B:out std_logic);
end component;
signal Z : std_logic_vector(4 downto 0);
begin
n1 : not_1 port map (D,z(0));
n2 : nand_2 port map(D,clk,z(1));
n3 : nand_2 port map(z(0),clk,z(2));
n4 : nand_2 port map(z(1),z(3),z(4));
n5 : nand_2 port map(z(2),z(4),z(3));
Q<=z(4);
Qbar<=z(3);
end Behavioral;
现在我的问题是,为什么我的输出端口 Q 和 Qbar 在 RTL 中不可见,而他的 OUT1 和 OUT2 是? 我是这个领域的初学者。
【问题讨论】:
-
Xilinx 9.1i(假设是 ISE)听起来像是一个相当旧的版本;在尝试调试任何问题之前,您可能需要更新到最新版本。
-
上次我测试“功能”时,我需要一个 *PAD 原语,因此不存在开放端。
标签: vhdl