Visible to Intel only — GUID: diw1643005801457
Ixiasoft
Visible to Intel only — GUID: diw1643005801457
Ixiasoft
12.5.3. Tcl Commands for BSP Generation Callbacks
If you are defining a device driver or a software package, you can define Tcl callback functions to run whenever a BSP is generated containing your driver or package. Tcl callback functions enable you to create settings dynamically for the driver or package. This capability is essential when the driver or package settings must be customized to the hardware configuration, or to other BSP settings.
Tcl callback scripts are defined and controlled from the *_sw.tcl file associated with the driver or package. In *_sw.tcl, you can specify where the Tcl functions come from, when function runs, and the scope of each Tcl function’s operation.
When the BSP is generated with your driver or software package, the settings you define in the callback scripts are inserted in settings.bsp.
You specify the source of the callback functions with the set_sw_property command, using the callback_source_file property.
- BSP initialization
- BSP generation
- BSP validation
- Component class
- Component instance
You specify each callback function’s runtime environment by using the appropriate property in the set_sw_property command, as shown in the table below.
Property as specified in set_sw_property | Run time | Scope | Callback Arguments |
---|---|---|---|
initialization_callback | Initialization | Component instance | Component instance name |
validation_callback | Validation | Component instance | Component instance name |
generation_callback | Generation | Component instance |
|
class_initialization_callback | Initialization | Component class | Driver class name |
class_validation_callback | Validation | Component class | Driver class name |
class_generation_callback | Generation | Component class |
|
Tcl callbacks have access to a specialized set of commands, described in this section. In addition, Tcl callbacks can use any read-only BSP setting Tcl command.
Section Content
add_class_sw_setting
add_class_systemh_line
add_module_sw_property
add_module_sw_setting
add_module_systemh_line
add_systemh_line
get_class_peripheral
get_module_assignment
get_module_name
get_module_peripheral
get_module_sw_setting_value
get_peripheral_property
remove_class_systemh_line
remove_module_systemh_line
set_class_sw_setting_property
set_module_sw_setting_property