FPGA Intellectual Property
PCI Express*, Networking and Connectivity, Memory Interfaces, DSP IP, and Video IP
6355 Discussions

How can we have a generic MegaFunction

Altera_Forum
Honored Contributor II
1,007 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
197 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.
0 Kudos
Altera_Forum
Honored Contributor II
197 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).
0 Kudos
Altera_Forum
Honored Contributor II
197 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
0 Kudos
Altera_Forum
Honored Contributor II
197 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
0 Kudos
Reply