FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
5884 Discussions

How can we have a generic MegaFunction

Altera_Forum
Honored Contributor II
880 Views

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?.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
70 Views

The megafunction generates an hdl file that instanciate an IP, it redefines the default parameters with parameters entered by the user. 

You can manually instantiate the same IP and redefines the default parameters with your own generic ones, but care should be taken to avoid contradictions in the parameters.
Altera_Forum
Honored Contributor II
70 Views

you 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).
Altera_Forum
Honored Contributor II
70 Views

 

--- Quote Start ---  

The megafunction generates an hdl file that instanciate an IP, it redefines the default parameters with parameters entered by the user. 

You can manually instantiate the same IP and redefines the default parameters with your own generic ones, but care should be taken to avoid contradictions in the parameters. 

--- Quote End ---  

 

 

Thank you it was really help full
Altera_Forum
Honored Contributor II
70 Views

 

--- Quote Start ---  

you 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). 

--- Quote End ---  

 

 

actually I'm not familiar with this way of using megafunction but I will try to use it. 

thank you
Reply