我是verilog的新手。当我在 Xilinx 14.3
上合成代码时收到以下警告合成单位
<Router_Debug>
。相关的源文件是“Router_Debug.v”。
警告:Xst:646 - 已分配信号
<P0_data_out<16:23>>
但从未使用过。这个未连接的信号将在期间被修剪 优化过程。单位
<Router_Debug>
已合成。
文件:Router_Debug.v
module Router_Debug(output wire signed [0:31]out_N,
output wire signed [0:7]out_E,
output wire signed [0:7]out_W,
output wire signed [0:7]out_S,
output wire signed [0:7]out_L,
input wire signed [0:7]in_N,
input wire signed [0:7]in_E,
input wire signed [0:7]in_W,
input wire signed [0:7]in_S,
input wire signed [0:7]in_L,
input clk);
wire signed [0:31]P0_data_out;
reg signed [0:31]P0_data_in;
wire signed [0:31]P1_data_out;
reg signed [0:31]P1_data_in;
wire signed[0:31]P2_data_out;
reg signed[0:31]P2_data_in;
wire signed[0:31]P3_data_out;
reg signed[0:31]P3_data_in;
wire signed[0:31]P4_data_out;
reg signed[0:31]P4_data_in;
always @ (*)
begin
P0_data_in[0:7]<=P1_data_out[0:7];
P0_data_in[8:15]<=P2_data_out[0:7];
P0_data_in[16:23]<=P3_data_out[0:7];
P0_data_in[24:31]<=P4_data_out[0:7];
P1_data_in[0:7]<=P0_data_out[0:7];
P1_data_in[8:15]<=P2_data_out[8:15];
P1_data_in[16:23]<=P3_data_out[8:15];
P1_data_in[24:31]<=P4_data_out[8:15];
P2_data_in[0:7]<=P0_data_out[8:15];
P2_data_in[8:15]<=P1_data_out[8:15];
P2_data_in[16:23]<=P3_data_out[16:23];
P2_data_in[24:31]<=P4_data_out[16:23];
P3_data_in[0:31]<=P0_data_out[16:23];
P3_data_in[8:15]<=P1_data_out[16:23];
P3_data_in[16:23]<=P2_data_out[16:23];
P3_data_in[24:31]<=P4_data_out[24:31];
P4_data_in[0:7]<=P0_data_out[24:31];
P4_data_in[8:15]<=P1_data_out[24:31];
P4_data_in[16:23]<=P2_data_out[24:31];
P4_data_in[24:31]<=P3_data_out[24:31];
end
Port_Debug P0(P0_data_out,P0_data_in,in_N,out_N,clk,3'd0);//mesh_size,3'd0);
Port_Debug P1(P1_data_out,P1_data_in,in_W,out_W,clk,3'd1);//mesh_size,3'd1);
Port_Debug P2(P2_data_out,P2_data_in,in_S,out_S,clk,3'd2);//mesh_size,3'd2);
Port_Debug P3(P3_data_out,P3_data_in,in_L,out_L,clk,3'd3);//mesh_size,3'd3);
Port_Debug P4(P4_data_out,P4_data_in,in_E,out_E,clk,3'd4);//mesh_size,3'd4)
endmodule
我在google上搜索并发现了相关问题的解决方案,但这对我没有帮助。所以任何帮助将不胜感激。谢谢!
答案 0 :(得分:2)
我无法对您的代码执行任何操作,因为:
你有一个代码错误:
您在组合块中使用非阻塞<=
分配。这应该是阻止=
。
你的代码风格是非正统的:
signed [0:7]
是否有效...... output wire signed [0:31]out_N,
output wire signed [0:7]out_E,
output wire signed [0:7]out_W,
output wire signed [0:7]out_S,
...
Port_Debug(.portname0(P0_data_out),
.portname1(P0_data_in),
...
...............
您的代码中存在异常:
P3_data_in[0:31]<=P0_data_out[16:23];
与模式不匹配。你可能想要:
P3_data_in[0:7]<=P0_data_out[16:23];