URL
https://opencores.org/ocsvn/an-fpga-implementation-of-low-latency-noc-based-mpsoc/an-fpga-implementation-of-low-latency-noc-based-mpsoc/trunk
Subversion Repositories an-fpga-implementation-of-low-latency-noc-based-mpsoc
[/] [an-fpga-implementation-of-low-latency-noc-based-mpsoc/] [trunk/] [mpsoc/] [rtl/] [src_topolgy/] [custom1/] [Tcustom1Rcustom_look_ahead_routing_genvar.v] - Rev 55
Go to most recent revision | Compare with Previous | Blame | View Log
/************************************************************************** ** WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE ** OVERWRITTEN AND LOST. Rename this file if you wish to do any modification. ****************************************************************************/ /********************************************************************** ** File: /home/alireza/work/git/hca_git/ProNoC/mpsoc/rtl/src_topolgy/custom1/Tcustom1Rcustom_look_ahead_routing_genvar.v ** ** Copyright (C) 2014-2021 Alireza Monemi ** ** This file is part of ProNoC 2.0.0 ** ** ProNoC ( stands for Prototype Network-on-chip) is free software: ** you can redistribute it and/or modify it under the terms of the GNU ** Lesser General Public License as published by the Free Software Foundation, ** either version 2 of the License, or (at your option) any later version. ** ** ProNoC is distributed in the hope that it will be useful, but WITHOUT ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ** or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General ** Public License for more details. ** ** You should have received a copy of the GNU Lesser General Public ** License along with ProNoC. If not, see <http:**www.gnu.org/licenses/>. ******************************************************************************/ `include "pronoc_def.v" /***************************** * Tcustom1Rcustom_look_ahead_routing_genvar ******************************/ module Tcustom1Rcustom_look_ahead_routing_genvar #( parameter RAw = 3, parameter EAw = 3, parameter DSTPw=4, parameter CURRENT_R_ADDR=0 ) ( dest_e_addr, src_e_addr, destport, reset, clk ); input [EAw-1 :0] dest_e_addr; input [EAw-1 :0] src_e_addr; output [DSTPw-1 :0] destport; input reset,clk; reg [EAw-1 :0] dest_e_addr_delay; reg [EAw-1 :0] src_e_addr_delay; always @ (`pronoc_clk_reset_edge )begin if(`pronoc_reset) begin dest_e_addr_delay<={EAw{1'b0}}; src_e_addr_delay<={EAw{1'b0}}; end else begin dest_e_addr_delay<=dest_e_addr; src_e_addr_delay<=src_e_addr; end end custom1_look_ahead_routing_genvar_comb #( .RAw(RAw), .EAw(EAw), .DSTPw(DSTPw), .CURRENT_R_ADDR(CURRENT_R_ADDR) ) lkp_cmb ( .dest_e_addr(dest_e_addr_delay), .src_e_addr(src_e_addr_delay), .destport(destport) ); endmodule /******************* * Tcustom1Rcustom_look_ahead_routing_genvar_comb ********************/ module Tcustom1Rcustom_look_ahead_routing_genvar_comb #( parameter RAw = 3, parameter EAw = 3, parameter DSTPw=4, parameter CURRENT_R_ADDR=0 ) ( dest_e_addr, src_e_addr, destport ); input [EAw-1 :0] dest_e_addr; input [EAw-1 :0] src_e_addr; output reg [DSTPw-1 :0] destport; localparam [EAw-1 : 0] E0=0; localparam [EAw-1 : 0] E1=1; localparam [EAw-1 : 0] E2=2; localparam [EAw-1 : 0] E3=3; localparam [EAw-1 : 0] E4=4; localparam [EAw-1 : 0] E5=5; localparam [EAw-1 : 0] E6=6; localparam [EAw-1 : 0] E7=7; localparam [EAw-1 : 0] E8=8; localparam [EAw-1 : 0] E9=9; localparam [EAw-1 : 0] E10=10; localparam [EAw-1 : 0] E11=11; localparam [EAw-1 : 0] E12=12; localparam [EAw-1 : 0] E13=13; localparam [EAw-1 : 0] E14=14; localparam [EAw-1 : 0] E15=15; generate if(CURRENT_R_ADDR == 0) begin :R0 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E9},{E0,E10}: begin destport= 0; end {E0,E2},{E0,E3},{E0,E8},{E0,E11},{E0,E12}: begin destport= 1; end {E0,E1},{E0,E4},{E0,E5},{E0,E6},{E0,E7},{E0,E13},{E0,E14},{E0,E15}: begin destport= 2; end endcase end end//R0 if(CURRENT_R_ADDR == 1) begin :R1 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E1,E2},{E1,E7},{E2,E7}: begin destport= 0; end {E1,E3},{E1,E4},{E1,E5},{E1,E6},{E1,E8},{E1,E9},{E1,E11},{E1,E12},{E1,E13},{E1,E14},{E1,E15},{E2,E9},{E2,E12}: begin destport= 1; end {E1,E0},{E1,E10},{E2,E0},{E2,E10}: begin destport= 2; end endcase end end//R1 if(CURRENT_R_ADDR == 2) begin :R2 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E1,E11},{E2,E1},{E2,E11}: begin destport= 0; end {E1,E5},{E1,E6},{E1,E13},{E1,E14},{E2,E0},{E2,E4},{E2,E5},{E2,E6},{E2,E7},{E2,E8},{E2,E9},{E2,E10},{E2,E12},{E2,E13},{E2,E14},{E2,E15}: begin destport= 1; end {E1,E3},{E2,E3}: begin destport= 3; end endcase end end//R2 if(CURRENT_R_ADDR == 3) begin :R3 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E3,E4},{E3,E11}: begin destport= 0; end {E3,E1},{E3,E6},{E3,E7},{E3,E8},{E3,E10},{E3,E12},{E3,E13},{E3,E14}: begin destport= 1; end {E3,E2}: begin destport= 2; end {E3,E0},{E3,E5},{E3,E9},{E3,E15}: begin destport= 3; end endcase end end//R3 if(CURRENT_R_ADDR == 4) begin :R4 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E3,E13},{E4,E3},{E4,E13},{E5,E3},{E6,E3},{E7,E3},{E8,E3},{E9,E3},{E10,E3},{E12,E3},{E13,E3},{E14,E3},{E15,E3}: begin destport= 0; end {E4,E2},{E4,E11},{E4,E14}: begin destport= 1; end {E3,E0},{E3,E5},{E3,E9},{E3,E15},{E4,E0},{E4,E5},{E4,E9},{E4,E12},{E4,E15}: begin destport= 2; end {E3,E6},{E4,E6}: begin destport= 3; end {E3,E1},{E3,E7},{E3,E8},{E3,E14},{E4,E1},{E4,E7},{E4,E8},{E4,E10}: begin destport= 4; end endcase end end//R4 if(CURRENT_R_ADDR == 5) begin :R5 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E6},{E0,E15},{E3,E9},{E3,E15},{E4,E9},{E4,E15},{E5,E6},{E5,E9},{E5,E15},{E6,E9},{E6,E15},{E9,E6},{E9,E15},{E13,E9},{E14,E9},{E15,E9}: begin destport= 0; end {E0,E4},{E0,E13},{E4,E12},{E5,E1},{E5,E2},{E5,E3},{E5,E4},{E5,E7},{E5,E8},{E5,E10},{E5,E12},{E5,E13},{E5,E14},{E6,E1},{E6,E7},{E6,E8},{E6,E10},{E6,E12},{E9,E3},{E9,E4},{E9,E13},{E9,E14}: begin destport= 1; end {E0,E14},{E5,E11},{E6,E2},{E6,E11},{E6,E14},{E9,E2},{E9,E11}: begin destport= 2; end {E3,E0},{E4,E0},{E5,E0},{E6,E0},{E11,E0},{E13,E0},{E15,E0}: begin destport= 3; end endcase end end//R5 if(CURRENT_R_ADDR == 6) begin :R6 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E13},{E3,E5},{E4,E5},{E5,E13},{E6,E5},{E6,E13},{E9,E13}: begin destport= 0; end {E3,E15},{E4,E12},{E4,E15},{E6,E1},{E6,E2},{E6,E7},{E6,E8},{E6,E10},{E6,E11},{E6,E12},{E6,E14},{E6,E15}: begin destport= 1; end {E0,E4},{E5,E3},{E5,E4},{E6,E3},{E6,E4},{E9,E3},{E9,E4}: begin destport= 2; end {E3,E0},{E3,E9},{E4,E0},{E4,E9},{E6,E0},{E6,E9}: begin destport= 3; end {E4,E2},{E4,E11},{E4,E14},{E5,E2},{E5,E14},{E9,E14}: begin destport= 4; end endcase end end//R6 if(CURRENT_R_ADDR == 7) begin :R7 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E1},{E1,E8},{E1,E10},{E2,E10},{E3,E1},{E3,E10},{E4,E1},{E4,E10},{E5,E1},{E6,E1},{E7,E1},{E7,E8},{E7,E10},{E8,E1},{E9,E1},{E10,E1},{E11,E1},{E11,E10},{E12,E1},{E13,E1},{E13,E10},{E14,E1},{E14,E10},{E15,E1}: begin destport= 0; end {E1,E9},{E1,E12},{E1,E15},{E2,E9},{E2,E12},{E7,E9},{E7,E12}: begin destport= 1; end {E1,E4},{E7,E2},{E7,E3},{E7,E4},{E7,E5},{E7,E6},{E7,E11},{E7,E13},{E7,E14},{E7,E15}: begin destport= 2; end {E1,E0},{E2,E0},{E7,E0},{E14,E0}: begin destport= 3; end endcase end end//R7 if(CURRENT_R_ADDR == 8) begin :R8 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E1,E12},{E2,E12},{E3,E7},{E4,E7},{E7,E12},{E7,E14},{E8,E7},{E8,E12},{E8,E14},{E9,E7},{E11,E7},{E13,E7},{E14,E7}: begin destport= 0; end {E1,E15},{E7,E5},{E7,E15},{E8,E4},{E8,E5},{E8,E15}: begin destport= 1; end {E1,E4},{E1,E9},{E2,E9},{E3,E10},{E4,E10},{E7,E3},{E7,E4},{E7,E6},{E7,E9},{E7,E13},{E8,E0},{E8,E3},{E8,E6},{E8,E9},{E8,E13},{E11,E10},{E13,E10},{E14,E0},{E14,E10}: begin destport= 2; end {E3,E1},{E4,E1},{E8,E1},{E8,E10},{E9,E1},{E11,E1},{E13,E1},{E14,E1}: begin destport= 3; end {E7,E2},{E7,E11},{E8,E2},{E8,E11}: begin destport= 4; end endcase end end//R8 if(CURRENT_R_ADDR == 9) begin :R9 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E5},{E0,E12},{E3,E0},{E4,E0},{E5,E0},{E6,E0},{E8,E0},{E9,E0},{E9,E5},{E9,E12},{E11,E0},{E12,E0},{E13,E0},{E15,E0}: begin destport= 0; end {E0,E11},{E0,E14},{E0,E15},{E9,E2},{E9,E11},{E9,E15}: begin destport= 1; end {E0,E4},{E0,E6},{E0,E13},{E9,E3},{E9,E4},{E9,E6},{E9,E13},{E9,E14}: begin destport= 2; end {E9,E10}: begin destport= 3; end {E0,E8},{E9,E1},{E9,E7},{E9,E8}: begin destport= 4; end endcase end end//R9 if(CURRENT_R_ADDR == 10) begin :R10 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E7},{E1,E0},{E2,E0},{E5,E7},{E6,E7},{E7,E0},{E10,E0},{E10,E7},{E10,E12},{E12,E7},{E14,E0},{E15,E7}: begin destport= 0; end {E0,E2},{E0,E3},{E10,E2},{E10,E3},{E10,E4},{E10,E5},{E10,E6},{E10,E11},{E10,E13},{E10,E14},{E10,E15}: begin destport= 1; end {E10,E9}: begin destport= 2; end {E0,E1},{E5,E1},{E6,E1},{E10,E1},{E12,E1},{E15,E1}: begin destport= 3; end {E10,E8}: begin destport= 4; end endcase end end//R10 if(CURRENT_R_ADDR == 11) begin :R11 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E2},{E0,E3},{E1,E3},{E1,E14},{E2,E3},{E2,E14},{E3,E2},{E4,E2},{E5,E2},{E6,E2},{E7,E2},{E8,E2},{E9,E2},{E10,E2},{E11,E2},{E11,E3},{E11,E14},{E12,E2},{E13,E2},{E14,E2},{E15,E2}: begin destport= 0; end {E1,E5},{E1,E13},{E2,E5},{E2,E15},{E3,E12},{E11,E0},{E11,E5},{E11,E9},{E11,E12},{E11,E15}: begin destport= 1; end {E1,E6},{E2,E4},{E2,E6},{E2,E13},{E11,E4},{E11,E6},{E11,E13}: begin destport= 2; end {E2,E8},{E3,E10},{E11,E1},{E11,E7},{E11,E8},{E11,E10}: begin destport= 3; end endcase end end//R11 if(CURRENT_R_ADDR == 12) begin :R12 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E8},{E1,E9},{E1,E15},{E2,E9},{E5,E8},{E5,E10},{E6,E8},{E6,E10},{E7,E9},{E8,E9},{E8,E10},{E9,E8},{E9,E10},{E10,E8},{E10,E9},{E10,E15},{E11,E9},{E12,E8},{E12,E9},{E12,E10},{E12,E15},{E15,E8},{E15,E10}: begin destport= 0; end {E0,E2},{E0,E3},{E0,E11},{E5,E1},{E5,E7},{E6,E1},{E6,E7},{E10,E2},{E10,E11},{E10,E14},{E12,E1},{E12,E2},{E12,E7},{E12,E11},{E12,E14},{E15,E1},{E15,E7}: begin destport= 2; end {E8,E0},{E8,E4},{E9,E1},{E9,E7},{E10,E3},{E10,E4},{E10,E6},{E10,E13},{E12,E0},{E12,E3},{E12,E4},{E12,E6},{E12,E13}: begin destport= 3; end {E8,E5},{E10,E5},{E12,E5}: begin destport= 4; end endcase end end//R12 if(CURRENT_R_ADDR == 13) begin :R13 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E4},{E1,E4},{E1,E6},{E2,E4},{E2,E6},{E3,E6},{E3,E14},{E4,E6},{E4,E14},{E5,E4},{E5,E14},{E6,E4},{E7,E4},{E7,E6},{E8,E4},{E8,E6},{E9,E4},{E9,E14},{E10,E4},{E10,E6},{E11,E4},{E11,E6},{E12,E4},{E12,E6},{E13,E4},{E13,E6},{E13,E14},{E14,E4},{E14,E6},{E15,E4},{E15,E6}: begin destport= 0; end {E13,E0},{E13,E5},{E13,E9},{E13,E12},{E13,E15}: begin destport= 1; end {E5,E3},{E6,E3},{E7,E3},{E8,E3},{E9,E3},{E10,E3},{E12,E3},{E13,E3},{E14,E3},{E15,E3}: begin destport= 2; end {E3,E1},{E3,E7},{E3,E8},{E4,E1},{E4,E7},{E4,E8},{E4,E10},{E13,E1},{E13,E7},{E13,E8},{E13,E10}: begin destport= 3; end {E4,E2},{E4,E11},{E5,E2},{E13,E2},{E13,E11}: begin destport= 4; end endcase end end//R13 if(CURRENT_R_ADDR == 14) begin :R14 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E11},{E2,E8},{E2,E13},{E2,E15},{E3,E8},{E4,E8},{E4,E11},{E5,E11},{E6,E11},{E7,E11},{E7,E13},{E7,E15},{E8,E11},{E8,E13},{E8,E15},{E9,E11},{E10,E11},{E11,E8},{E11,E13},{E11,E15},{E12,E11},{E13,E8},{E13,E11},{E13,E15},{E14,E8},{E14,E11},{E14,E13},{E14,E15},{E15,E11}: begin destport= 0; end {E3,E12},{E11,E9},{E11,E12},{E13,E12},{E14,E12}: begin destport= 1; end {E0,E2},{E1,E4},{E2,E4},{E4,E2},{E5,E2},{E6,E2},{E7,E2},{E7,E3},{E7,E4},{E8,E2},{E8,E3},{E9,E2},{E10,E2},{E11,E4},{E12,E2},{E13,E2},{E14,E2},{E14,E3},{E14,E4},{E15,E2}: begin destport= 2; end {E0,E3},{E1,E6},{E1,E13},{E2,E6},{E3,E1},{E3,E7},{E3,E10},{E4,E1},{E4,E7},{E4,E10},{E7,E6},{E8,E6},{E11,E1},{E11,E6},{E11,E7},{E11,E10},{E13,E1},{E13,E7},{E13,E10},{E14,E0},{E14,E1},{E14,E6},{E14,E7},{E14,E10}: begin destport= 3; end {E1,E5},{E2,E5},{E7,E5},{E11,E0},{E11,E5},{E13,E0},{E13,E5},{E13,E9},{E14,E5},{E14,E9}: begin destport= 4; end endcase end end//R14 if(CURRENT_R_ADDR == 15) begin :R15 always@(*)begin destport= 0; case({src_e_addr,dest_e_addr}) {E0,E14},{E1,E5},{E1,E13},{E2,E5},{E3,E12},{E4,E12},{E5,E12},{E6,E12},{E6,E14},{E7,E5},{E8,E5},{E10,E5},{E10,E13},{E10,E14},{E11,E5},{E11,E12},{E12,E5},{E12,E13},{E12,E14},{E13,E5},{E13,E12},{E14,E5},{E14,E12},{E15,E5},{E15,E12},{E15,E13},{E15,E14}: begin destport= 0; end {E8,E4},{E10,E3},{E10,E4},{E11,E9},{E12,E3},{E12,E4},{E15,E3},{E15,E4}: begin destport= 2; end {E5,E1},{E5,E7},{E5,E10},{E6,E1},{E6,E7},{E6,E10},{E10,E6},{E11,E0},{E12,E6},{E13,E0},{E13,E9},{E14,E9},{E15,E0},{E15,E1},{E15,E6},{E15,E7},{E15,E9},{E15,E10}: begin destport= 3; end {E0,E2},{E0,E3},{E0,E11},{E5,E8},{E5,E11},{E6,E2},{E6,E8},{E6,E11},{E9,E2},{E9,E11},{E10,E2},{E10,E11},{E12,E2},{E12,E11},{E15,E2},{E15,E8},{E15,E11}: begin destport= 4; end endcase end end//R15 endgenerate endmodule
Go to most recent revision | Compare with Previous | Blame | View Log