admin管理员组文章数量:1530845
题目:对下面图中每个1位数据进行不同方式Verilog语言中的复制操作,最后输出结果是两者异或
错误操作:
assign out=~{ 5{a}, 5{b}, 5{c}, 5{d}, 5{e} }^{ 5{a,b,c,d,e} };
编译后报错:
Error (10170): Verilog HDL syntax error at top_module.v(9) near text: “,”; expecting “}”. 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/support/support-resources/knowledge-base/search.html and search for this specific error message number. File: /home/h/work/hdlbits.3116519/top_module.v Line: 9
报错内容是在,之前少了一个分号!!!原因是5{a}表示对5个a进行连接,之后的结果是a,a,a,a,a
(!!!注意:这里没有大括号)
之后再与后面5个b相连接时,因该加{}将5个a连接在一起,表示一个整体。正确代码如下
assign out = ~{ {5{a}}, {5{b}}, {5{c}}, {5{d}}, {5{e}} } ^ {5{a,b,c,d,e}};
版权声明:本文标题:HDLBits练习(2)verilog中复制运算的要点 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dianzi/1725429993a1022799.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论