This is supported as of MATLAB R2017b.
For releases prior to MATLAB R2017b, HDL code generation is not supported for the reshape block when its output dimensionality is set to 'Derive from reference input port'. The main reason for this is that HDL Code generation does not expect this block to have 2 input ports and thus throws the following error: Found more than one input or output port for a wiring block.
The workaround for this scenario is to use one of the other output dimensionality settings such as 1-D array, Column vector, Row vector or Customize. These options reduce the number of input ports to one and are therefore compatible with HDL code generation.
Best Answer