Verilog用Modelsim仿真时错误:Instantiating 'u_state_machine_pkt_top' has exceeded the recursion depth limit

错误信息:Instantiating 'u_state_machine_pkt_top' has exceeded the recursion depth limit of 200.

                 (实例化“ u_state_machine_pkt_top”已超过递归深度限制200。)

原因:测试文件的模块名和实例化文件模块名一样,造成嵌套死循环,递归深度无限大。如下图所示。

Verilog用Modelsim仿真时错误:Instantiating 'u_state_machine_pkt_top' has exceeded the recursion depth limit

解决方法:将测试文件模块名改为和实例化模块名不一样的,就OK了。

修改后如下图:

Verilog用Modelsim仿真时错误:Instantiating 'u_state_machine_pkt_top' has exceeded the recursion depth limit