Forum Discussion
Altera_Forum
Honored Contributor
14 years agoHow can we have a generic MegaFunction
I have an entity with a generic. and I need to process data (which its size differ according to the generic value) with megafunctions (mult,ram..). Can you advice me how to perform that?.
Altera_Forum
Honored Contributor
14 years agoyou dont have to use the megawizard to instantiate mega functions. You can pass your generics to the generics on the megafunction.
In VHDL you just include the library: library altera_mf; use altera_mf.altera_mf_components.all; and instantiate to your hearts content. But have you thought about using infered megafunctuions (ie. you write behvioural code and Quartus makes the megafunctions for you when you compile it?) you can do this easily for most megafunctions (including multipliers and most types of ram).