Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
15887 Discussions

How to wire the PARAM from Quartus primitives in a BDF file

Altera_Forum
Honored Contributor II
3,627 Views

I tried wiring a PARAM primitive in a BDF file to mimic a generic parameter. I used same PARAM name in a bus to a module in the same sheet. When I check the HDL, the PARAM was converted to a generic parameter but it was not wired to the module. A separate signal with the same name has been wired instead. 

 

So how can we properly wire a PARAM in a BDF file?
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
1,634 Views

Hi kaushalyas, 

 

I use to parameterize my bdf designs with the PARAM primitive just as you can see in the attached files. 

 

This bdf example generates no error when compiled and I haven't generate any HDL to check as the implementation has proven to performed properly once downloaded into the FPGA ! 

 

Regarding your problem, have you put the PARAM in the pin name of your input/output primitive connected to your bus as well ?
Altera_Forum
Honored Contributor II
1,634 Views

Hi OliB.Good, 

 

Thanks for your reply.  

 

Please check my attachment. Its somewhat similar to what you have done. I have used the PARAM to define a generic 8 bit constant and tried to route it to an 8 bit input port of a module in the same BDF. I named the input bus the same as the PARAM name with the index. But when I try to convert it to HDL just to check my idea has worked, it generates wrong HDL. 

 

Pls let me know if your design has correctly being generated in HDL. 

 

Thanks and regards, 

kaushalyas
Altera_Forum
Honored Contributor II
1,634 Views

I am facing the exact same problem as kaushalyas. 

the bdf file won't compile even if I use the same " param " name as an input to some symbol, even if I match the correct bit-widths of input & param. 

 

Same problem with using the " constant " symbol inside bdf file. 

 

Can anybody explain how to use these two symbols (param & constant) as direct inputs to some other block ? Or can't we ?
Altera_Forum
Honored Contributor II
1,634 Views

I'm running into the same problem. Did anyone ever get the CONSTANT or PARAM blocks configured as inputs to logic blocks?

Altera_Forum
Honored Contributor II
1,634 Views

I think the key is to change the "Value" of the sub blocks to the name of the Param name 

 

S
Altera_Forum
Honored Contributor II
1,634 Views

Here is an example on how I use constant and param in quartus. 

hope this help :)
Altera_Forum
Honored Contributor II
1,634 Views

 

--- Quote Start ---  

Here is an example on how I use constant and param in quartus. 

hope this help :) 

--- Quote End ---  

 

 

Hi Mazel, 

 

I am trying to do exactly what you have in the example shown in the thread. However, each time I open the LPM function, (specifically the LPM_COUNTER), to set its parameters I cannot enter a string there, I can only choose the parameter values from pull-down menus. 

 

How can I edit the value of an LPM function parameter so that I can enter a string to link it to a constant or another parameter? 

 

Thanks in advance for the help
Altera_Forum
Honored Contributor II
1,634 Views

Hi jcarmona. 

 

Do you use the altera megawizard to create lpm functions ? If right, you must recreate the function without the megawizard. Then double-click on the white table, not on the function symbol to set the parameters.
Altera_Forum
Honored Contributor II
1,634 Views

Hi Mazel, 

 

Thanks for the prompt reply. 

 

I am not using the Megawizard to create lpm functions. I am importing them raw from the Quartus II menu and then I try to configure the parameters of each function. 

 

The attached pictures shows the different tabs of the menu I get when I double click either on the LPM function block or on its Parameter's white box. 

 

As you can see in the image "Setting of LPM Counter - Parameters.JPG", the Value box for the parameter WIDTH has a button for the pull down menu. I can key in values, but it will only take those that are already on the pull down list. Anything else I key in is ignored. 

 

I am also attaching an image of the box I get when I click on the About tab of the Quartus II software, just to let you know what version of the software I am running. 

 

Since you are able to modify the parameters at will and I am not, it could be that I have some different settings in my software or libraries.  

 

I will welcome and try any ideas you could suggest me. 

 

Thank you in advance
Altera_Forum
Honored Contributor II
1,634 Views

I found a solution for the problem I cite above. This solution compiles but I have not tested it in hardware or simulation. 

 

It consists on "encapsulating" the megafunction in a user-defined module in Verilog. This module acts as a carrier for the megafunction. 

 

As I understood from the tests I made, when we instantiate a megafunction in verilog we can assign to its input parameters any valid expression we want. The parameters are not restricted to a set of values that the GUI has (as shown in my previous reply). 

 

The carrier module should have the parameters we want to configure for the megafunction. 

 

Once the carrier module has been defined we can create its symbol. This symbol will have a parameter box. But since it is user defined, the value column of this parameter box is not restricted to anything. So we can specifi there any valid expression. 

 

Attached are images of an example I made. It shows only one megafunction and one parameter, but we can have more than one for both.
Reply