在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 1434|回复: 2

[求助] please help for VHDL code

[复制链接]
发表于 2017-6-28 09:13:53 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
I don't have much Vhdl coding experience, please help for the follow code
IO1 port is defined in component section
port(
...
...
IO1  : inout  std_logic_vector(31 downto 0);
...
);

at the time of calling this module, we have both RegPort_B and RegPort_C defined as output and input
respectively:
RegPort_B    : OUT std_logic_vector ( 15 DOWNTO 0);

RegPort_C    : IN  std_logic_vector (15 DOWNTO 0);

so IO1 as output I coded: in port map section

IO1 => noCon(15 downto 0) & RegPort_A(15 downto 0),
for an instance

and as input:
IO1  => B"0000000000000000" & RegPort_C(15 downto 0),
for another instance

but I got errors for both:
    55:       IO1  => B"0000000000000000" & RegPort_C(15 downto 0),
                                          ^
[Error] Actual must be a signal or port (or a type conversion on a signal or port)


and
    79:       IO1  => noCon(31 downto 16) & RegPort_B(15 downto 0)
                                            ^^^^^^^^^
[Error] Read error: trying to read port of mode OUT



please help
发表于 2017-6-29 14:25:26 | 显示全部楼层
有点乱,能否直接上代码部分的内容截图?感觉是inout接口在例化时候的连接问题。
发表于 2017-8-16 16:18:26 | 显示全部楼层
IO1将输入和输出分开定义
    IO1_in   : in std_logic_vector(31 downto 0);
    IO1_out : out  std_logic_vector(31 downto 0);
例化时在component外部进行三态控制。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /1 下一条

×

小黑屋| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-3-29 23:24 , Processed in 0.018671 second(s), 7 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表