Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
842 Views

How 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?.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
32 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 I
32 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 I
32 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 I
32 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