导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→发表看法:[asia_li]HDL中双向数据使用的困惑



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 ......

>>返回讨论的主题



  发表回复
用户名   *您没有注册?
密码   *
验证码   * .
标题   *
心情
随便说说    我回答你    最新发现    得意的笑   
气死我了    真是没劲    坚决同意    表示反对   
大家过来    好奇怪哟    懒得理它    大家小心   
文件上传
内容


字体:      字体大小:    颜色:
粗体 斜体 下划线 居中 超级连接 Email连接 图片 Flash图片 Shockwave文件 realplay视频文件 Media Player视频文件 QuickTime视频文件 引用 飞行字 移动字 发光字 阴影字 查看更多的心情图标 背景音乐
点击加入表情
                         
选项
有回复时用短消息通知您?

   




老古网执行:14毫秒 最大:78531毫秒 查询6次