diff --git a/vgen_process_simulink_model.m b/vgen_process_simulink_model.m index c29b3a1..dc9bfda 100644 --- a/vgen_process_simulink_model.m +++ b/vgen_process_simulink_model.m @@ -25,10 +25,16 @@ % this is where hdlworkflow puts the vhdl files hdlpath = [mp.modelPath filesep 'hdlsrc' filesep mp.modelAbbreviation]; -if ispc - python = "python "; -else +if system("python3 --version") == 0 python = "python3 "; +else + [status, output] = system("python --version"); + if status == 0 && contains(output, "Python 3.") + python = "python "; + else + disp('Python 3 was not found on the path. This must be fixed before continuing') + return; + end end %% Generate the Avalon VHDL wrapper for the VHDL code generated by the HDL Coder