Altera_Forum
Honored Contributor
17 years ago"Component Instantiation" in VHDL
Hi,
I have a question in component instantiation in my VHDL code. There are several components in my VHDL code. Some components share the same input and output ports. But, it seems that I can only declare output ports once in one component although they are used in other components (?) e.g. both AA and BB use the input port "a" and output port "b". My code is as follows: Architecture structure of Project is component AA is port (a: in std_logic; b: out std_logic ); end component; component BB is port (a:in std_logic; --b: out std_logic ): begin u1: AA port map (a,b); u2: BB port map (a,b); end structure; In this way, I can pass the compilation. Am I correct? Thank you!