Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

How to use Radio Display_Hint in hw.tcl file

Hi,

In the Quartus II Handbook Version 9.0 there is a nice example of how to create a pull down menu using allowed_ranges

add_parameter sound string 0 0

set_parameter_property sound allowed_ranges {"0:No Audio" 1: Monophonic 2:Stereo 4:Quadraphonic}

When I do this, I get a nice pulldown menu that assigns sound a value of 0,1,2, or 4 but displays the text instead of the number.

I had wanted to use this syntax with a

set_parameter_property separate_control DISPLAY_HINT radio

But when radio hint is used; 0, 1, 2 and 4 are displayed without any text.

Does anyone know how to show the nice text strings in the radio format but assign the numberic value to the string for easy use assigning a number value later.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I ran into that too. Instead what I did was used a dummy string parameter then took the result and mapped that to my integer parameter in .tcl You have to do this in the validation callback.

    If you want to see an example shoot me over an email and I'll send you my .tcl file.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks,

    I will make a dummy string or stick with the pull down.

    -Jennifer