説明
値のディクショナリを {record: {field: value, ...}, ...} の形式でリソースに設定します。
構文
set_values(<records_dict>)
パラメーター
| 名前 | 説明 |
|---|---|
| <records_dict> | レコード名をキーとし、フィールド名から値へのマッピングを持つディクショナリを値とするディクショナリを表します。形式は {record: {field: value, ...}, ...} です。 |
例
# Set values on existing records or create new records
proj = open_project('my_design.pdm')
io_config = proj.get_block('io').get_resource('io_config')
# Create a new record by setting values with a new name
io_config.set_values({'io_inst1': {'input_pins': 1, 'output_pins': 2}})
# Edit fields of an existing record
io_config.set_values({'io_inst1': {'toggle_rate': 0.25}})
# Create multiple records at once
io_config.set_values({
'io_inst2': {'input_pins': 4, 'io_type': 'XP'},
'io_inst3': {'input_pins': 8, 'io_type': 'HD'}
})
# Read-only field names in the dictionary are silently ignored