Description
Get valid values of a single setting, identified by its path - a list of hierarchical dictionary keys.
Syntax
get_setting_valid_values(<setting_path>, [<settings_dict>])
Returns
List or range of a clock setting valid values.
Parameters
| Name | Description |
|---|---|
| <setting_path> | Clock setting path - a list of hierarchical dictionary keys. For example, ['freq'] or ['io', 'type']. |
| [<settings_dict>] | Clock settings dictionary containing all settings and values that the specified setting depends on. This parameter is not needed or is ignored if the setting has no dependencies. Default: None |
Examples
# Get valid values for an independent clock setting
proj = open_project('my_design.pdm')
clock_handler = proj.get_clock_handler()
valid = clock_handler.get_setting_valid_values('io_type')
# valid == ['HD', 'XP', 'HDIO']
# Get valid values for a dependent setting by providing its dependencies
valid = clock_handler.get_setting_valid_values('min_scaled_freq', {'freq': 500})
# valid == [0.0, 500.0]
# Get valid values for io_standard (depends on io_type)
valid = clock_handler.get_setting_valid_values('io_standard', {'io_type': 'HD'})