How to generate HDL code using hdl coder for a model having universal bridge?

2 views (last 30 days)
I am trying to generate VHDL code using Simulink-HDL coder for a complicated model which has Universal Bridge in it. This produces an error as this block is not compatible with the HDL coder. I get the following error: "Cannot find the implementation for block 'model_togen_code/Universal Bridge1/UniversalBridge'." (2013a version) Is there any way to work around this issue with out actually writing the HDL code for the bridge?

Answers (1)

Tim McBrayer
Tim McBrayer on 8 Jul 2014
You do have a couple options here. In general if you want to use an unsupported block, you will need to find another way to model its behavior. One way, as you mentioned, is to write the HDL for the block yourself. This can then be connected to the rest of the generated code by using the HDL Coder black box interface.
A second way is to implement the block functionality in Simulink by using other, supported blocks. I'm not familiar with the Universal Bridge block, so I don't know what this may entail. Keep in mind that the supported block list includes the MATLAB Function block and Stateflow; both of which are well suited to implementing complex behaviors.
The documentation for the Universal Bridge block shows that it is a power electronics device from the SimPowerSystems library. HDL Coder does not support any of the Simscape blocks, from this or any other physical modeling library. I wouldn't think that you can build a power converter on an FPGA or ASIC. You may need to reconsider what portion of your design is your control electronics (which can be placed on a FPGA) and which are the physical plant being controlled (which probably cannot be placed onto a FPGA).

Products

Community Treasure Hunt

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

Start Hunting!