quartus 编译报错修改方法

在使用Verilog HDL编译时遇到错误10170和10759,错误提示涉及“cout”语法错误和“result”的重新声明。解决方法是检查并修正代码中关于“cout”的语法,确保在模块体内不重新声明port对象“result”。通过按照错误提示进行修改,问题已成功解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

源代码:

module adder(
input [31:0] operand1,
input [31:0] operand2,
input cin,
output [31:0] result,
output cout
);
assign {cout,result} = operand1 + operand2 + cout;

endmodule

报错: Error (10170): Verilog HDL syntax error at Verilog1.v(8) near text: “cout”; expecting “highz0”, or “highz1”, or “large”, or “medium”, or “pull0”, or “pull1”, or “small”, or “strong0”, or “strong1”, or “supply0”, or “weak0”, or “weak1”. Check for and fix any syntax errors that appear immediately before or at the specified keyword. The Intel FPGA Knowledge Database contains many articles with specific details on how to resolve this error. Visit the Knowledge Database at https://www.altera.com/support/support-resources/knowledge-base/search.html and search for this specific error message number.

Error (10759): Verilog HDL error at Verilog1.v(8): object result declared in a list of port declarations cannot be redeclared within the module body

Error (10112): Ignored design unit “adder” at Verilog1.v(1) due to previous errors

Error: Quartus Prime Analysis & Synthesis was unsuccessful. 3 errors, 1 warning
Error: Peak virtual memory: 4702 megabytes
Error: Processing ended: Sat Nov 27 15:57:22 2021
Error: Elapsed time: 00:00:12
Error: Total CPU time (on all processors): 00:00:27

Error (293001): Quartus Prime Full Compilation was unsuccessful. 5 errors, 1 warning

在这里插入图片描述
解决方法:

选择红框中的选项。
在这里插入图片描述

已解决!

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

livercy

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值