Simulink block for switching: Multiport switch block not supported in HDL Coder
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Pooja
el 7 de Oct. de 2013
Respondida: Tim McBrayer
el 7 de Oct. de 2013
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.
0 comentarios
Respuesta aceptada
Tim McBrayer
el 7 de Oct. de 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.
0 comentarios
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!