Forum Discussion
Altera_Forum
Honored Contributor
15 years agoVHDL newbie : package and "use" directive
Hi ! However hard I try to insert those 2 lines in my vhdl top level design (multiplexer.vhd) : library WORK; use WORK.multiplexer_Pkg.all; my component instantiations located in my to...
Altera_Forum
Honored Contributor
15 years agoHi,
package is for procedures and functions. (not 100% sure) If you want to instantiate "genericMultiplexer" (written in genericMultiplexer.vhd), You have to write in architecture of your "multiplxer.vhd" something like
genericMultiplexer_i : ENTITY work.genericMultiplexer( genericMultiplexerArchi )
generic map ( selectorWidth => mySelectorWidth ) -- mySelectorWidth ?
port map (
selector => selector,
dataInput => dataInput,
output => output
);
It is enough. Your package body is empty, and your package is useless. (In my opinion)