Compile Error in Vivado

Background INFO

I’m writing a 2-to-1 multiplexer, which should simple and easy to coding.

And below is the source.

module mux2(input sel, input in[0], input in[1], output out);
    assign out = sel? in[1] : in[0];
endmodule

As usual, after writing this code, I write a testbench for the short module aims at checking everything is Okay. However, when I clik the botton SIMULATION, an error happened accidently.

ERROR: [USF-XSim-62] 'compile' step failed with error(s). Please check the Tcl console output or 'D:/PTC_Vivado/mux2/mux2.sim/sim_1/behav/xsim/xvlog.log' file for more information.
ERROR: [Vivado 12-4473] Detected error while running simulation. Please correct the issue and retry this operation.
ERROR: [Common 17-39] 'launch_simulation' failed due to earlier errors.

Process of takling

Commonly, we copy these error INFO, and search in Google

Um, too many “maybe” solutions. Luckily, a bloger named 馬鹿吖 show us a meaningful method: CHECK YOUR LOG!

xvlog

Infact, the Xilinx company has design a significant approach for user to check the error in simulation. By default, the “xvlog” is in the subproject of your design file. And here is my address

"D:\PTC_Vivado\mux2\mux2.sim\sim_1\behav\xsim\xvlog.log"

And in this log file, I find some best answer:
“parameter should not have an array!”
Ohh, so design in before, I had create a array that should be useful while assignment in my opinion.

Outcome

So, I delete the array in parameter, and then simulation is correct!

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值