VHDL:信号和端口在“箭头"的哪一侧?=> [英] VHDL: signals and ports on which side of the "arrow" =>
问题描述
非常基本的问题:
我怎么知道端口/信号/值应该放在箭头的哪一边?我注意到通过切换 port_a =>x
到 x< = port_a
似乎很相等,我得到了一个错误.另外, x =>port_a
不起作用
How do I know where the port/signal/value should be placed on which side of the arrows?
I noticed that by switching
port_a => x
to x <= port_a
which seems very equal, I got an error.
Also, x => port_a
dont work
我什至不知道箭头应该指向哪个方向.
I even do not know which way the arrows should point.
非常感谢您的答复!
推荐答案
< =
是一种分配-尤其是信号分配,从其他地方驱动带有值的信号.从物理上讲,右手边的东西将值驱动到左手边.
<=
is an assignment - specifically a signal assignment, driving a signal with a value from somewhere else. For a physical analogy, the thing on the right hand side drives a value onto the left hand side.
=>
是从引脚到信号的端口映射.这不是一项任务-物理上的类比可能是将引脚焊接到电线上.
=>
is a port mapping from a pin to a signal. This is not an assignment - the physical analogy might be soldering a pin to a wire.
您只能对实例进行焊接",因此 =>
映射仅发生在 port map
内部.在那里,大头针"总是 放在左侧(因为这是语言规则所说的),这就是为什么您不能在键盘上执行 x< = port_a
的原因港口地图
.
You can only do "soldering" to instantiations, so =>
mapping only happens inside a port map
. And there, "pins" always go on the left (because that's what the language rules say), which is why you can't do x <= port_a
in a port map
.
这篇关于VHDL:信号和端口在“箭头"的哪一侧?=>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!