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.
5875 Discussions

Customised IP parameter Problem

cosx
New Contributor I
286 Views

Hi everyone,

I came across a strange problem when using Quartus 15.1 standard edition to run a customised IP created myself.

I have attached the IP file for your reference in .txt form.

This ip is for lsu_ic_top.v module in Intel hld ip package.

Now one confusing thing is when using command (line 186 in the file):

set MWIDTH [ expr { [get_parameter_value MWIDTH_BYTES]*8 } ]

to set the MWIDTH value, the qsys just gives errors that MWIDTH_BYTES is empty.

I have, however, already set MWIDTH value to 32 using command (line 46 in the file):

set_parameter_value MWIDTH_BYTES 32

Currently I have tried all debug techniques, including printing MWIDTH in a file and changing files parameter properties. 

Unfortunately, there is no method that has been succeefully solved this issue. Qsys of Quartus 15.1 just gives that "* cannot be used with empty string", indicating MWIDTH_BYTES is empty.

May I ask has anyone come across this before?

If not, may I ask if there are Intel-generated _hw.tcl for lsu_ic_top.v module?

Thank you in advance!

Mingqiang

0 Kudos
1 Solution
RichardTanSY_Intel
255 Views

I am using Quartus version 20.1 and I try to add this IP into Platform Designer, it complained first:

Error: set_parameter_value not allowed during GLOBAL while executing the set_parameter_value AWIDTH 31 and so. 

and later pop up the error that you mentioned after resolving the first one:

Error: get_parameter_value not allowed during GLOBAL while executing "get_parameter_value MWIDTH_BYTES" invoked from within "expr { [get_parameter_value MWIDTH_BYTES]*8 } " invoked from within "set MWIDTH [ expr { [get_parameter_value MWIDTH_BYTES]*8 } ]"

To solve these errors, you will need to add elaboration callback or validate callback in the _hw.tcl. 

set_module_property ELABORATION_CALLBACK validate
set_module_property VALIDATION_CALLBACK validate

Then you need add callback procedure for set_parameter_value and get_parameter_value. With that, the error should be gone for now. 

proc elaborate {} {
set_parameter_value
get_parameter_value
}

You may checkout the User Guide below for further details. 

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-qpp-platform-designer...

- Creating Platform Designer Components on page 89

- Example 6. Sample _hw.tcl Component with User Alterable Expressions on page 100

Else, you can check for the <quartus_installation_directory>/ip/altera for any available _hw.tcl file as a reference. 

View solution in original post

3 Replies
RichardTanSY_Intel
256 Views

I am using Quartus version 20.1 and I try to add this IP into Platform Designer, it complained first:

Error: set_parameter_value not allowed during GLOBAL while executing the set_parameter_value AWIDTH 31 and so. 

and later pop up the error that you mentioned after resolving the first one:

Error: get_parameter_value not allowed during GLOBAL while executing "get_parameter_value MWIDTH_BYTES" invoked from within "expr { [get_parameter_value MWIDTH_BYTES]*8 } " invoked from within "set MWIDTH [ expr { [get_parameter_value MWIDTH_BYTES]*8 } ]"

To solve these errors, you will need to add elaboration callback or validate callback in the _hw.tcl. 

set_module_property ELABORATION_CALLBACK validate
set_module_property VALIDATION_CALLBACK validate

Then you need add callback procedure for set_parameter_value and get_parameter_value. With that, the error should be gone for now. 

proc elaborate {} {
set_parameter_value
get_parameter_value
}

You may checkout the User Guide below for further details. 

https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/ug/ug-qpp-platform-designer...

- Creating Platform Designer Components on page 89

- Example 6. Sample _hw.tcl Component with User Alterable Expressions on page 100

Else, you can check for the <quartus_installation_directory>/ip/altera for any available _hw.tcl file as a reference. 

cosx
New Contributor I
253 Views

Thank you so much for your help!

I also found the problem myself.

Indeed the _hw.tcl does not allow get_parameter_value command.

I actually redesign a top level module that contains lsu_ic_top.v and assign the parameter values from qsys level.

Thank you for your help still!

Best wishes,

Mingqiang

RichardTanSY_Intel
238 Views

Hi Mingqiang,

Great to hear that you are making progress! I’m glad that your question has been addressed, if any answer from the community or Intel support are helpful, please feel free to give Kudos.  

With that, I will now transition this thread to community support. If you have a new question, feel free to open a new thread to get the support from Intel experts. Otherwise, the community users will continue to help you on this thread. Thank you.

Best Regards,
Shyan Yew (Richard)

Reply