Board logo

标题: 请大家看一下这段程序,关于总线的 [打印本页]

作者: ljp    时间: 2003-8-26 09:40

在双向口仿真时,需要输出数据时,要将输入的设为高阻态,比如: 在 DIR=‘0’时,是 A<=B ,就需要将 A的输入设为高阻,在 DIR=‘1’时,就需要将B的输入设为高阻;
作者: samire    时间: 2003-8-26 12:47     标题: 请大家看一下这段程序,关于总线的

library IEEE; use IEEE.Std_logic_1164.all; entity HCT245 is port(A, B : inout std_logic_vector(7 downto 0); DIR, GBAR : in std_logic); end HCT245; architecture VER1 of HCT245 is begin A <= B when (GBAR = '0') and (DIR = '0') else (others => 'Z'); B <= A when (GBAR = '0') and (DIR = '1') else (others => 'Z'); end VER1; 语法没有任何问题,但在波形仿真时令人费解,望大家不吝赐教
作者: samire    时间: 2003-8-26 12:47

谢谢,不胜感激,解开我百思不得其解的谜团。




欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) Powered by Discuz! 7.0.0