Vivado出现编译错误:[USF-XSim 62] 'compile' step failed with error(s) while executing...

在vivado执行仿真过程中出现了如下错误:

Vivado出现编译错误:[USF-XSim 62] 'compile' step failed with error(s) while executing...

[USF-XSim 62] 'compile' step failed with error(s) while executing 'D:/vivado_pro/led_8lights/led_8lights.sim/sim_1/behav/compile.bat' script. Please check that the file has the correct 'read/write/execute' permissions and the Tcl console output for any other possible errors or warnings.

出现该错误的原因可能是代码有误,可在项目文件>仿真文件>仿真文件.sim>compile.log文件中查看编译错误。

我在该次编译出错的原因:

Vivado出现编译错误:[USF-XSim 62] 'compile' step failed with error(s) while executing...

原来是因为忘记在counter8模块的输出端口定义时添加reg。

根据查询自己项目中的log文件,找出错误,解决。