How do I change an Avalon interface parameter in a custom component? - How do I change an Avalon interface parameter in a custom component?
Description When you add Avalon interfaces to custom components, there are parameters associated with these interfaces that you might want to change. For example Avalon Streaming interfaces have a maximum channel value that you might want to change as you are instantiating the custom component in your system. Follow these steps to allow changes to be made to these parameters. 1. Add a parameter or generic to your custom component HDL file: parameter MAX_CHAN_SINK = 255; 2. Add parameter and property values in the hw.tcl file associated with the custom component: add_parameter MAX_CHAN_SINK INTEGER 8 "Max Width of the sink channel" set_parameter_property MAX_CHAN_SINK DEFAULT_VALUE 8 set_parameter_property MAX_CHAN_SINK DISPLAY_NAME MAX_SNK_CHANNEL_WIDTH set_parameter_property MAX_CHAN_SINK TYPE INTEGER set_parameter_property MAX_CHAN_SINK UNITS None set_parameter_property MAX_CHAN_SINK DESCRIPTION "Max Width of the sink channel" set_parameter_property MAX_CHAN_SINK AFFECTS_GENERATION false set_parameter_property MAX_CHAN_SINK HDL_PARAMETER true 3. Add an elaboration procedure to assign the interface parameter in the hw.tcl file associated with the custom component: # ----------------------------------- # elaboration callback - assign parameter set_module_property ELABORATION_CALLBACK elaborate proc elaborate {} { set max_chan_var [ get_parameter_value MAX_CHAN_SINK] set_interface_property avalon_streaming_sink maxChannel }
Custom Fields values:
['novalue']
Troubleshooting
novalue
False
['novalue']
['novalue']
novalue
novalue
['Programmable Logic Devices']
['novalue']
['novalue']
['novalue'] - 2021-08-25
external_document