找回密码
 注册
搜索
查看: 837|回复: 1

[讨论] 请教关于VHDL中Z 的问题

[复制链接]
发表于 2008-3-22 13:52:07 | 显示全部楼层 |阅读模式
library ieee;
use ieee.std_logic_1164.all;
entity temp is
port(din:in std_logic;
     dout:out std_logic);
end entity;
architecture be of temp is
begin
process(din)
begin
if din='1'  then
dout<='0';
else
dout<='1';
end if;
end process;
end be;
上段程序仿真时,当din='Z'时,为什么dout不为1,而为未知的‘X'。要想din=’Z'时,dout为1,应该怎样修改程序?
小弟只是初学者,望给位大侠指教!
发表于 2008-3-24 09:39:04 | 显示全部楼层
首先要确定是高阻状态,可以在硬件上加下拉电阻。
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-9-30 08:35 , Processed in 0.050249 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表