简体   繁体   English

FPGA上片上网络的实现

[英]Implementation of Network on Chip on FPGA

I'm new to the verilog. 我是Verilog的新手。 I receive following warning when I synthesize my code on the Xilinx 14.3 Xilinx 14.3上合成代码时,收到以下警告

Synthesizing Unit <Router_Debug> . 合成单元<Router_Debug>

Related source file is "Router_Debug.v". 相关的源文件是“ Router_Debug.v”。

WARNING:Xst:646 - Signal <P0_data_out<16:23>> is assigned but never used. 警告:Xst:646-信号<P0_data_out<16:23>>已分配但从未使用过。 This unconnected signal will be trimmed during the optimization process. 在优化过程中将微调此未连接的信号。

Unit <Router_Debug> synthesized. 单元<Router_Debug>合成。

File: Router_Debug.v 文件: 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

I've searched on the google and found relevant problem's solutions but that didn't help me. 我已经在Google上进行搜索,找到了相关问题的解决方案,但这并没有帮助我。 So any help will be much appreciated. 因此,任何帮助将不胜感激。 Thanks! 谢谢!

I can't do much with your code because: 我不能对您的代码做太多事情,因为:

  • Your error message does not say which signal is optimised away 您的错误消息未说明哪个信号已被优化
  • I have no idea what Port_Debug does. 我不知道Port_Debug是做什么的。

You have a code error in there: 您那里有一个代码错误:
You use non-blocking <= assignments in a combinatorial block. 您可以在组合块中使用非阻塞<=分配。 That should be blocking = . 那应该是=

You code style is unorthodox: 您的代码风格是非正统的:

  • All you signal indices are from low to high: customary is from high to low. 信号指标从低到高:习惯从高到低。 Just like in computer numbers the bits are from MS (left) to LS (right) .I have no idea if signed [0:7] even works... 就像计算机中的数字一样,位是从MS(左)到LS(右)。我不知道signed [0:7]有效...
  • Don't make very long lines. 不要排很长的线。 Your ports are not readable. 您的端口不可读。 This is readable: 这是可读的:
    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,
    ...
    (I have seen this before and always in the ports. I start to think it is some sort of bad emacs macro.) (我以前在端口中一直都看到过这种情况。我开始认为这是某种错误的emacs宏。)
  • When connecting signals always use by reference: 连接信号时,请始终参考使用:
    Port_Debug(.portname0(P0_data_out),
    .portname1(P0_data_in),
    ...

............... ...............

There is an anomaly in your code: 您的代码中存在异常:
P3_data_in[0:31]<=P0_data_out[16:23];
Does not match the pattern. 与模式不符。 You probably wanted: P3_data_in[0:7]<=P0_data_out[16:23]; 您可能想要: P3_data_in[0:7]<=P0_data_out[16:23];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM