port size does not match connection size

自古美人都是妖i 提交于 2019-12-02 02:18:47

The warning is correct.

In module ALU, you have this declaration:

input  [4-1:0]   src3_i;//shmat is 5 bits instruction[10:6]

This sets the width of src3_i to 4 because 4-1=3, and 3:0 is 4 bits.

But, in Simple_Single_CPU.v, you have:

         .src3_i(instr_o[10:6]),

This connects a 5-bit signal (instr_o[10:6]) to a 4-bit port (src3_i).

You must decide whether the signal should really be 4 bits or 5 bits. For example, if you want 5 bits, use:

input  [5-1:0]   src3_i;//shmat is 5 bits instruction[10:6]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!