You can verify HDL modules using the HDL Cosimulation System object™. You can use the System object as a test bench or you can use it to represent a component still under design.
The easiest way to create a test bench System object is to use the HDL Cosimulation Wizard with existing HDL code. You can also create an HDL Cosimulation System object manually.
You can find out more about the HDL Cosimulation Wizard and creating System objects within these topics:
For an example of how to use the HDL Cosimulation System object, see Verify Viterbi Decoder Using MATLAB System Object and HDL Simulator.
For an example of converting existing HDL code to a System object test bench, see Prepare to Import HDL Code for Cosimulation.
For general information about how to use System objects, see System Design and Simulation in MATLAB (MATLAB)