Visible to Intel only — GUID: mwh1409958806734
Ixiasoft
Visible to Intel only — GUID: mwh1409958806734
Ixiasoft
4.3.10.5. Validate Parameter Values with a Validation Callback
You can use a validation callback procedure to validate parameter values with more complex validation operations than the ALLOWED_RANGES property allows. You define a validation callback by setting the VALIDATION_CALLBACK module property to the name of the Tcl callback procedure that runs during the validation phase. In the validation callback procedure, the current parameter values is queried, and warnings or errors are reported about the component's configuration.
Demo AXI Memory Example
If the optional Avalon streaming interface is enabled, then the control registers must be wide enough to hold an AXI RAM address, so the designer can add an error message to ensure that the user enters allowable parameter values.
set_module_property VALIDATION_CALLBACK validate
proc validate {} {
if {
[get_parameter_value ENABLE_STREAM_OUTPUT ] &&
([get_parameter_value AXI_ADDRESS_W] >
[get_parameter_value AV_DATA_W])
}
send_message error "If the optional Avalon streaming port\
is enabled, the AXI Data Width must be equal to or greater\
than the Avalon control port Address Width"
}
}