8

VHDL: signals and ports on which side of & ldquo; arrow & rdquo; = &...

 3 years ago
source link: https://www.codesd.com/item/vhdl-signals-and-ports-on-which-side-of-arrow.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

VHDL: signals and ports on which side of & ldquo; arrow & rdquo; = & gt;

advertisements

very basic question:

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.

Answers are really appreciated!


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

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK