[英]Verilog, can't generate bitstream
First timer in Vivado Verilog here, I just finished my coding for a project and simulation for the project.这里是 Vivado Verilog 的第一个计时器,我刚刚完成了项目的编码和项目的模拟。 I keep getting error message when trying to generate bitstream... I think my syntax is correct, just can't figure out what's wrong.
尝试生成比特流时,我不断收到错误消息...我认为我的语法是正确的,只是无法弄清楚出了什么问题。 This is picture of design that I try to code.
这是我尝试编码的设计图片。
This is project code.这是项目代码。
`timescale 1ns/1ps
module project7_demo(
input A,
input B,
input C,
output X
);
wire N1,N2,N3;
assign #1 N1 = A & B;
assign #1 N2 = ~B;
assign #1 N3 = N2 & C;
assign #1 X = N1 | N3;
endmodule
This is simulation code for the project.这是项目的模拟代码。
`timescale 1ns/1ps
module project7_demo_sim;
reg A_sim;
reg B_sim;
reg C_sim;
wire X_sim;
wire N1_sim;
wire N2_sim;
wire N3_sim;
project7_demo ASIM (A_sim,B_sim,C_sim,X_sim,N1_sim,N2_sim,N3_sim);
integer k = 0;
initial
begin
A_sim = 0;
B_sim = 0;
C_sim = 0;
for(k=0; k<4; k=k+1)
begin
{A_sim,C_sim} = k;
#5 B_sim=1;
#5 B_sim=0;
#5 ;
end
end
endmodule
It doesn't show that I have syntax error.... But I feel like the errors are from the simulation code?它没有显示我有语法错误....但我觉得错误来自模拟代码? Any help would be appreciated.
任何帮助,将不胜感激。 Thank you.
谢谢你。
How to read error message: The error message "ERROR: [VRFC 10-2922] 'project7_demo' expects 4 arguments" says that project7_demo expects 4 arguments and error is in project7_demo_sim.v line 12. Going to that line, we can see that you have declared project7_demo ASIM (A_sim,B_sim,C_sim,X_sim);如何阅读错误消息:错误消息“错误:[VRFC 10-2922] 'project7_demo' 需要 4 个参数”说 project7_demo 需要 4 个 arguments 并且错误在 project7_demo_sim.v 第 12 行。转到该行,我们可以看到您已声明project7_demo ASIM (A_sim,B_sim,C_sim,X_sim); which is basically 7 arguments.
这基本上是 7 个 arguments。
Correct one is project7_demo ASIM (A_sim,B_sim,C_sim,X_sim);正确的一个是project7_demo ASIM (A_sim,B_sim,C_sim,X_sim);
PS: You seriously need to read some user guides/ text books to understand the concepts. PS:你真的需要阅读一些用户指南/教科书来理解这些概念。 bitfile generation and simulation are different.
位文件生成和模拟是不同的。 You are getting this error in simulation which is completely different than bit file generation.
您在模拟中遇到此错误,这与位文件生成完全不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.