No.31056 作者:asia_li 邮件:liyzasia@sina.com ID:11504 登陆:3次 文章数:6篇 最后登陆IP:219.150.172.3 最后登陆:2003/6/2 13:19:04 注册:2003/4/23 16:22:56 财富:125 发帖时间:2003/5/19 19:41:16 发贴者IP:219.150.172.3 标题:asia_li:HDL中双向数据使用的困惑 摘要:No.31056HDL中双向数据使用的困惑 本人写了一段程序,用到了双向数据,但仿真时却发现输入并没有实现,只有输出,为此感到很是困惑,请大侠解惑! 程序如下: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; -- Uncomment the following lines to use the declarations that are -- provided for instantiating Xilinx primitive components. --library UNISIM; --use UNISIM.VComponents.all; --Describe: -- sclk : in std_logic; --__|--|__|--|__...|--|_______|--|__|--|_... -- 0 1 7 0 1 -- entity getinfo is Port ( wraddr : in std_logic; -- 1us sclk : in std_logic; -- from board framehead : in std_logic; --___|-|______..._______|-|________.._______ sdin : in std_logic; -- from board read_en : in std_logic; --from 860 byte : out std_logic_vector(5 downto 0); --just test shift : out std_logic; dinout : inout std_logic_vector(7 downto 0); rdy : out std_logic -- 0 active ); end getinfo; architecture Behavioral of getinfo is signal reg : std_logic_vector(7 downto 0); signal cnt : std_logic_vector(8 downto 0); -- 6 bit as bytenum 3 bit as bit select -- signal bitcnt : std_logic_vector(2 downto 0); -- signal bytenum : std_logic_vector(5 downto 0); -- 6 bit register of byte number signal bytenum_set : std_logic; signal shift_en : std_logic; signal ready : std ......
>>返回讨论的主题
|