Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16614 Discussions

QSF file set_parameter for time type generics

Altera_Forum
Honored Contributor II
2,149 Views

Hello, 

 

I've got a problem with setting a generic value of my top level entity with the "set_parameter" option in the project's .qsf file. The generic value is of type time: 

 

entity strobegen is 

generic 

gclkfrequency : natural := 10e6; 

gstrobecycletime : time := 10 us 

); 

port 

inresetasync : in std_ulogic; 

iclk : in std_ulogic; 

ostrobe : out std_ulogic 

); 

 

I tried several options, like: 

set_parameter -name gstrobecycletime 10000 

set_parameter -name gstrobecycletime 10 us 

set_parameter -name gstrobecycletime "10 us" 

set_parameter -name gstrobecycle time 10us

 

but Quartus always returns an Error like "The string literal doesn't match time type" or 

"us not defined". 

Can someone help me out with this?:)
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
1,003 Views

set_parameter is not a VHDL style syntax. I think you want constant. Google "vhdl constant" and you get some good examples,

0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

Hi, 

 

I think missunderstood my problem. I don't want a constant in the VHDL code, i want to set a generic parameter from the QSF file, to override the default parameter in the VHDL code above. 

In my opinion this could be a simple substitution of the value, but it does not work. So it's not a VHDL syntax problem, it's a QSF File syntax problem. 

 

Regards
0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

Ahhh. You can't do that in the VHDL directly. In Quartus, right-click on the hierarchy in the hierarchy browser and locate to Assignment Editor. Then with the Category selection on the top of the Assignment Editor, select the Parameter category(at the bottom of the list). Then type in the parameter and new value. This will get updated to your .qsf when you save the project, and you can see the syntax there.

0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

Thank you for your hint, I should have thought of that. 

I entered the parameter and the value into the cells of the Assignment Editor: 

gstrobecycletime | 10 us 

In the .QSF File, it just surrounds the value with double quotes: 

set_parameter -name gstrobecycletime "10 us" 

As I posted at the beginning, this does not work. I guess I should just not use this parameter assignment for time type generics in the .QSF file. 

 

Regards
0 Kudos
Altera_Forum
Honored Contributor II
1,003 Views

When I follow the steps, I get a different syntax: 

set_parameter -name myparam 3 -to "ddr_out:xbar_outputs:0:xbar_clk_out" 

 

The difference is that it has added the -to option with a value after it. This option tells Quartus what level of hierarchy to apply the parameter to. Note that gStrobeCycleTime could be a parameter in ten different hierarchies, all with different values and doing different things, which is why you need to tell Quartus where in the hierarchy it gets applies. Hope that helps. (And that's why I recommend right-clicking on the hierarchy you want in the hierarchy browser and locating to the assignment editor. It's tough to get the name right otherwise...) 

And the reason it put quotes around your value is because it's a space, and in Tcl you need to put it in quotes to say that the full thing "10 us" is on value.
0 Kudos
Reply