Showing results for 
Search instead for 
Did you mean: 


DSPBAModelVectorBus [ VecBusApp.PNG - click to view image ] [ VectorBus.PNG - click to view image ]

Vector of Reg Fields

This is an example of how to auto generate a sub-system with multiple RegFields elements in order to create a vector of complex coefficients. (The RegField block doesn't natively support vector and complex at the time of writing). 

The setup script is separate here - but could easily be embedded directly into the initialization call.On initialization the block will create an arrary of RegField blocks and combine them through Real/Imag To Complex blocks and a Mux. 

You can look under the mask after parameterization to see the result: for example [ VectorBusUnderMask.PNG - click to view the image ]

NB: 1) The data type of the "Initial Value" parameter has to be one of the main supported Simulink types (e.g boolean, double, int), not fixed point. (The tool does the conversion to the specified Register Output Type - but does not take in a fixed point type value directly).

2) There is a current restriction on the width of the Bus interface - see DSPBA documentation for latest details. 

The files are the MDL: File:VectorModelBus.mdl and the m-script:File:Setup regfield vec.m

Version history
Last update:
‎06-25-2019 09:05 PM
Updated by: