MATLAB: Cannot find design ‘main’ on the path : HDL coder error

matlab hdl coder

|while converting my m file using hdl coder following error occurs Error using Float2FixedConverter.Float2FixedConverter (line 143) Cannot find design 'main' on the path
Error in C:\Program Files\MATLAB\R2013a\toolbox\coder\coder\+coderprivate\Float2FixedManager.p>Float2FixedManager.buildFloatingPointCode (line 77)
Error in C:\Program Files\MATLAB\R2013a\toolbox\coder\coder\private\fpBuildFloatingPointCode.p>fpBuildFloatingPointCode (line 4)
Error in C:\Program Files\MATLAB\R2013a\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 16)
Cannot find design 'main' on the path
Error in Float2FixedConverter>Float2FixedConverter at 143
Error in Float2FixedManager>buildFloatingPointCode at 77
Error in fpBuildFloatingPointCode at 4
Error in emlcprivate at 16|

Best Answer

  • Can you tell us which version of MATLAB you are using? Thanks
    please make sure your project file (.prj) file is in the same folder as the design (main.m) and testbench (main_tb.m). please launch the project after cd'ing into the directory, add the design and testbench before opening workflow steps.