Description
Get dictionary of specified record names mapped to dictionaries of specified field names to value mappings.
Syntax
get_values([<field_names>], [<record_names>], writable_only=False, invalid_only=False)
Returns
Dictionary in a format {record: {field: value, ...}, ...}.
Parameters
| Name | Description |
|---|---|
| [<field_names>] | List of field names. Default: All fields |
| [<record_names>] | List of record names. Default: All available record names |
| [writable_only] | Enables returning only writable field values if True, otherwise, read-only fields are also returned. Default: False |
| [invalid_only] | Enables returning only invalid field values if True, otherwise, field values are returned regardless of their validity. Default: False |
Examples
# Get all values of a summary
proj = open_project('my_design.pdm')
io_power = proj.get_block('io').get_summary('power')
values = io_power.get_values()
# values == {'VCC_IO': {'voltage': 0.8, 'power': 0.0}, 'VCCAUX': {'voltage': 1.5, 'power': 0.0}, ...}
# Get values for specific fields and records
values = io_power.get_values(['voltage'], ['VCC_IO', 'VCCAUX'])
# Get only invalid writable values
invalid_values = io_power.get_values(invalid_only=True, writable_only=True)