Azzera filtri
Azzera filtri

Simulink block for switching: Multiport switch block not supported in HDL Coder

3 visualizzazioni (ultimi 30 giorni)
Hello, I am using Matlab 2011a. In simulink when i use Multiport Switch block, the HDL Compatibility test gives following Error:" "Specify indices" is not supported by the Multi Port Switch block parameter "Data Port Order" for HDL code generation ".
But the switch is found in hdllib.
I need to use the switch with "Specify indices", as i have input data of different ranges which are to be switched.
Kindly let me know how it canbe done to use with HDL coder.
Thank you in anticiaption.

Risposta accettata

Tim McBrayer
Tim McBrayer il 7 Ott 2013
As the error message states, the 'Specify Indices' mode of the MultiPort Switch block is not supported for HDL code generation. To implement this behavior you will need to decompose the logic you want to use blocks in their supported modes. If you have a small number of contiguous ranges this task is not overly difficult. If you have a large number of potential outputs, or the values to select a particular index are non-contiguous, the task becomes more challenging.
For example: if you want to select signal A when your select signal is 1-4, B when it's 5-8, and C if it's > 8, then you can implement this with 2 Switch blocks, 3 Compare to Constant blocks, and a handful of Boolean operators. If your selection logic is more complex, then the required design is more complex.

Più risposte (0)

Categorie

Scopri di più su Code Generation in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by